Morrowind Construction Set Quest and Dialog Tutorial
Created for 1024x768

Dave Foster's Morrowind Construction Set Tutorials

The Elder Scrolls III : Morrowind Construction Set Quest and Dialog Tutorial

Page created 30th June, 2009

After seeing how popular the construction set tutorials have been from the number of emails I have received and the number of messages on the newbie tutorial page, I have decided to create a blog where I can answer your questions in full and where other modders can provide feedback on how they are progressing. This blog is called the Morrowind and Oblivion Blog. If you feel that you need help with a more personal touch, then why not try posting your questions, suggestions and useful tips in the open post that I have called 'Please use this post for CS help and general chitchat'. I would like to hear your problems and ideas, so come along and check out the blog. Dave.

This tutorial is to be used in conjunction with the Balmora West mod, and will see you learning how to create a simple quest with dialog and journal entries. It will be quite basic, so it should be considered to be a newbie's tutorial. Having said that, anyone who is a bit flaky with the CS could also benefit from this tutorial. NB. If you are a complete newbie then you will not have read through the basic newbie tutorial called 'morrowind_section1'. You will need to read that tutorial before you're ready for this one since some of the language and instructions will be unfamiliar to you.

We will create a small quest in Balmora West in which the player is asked to perform a task for the owner of the local drinking establishment. His guests have been falling off recently due to attacks from a particularly nasty kagouti. The quest will consist of the initial greeting from the barkeep and his request to go and kill the creature, the player carrying out the request, then reporting back to collect payment. It will have a fair amount of dialog to get you into the swing of things, and will show you how to create the associated journal entries.

This tutorial will describe in detail the processes involved in creating descriptive and meaningful conversations within Morrowind. You will learn how to create a new topic and how to introduce the player to this topic via greetings. You will also learn how to use the info/response mechanism, the speaker conditions and the results returned from the topic dialog.

The Elder Scrolls Morrowind CS Tutorial
  • Step 1

Look at the image above and you will see the sections of the CS Dialog screen marked in red. This screen is an extract from the Five Keys mod and is only here as an example of the various sections. The topics shown on this screen are all the topics for Morrowind, the Five Keys and any other mods we have loaded at the time. It would be as well to ensure that you only have the vanilla Morrowind loaded together with the Balmora West mod to avoid any confusion later in the tutorial. But, just leave that for now and we'll come back to loading the mod in a few minutes.

We will be creating a new topic for our quest in this tutorial, and that topic will appear in the section1 window on the left. The sections are as follows:

1. Topics/Greetings with the topic filter selection tool at the bottom.
2. Info/Response section
3. The dialog as highlighted in the Info/Response section
4. The Speaker Conditions section including the Function/Variable
5. The Result section

So, what are all these sections, and how do you use them? Well, section 1 consists of the set of Tabs that give access to the Topics, the Greetings, the Journal and a couple of others that we will not use here. The topics are the items that you find in-game in Morrowind when you speak to someone eg. My Background. The Greetings are the first thing an NPC says to the player. The Journal holds the quest sequence information i.e. each quest is listed with its sequence number together with information relating to that quest.

Section 2 contains the info/response, which is the dialog associated with the topic. You will select a line in this section and begin typing in the info column. When finished this text will be shown in section 3. As section 3 mirrors what you have typed in the info column, the other colums are a mirror of values set in the Speaker Conditions section 4.

Section 5 is the Result section. It holds values that are going to be passed back to the executable program. These results are such things as setting a journal entry, or modding an NPC's disposition towards the player, or giving the player an item or gold.

  • Step 2

So, now we've gone through the basic screen, it's time to load Balmora West and open it in the CS. Load the mod and ensure it's the latest version called 'balmora_west_v2.1.esp'. If you do not have this version then just download it again from the Balmora West page. Now, open up the Dialog window - Character|Dialogue. You should see something like the image below.

