We are your number one source for oblivion files, oblivion mods, oblivion downloads, oblivion guides, cheats and walkthroughs.

Main

Forums
Mod Database
Site Updates
Contact Us

Technical Stuff

How Screenshots
Patches
Improve Performance

Guides & FAQs

Secrets and Easter Eggs
Player.Additem Codes
Game of the year edition
Daedric Shrines
Ayleid Statues
Oblivion Races
Full Walkthrough
Downloadable Content

Official Plugins/Mods

Shivering Isles

Best Mods (Downloads)

Unofficial Patch

Specific Mod Lists

A's List
Ball of Flame's List
Big Quest Lists
Small Quest Lists

Mod Reviews

MorrOblivion
Female Nude Mod
Dragon Mount
Improved Trees & Flora

Modding Tutorials by Lord_Gannondorf

Download full PDF
Introduction
Abbrebiations and Def.
Shortcut Keys
What is ESCS
Installing & playing
Toolbar Descriptions
Windows
Saving and testing mods
Utilites
Tutorials
Tweaking Oblivion

Mod List (ABC)

Mod List A
Mod List B
Mod List C
Mod List D
Mod List E
Mod List F
Mod List G
Mod List H
Mod List I
Mod List J
Mod List K
Mod List L
Mod List M
Mod List N
Mod List O
Mod List P
Mod List Q
Mod List R
Mod List S
Mod List T
Mod List U
Mod List V
Mod List W
Mod List X
Mod List Y
Mod List Z

 

tutorials

