Oblivion quest tutorial
From Nexus Wiki
Welcome to Povuholo's quest tutorial. That's me :) I know how complicated the Construction Set can look like, especially the quest system. When Oblivion was released and I looked at the system, I had no idea what to do. But after reading a tutorial (which had mistakes in it, by the way :P ) I sort of started to get it. With the first few stages I kept the tutorial page open so I could check whether I was doing it right, but suddenly I just understood it.
Anyway, this isn't a story about me, this is a quest tutorial. This is what we will do with this tutorial:
- Add dialogue to an npc (Non Playable Character, everyone else but you in Oblivion)
- Making the journal update by picking up an item, or talking to an npc.
- Receiving an item (key) from an npc, so you can find the item he lost.
- Receiving a reward from an npc, for giving that item back.
- And those things without any mistakes (like giving the key or the reward multiple times 0.o)
- Add quest markers, so the player knows where he has to go.
Before we start, I want to make sure you know a few basic things, which I won't explain in this tutorial.
- Being able to make new npc's and items by changing their ID.
- Being able to place such npc's and items in the cell you want.
- Being able to create a new container (chest), and place an item in it.
- Being able to read English. ;)
If you don't meet the first three requirements yet, take a look at this site:Link
And a tip before we start: SAVE OFTEN. The construction set often crashes when you do something wrong, or even when you do something right! So save often!
Making the quest giving npc
Alright, let's start with making the items we need. Add a new npc to a cell. Be sure to make a new ORIGINAL and UNIQUE ID.
This is wrong:
NPC1 MyNPC Quest
This is right: povtutAlex1 (pov stands for Povuholo, that's me. Placing that in front of all your id's won't just make the ID unique, it will also make it easier to find in the object list. Tut stands for Tutorial, which is the name of my mod. So my ID's always look like this: My name+my mod name+my object, or My name+my mod name+ name of the item's owner+my object.
Of course this is just how I do it, you should make your own ID's. Just make sure they are unique, we don't want anyone else use the same ID for his quest, that will probably prevent both mods from completely functioning.
So add the new npc (mine is called Alex) to a cell. Let's say the imperial city market district. Double click on him, tick the box persistent reference (if possible) and make a new reference id. Mine is povtutAlexref2 (something went wrong with 1 when I was messing around)
Go to objects and find the key tab. Make a new key with a new ID… My key id is povtutalexkey1. Now, choose what item Alex lost. His own iron armor, perhaps? Go to the armor tab and take the iron armor, change its name in Alex's iron armor and change his ID. My ID is povtutalexarmor1. You could also check the box of Quest Item, which makes sure the player can't drop the item.
Now add a new container, a chest. You can change its name, but if its name is Chest already, you can just keep it that way. Or you could change it into Alex's chest, whatever you want. My ID is povtutAlexchest1. Now, place the iron armor in the chest, and go to the lock tab of the chest. There you change the lock to "needs a key", and choose the key you've created a minute ago as the key which can unlock it. Now, you place the chest in a cave, or wherever you want. Then click on the chest, tick the box 'persistent reference' and add a reference ID. mine is povtutarmorchestref
Phew... That was the item creating part. Now we are going to the part you came for in the first place, the quest itself! Click on the Q, to open the quest window. At the left side you can find all the quests, you can look at a few to see how they work. Just don't change anything ;)
When you are ready, click with your right mouse button on one of the quests in the Editor ID box, and click on "new" A small window will open, where you can enter your quest ID. Again, make it unique. Mine is povtutAlexarmorquest. (1)
Now, select the ID you just created. Enter your quest name, mine is Alex's armor. Change the priority to something high, 60 is fine. At the quest conditions, search for GetisPlayableRace, and select it (don't press enter, it'll close the quest window). I have no idea why GetisPlayableRace has to be there, but every quest has it, other tutorials say to do so, it has no weird side effects so you don't have a reason not to do it.
That's all for the quest data tab, we will now go to the quest stages tab. At the Index, click the right mouse button and select new. Set it to 10. The text you add to the Log Entry, is the text you will see when your journal updates. I wrote "I met Alex, a man who had lost his armor. He asked me to find it. It is supposed to be in a locked chest in [write the name of the cell you placed the chest in here]. He gave me the key. I should try to find this chest, and give him his armor back" Again, don't press enter, it closes the quest window.
Now, make a new index again, but with the stage 15. This time, you say: "I found Alex his armor, I should bring it back to him". Now make one more index, with the number 20, and type "Alex was happy I brought his armor back, and rewarded me with 200 gold." Also tick the box "complete quest" here.
Next thing is the topics. Go to the topics tab. Click with your right mouse button on a blank spot in the editor ID, and choose add topic. Then select GREETING. Press OK.
Right click with your mouse on one of the empty fields at the info box, and click on new. Type: "Hi, could you help me? I lost my armor, and I want it back." Add another topic by selecting add topic in the editor ID, right clicking on a topic and clicking on 'new'. Give it a name. Mine is povtutlostmyarmor.
To the right, there are a few empty fields, with the words add topic above them. DO NOT use this to add topics. There is a bug in the CS that makes multiple mods that add topics that way conflict, so they won't work. Instead, go to the result script and type: "addtopic povtutlostmyarmor" without the brackets.
What we just did? Well, when Alex greets you with his greeting, the topic povtutlostmyarmor will be added to his topic list, so you can ask him about it.
Now, at the conditions part of the window, click on new. At the function select getisID. At the parameters, click on INVALID. It will give a long list. Remember the npc you made? Type the letters of his ID (that's POVtutalex for me) and you will find it. Make sure you select the npc, not the armor or anything like that. Click on OK. Now it will say getisID povtutAlex1 = = 1. 1 means yes, 0 means no. This means that when the npc you talk to has the ID povtutalex1, he will select this greeting. If you don't do this, every npc in the world will say this greeting!
Of course, we don't want him to say this when he has his armor back already! So select new again from the Conditions part of the window. This time select the function getstage. Click on Invalid, and search for the ID of your quest. At the comparion, choose the symbol < . At the value, type 10. This means that Alex will only say this if the quest stage is smaller than (<) 10!
Add a new greeting with the text "Please find my armor". Go to the conditions and do the same as last time with GetisID. For getstage, choose the same quest, but select the comparison = =, and choose the value 10. So when he has asked for you to find the armor, but you haven't found it he will say this. = = means "equal to" So it does this when it's 10, not higher or lower.
Now, add one more greeting with the text "thanks again for finding my armor". Same getisID again. For GetStage, select = = 20.. Don't forget the quest ID of course!
Now, at the editor's ID of the topics (where the topic GREETINGS is) right click, and select add topic. Choose the topic you created at the first greeting, for me that was povtutlostmyarmor. Change the topic text to "Lost my armor", because you don't want the player to see povtutlostmyarmor as the topic, right? At info, right click and select new.
Now you will enter the text that will be shown when you click on this topic. Type something like "I've lost my armor when I was hunting in [write the name of the cell you placed the chest in here]. I placed it in a chest and locked it, to see if any bandits came to steal it.. But then I was attacked, and ran back here without taking the armor! Could you please get it from me? Here is the key for the chest."
If your text is too long it might not fit into the box. Just press ok (just make sure you did finish the sentence), right click with your mouse at an empty field in the response text and type the rest of the text.
At the result script, type "setstage povtutalexarmorquest 10" without the brackets. Then press enter and type player.additem povtutalexkey1 1
The ID of the character who gets the item is first (for the player, that's just player) then comes a dot, then additem. Then a space, then the ID of the item you want to give, in this case a key, and then how many you want to give to the player. So when this text is said, you will get a journal update at stage 10, which says: "I met Alex, a man who has lost his armor…." And the rest of the text, and the key is added to the players inventory.
At the conditions box, once again choose getisID with the same ID as with the greetings. That is Alex's ID!
Now, right click at an empty spot in the info field and select new. Type: "I hope you will find my armor" Choose the same ID as with the greetings, and with getstage do = = 10. So this text will appear when you click on the topic lost my armor, Alex already told you he lost his armor but you haven't got the armor back yet.
We are almost there… Right click and select new at info again, and type "Wow! You found it, thanks! Here is your reward!"
Same getisID, at getstage do = = 15.
At the result script, type setstage povtutalexarmorquest 20 and type player.additem gold001 200 . Gold001 is the ID for gold, by typing 200 behind it you give 200 gold! And of course type player.removeitem povtutalexarmor1 1 so you give him his armor back!
Add another line to the info field and type "It's not lost anymore!" Same getisID, for getstage do = = 20. This is the text that will be shown if you ask about the lost armor after you gave it back. Exit the quest window by pressing ok.
Now click on the pencil, which will open up the script window. Don't worry; it'll be short and painless. ;)
Click on script, and select new. This ( ; ) symbol can be used to place a description next to a script line, to explain it without changing the script.
scn povtutalexarmorscript; This is the ID of the script. SCN means script name. This should always be on top of your scripts.
Begin OnAdd; When the item this script is placed on (we will do that next) is added to the players inventory, the following thing will happen.
if ( getstage povtutalexarmorquest == 10 ); If the quest stage is at 10 SetStage povtutalexarmorquest 15; Set it to 15. Endif; Just a standard thing you have to type when you used "if" endif End
Press save and exit the window.
If for some reason your script won't work (gives errors when you try to save it), remove all the text behind the ; symbol. It should work though Don't press enter in the middle of a script line either. Now, find Alex his armor (in the object window, not in the chest). At scripts it should say NONE. Scroll through it until you find your script. Select it and press OK.
At this point, if you would start playing the quest it will work. But I will show one more thing to make the quest easier: Quest markers.
Open the quest window. And click on quest targets. At target ref, right click with your mouse and select new. At the conditions add getstage povtutalexarmorquest == 10.
At the quest target data, select the cell you placed the chest with alex's armor in. For ref, select the ref of the chest you made. Mine was povtutarmorchestref If it isn't in the list, go to the chest in the cell, select it and see if the box "persistent reference" is ticked, and if you made a reference ID. If not, do so. Now, when the quest's stage is at 10, the marker will be placed on the chest, so the player can find it.
Make a new line at the quest target ref. At the conditions, do getstage povtutalexarmorquest = = 15. At the reference, scroll to the cell Alex is in, and select his reference. When you take the armor now, and the journal updates to stage 15, the marker will be placed on Alex, so you can find him.
That's it. You've just created a quest. Remember that everything you've made won't appear in game unless you select your mod at the data files when loading Oblivion, so do that first before testing! To start just talk to Alex.
Maybe you could try to make another quest, and don't look at the tutorial too much. It's a good way to learn. And I'll say this again: SAVE OFTEN! If you mod for an hour without saving and the construction set crashes, you're likely to get frustrated.
If you have any questions about the quest system or anything just send me a message at the Tessource Forums.