The Elder Scrolls Morrowind CS Tutorial

Notice in the left column that there are ten lines of greetings. Each greeting is put into one of ten categories by the original game, but it doesn't really matter where your mod's greetings go. I chose to put all my greetings into section 1 in order to make debugging easier. You may wish to investigate the categorisation of greetings further, then decide where to put your own greetings. As with the topics, greetings go from bottom to top.

Let's take a little sidetrack may be wondering to yourself about the order for the dialog - being from bottom to top. Well, the reason is the Morrowind executable parses the mod file from top to bottom. In fact, for the greetings section it parses the greeting categories from top to bottom, and the dialog within each category from top to bottom. So now you see why I put my greetings in section 1 - because the executable will find my dialog lines quicker than if they were at the bottom in section 9.

The parsing machanism is looking for the next line of dialog to be presented to the player based on the executable's local store of variables. It needs to find a matching line for it's set of variables, and it does this by examining each line of dialog from top to bottom looking for a set of conditions that match the variables e.g. say, the name of the NPC that needs the dialog is Bob, and the quest id find_bobs_gold. The local variable for the Journal Entry is currently set at 0, which indicates the start of the quest. So, the parser must find a line of dialog where the speaker is Bob, and where the condition is find_bobs_gold=0. There will be just one line of dialog that meets this requirement. When the parser finds the line, it will return the dialog text to the executable, which will print it on the screen.

You need to be extra careful with the order of dialog so as to ensure you do not create a section that allows part of a quest to be skipped. Skipping parts of quests, or even complete quests will not necessarily result in a broken game. But consider, one particular quest might deliver an artifact or quest item to the player, and this item could very well be vital to completing the game. You need to read your dialog lines from top to bottom, like the parser, and ensure that a line is not read out of sequence. You need to check and double check your lines of dialog that relate to vital game quests.

  • Step 3

The first thing we are going to do is to create a new topic for our quest. We need to give it a descriptive name that distinguishes our topic from the all the other topics in the list. Let's call it 'Nasty Kagouti'. Right click in the Topics column and select NEW topic. Call the topic Nasty Kagouti and save it. Notice how the list now adjusts so that you see a new selection of the Topic List around the new topic. The list is in alphabetical order as you might have guessed. There is nothing in any of the fields on the right when you click on the topic. See the image below. Now it's time to create a piece of dialog that will be used by the barkeep when you mention the name 'Nasty Kagouti' in conversation. But, first, let's give the barkeep the initial greeting that will introduce this topic to the player.

The Elder Scrolls Morrowind CS Tutorial

Before the player can ask about a topic he must have it in his list. So he must be given the topic through conversation, or directly by you programming it into the game - more of that later. To give the barkeep the greeting we need to select the Greeting tab at the top of the column. Then select the Greeting 1 entry in the list. This is where the majority of modder greetings are placed. You will see that the top greeting on the right is [You have failed your Oath of Silence]. This is the system greeting provided by the Morrowind team and it should always be at the top. This greeting has an asterisk to show that it has been modified in some way. The way it has been modified is that it has been pushed up from the bottom by five greetings that I have provided for the Balmora West mod. And below those five is a greeting 'Who's there?' which is another system greeting. We place all the greetings for our mod in this list between the 'who's there' and the 'You have failed..' greetings.

The greetings are parsed from top to bottom, so newer greetings in the mods we create are found earlier than those created for Morrowind, for example. The last Balmora West greeting is 'Good day %PCName, it is good to see you again.', just below 'You have failed...'. And the one below is 'Hello %PCRace, is there anything I can do for you?'. Both of these greetings, provided by myself for the Balmora West mod, are general purpose greetings inside the Balmora West Corner Club. Looking at the second 'Hello %PCRace, is there..' greeeting, you will see that there is a conditon set on the right that determines whether an NPC will say the greeting to the player, or not. It is a function called 'Talked to PC' and is set to 0 which indicates that NPC has not yet spoken to the player. If the player talks to this NPC, he/she will give the line of dialog. If the player has already spoken to this NPC then the function will be set to 1 so that a second greeting is given, as per the greeting above 'Good day %PCName..'.

