How to make a Fetch Quest (with multiple items). Game: Fallout 3This is going to be another fetch quest, but this time it'll be directed at Fallout 3, rather than Oblivion. Since there are lots of similarities between the Construction Set (CS) and the GECK, there isn't much point in writing a pure fetch-style quest twice. So, in this tutorial I'll be talking about fetching multiple items rather than just one. I'll also try to illuminate any differences between CS and GECK that we come across, okay?
A lot of the things in this post can be used for the CS as well. So if you make a quest which fetches multiple items in the CS, you should be able to follow most of the steps here.
One way to fetch multiple items is to use "ItemCount," which is a variable often used when multiple items are involved. So today you'll be getting your first lesson in variables, perhaps.
ItemCount, and other variables such as Dead or Timer, can be used to do all sorts of things. Today we are going to be using ItemCount to make our fetch quest bump forward while using a non-linear approach, and also generic (rather than referenced) items. In other words, say we've got three baseballs to find during a quest. We won't have to find these balls in any strict order if we use ItemCount, which frees the Player from following a strict path.
The items also won't need to be "special" (in the sense that they won't need reference IDs), but they will all need to share the same Object Script. So it'll be like picking up three generic baseballs, rather than one baseball specifically referenced (possibly owned) by Three Dog, another specific to Moira Brown, etc.
This lesson assumes you've already studied some of the steps, tips, and notes found in other lessons above, just so I don't repeat myself too much, and save some space.
It also assumes the GECK is already opened, and you've got a mod you're already working with, or at least an idea for a mod.
-----------------------------------------
1).
OBJECT windowGo to Actor Data > Quest. Single left-click on Quest, and all the quests appear in the right window. Right-click > New into this window. Start a new quest.
2a). QUEST DATA
Give your quest a Name, an ID, and Priority of 55. "Start Game Enabled" and "Script Processing Delay" can both be toggled on.
2b). Open up the Script button, which (again) is the button which looks like
[...], and type in the following...
---------------
scriptname aaaFetchQuestScript
short ItemCount-----------
Substitute the words 'FetchQuest' with the name of your quest if you'd like, but the syntax I'll be using today will be "scriptname aaaFetchQuestScript."
We're going to add to that script in a minute, but for now...
2c). Save the script as a Quest in the Script Type scroll-bar. Click OK so the Quest window closes. Save your progress, and then reopen your quest. Make sure your script is in the scroll-bar.
I am going to make this fetch quest a lot more basic than the Oblivion one up above, to save time and space, so I won't go into as much detail about how to create an NPC, how to use the Render window, etc. Study the Vendor NPC post up above, if you need to backtrack. 3a). OBJECT windowYou'll need to make an NPC, unless you already made that vendor from the last tutorial, and want to reuse him or her. If this is so, you can use this guy/gal again, and he/she can be today's fetch quest-giver.
If you do it this way, you'll need to change the Priority of your fetch quest to 60 instead of 55, so the game recognizes that your fetch quest needs to get done
before the vendor quest's dialog (especially Greetings) kick in again. If your NPC is totally new though, you won't have to change this.
I am going to be using the same low-life chem dealer I put into Moriarty's Saloon. This guy will be the one who wants my character to fetch three stacks of Pre-War Money, and bring them back to him. When he gets his three stacks, he will then give my character some caps, and the game will reward some XP.
Ka-ching!, in other words.
From here on, you can use PreWarMoney like I am, or you can edit your own item from Bethesda's Object window. PreWarMoney can be found in the Object window > Items > Misc Items > Clutter > PreWarMoney.
3b). Edit PreWarMoney (or whatever item you're going to want fetched), and give it a new ID, saving this item as a New Form.
Note: It is possible to attach scripts to stuff Bethesda has already made without saving these items as New Forms, but it's just better to make our own ID. This way, our script won't wind up getting attached to every generic Pre-War Money stack (or whatever generic item you're fetching) in the game. Try to keep your own material clean from Beth's, if possible.
3c). Now to write that script. Or start it, at least. Open up your item-to-fetch, click on its
[...] button, and type in the following.
----------------------------
scriptname aaaItemScript
short ItemCount
--------------------------------
You can substitute whatever words you'd like where "Item" is. aaaBaseballScript or aaaPencilScript. Whatever. In my game, the scriptname is aaaPreWarMoneyScript.
3d). Close the script, save it, and click OK, closing your item's panel.
3e). Now, reopen your item, and look for your script in the scroll-bar. Select this script, and press OK.
4a). CELL + RENDER windowsPlace the item and NPC into any cell(s) you like. For convenience, I'm keeping my NPC in MegatonMoriartysSaloon, and placing my stack of edited Pre-War Money into MegatonMensRestroom. My current character is male, you see. Not many NPCs go in restrooms (why should they?), so the money won't get kicked around, yet this cell happens to be a public place, meaning that my character won't have to steal anything.
4b). Single left-click on the item in the Render window, and duplicate it (ctrl + D). Now you've got two items, though they're probably sitting in the same space. Drag one of these away from the original, and duplicate it again, so that there are three in total.
If you are putting items into multiple cells, obviously you won't be duplicating. Ctrl + D is a little trick which only works if each item is in the same cell.
Note: if your fetchable items are different from one another, for instance if you've got multiple items, each with its own ID name, this is okay. As long as the same script gets used for all of these, and that script can also be attached to the item, everything should work.
Some items can't have scripts attached directly to them though. Holotapes are an example. For these items, Reference IDs will need to be used, and then the main script can handle collection of these items. That's for another tutorial, though.
5). OBJECT windowGo back to Actor Data and find your quest. Click on the Quest Stages tab. Put seven stages into the Index. I am using the stages 0, 5, 10, 30, 40, 50, and 100.
6a). Topics tab
Right-click > New into the Editor ID window (Windows 8 users: this is the tall vertical window which doesn't have a name). Find and select GREETING.
6b). Make a greeting which the NPC will start with. "Yo, you got a moment?" is what my chem-dealer will say.
6c). Conditions window: make a GetIsID for your NPC, and
GetStage Quest: 'aaaFetchQuest' < 5.
6d). In the Result Script (End) box, type
Player.SetStage aaaFetchQuest 56e). In the Add Topics box, add whatever unique topic name you'd like. For me, this is going to be aaaFetchTopic.
6f). Right-click > New into the Editor ID window, find your unique topic, and click OK.
6g): Highlight the topic you just created, and add some dialog which the NPC will say. "So I gots these three stacks of bills hidden in the men's restroom... and I needs somebody to go get them for me," is what my chem dealer will say. "I can't go in there myself, 'cause I don't want the sheriff to see me goin' in there."
a). One of the differences between the CS and GECK is we can make NPCs move around in specific ways as they speak to us. Before you click OK, click on the Use Emoticon Animation toggle instead, so that it is off.
b). In the Speaker scroll-bar, look for any animation which seems like it'd be appropriate for the moment. There's a HUGE list in this scroll-bar, and not all animations will work (a animation for an ant or a brahmin, for instance, will not work on a human).
But for instance, I am choosing 3rdP1HPShrugs, which will cause my chem-dealer guy to look as though he's trying to be nonchalant.
Now.... another one of the differences between the Oblivion Construction Set and the Fallout 3 GECK is we can either use the Topic Text slot to move dialog forward, or we can use the Prompt slot, which is right below the Info window. Basically, you can use just one Topic for your entire quest, along with that initial GREETING. Instead of potentially making dozens of new topics, you can instead use the Prompt slot to introduce new dialog for us to click on, once we're back in-game.
I hope that made sense.
It will eventually, if it doesn't at the moment. Basically, the Prompt slot will save us from having to create a bunch of different Topics.
6h). So I am going to leave Topic Text as "aaaFetchTopic," but I'm going to change Prompt to "What is it? I'm not interested in any of your junk."
6i). Go back to the GREETING's Conditions window, and Copy All Conditions found there. Now go to your unique fetch topic, and Paste these conditions in there, changing GetStage 'aaaFetchQuest' < 5 to
GetStage 'aaaFetchQuest' == 5.
Also, type
player.SetStage aaaFetchQuest 10 into the Result Script (End) box.
6j). Toggle Say Once on, unless you want the option to have your NPC repeat the same "Go fetch these items" over and over during Stage 5. (Edit: actually, ignore this, since the setstage causes dialog to move forward, Say Once won't be needed. If the same stage is kept though, Say Once can be used if we don't want dialog to keep repeating/the same Prompt or Topic Text to keep being shown.)
6g). Click OK, closing the quest window. Save, and reopen your quest.
7).
QUEST window > Quest Stages tabNotice I am sort of dancing back and forth between Quest Stages and Topics this time, rather than writing up all the Stages, and then writing all the Topics as I did in earlier lessons. I usually dance back and forth like this as I write quests; and once you get good at writing your own, you won't need to follow any strict sort of path yourself.
Anyway, here is what our quest stages are going to look like.
------------------------------------
Stage 0: Right-click > New into the top Log Entry window, and move on. It'll say EMPTY in there. Just leave it like that.
-------------------------------------
Stage 5: Right-click > New into the top Log Entry box, but this time, type whatever you want into the lower Log Entry box.
Note: Unlike the Oblivion CS, the GECK does not use Log Entry Info when quests get bumped. Instead, the GECK uses Quest Objectives for our in-game quest messages. So, whatever you type into the Log Entry box will be strictly for your own reference, and will NOT appear in the game. Therefore, you don't really need to type anything into Log Entry. It helps to add something in there though, just to keep things organized for your own purposes. Just imagine that you've got dozens of stages, and begin to forget what their significances are as you add more!
Anyway, by now the NPC has greeted our character, but has not told him/her what needs to be done yet. You can simply type "NPC has greeted the PC" into Log Entry.
----------------------------------
Stage 10: Right-click > New into the top Log Entry box again. For your own reference, you can type "NPC tells PC about some items that need to be found, and brought back."
In the Result Script box, type
SetObjectiveDisplayed aaaFetchQuest 10 1. This command is what will cause one of those creepy messages to appear onscreen, once we've reached this stage in the game. The number "1" at the end is
very important; it is what tells the game to flash that message on. Easy to forget that final "1", and then get an error message.
I've done this soooo many times, folks.
----------------------------------
Stages 30 and 40: These two stages are optional, so far as in-game messages go. When the Player finds the first stack of money, the quest bumps from 10 to 30. When he/she finds the second stack, it goes from 30 to 40. Each stage will have its own corresponding message in my game from the Quest Objectives tab, but if you find all these messages distracting you don't absolutely need to add them.
I will simply teach you the most important messages in a moment, which are 10 and 50. If you want to add more on your own, this is certainly possible.
-----------------------------------
Stage 50: Under Log Entry you can type "All items found" into the lower Log Entry box.
Result Script will be....
SetObjectiveCompleted aaaFetchQuest 10 1
SetObjectiveDisplayed aaaFetchQuest 50 1... and these will cause the game to say the message from Stage 10 has been completed, while the message from 50 has just been assigned to us. We have not created these messages yet, but we will.
-------------------------------------
Stage 100: "Items brought back to NPC" can go under Log Entry. And make sure to toggle Complete Quest on.
-------------------
8a). Quest Objectives tab
We're going to type those creepy in-game messages now. Right-click > New into the top window, which is called Objective Index.
8b). Change the number in the Index slot from 0 to 10.
8c). Type whatever you'd like into the Display Text slot. This is what we're going to see flash across the screen, after the NPC tells us of the items he/she wants fetched. So I'm going to type "Find three stacks of Pre-War Money" into this slot, and you can substitute your own material here.
8d). Follow the same steps for the objective which will appear for Stage 50. So during Stage 50, "Find three stacks of Pre-War Money" will show up as COMPLETED in my game, and then my character will get assigned its next mission, which (for me) will be "Return to Chem Dealer in Moriarty's Saloon for reward."
Note:
Working in the Quest Objectives tab can be notoriously slow as you move from window to window. Just be patient!
9). Quest Data tab
Time to flesh out the rest of the quest's main script, heh heh. Open it up, and here is what it'll look like in my game ...
scriptname aaaFetchQuestScript
short ItemCount
Begin GameMode
If (aaaFetchQuest.ItemCount == 1)
SetStage aaaFetchQuest 30
EndIf
If (aaaFetchQuest.ItemCount == 2)
SetStage aaaFetchQuest 40
EndIf
If (aaaFetchQuest.ItemCount == 3)
SetStage aaaFetchQuest 50
EndIf
End----------------------------------------
Not so bad, eh? The quest will bump with each item we find now. However, the game's engine also needs to be able to "see" whenever we pick up one of these items, at the very moment we pick it up.
10). OBJECT windowFind the object you edited earlier. And here is what goes into its script. Again, you can substitute your own words where I currently put aaaFetchQuestScript, if you haven't already done so.
scriptname aaaFetchQuestScript
short ItemCount
Begin OnAdd
If (Player.GetStage aaaFetchQuest == 10)
If (aaaFetchQuest.ItemCount < 1)
Set aaaFetchQuest.ItemCount to 1
SetQuestObject aaaObjectName 1
EndIf
EndIf
If (Player.GetStage aaaFetchQuest == 30)
If (aaaFetchQuest.ItemCount == 1)
Set aaaFetchQuest.ItemCount to 2
EndIf
EndIf
If (Player.GetStage aaaFetchQuest == 40)
If (aaaFetchQuest.ItemCount == 2)
Set aaaFetchQuest.ItemCount to 3
EndIf
EndIf
End --------------------
Tip: Note in that first If/EndIf block I typed in
SetQuestObject aaaObjectName 1. Substitute your own item's name where it says aaaObjectName. What this does is makes your mundane item into a Quest Object, which prevents the player from simply dropping this item twice, and picking it up two more times to bump the quest forward. Although you might not cheat in this manner, this trick will prevent anybody who uses your mod in the future from doing so, and then claiming that your fetch mod is "broken."
You can also change the status of a Quest Object back to zero by typing
SetQuestObject aaaObjectName -1 anywhere that a Result Script box appears in the GECK.
11a). QUEST window > Topics tabOpen up your quest again, and find GREETING. Add the greeting which the NPC says when we return. "Have you got my things yet?" or whatever. Conditions are....
GetStage aaaFetchQuest == 50 AND
GetIsID aaaNPCName == 111b). Click on the topic you created earlier. For me, this was aaaFetchTopic. Make some dialog the NPC will say. "Oh hell yes, you got my things! Here is your reward."
11c). Put something appropriate in the Prompt slot. "I have returned with your things.... bla bla..." Again, this is what your character will say (what you'll click on), once you're back in-game.
11d). Copy All Conditions from the Stage 50 greeting, and Paste them into your fetch topic.
11e). Result Script (End) should have
Player.SetStage aaaFetchQuest 100, and toggle Goodbye on if you'd like the NPC to dismiss your character, without having to click on that awkward "Goodbye" option.
12). Quest Stages tabGo to your final stage, which is 100 (unless you chose some other number). Make sure Complete Quest is toggled on. And here is what'll go in the Result Script box...
SetObjectiveCompleted aaaFetchQuest 50 1
Player.RemoveItem aaaFetchObject X
Player.AddItem Caps001 X
RewardXP X
StopQuest aaaFetchQuest Where it says aaaFetchObject, put the ID name of your fetchable object. Where it says X, you can substitute your own numbers. So in my game, 3 Pre-War Bills being removed, 50 caps are given to my character, and just 5 XP are awarded for him, since he didn't have to work very hard at this one.
13). There you go. Save your work, close the GECK, and always make sure you make an immediate copy of your .esp, or overwrite one already in your backup folder.
This post has been edited by Renee: Jan 31 2023, 04:37 PM