Part 3: Creating Dialogue

[Note that this page is outdated! See the new page on the wiki instead: https://wiki.project-tamriel.com/wiki/Simple_Quest_Tutorial]

Dialogue Basics

Writing out the dialogue is arguably the biggest part of the quest creating process that also requires the most creativity. Tips for writing good dialogue is not the intent of this tutorial, and so I will be keeping this mainly to how to handle all the logistics of implementing dialogue using the Construction Set.

Topics-Based Dialogue vs. Tree Dialogue

The first thing to understanding Morrowind dialogue is that it is TOPICS-BASED Dialogue, rather than the Tree Dialogue you may be used to in other games like Skyrim or Neverwinter Nights. What this means is that the dialogue is organized by topics which the player can pick out of a list to ask the NPC about. The flow of conversation and how the player character is asking about the topics is largely left up to the player’s imagination.

This contrasts to Tree Dialogue, where the writer of the game has taken the liberty to write out exactly what the player character is saying to the NPCs. While Tree Dialogue is possible to code into Morrowind’s engine, the writing of it has to be done carefully so as to allow the player the flexibility of roleplaying their character however they want. 

Top-Down Processing

Besides being topics-based, the other important thing to understand about Morrowind dialogue is that the game engine processes dialogue in a top-down fashion. When you open up any Topic in the Construction Set, to the right you will see a window that lists all the possible responses for that Topic, called Responses. The engine goes through these Respones from top to bottom, checking to see if each Response matches the parameters you've given in the Speaker Conditions section. It stops once it finds one that does match, and this is what gets spit out at you in the game itself.

As far as developing quests goes, we then have to be very careful of tagging each Response with conditions so that it shows up only when we want it to. The engine will pick the first response it sees that even remotely matches the right conditions, meaning the most general Responses should be put at the very bottom of the list.


(This is just an example of the Speaker Conditions box. Don't actually create this. If you like, see if you can sharpen your modding skills and determine when this Response would show up, based on the parameters!)

Below is a quick list of possible parameters and when you might make use of them:

ID

Here you can pick the ID of a particular NPC. Once selected, only this NPC can say this Reponse.

Race

This narrows down the speaker to a particular race. For instance, you may want to write out a response that makes use of Khajiit's special grammar, and only give it to Khajiit.

Class

Similarly, speakers can be narrowed down to a particular NPC class. For NPCs, classes also are often the NPC's profession, so be sure to check out the available list of classes to see which ones may be most applicable.

Faction

This limits the dialogue to NPCs who only belong in a certain faction. Remember that NPCs can only belong to one faction at a time.

Rank

This limits the dialogue to NPCs who have the rank selected, or a higher one. A faction must be chosen first before this option becomes available.

Cell

This limits dialogue to only appear when the NPC is placed in the given cell, or any of the cell's child cells. This is most useful for rumors that only appear in certain towns, or for NPCs making comments about the building they're in. If the NPCs move out of the cell, the dialogue will no longer show up, so you want to be careful selecting this option if the intended speaker(s) move(s) around.

PC Faction

The player has to belong to the selected faction for the dialogue to become available. 

PC Rank

The player has to be of a certain rank for the dialogue to become available. You must first choose a faction for this option to become available.

Sex

This is to limit the dialogue by the NPC's gender. (For dialogue that is based on the player's sex, see Function/Variable)

Disp

This stands for Disposition, or the number in the blue bar that denotes how positively the NPC sees the player ingame. For this dialogue to appear, the NPC's Disposition number must be greater than or equal to the number in the Disp box. 

Function/Variable 

This section has a series of boxes that allow you choose more complicated variables than the ones above. I've listed out some of the more commonly used ones below.

Item

The player must have the specified number of Items. Note that generally you do not want to use the = operator, or else the player must have exactly this amount of items, no more and no less!

Journal

The player must be at the specified stage (index) in the quest journal. A majority of your dialogue entries for quests will make use of this function, so I will go into how to make use of this later. Note that you can specify the quest as well as the index. This is particularly useful for making quests that are part of a series, or refer to events that went on in other quests!

Function > PC Race

The player must belong to the specified race. Note that the value for race is only set once in character creation, so this function may break when working with mods that add more playable races. Each number refers to the races in alphabetical order, like so:

1 Argonian
2 Breton
3 Dark Elf
4 High Elf
5 Imperial
6 Khajiit
7 Nord
8 Orc
9 Redguard

Function > PC Sex

The player must belong to the specified gender. Males have a value of 0, while Females have a value of 1. (Not to be taken literally, ladies; you're always #1 in my heart anyway!)

Function > Weather

This dialogue only shows when the weather of the appropriate sort is happening outside. Very useful for Khajiit complaining about the rain! This may not work as intended while in an interior cell.

0 Clear
1 Cloudy
2 Foggy
3 Overcast
4 Raining
5 Thunder
6 Ash
7 Blight
8 Snowing (Bloodmoon required)
9 Blizzard (Bloodmoon required)
Okay, that’s great and all, but where do I start?

That, my friends, depends on how you like to write dialogue!

Different quest writers will do this step differently. Some will start with the topics they want to fill in and write to suit; others will just write out a natural conversation and then pick their topics based on what they’ve written. In TR, you may find all the dialogue written out already by another writer in the Claims Browser.

Whichever route you choose, you'll want to create the topics for your dialogue next. As far as my Kevaar Finds A Shiny quest is concerned, I then want to pick a few topics that the player will be using to speak with the NPCs involved in the quest. Good quest design normally has three different kinds of topics. I will go through these one by one.

Main Topic

The main topic is used for starting the quest and moving it along its updates. For sake of simplicity, you generally want to keep this to a single topic that is completely unique to your quest.  

Creating the Main Topic

For my simple quest, I have decided that the main topic that starts the quest is called “ring I found”, since just "ring" would probably be too general and already in use by another quest. To create this topic, I first right-click anywhere in the Topic list and select “New”. (It does not matter where in the list you click to do this). I then type in my topic exactly to be “ring I found”—misspelling this could mean my topic doesn’t appear correctly, and as there is no way to edit a topic name once made, I want to be very careful I get this right the first time!

Once the topic is created, I navigate over to the Responses tab and right-click to create a new Response. In the top box, I write out what I want Kevaar to say about this topic:

Then I fill in the Speaker Conditions. For instance, I want to make sure this Response only comes from Kevaar, and so select him in the ID box. I also want to make sure it only appears before the player is on the quest, so I fill in a Functions/Variable slot with Journal "Quest_ID" < (is less than) 10.
 

 

Pro Tip: The Conditions I chose here should be specific enough that the Response doesn’t shows up when I don’t want it to, but I might want to give some thought to peculiar circumstances. For instance, if Kevaar were to have a script that made him appear in Vivec every Morndas, would I still want him rambling on about the ring he found while in Vivec? If I didn’t, I’d also want to select the Cell to only read Seyda Neen or perhaps more specifically Seyda Neen’s Lighthouse.

Now, as this is my main topic, I also want to add Responses in here that will appear at all stages of the quest to progress it. A good rule of thumb is to have a Response for each of these general stages:

  1. When the player first asks Kevaar about the quest.
  2. If the player rejected the quest.
  3. When the player has accepted the quest and the quest is still in progress.
  4. When the player returns to Kevaar for their reward (quest completion).
  5.  After the player has completed the quest successfully.

Getting these steps to appear at the right time means making wise use of the Journal. Remember the Journal index numbers we chose? (If not, be lazy and click on the dialogue button in the toolbar again. You can have several of these windows open at once!) We use these to reference which stage of the quest the player is on, using the Journal function and simple mathematical logic. My list of responses for the "ring I found" topic now look like this:

Or, in plain text, like this:

Journal "TR_KevaarShiny" = 10
Have you figured out who owns the ring yet?

Journal "TR_KevaarShiny" = 50
You know who it belongs to? Excellent! I'll return it to them. Don't you worry!

Journal "TR_KevaarShiny" >= 60
Thanks for all your help finding the owner of the ring!

Journal "TR_KevaarShiny" < 10
Yes! I found it in a barrel on the docks. I wonder who was lazy enough to leave it there? Ask around town and see if anyone's missing a ring!

Note that the entries that include the < and >= operators are at the very bottom of the list, as they are less specific than the ones with the = operator! After finishing all the “ring I found” Responses that are specific to Kevaar, I want to consider the other NPCs that are involved in the quest. In my quest design, I see that I wanted the player to talk to the NPCs around Seyda Neen to find the rightful owner. To do this, I create another Response.

Then I fill in the Speaker Conditions to have Seyda Neen for the Cell condition. This means all NPCs located in Seyda Neen will have this Response. As this is a less specific Response than Kevaar’s dialogue (and eventually, Fargoth's), I want to move it to be UNDER his in the list, or else Kevaar will say this instead of his own personalized dialogue. I do this by selecting the Response in the Response box and using the Left or Rught arrow keys to move it up or down. 

Next, similar to Kevaar’s response, I want to consider writing Responses that are applicable to each quest stage. So long as I am sure to tag each Response with the Journal Function, it is not necessary to write a Response for each stage—the topic will simply not appear when there is no Response for it. I do, however, want to make sure all the Responses are ordered correctly so that the most general greetings are at the bottom. So I might have this:

Journal "TR_KevaarShiny" == 10
"I hear Fargoth has lost a ring recently. Why don't you ask him?"

Journal "TR_KevaarShiny" == 50
"I'm glad you found out who owned the ring. Has Kevaar given it back yet?"

Journal "TR_KevaarShiny" < 10
(I do not have to write out an entry for this journal index, as the player will come across the "ring I found" dialogue first through Kevaar. Giving other NPCs a Response to this before the quest begins may lead to this dialogue randomly showing up before the player discovers the quest.)

Journal "TR_KevaarShiny" >= 60
(This is another journal index that I don't have to write a response for, as it handles any dialogue that might show up once the quest is completed. Memes not withstanding, I don't imagine other NPCs will have much to say about Fargoth's ring after its returned to him, and so not creating a response for this will mean this topic will disappear for other NPCs.)

The final NPC included in the quest is Fargoth himself. Like Kevaar’s dialogue, the only Speaker Conditions I need to worry about is the ID and the Journal function. I also want to make sure the Responses are higher in the list than the more general responses tagged for Seyda Neen. (It should not matter whether they are higher or lower than Kevaar’s Responses.) These are the ones I added:

Journal "TR_KevaarShiny" < 10
(Like the Responses tagged to Seyda Neen, there is no reason for Fargoth to have a topic about the "ring I found" until the quest starts, so I will not create a Response for this journal index.)

Journal "TR_KevaarShiny" == 10
"Kevaar what? He found a ring? It's my ring, I'm sure of it! Please give it to me."

Journal "TR_KevaarShiny" == 50
"Please go talk to Kevaar. Make him give me back my ring!"

Journal "TR_KevaarShiny" >= 60
"Thank you for helping me find my ring! Again..."

Now the topic "ring I found" looks nicely populated with new dialogue Responses! Check once again that your Response order is correct, and be sure to SAVE your mod so you don't lose all of your hard work here!

Greetings

Now that the meat of my quest’s dialogue has been implemented, I want to be sure the player can find it! This is most often done through use of the Greetings. Greetings are what the player sees whenever they greet NPCs and before they click on anything in the topic list. In the Construction Set, the Greetings work the exact same as the Topics, except that they are under a different tab called (obviously enough) Greetings.

Greetings can also be used to characterize the NPCs in my quests, add detail to the worldspace, or give the player reminders that they are on a quest at all.

Creating the Greeting

First open up the Dialogue window and navigate to the Greetings tab. Unlike in the Topic tab, you will see Greetings are labeled from 0-9 instead of using specific titles. Each of these Greetings are used for different purposes in Morrowind. Like the Topic Responses, Greetings follow the Top-Down logic, where the engine goes through all the Greetings in Greeting 0, then moves to Greeting 1, then to Greeting 2, etc, until it finds the first Greeting that matches the parameters it needs. This means that the higher number Greetings often have very specific Speaker Conditions, and tend to be used for quests and events that have the potential to override everything else. 

Below is a list of what circumstances each Greeting is typically used for. For the most part, you will be using Greeting 5 for quests, occasionally branching into Greetings 0 or 1 in special circumstances.

   
Greetings 0 Absolute priority, includes crime greetings for arresting guards using the “alarmed” function. May also include characters that don't speak normally (emotes in the background, animals, etc). When in doubt, use Greetings 1 instead.
Greetings 1 Priority quest greetings (including forcegreetings, encounter-specific greetings) where it doesn’t matter if the player is a vampire, criminal, diseased, etc. The Vow of Silence failure reply must always be at the top.
Greetings 2 Player is a vampire/player is nude, both generic and for triggering vampire-enabled quests.
Greetings 3 Special greetings for traitors to the Morag Tong. Also used for creature greetings.
Greetings 4 Greetings for players with common diseases, blight, or corprus. Also covers writs for the Morag Tong, and faction-based greetings if the player has a high bounty.
Greetings 5 Greetings for NPCs involved in quests, both faction-based and miscellaneous.
Greetings 6 Greetings that manage faction mechanics, such as joining, being expelled, and being top rank.
Greetings 7 Class-based greetings (publicans, fast travel, guards, slaves), unique ID greetings, crime level greetings, Endgame Nerevarine greetings.
Greetings 8 Clothes (general greetings concerning how player is dressed).
Greetings 9 Location-filtered greetings, also some some faction-filtered greetings for general chatter.

So why are Greetings important, beyond making your NPCs not sound like every other Average Joe out there? Morrowind dialogue is coded to not overwhelm the player with choices, so topics do not appear unless they are called by a script (rare) or spoken by an NPC with an available Response for that topic (most common). And so, the best way for the player to find our main topic is to mention it specifically in a Greeting!

To do this, I first navigate to the Greetings tab and click on the Greeting number I want to use. Let’s choose 5. Next, I right-click in the Responses tab to make Kevaar's Greeting. Just like his other dialogue, I want to give this Response specific Speaker Conditions tailored to Kevaar's ID and the player's progress on the quest.

Journal "TR_KevaarShiny" < 10
"Hello there! My name is Kevaar. I'm new here just like you, but I've already found some great shinies. Look at this ring I found! See how it glitters?"

 Now a note on good modder etiquette: it’s good practice to scroll through the Greetings until you find other similarly Conditioned Greetings to put yours with, and put it somewhere in the middle of those. Not only do we make sure the Top-Down dialogue logic processes correctly and the right characters say our dialogue, the other reason we do this is that the Morrowind engine references dialogue Responses by remembering what comes right before and right after your Response in the list. Taken alone, your mod won't break if you put your dialogue at the top or bottom of a chunk of similarly conditioned dialogue, but when added into a loading order of a bunch of other different mods, it is more likely that several Responses will compete for the top slot, and cause incompatibilities between mods.

With this in mind, for our quest  I am going to put my Greetings in between the dialogue for Ronerelie talking about the Dwemer museum and Hanarai babbling in 6th House speak.

Other Greetings

For many quests, simply creating a Greeting to introduce the main topic is enough. I don’t have to make Greetings for other NPCs in the quest or for each quest stage unless I really want to punish myself. Usually, additional Greetings are to help characterize the NPCs in my quest (for instance, an impatient NPC constantly badgering the player to finish their tasks), or to help remind the player where they are if the quest is a particularly long one. If there are no more Greetings, the engine will simply keep going through those available, usually landing on one that is specific to the character’s Cell, Race, or Faction.

For our quest, I want to playtest what Greetings Kevaar, Fargoth, and the other NPCs involved will default to if I don't give them more Greetings. In 

Secondary Topics

Technically these are no different from main topics, but I make the distinction based on how they are used in simple quest design. The secondary topics are topics that give background information on the quest. These may or may not be important to furthering along the quest itself. In Kevaar Finds a Shiny, I might use the topic "shinies" for Kevaar to ramble on about how much he likes shinies, further characterizing Kevaar and giving a clue as to how he found the ring to begin with. Or, I might use the topic "tit for tat" if one of the NPCs in my quest wants the player to complete an additional task before telling the player who the ring belongs to.

Creating Secondary Topics

In this step, I want to go back and add any secondary topics I have left. They are created in the Construction Set just like main topics. Also just like main topics, they have to be introduced to the topic list through the dialogue of the NPC who will be speaking them or called through a script, and you want to be careful with their Speaker Conditions so that they only show up when you want them to.

Kevaar has already spoken about "shinies" in his Greeting, so creating a secondary topic is simple. First I navigate to the topic list, right-click anywhere in it, and then type in "shinies" (again, watch your spelling). Then I navigate over to the Response window, and type in a Response:

I also want to give some thought on whether I want this Response to appear before, during, or after the quest. As nothing in Kevaar's Response up there references the quest, I am okay with it appearing anytime, and so I will only condition it with his name to keep it unique to him.

Secondary topics can also be used to add additional quest steps or sidequests. Creating these is beyond the scope of my simple Kevaar Finds A Shiny quest however, and I will address it in another tutorial.