So, the parsing works as follows. The player walks into the Corner Club and decides to speak to one of the NPC's. The parser scans from the top of the greetings looking for a greeting that matches the current status of the player and the NPC's. It looks for a greeting that is a) inside the Balmora West Corner Club' and b) for an NPC. At this stage it does not matter which NPC it is if they do not have a specific thing to say. It's either one or the other - NPC has not spoken to player, or NPC has already spoken to player.

In order the speak to the barkeep and get a specific greeting we would need to name that person specifically by putting his 'ID' into the ID box. So we need to create a new greeting that targets the barkeep directly. The greetings we have already spoken about are general greetings to no specific person, so they should be lower in the list than greetings that target a specific person. So it should be above the two greetings I have just spoken about, but below the 'You have failed..' greeting. Lets give the barkeep the greeting that will result in him giving the player the topic about the Kagouti. Go to the line 'Good day %PCName, it is good to see you again.' and right click on it. An empty line will appear above, and you should type in the following: Good day %PCRace, I've not seen you around here before. And, if it's not impolite of me, I would like to ask whether you would be willing to do me a small favour. There's this Nasty Kagouti that's been bothering the customers, and I see that you look like you could handle yourself in a situation... We then need to target this dialog to the barkeep. His id is 'bw philip brielle'. So, go to the ID box and use the pulldown to find him and select him into the box. We now have to ensure that once he's given this greeting he will not give it again. So we should set the 'Talked to PC' function to 0. See the image below. When you talk to this NPC again he will have the topic regarding the nasty kagouti that he wants you to kill. We will create another piece of dialog for him where his 'Talked to PC' value is 1 and he says something like 'Have you killed the Kagouti yet?'. 'Talked to PC' is the usual way to ensure a greeting is only given once. But there are other ways, as you will see later. Save the mod.

You will see that we have identified the barkeep with the alias 'bw philip brielle'. It is important to give NPC's a unique id, and I do this by tagging the name with 'bw'. All my NPC's are named in this way. It makes listing your NPC's much easier, since all characaters begining with the tag are listed one after the other in sequence. Otherwise, you would find that you would lose your NPC in the horde of other NPC's created by the system.

By putting Philip Brielle in the ID column this effectively makes him the owner of this line of dialog. But, there are others that can be given dialog, and not just a single person. There are further drop-downs that allow you to create dialog associated with various groups of people in Morrowind e.g. Race, Class, Faction and Rank. Should you wish to include a line of dialog that is spoken by all NPC's that are a particular race, such as Dark Elf or Breton, then you would leave the ID box blank and put the name of the race into the Race box. Thus, when you met someone that was a dark elf, he would have the dialog topic in his list. Equally, putting a name in the Cell box would give the topic to all NPC's within that cell. See the image again below for the Philip Brielle dialog.

The Elder Scrolls Morrowind CS Tutorial
  • Step 4

PC Faction and PC Rank are further drop-downs for specifying the faction and rank of the PC. Should the PC be in a particular faction, then putting the player's faction in the PC Faction field will result in the player receiving the conversation that relates to that faction i.e. the NPC will have the faction topic in his list. The same holds true for PC Rank.

Sex and Disposition can also determine whether an NPC will have a topic for the player. Use the appropriate boxes for this. The Dispostion is the minimum disposition that the player must have before the NPC will reveal his topic. If the player does not meet this minimum disposition then the NPC will not talk to the player about the subject. This allows you, the game developer, to decide how much favour the player must earn with an NPC, or group of NPC's, before they will deign to talk to you about a particular topic in their repertoire. If your disposition is too low, or if you are male rather than female, then the NPC will not show this topic in the dialog pane of Morrowind.

  • Step 5