Chapter 7 - Tutorials
In this section I will be providing tutorials. I will be getting these of various websites and
giving the original authors credit and I will occasionally write one. These tutorials will
cover the more difficult sections of the CS.
Making a Quest Tutorial:
This is what we will do with this tutorial:
Add dialogue to an NPC.
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.
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.
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!
Oblivion Mod Maker’s Manual
148
Making the quest-giving NPC:
All right, let's start with making the items we need. Add a new npc to a cell. Be sure to
make a new 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.)
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/her quest, which 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. D-Click on him, tick the box Persistent Reference and make a new reference ID
located at the top of the window. Mine is PovTutAlexRef1.
Adding the quest related items:
Make a new key with a new ID… My key ID is PovTutAlexKey1. Now, choose what
item Alex lost. His own iron armour, perhaps? Go to the armour tab and take the iron
armour, change its name in Alex's iron armour and change its ID. My ID is
PovTutAlexArmour1. 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 armour 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 PovTutArmourChestRef
Quest data:
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 on the toolbar to open the quest window. At
the left side you can find all the quests listed.)
Oblivion Mod Maker’s Manual
149
When you are ready, R-Click 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 PovTutAlexArmourQuest1
Now, select the ID you just created. Enter your quest name, mine is Alex's Armour.
Change the priority to something high, 50 is fine. At the quest conditions, search for
GetIsPlayableRace, and select it (don't press enter, it'll close the quest window).
Quest Stages:
That's all for the quest data tab, we will now go to the quest stages tab. At the Index, R-
Click 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 armour. 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 armour back" Again, don't press enter, it exits the quest window.
Now, make a new index again, but with the stage 15. This time, you say: "I found Alex
his armour, I should bring it back to him". Now make one more index, with the number
20, and type "Alex was happy I brought his armour back, and rewarded me with 200
gold." Also tick the box "Complete quest" here. (Also remember to write StopQuest in
the result script box, otherwise the quest is still running in the background and can slow
down your machine)
Quest Topics:
Next thing is the topics. Go to the topics tab and R-Click on a blank spot in the Editor ID,
and choose Add Topic. Then select GREETING and press OK.
R-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 armour, and I want it back." Add another topic
by selecting add topic in the Editor ID, R-Clicking on a topic and clicking on 'new'. Give
it a name. Mine is PovTutLostMyArmour.
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
PovTutLostMyArmour" without the brackets.
What we just did? Well, when Alex greets you with his greeting, the topic
PovTutLostMyArmour 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 armour or anything like that. Click on OK. Now it will say
Oblivion Mod Maker’s Manual
150
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 armour 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 comparison,
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 armour". 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
armour, 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 armour". 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
PovTutLostMyArmour. Change the topic text to "Lost my armour", because you don't
want the player to see PovTutLostMyArmour 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 armour 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 armour!
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 PovTutAlexArmourQuest 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 armour…" And the rest of the text, and the key is added to the PCs inventory.
At the conditions box, once again choose GetIsID with the same ID as with the greetings.
That is Alex's ID!
Oblivion Mod Maker’s Manual
151
Now, right click at an empty spot in the info field and select new. Type: "I hope you will
find my armour" 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 armour, Alex already told
you he lost his armour but you haven't got the armour 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 PovTutAlexArmourQuest 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 PovTutAlexArmour1 1 so you give him his armour
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 armour after you gave it back.
Exit the quest window by pressing ok.
The script:
Now click on the pencil, which will open up the script window.
Click on script, and select new.
ScriptName PovTutAlexArmourScript; this is the ID of the script; 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
PCs inventory, the following thing will happen.
If ( GetStage PovTutAlexArmourQuest == 10 ); If the quest stage is at 10
SetStage PovTutAlexArmourQuest 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 armour (in the object window, not in the chest). At
Oblivion Mod Maker’s Manual
152
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.
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 PovTutAlexArmourQuest == 10.
At the quest target data, select the cell you placed the chest with Alex’s armour in. For
ref, select the ref of the chest you made. Mine was PovTutArmourChestRef 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
PovTutAlexArmourQuest = = 15. At the reference, scroll to the cell Alex is in, and select
his reference. When you take the armour now, and the journal updates to stage 15, the
marker will be placed on Alex, so you can find him.
The End!
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 the quest just talk to the NPC you placed.
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.
------------------------------------------------------------------------------------------------------------
My First Script, Scripting Tutorial:
Refer to The Scripting Window for more information on scripting.
Before we really start writing our tutorial script we should decide what we want it to do!
For this tutorial we are going to make a Riddle Cupboard: The cupboard will ask a riddle
and only the right answer will open the cupboard. If the player provides the wrong
answer, a trap will go off, hurting the player, and the cupboard can't be opened. That’s a
fairly complex undertaking, but we will take it step by step and see that it's not so bad
after all.
Writing the script:
Oblivion Mod Maker’s Manual
153
Once you have the Script Edit window open, click Script -> New.. You should see that
the Script Type is "Object", which is exactly what we want it to be. Click in the main part
of the window, which should now have gone from grayed out to white. This is where
you'll be writing the script.
Naming the Script:
First of all we must give our script a name. Every script must start with a declaration of
that script's name. In the editing field, please type:
ScriptName RiddleChestScript
Note that there are no spaces and no underscores in the name. Your script name must be
one word, so you may not use spaces. Also, Oblivion ignores underscores in the
alphabetical listing of scripts; you may use underscores to make the title clearer for
yourself, but you will not see them when you look to open the script later. (Advanced
scripting information: Oblivion allows something called aliasing in TES Script. This is
where you replace the full name of the command with a shorter version. For instance,
"ScriptName" becomes "scn", or "ForceActorValue" becomes "ForceAV". We will not
be using aliasing in this tutorial, but don't be surprised if you see other scripts that do use
it.) Remember that TES Script is not case sensitive; you could have written "scriptname"
or "ScRiPtNaMe" just as well.
Try to save your script using the Save button in the toolbar. Nothing obvious should
happen, but if you click on the Open button, you should see your script name in the list of
scripts in Oblivion. Click on the X at the top right corner of the Select Form window to
close it and return to the Script Edit window. RiddleChestScript is now the shortest script
possible in Oblivion, but it doesn't do anything right now. Let's change that.
Begin and End:
The Begin and End commands define, somewhat obviously, the beginning and end of
blocks of the script—separate chunks of code that will be performed under certain
conditions. For example, "Begin GameMode" defines the start of a block of text that will
run every frame the user is not looking at a menu. For our purposes, we want an
OnActivate block: one that will run when our chest is activated, but no other times. (It
would get very annoying having to answer the riddle every frame, or every time an NPC
died, both of which are possible using other variants of Begin!) So hit enter twice to
move the cursor down, and edit your script to look like this:
ScriptName RiddleChestScript
Begin OnActivate
; Here we will enter what happens when the chest is opened.
End
Click Save again now. The script still doesn't do anything, but at least now we have
defined under what conditions it will run. There are a couple of things to note here. First,
Oblivion Mod Maker’s Manual
154
we have ended the current block before beginning a new one—not so important when
there's only one block, but as this script gets more complicated we'll need multiple blocks
in a single script. In somewhat more technical terms, Begin/End blocks do not nest. The
other thing to notice is the semicolon ";" on line 4. A semicolon marks the rest of the line
as comment. Whatever you type after the semicolon on that one line will be ignored when
the script compiles. You use comments to explain your code, which can help you and
others understand what's going on inside the script quickly at a later date. If you want
more than one line of comment, you must have one semicolon for each line.
MessageBox Function:
Now we want our trapped chest to ask the player a riddle. For this we use the
MessageBox function, which should look familiar: the My First Script tutorial used a
close relative of MessageBox, the Message command. MessageBox allows us to display
some text on the screen and also to display choices that the player can select from.
Unfortunately Oblivion (like Morrowind before it) has no option to have the player type
in the answer to our riddle, so we will have to give multiple choices. The line for that
could read:
MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"
The first string (the text between the first pair of quotation marks) is the text actually
displayed in the box; the other texts, separated by commas, tell the game to make
"buttons" with the given text displayed one string per choice.
But how do we ensure that the riddle is asked only the first time we try to open the chest
and not every time? We now come to a very central point: the use of do-once conditions
and state variables. Most of the problems that beginners encounter with scripting for
Oblivion have their roots in misunderstanding how the scripts are actually executed and
how scripts should accordingly be structured. So let's have a look at this in greater detail.
Remember to save regularly.
How Object scripts are executed:
Every script that is attached to an object or an NPC (Object script) is executed every
frame the game displays on screen while the cell with the object is active (when indoors
only the cell the PC is currently in is active, when outdoors the PC’s cell and all adjacent
cells are active). So the complete script (not just one line of it) is executed 10-60 times a
second or however fast your computer runs the game! It is best to imagine every local
script wrapped in a big "whileloop":
while (Object is in active Cell)
[Your script code]
endwhile
This is the reason why the following script spits out a continuous stream of messages (if
attached to an object or NPC in the same cell as the player). Try it, if you want:
Oblivion Mod Maker’s Manual
155
ScriptName HorribleMessageScript
Begin GameMode
MessageBox “Thousands of useless messages!”
End
This example is relatively harmless, but imagine what happens if you had used a line of
code that adds an item to the player's inventory, or places a monster next to him, etc.!
For this reason, “Do Once” constructions are very essential and something you will
probably use a lot while scripting for Oblivion. So, let's go on with our tutorial script: we
need to declare a variable and use it to make sure the message is only displayed once.
Change the script to the following:
ScriptName RiddleChestScript
Short controlvar
Begin OnActivate
If ( controlvar == 0 )
MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"
Set controlvar to 1
EndIf
End
Save the script again. Note that the MessageBox command should be on one line in your
script! Do not break it up!
Once again, there are a few things to point out in this latest addition. The "If" command
is there to check a condition—whenever the expression in the parantheses is true the
following lines of code will be executed until the "EndIf" command is encountered. The
"==" checks if an expression on the left of it (in our case the variable controlvar) is equal
to the expression on the right of it (in our case to 0). If you forget the EndIf command
after an If command, the editor will complain with an error message when you try to
save.
"Short controlvar" declares a new variable we'll call "controlvar", of type short. For the
moment it's enough to know that this is variable that will contain integers (whole positive
or negative numbers). A variable is a "placeholder" that can take on different values. The
Set command is also new, but simple enough—it sets our variable that had the value 0
before (all variables start out at zero when declared) to 1. This, in connection with the "If
( controlvar == 0 )" command, provides a do-once condition—the next frame the script is
executed after the variable was set to 1, the If condition will be false and the message box
will not be displayed again.
Saving and preparing the mod:
Now our script is already capable of being run, so lets test it:
1. Save the script and close the script editor window.
Oblivion Mod Maker’s Manual
156
2. Look to the Object Window, and proceed in order through the directories of
WorldObjects > Container > Clutter until you find the object with the Editor ID of
CupboardFoodLower.
3. Now either right-click and choose Edit or double-click the object to bring up its
properties.
4. In the script dropdown menu, select the script you just made RiddleChestScript.
5. Hit OK, save the mod, and quit TESCS.
Note: Pay attention to what we have just done. Editing an object without giving it a new
ID is terrible modding practiceNever do this unless you are sure what you are doing!
The script in-game:
1. Now use Data Files to activate your mod, start Oblivion, and load a savegame.
2. When your game has loaded, bring down the console (usually the key, or
whatever you have to the left of the "1" on the main keyboard) and in the console
type:
player.coc "AleswellInn"
And press enter.
You will appear in the Aleswell Inn, and be immediately greeted by a group of
invisible people. This has nothing to do with the mod, but relates instead to the
author's random choice to use this cell to test the mod (it's near the top of the list
of interiors, so is very easy to find). Click through until you can move, and
approach the cupboard on the wall to your left.
When you activate the cupboard, you should see your messagebox appear on the screen.
Clicking on any of the choices should close the messagebox for the moment, and nothing
should happen when you activate the cupboard again—which is good, because it means
our controlvar check is working like we wanted. (The cupboard is not activating because
we have not included an Activate command anywhere in our script, but we'll come to that
later.)
Quit Oblivion and reload your mod in the CS. Those poor people in Aleswell Inn will
have to wait till some other time to regain their visibility, but such is life being an NPC in
a video game.
Letting the player choose an answer:
Oblivion Mod Maker’s Manual
157
We now need to figure out which answer the player selects, and script appropriate
reactions for right and wrong answers. The function to test the selected answer is
GetButtonPressed. This function returns a number depending on which of the buttons of a
message box has been clicked on with the mouse. It will return "0" for the first button
("Bat" in our example) and 1, 2, 3, etc. for the following buttons, in the order you listed
them in the MessageBox command. Until an answer has been selected, the function will
return –1, so we have to take care of that, too.
The "Activate" function will make our cupboard open; in fact, Activate will simply
trigger the standard action that would usually be performed when you "use" the scripted
object—doors will swing open, NPCs will initiate dialogue, etc. The following update to
our script also demonstrates how you can use a control variable to force Oblivion to
process functions one after the other, although the complete script is processed every
frame of the game: simply increment the control variable and test it in a series of If–
ElseIf statements. This is a very safe way of scripting for Oblivion. It may not always be
necessary, but it's safe.
Please edit the script to look like the following:
ScriptName RiddleChestScript
Short controlvar
Short button
Begin OnActivate
If ( controlvar == 0 )
MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"
Set controlvar to 1
ElseIf ( controlvar > 1 )
Activate
EndIf
End
Begin GameMode
If ( controlvar == 1 )
Set button to GetButtonPressed
If ( button == -1 )
Return
ElseIf ( button == 2)
MessageBox "Your answer was correct."
Activate
Set controlvar to 2
Else
MessageBox "Your answer was wrong."
Set controlvar to -1
EndIf
EndIf
End
Take a look at the new GameMode block that starts with "If (controlvar == 1)". We have
set controlvar to 1 as soon as the cupboard got activated. But OnActivate only runs script
for the frame the object was activated; we must use the GameMode block to continue
checking for the player's choice, since that runs every frame. Now we test for which
button is being pressed. We do this by assigning the new variable "button" a value
Oblivion Mod Maker’s Manual
158
returned by GetButtonPressed. Since the script is still running, even while the game
seemingly pauses to await your decision, we first test if no button has been selected yet—
return tells the game engine to stop processing the script for this frame.
Our correct answer was "Wind", which corresponds to button number two—if button
number two gets pressed, we want to tell the player that he gave the right answer, and
allow Activate to open the cupboard's inventory in the usual way. All other values of
button mean that the player has selected a wrong answer, so we can use the Else
command here. In this case we tell the player what a fool he was and the chest is not
activated.
Now look at the little addition at the top of the script:
Begin OnActivate
If ( controlvar == 0 )
MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"
Set controlvar to 1
ElseIf ( controlvar > 1 )
Activate
EndIf
End
This means that, whenever the cupboard is activated in the future, it will only open if
controlvar is greater than 1. Remember the last paragraph: if the player provides the
wrong answer to the riddle, controlvar is set to –1, so he will never be able to open the
cupboard. But if he knows the right answer, controlvar is set to 2, and from now on the
player can open the chest as often as he likes. 'Save and run your plugin, and test as
described above.
Your first bugs, and the fixes:
If you tested the plugin, you should already have noticed that things do not go quite as
planned. Choosing incorrectly does lock the chest forever, but if the player chooses
correctly the inventory and the correct-answer messagebox come up at the same time.
The messagebox must be cleared before anything else may be done, but it's covered by
the inventory!
Let's try the following (change the corresponding section of your script to look like this:
If ( controlvar == 1 )
Set button to GetButtonPressed
If ( button == -1 )
Return
ElseIf ( button == 2)
MessageBox "Your answer was correct."
Set controlvar to 2
Else
MessageBox "Your answer was wrong."
Set controlvar to -1
EndIf
ElseIf ( controlvar == 2 )
Activate
Oblivion Mod Maker’s Manual
159
EndIf
See how we moved the activate command to the section that tests for controlvar == 2?
This provides a cleaner sequence of events by preventing the two boxes from being open
simultaneously, and as was mentioned above, clean sequences of events can be very
important when scripting for Oblivion—always try to avoid doing too many things at
once! Well, save, run and test it.
Great, now the inventory opens as we wanted, but what is this? We can't close the
inventory! Look above:controlvar was set to two, and remains there since we do not
change it again. Therefore the game now gets continuous "Activate" commands each time
the script is processed (every frame)! That’s why we can't close the inventory—it gets
reopened immediately. So change the following part of the script:
ElseIf ( controlvar == 2 )
Activate
Set controlvar to 3
EndIf
Test the mod again: now everything works the way we wanted. Hopefully you are not
confused from with the above excursion into the process of debugging, but it is a very
important thing to know about—you will constantly have to rethink your scripts and try
different ways of doing it to be successful.
What's missing now? The trap effect, of course!
Adding the trap:
Our cupboard will put a curse on the player if he fails to answer the riddle. First, select
the spell you want to hit the player with: click on the + sign next to Magic, the + sign
next to Spell, and click to highlight Spell. There are quite a few choices here, but for the
purposes of the tutorial we'll use the Mg05FingerSpell15 spell.
With our painful consequence chosen, we need to add it to the player when he chooses
the wrong answer. Edit the script again:
Else
MessageBox "Your answer was wrong."
Cast Mg05FingerSpell15 Player
Set controlvar to -1
EndIf
Note the use of the Cast function. (Advanced scripting information: Cast requires a
calling object to work. We did not include one in our script because it is an Object script,
and will be attached to an object in the game. The script will therefore default to the
attached object when functions require a calling object.)
Now, your script should look like this:
ScriptName RiddleChestScript
Oblivion Mod Maker’s Manual
160
Short controlvar
Short button
Begin OnActivate
If ( controlvar == 0 )
MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"
Set controlvar to 1
ElseIf ( controlvar > 1 )
Activate
EndIf
End
Begin GameMode
If ( controlvar == 1 )
Set button to GetButtonPressed
If ( button == -1 )
Return
ElseIf ( button == 2)
MessageBox "Your answer was correct."
Set controlvar to 2
Else
MessageBox "Your answer was wrong."
Cast Mg05FingerSpell15 Player
Set controlvar to -1
EndIf
ElseIf ( controlvar == 2 )
Activate
Set controlvar to 3
EndIf
End
Ok, now we have our final working script. Congratulations! If you want, experiment a
little more with this script using some of the other functions in TES Script.
------------------------------------------------------------------------------------------------------------
Making your first NPC Tutorial:
In this tutorial I will be guiding you through making your first NPC. I recommend
reading the NPC Window before here, as I will not be giving a whole lot of detail.
Make sure you have a new NPC window up.
A rundown of the NPC:
Before I begin creating an NPC I like to write down what the NPC is going to be named
and some other general details. This NPC is fairly basic; here is the rundown of the NPC
we will be creating:
Name: Tracey
Sex: Female
Race: Imperial
Oblivion Mod Maker’s Manual
161
Class: Warrior
Description: Tracey is a young woman in her early twenties; she wears a full suit of steel
armor besides the helmet; and wields an Iron Battleaxe.
As I said, this is a very basic NPC. If you were making a large mod you would write
down how she looks, what her schedule is and various other things.
Creating the basics of the NPC:
Ok, first give your NPC an ID; make sure that it’s unique. (If I were to make an ID I
would type: LGDTracey Why? My Online Name is Lord_Gannondorf. The L stands for
Lord, the G for Gannon and the D for Dorf. And Tracey is the NPCs name.) Doing this
will make you mod have less chance conflicting with another mod making the two
unplayable.
Just below the ID box is the Name box, put the NPCs name here, Tracey.
Next we want to give Tracey a class, we want her to be a warrior; so in the Class drop
down box find Warrior and select it.
A bit further down we will see Level, give her a level of 7, and to the right of the window
check the box that says ‘Auto Calc Stats’. As you see most of the stats tab is grayed out
and her stats have been automatically calculated.
Next change her race to Imperial, and check the box that says ‘Female’.
Filling the NPCs Inventory:
Now that we have done the basics we need something for her to wear! At the top of the
window click on the ‘Inventory’ tab. Now, keep the NPC window up and navigate
through the Object Window until you have found armor. Look through the armor list
and click on steel. Then drag and drop SteelBoots, SteelCuirass, SteelGreaves and
SteelGauntlets from the Object Window to the NPCs inventory. Navigate through the
menus again and find WeapIronBattleAxe under weapons and drag it into her inventory.
She will now have the armor and weapon in game.
Finishing of the NPC:
Ok, so now we just have to finish off Tracey. Click on the ‘Face’ tab; to the very bottom
of the window you will see the drop down menu that let’s you select her hair, select any
hair you wish.
Oblivion Mod Maker’s Manual
162
Move around the age slider until she looks about 20 years old, then move the complexion
slider to make her look even better. Mess around with this page and then read the next
paragraph.
We are almost finished, next click on the ‘Face Advanced’ Tab, you will see a list of
selections to the left and a slider beside them. Click on ‘Brow Ridge – high/low’, now
move the slider up and down and you will see her eyebrows go up and down; neat eh?
Mess around with these settings until you are satisfied. Your window should now look
something like this:
The End!
There are a lot more features of NPC editing than we explored here! Have a mess around
and see what you can figure out, hope you enjoyed the tutorial!
------------------------------------------------------------------------------------------------------------
Enchanting your First Weapon Tutorial:
In this tutorial you will learn to put a simple enchantment on a steel Longsword, the
enchantment will be frost damage. So, lets begin:
Getting the Weapon Ready:
Go to Items->Weapon->Weapons->Steel and find WeapSteelLongsword and D-Click on
it. Change ID of the weapon to something unique. (If I were to make an ID I would type:
LGDFrostBite Why? My Online Name is Lord_Gannondorf. The L stands for Lord, the
G for Gannon and the D for Dorf. And Frost Bite is the weapons name.). Make sure you
also change the name of the weapon to Frost Bite.
Now we have done that click ‘Ok’, a message will appear asking if you want to create a
new form. Press yes to create a new item.
Oblivion Mod Maker’s Manual
163
Creating the Enchantment:
Now go to Magic->Enchantment and R-Click in the list and press new, give the
enchantment an ID; mine is LGDFrostBiteEnch (LGD – Lord_Gannondorf, FrostBite –
Weapon Name, Ench – Enchantment.)
Make sure the ‘type’ drop down box is set to Weapon otherwise the enchantment won’t
work. R-Click in the effects list to the right and press new. The Effect Item window will
pop up; change the effect drop down menu to Frost Damage. Next change the magnitude
of the effect to 15; the magnitude is how powerful the Frost Damage is. Press ‘Ok’, then
‘Ok’.
Giving the weapon the enchantment:
Find the weapon that we created in the Object Window and D-Click it. In the Enchanting
drop down box find the enchantment that we just created, just below the enchanting drop
down box you will see Enchantment. Put 1200 in here; this is the enchantment power of
the weapon.
The End!
Now just place the weapon in the game and you are ready to go! Hope you enjoyed the
tutorial.
------------------------------------------------------------------------------------------------------------
Making a House Tutorial:
In this tutorial I will try to teach you how to make a house in the CS.
Ok, first we need to decide what house design is going to be, what sort of furniture will
be in the house and what sort of miscellaneous objects (food etc.) will be in the house.
This is a basic layout of the house:
The house is a low-end design (waterfront), which doesn’t contain a basement.
There needs to be at least one bed for the player to rest in, preferably a single-bed,
the house will be designed for a warrior character, there will be weapon stands,
hay targets, etc. The objects will not be placed neatly around the house; they will
be ‘thrown’ around and the house will be messy. The house is located just outside
of the Imperial City in the small farm town ‘Weye’.
Now that we know what we want in the house we should start building it! Let’s start by
creating the interior cell for the house. To find the Cells Window go to World->Cells.
Oblivion Mod Maker’s Manual
164
Once the window has opened R-Click in the list to the left and click new; give the house
an ID, for this tutorial we will make the ID: ‘MyFirstHouse’.
The Common Data tab is fine so let’s move on to the lighting tab. Here is where you can
adjust lighting in the cell, add fog etc. In ‘Ambient’ Give R, G and B the following
values:
R: 35
G: 40
B: 50
This determines the lighting for the cell; if you keep all these values at 0 the room would
be black; but we still need to add candles etc. Next go to the Interior Data tab, in the
name text box type: My Shack. This is the name of the cell in game.
Now we have the cell ready to place objects in. Find the cell in the Cell View Window
(Not the Cells Window!) and D-Click it; this will load up a blank cell in the Render
In the Object Window we need to find the interior for the house, go to WorldObjects-
>Static->Architecture->LowerClass->HouseLowerInterior01 to find the house. Once you
have found it drag and drop it into the render window. You will see the interior of the
house sitting there, now we need to add some furniture.
In the Object Window find Static->Clutter->LowerClass->LowerClassTable0. Once
again drag and drop the object in the render window. You will see the table appear in the
render window, it may not be in the exact place you want it to be; to move it around hold
L-Click on the object and move your mouse. But, how do you move the table up and
down? All you need to do is hold ‘Z’ on the keyboard. Look at Shortkeys for more
information.
Now that we have the table there we need a chair to sit on, go to WorldObjects-
>Furniture->LowerClass in the object window. Here is where all the beds, chairs etc are.
If you drag and drop a chair into the object window you will see what seems to be a
‘ghost’ sitting on the chair and one to the left, right, front or behind it. The ghost on the
chair is where the player will be sitting and the other one is which way the player will get
on the chair when it’s activated. Choose a chair and sit it near the table, you can also add
a bed in the house while you are adding the chair.
Now you know how to clutter your house with furniture, all you need to do know is add
objects (food, cutlery etc) to the house. You will find all of these items under Items-
>MiscItem in the object window.
Once you have cluttered your house we need to make the house accessible from the
outside. First we need to add a door to the interior, in the object window go to Static-
Oblivion Mod Maker’s Manual
165
>Door->LowerClass->DoorFullLower and drag it into the render window. Make sure you
position the door in the ‘door hole’.
Now for the outside, on the cell view window set the World Space drop down box to
Tamriel, in the list find WeyeExterior and D-Click it. Find an empty space here
somewhere and place the exterior of the house (WorldObjects->Static->Architecture-
>LowerClass->HouseLower01). Once you have placed it put another door in the door
hole.
Now we need to ‘connect’ the doors so the player can get to the interior. D-Click on the
exterior door and click the teleport tab, check the Teleport check box and change the Cell
drop down box to MyFirstHouse and set the reference to DoorFullLower.
Now the doors are linked but we still need to position the teleport markers, click on View
Teleport Marker and move the selected Teleport Marker to the correct place (The teleport
marker controls where the player appears when the door is activated). Position both door
makers correctly.
You are now ready to test your house in game, remember to activate the plug-in in the
Data window in the Oblivion Launcher

May 28, 2008 Posted by Jeremy| Tags: Oblivion, mods, html | Comment in the forum


Friends

The Music Lyrics Archive
Max Crysis
HTML Forums
File Xing
Xclix - quik $$$

Sponsors

Design (C) Jeremy Judkins