The Function/Variable section of the Speaker Conditions is where most of the decision making process takes place. There are four columns that allow up to six decisions to be made for this piece of dialog. The first column relates to the various system variables such as Function, or Journal etc. By setting this column to one of the pre-defined functions, you are stating that values in the following columns directly relate to this function. Thus, if you set column 1 to 'Journal', you are stating that column 2 will hold the name of a valid Journal Entry as displayed on the Journal tab in section 1. We will describe the journal entries later.

Columns 3 and 4 will state the values of this journal entry. Column 3 is the equality selector and column 4 is the value. Other functions include Global, Local and Item. This means that the conversation will be given should a global or local value be set or not set to a particular value. Or, an item may or may not be in the possession of the player etc.

All the Function/Variable conditions must be met before the NPC will make this particular topic of conversation available to the player.

If the player speaks to an NPC in the game, and the NPC has a topic of conversation that the player initiates, then there will be some kind of result set in the game. This result can take many forms. It can be a result that gives the player an item, or gives the player some disposition with this NPC. Or it can set a Journal Entry, or it can result in a choice being given to the player. The choice function allows for multi-part dialog to be initiated, whereby a number of choices pop-up in the conversation window. The player selects one of these choices, and the dialog continues onto the relevant line higher up the grid. To give the set of choices to the player, you, the game author, will provide choice lines in the result box.

It's probably now a good time to discuss Journal Entries since we will need to use one shortly when we click on the topic 'Nasty Kagouti' and Philip gives you the quest.

  • Step 6

Look at the image below. It is still the dialog screen but we have now selected the rightmost TAB on the list to display the Journal Entry screen. Notice that the Journals are diplayed in the left-hand column in alphabetical order, and that the Morrowind developers have named them with the first two letters of their type e.g. FG for Fighters Guild etc. It is probably a good idea for you to also follow this naming convention so that it makes it easier to find your Journals quickly. Note also that these Journals relate to the quests in Morrowind, and that the Journal Entries are show in the right-hand pane of the window. Each Journal Entry is given a unique Id and is usually started at 10, then progressing up in steps of 10. The reasoning behind this scheme is that you will almost certainly miss out a vital step of the quest line and have nowhere to put it if the entries were numbered sequentially. I have had much experience of this and it is quite a pain. I always put the name of the quest on line 1 of the right hand pane, then number the rest of stages in increments of 10 e.g. 10,20,30 etc. but you do not need to do the same if you would rather find your own style. So, stick to the naming convention and the journal entry numbering scheme as much as you can. If there are three stages in your quest, then you will have three journal entries numbered 10, 20, 30. This fits in with the plan for this mod to have three stages; get quest, do quest, get payment.

The Elder Scrolls Morrowind CS Tutorial

So, let's consider our Journal and Journal Entries for the 'Nasty Kagouti' quest. You can decide for yourself what you want to call it. But, for clarity, I have opted to name the Journal 'BW_Nasty_Kagouti', BW being the initials of the name of the mod, in this instance. Now we must give descriptions to the Journal Entries of our three stages.

Let's give them these descriptions, or descriptions of your choosing:

10 I have been asked by the barkeep of the Balmora West Corner Club to go and kill a nasty kagouti that has been terrorizing his customers. It can be found to the northwest of the inn.

20 I have successfully put down the kagouti that has been causing so much trouble for the landlord of the corner club. I should now return and give him the good news and collect my reward.

30 The barkeep was impressed with the speed at which I got the job done and has rewarded me with 30 gold for efforts.

Enter these into the grid for the Kagouti journal ensuring you put them into the grid in descending order. I have done them as per the image below. You should put the Journal numbers into the Index box as you can see from the image.

The only other bits that are used here are the full line of dialog and the boxes at right-top above the Function/Variable. These boxes are Quest Name, Finish, Restart and Index. If Line 1 has the Quest Name box ticked then you can provide a quest name on the line. It will not be parsed in-game. The Index is the value you see in the disp/index column, and indicates the stage number. The Finished box is ticked for the last stage of the quest.

That's all I'm going to say about the Journal screen. It's quite simple and straightforward, and you will get the hang of it very quickly. Save the mod.

  • Step 7

The most difficult part of building a quest mod is getting the Greetings and Topics to interweave correctly. They are both in their own sections on different tabs, but they must co-operate with each other perfectly, otherwise the greeting you get will not relate to the quest topic that you are about to start - and that is very distracting to the player.

So, let's take a step back now and revisit the time we talk to the barman and he gives you the greeting 'Good day %PCRace, I've not seen you around here before...'. The Nasty Kagouti is mentioned in the greeting, but at the moment, that won't show as a hyperlink that the player can click on until we create a line of dialog for the topic. The line of dialog given by the barman when the player clicks the hyperlink will be as follows:
Do you think you could go and get rid of it for me? I'd be very grateful, and there'd be some gold in it for you. It's in the north-west corner of the swamp by the road.
You will also get a Journal Entry that we created for this line of dialog. The Journal Entry will be as stated previously: I have been asked by the barkeep of the Balmora West Corner Club to go and kill a nasty kagouti that has been terrorizing his customers. It can be found to the northwest of the inn.

The question you're probably asking now is 'How do I write the Journal entry into the player's Journal?'. Well, there is a specific format for the purpose, and in this case it will be as follows:

Journal BW_Nasty_Kagouti 10

This goes into the results box at the bottom of the screen. 'Journal' is the keyword for writing a Journal Entry; 'BW_Nasty_Kagouti' is the name of the topic; and '10' is the stage number. See the image below. Notice that we have an entry in the right hand Function/Variable column that says 'Journal; BW_Nasty_Kagouti; =0'. This is to ensure that we only get the result once. We test to see if the first Journal Entry has been given, if it hasn't then we create the Journal.

The Elder Scrolls Morrowind CS Tutorial
  • Step 8

We've been given the first greeting and asked about the topic for killing the Kagouti. We then received the Journal Entry in the player's Journal. When we talk to the barman again, prior to us completing the task, we want him to say something different since he is waiting for the player to complete his task. Let's create a new greeting for the barman for this situation. Let's make it Hello again, %PCRace, have you killed that Kagouti for me? We will also need some conditions for this greeting so that he only gives it in the right circumstance. i.e. the Kagouti must NOT be dead, and, he must have asked us to kill it i.e Journal Entry is currently set to 10. See the image below.

The Elder Scrolls Morrowind CS Tutorial

Notice the conditions for this greeting, in particular, the "Dead" function - Dead; bw_nasty_kagouti; =0 We only want him to say this greeting if the player speaks to him before killing the Kagouti. If the kagouti is alive then the value of the Dead function will be zero. Also the Journal must equal 10. So, the parser reads the conditions which say: if player has been asked to kill the kagouti and it is still not dead, then say the following to the player as a greeting - Hello again, %PCRace, have you killed that Kagouti for me?'. Save the mod.

  • Step 9

So, it's now time for the player to go and kill the kagouti. You may be wondering how the game will recognize when the player has killed the kagouti, and this is one of the trickiest parts of this quest. We will need to use a small script on the kagouti that determines when it is dead, and which then writes the Journal Entry for us. We'll leave this thorny issue until last, since scripting is not really a topic for the novice modder. Let's just put it to one side for now.

Let's assume that the player has now killed the kagouti and the script has given the player the correct Journal Entry. We now need the player to go back to the barman and tell him he's done the job; then collect his reward. The Journal Entry 20 will have been given and will appear in the player's Journal i.e. I have successfully put down the kagouti that has been causing so much trouble for the landlord of the corner club. I should now return and give him the good news and collect my reward.

The Elder Scrolls Morrowind CS Tutorial

Ok, this screen needs something of an explanation of the results section. You can see the dialog from the barkeep : Well, I'm mighty glad to hear that %PCName, and so quick, too. And, as I promised, here's your reward for a job well done. Thanks a lot, and pop in for a drink and a chat whenever you're in the area - you're most welcome.
A check is made that the Journal has been set to 20 in the function column, and we have the results, one per line, as follows:

  • Journal BW_Nasty_Kagouti 30
  • ModDisposition 10
  • Player->AddItem Gold_001 30

The first line is just setting the Journal to 30 for killing the kagouti. The second line is something of a reward for the player; an increase in the barkeep's disposition to the player, an increment of 10. This means the barkeep will be a bit more accommodating to the player from now on - may tell you things he would not divulge to a complete stranger etc. The third line is the actual reward of 30 gold. Notice the structure of this result. Add 30 of the item 'Gold_001' to the Player. 'Gold_001' is the object for one gold coin and you're giving the player 30 of them. Save the mod.

  • Step 10

Ok, there's one last thing we need to do before creating the script on the kagouti; that's the final greeting for the barkeep once the quest is complete. See the image below.

The Elder Scrolls Morrowind CS Tutorial

The player has killed the kagouti and has received his reward as indicated by the Journal test being for 30 (quest complete). So the barkeep will now say the greeting to the player whenever the player speaks to him.

  • Step 11

Ok, so far, so good. We just need to create the script now on the kagouti to finish the mod. Go to the menu item Gameplay|Edit Scripts and open the editor. In the script editor window go to the menu Script|New to create a new script and type in the following code :
begin Kill_Nasty_Kagouti

if ( OnDeath == 1 )
Journal BW_Nasty_Kagouti 20

Then go to the menu Script|Save to save the script. Save as 'Kill_Nasty_Kagouti'. Now, we need to attach this script to the Nasty Kagouti. So, go to the Object window and select the Creature Tab. Scroll down the list until you find the 'bw_nasty_kagouti' then double click on it to bring up it's properties screen. Locate the script box and use the pull down to find and select the 'Kill_Nasty_Kagouti' script. Click on the Save button to save the properties of the Nasty Kagouti. Save the mod. See the screen below. Finished!

The Elder Scrolls Morrowind CS Tutorial

This concludes the quest and dialog tutorial.

  • Conclusion

In this tutorial, you have learnt how to use the Dialog creation screen to create dialog, greetings, topics and Journal Entries for a quest that you have created.

Here's an updated version of the keyboard shortcuts that you have learnt so far.

  • Keyboard Shortcuts

    • Up, Down, Left, Right------------------- Landscape Editor - move to cell
      H --------------------------------------------- Landscape Editor
      B --------------------------------------------- Borders
      T --------------------------------------------- Zoom to Top View
      C --------------------------------------------- Zoom to Ground Level View
      LShift/Mouse ------------------------------ Move object/s around
      MouseWheel/Move mouse ---------- Move your viewpoint or zoom-in/zoom-out
      Z/LeftMouse ------------------------------- Move object up/down
      CTRL-C, CTRL_V and CTRL-X ------ Copy, Paste, Cut

    You can contact me here if you wish to make any comments or suggestions for further tutorials.

    Here are the other Morrowind Construction Set Tutorials :

    Morrowind House Mod Tutorial 1

    Morrowind House Mod Tutorial 2

    Morrowind House Mod Tutorial 3 & NPC Tutorial

    Morrowind Landscape & Region Tutorial

    Morrowind Faction Tutorial

    Morrowind Faction and Dialog Tutorial

    You can find the Oblivion Tutorials here :

    Oblivion Quest Tutorial

    Oblivion Scenery Tutorial

    Oblivion House Mod Tutorial

    Site is hosted on Unlimited Web space / Unlimited Bandwidth / 10 domains /10 MySql Db per domain - All for just £99.99 a year..