Quest and Dialogue Tutorial Draft

6 posts / 0 new
Last post
Kevaar's picture
Lead DeveloperDeveloperQuest Developer
2016-01-19 19:35
Last seen:
1 hour 8 min ago

WIP. Below is an outline of things I intend to include. If you think I’m missing something, please post.

I. Basic understanding of Morrowind’s internal logic

A. Topics-Based Dialogue
i. importance of unique topics
ii. how to make topics appear (add topic code or appears in same NPC’s dialogue)
B. Dialogue order
i. navigating dialogue window
ii. engine reads top to bottom
II. Quest Journal
A. what is
i. Title Page, Failed, Completed tickboxes
B. using the stages efficiently
i. What if my quest has multiple endings or beginnings?
C. Making quests that work together
III. Greetings
A. What the different Greetings are used for
B. How to do a Force Greeting

IV. Commonly Used Dialogue Variables

A. Narrowing down who has the dialogue:
i. Unique NPC ID
ii. NPC faction
iii. NPC zone
iv. “Lore” NPCs
B. controlling when topics appear
i. that dialogue order thing again
ii. player has quest item
a. warning: non-unique items!
iii. player is on journal stage
iv. NPC disposition
v. the special case of Talked To Once
C. Latest Rumors
i. the use of rumors as breadcrumbs
ii. clean up! changing rumors offered before/during/after quests
iii. playing nice with other rumors already present
a. random mechanic to control frequency
b. NPC variables to control who actually gives the rumor
V. The Coding Box; Commonly Used Scripts
A. Moving NPCs
i. Teleport NPC to player
ii. Move NPC somewhere else
ii. Make NPC follow/stop following player
B. giving or taking items
C. Aggression
i. Make NPC attack player
ii. Making NPC attack other NPC
iii. Calming NPCs
iv. Unintended Bounties
a. who strikes first
b. how to make NPCs nearby ignore player aggression
D. Faction and Reputation
i. Increasing/Decreasing Disposition
a. overall faction disposition
b. unique NPC’s disposition towards player
ii. Handling Faction Ranks
a. detecting faction rank (giving quests)
b. promoting player
c. expelling player
E. Goodbye, Continue, and Choice
i. How to make a classic tree dialogue using if/then statements
VI. General tips and tricks for writing dialogue
A. less is more
i. !!, ??, ?!?!, capitalization
ii. plain speaking (no big words)
iii. avoid emotes (non-verbal interactions)
iv. NPCs don’t tell their life stories to just anyone/topic length
v. Don’t put words in the player’s mouth
B. common tags like %PCRace, %PCName
C. Playing sounds while in dialogue


10Kaziem's picture
Lead DeveloperDeveloperInterior Developer
2015-12-12 23:47
Last seen:
3 hours 25 min ago

No suggestions, but this looks like it will be very nice to have in the handbook!

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable, disappears for a few days or a week (or more) without warning. Still active. Find me on Discord mainly but also IRC.

Kevaar's picture
Lead DeveloperDeveloperQuest Developer
2016-01-19 19:35
Last seen:
1 hour 8 min ago

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 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. More on that later.

Top-Down Processing
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 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. It stops once it finds one that does, 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 parameters so that it shows up only when we want it too.

So let’s get started!
Planning Your Quest
The first step to doing any quest creation is writing out an outline of the quest. For most of you working from the claims browser, these outlines will be provided for you. Even so, it’s helpful to break it down into steps so that you know what needs to be implemented.

In general, quests follow a very simple format:
1) The player finds out about the quest and talks to the quest-giver.
2) The player does whatever the quest-giver wants them to do, such as find an item or kill a monster.
3) The player then returns for their reward, usually given to them by the original quest-giver.

Obviously, these steps can be added to, such as the player having to find more than one item, or the quest-giver giving them additional tasks, or the player having to find out about the quest by doing other quests first. This I will cover later in (link).

For the purposes of the tutorial, I’ve planned out a very simple quest called Kevaar Finds a Shiny. It goes like this:

1) The player speaks with Kevaar, who talks to them about a ring he found. The player offers to find the ring’s original owner.
2) The player speaks to characters around town about the ring. The player finds out that the ring belongs to Fargoth, and gives it to them.
3) The player returns to Kevaar for their reward for returning the ring.

Though this quest design could be expanded to add more twists in the plot or additional ways for the player to finish the quest, it is enough to start crafting my quest.

The Quest Journal
The first step to creating your quest in the Construction Set is creating the Quest Journal entries for it. (Well, actually the first step is opening up the Construction Set, but we’re assuming you already know how to do that and won’t be covering it in this guide!)

You first navigate to the Dialogue Window. This is a little icon near the top of your screen that looks like a speech bubble. Click it.

(picture of dialogue icon)

This opens up the dialogue window. In the default view, here you can see all the dialogue ever written into the game. To get to the Quest Journal, you’ll want to navigate over to the tab that says Journal.

(picture of dialogue window with mouse over tabs)

Here you will see a list of all quests that have been implemented into the game. To create your own, right click on any quest title and click New.  (It doesn’t matter which quest you do this to, as you won’t be changing it by doing this.) Type in an ID for your quest. Note that changing the ID gets tricky later on, so you’ll want to make this something short, unique, and identifiable to you at a glance. (link to naming conventions) I decided on the ID “TR_KevaarShiny”.

The next thing you will need to do is create the title of the quest as it will appear in your ingame journal. You can add this at any time, but since I already know my title, I’ll do that now. First I’m going to right-click in the Info/Response window, and select New. Then I’m going to navigate down to the text box and type in my title, capitalized correctly. As this is the Quest Name, I am then going to click on the “Quest Name” checkbox, so that the game doesn’t inadvertently give me a journal entry that says nothing but Kevaar Finds A Shiny. Because that would be strange. Unless you’re Kevaar.

(screenshot of my purdy title)

Next I’m going to start making the rest of my journal entries. These will appear in the ingame journal as the player plays through my quest. These entries also help you, the backend writer, to organize your quest in logical steps. I’m going to be making a simple quest, so I’m going to add just three entries to start with.

The first entry should be what appears once the player stumbles upon your quest for the first time. Sometimes you will have multiples of these depending on how many ways the player can find your quest, but I will just have the one. First I click on the Info/Response tab and click New, just like when I made my quest title. In the textbox, this time I will be typing out exactly what I want to appear in the journal entry itself. (The game engine will automatically handle adding a date to the entry). Using the logic of Topic-Based Dialogue, I want to write blandly, so that conceivably any kind of character could be writing this.

(quest entry 1 screenshot)

I also want to add an Index number to this entry. This is used later on for identifying what stage of the quest the player is on. Since this is the first entry, I will call it 10. I like to use multiples of 10 just in case I forget an entry and need to go back and add others in between. Entries should be in the order you expect the player to come across them, for it makes your life easier later on down the road.

If I haven’t already, I am going to SAVE my mod file!

Next I will add my second entry. For the purposes of my simple quest, this will be the entry that shows up when the player has returned the shiny to its owner successfully but has yet to tell Kevaar. I will call it 50. If I were writing a mystery quest or a quest with multiple steps, I might realize later I need other entries that happen between 10 and 50, which is why I chose such a big gap.

(quest entry 50 screenshot)

Finally, I need to write an entry for once I have returned to Kevaar and he has given me a reward for completing his quest. I am going to call this entry 70. Since I don’t want this quest hanging around forever in the player’s journal, I will also check the Finished box so that the quest no longer appears once the player has finished it.

And that’s all I have to do for my simple quest journal! For tips and tricks to using more complicated journal entries, click here (link). If you haven’t already, SAVE your mod file!

Next, we will be handling creating all the objects needed for the quest.


Kevaar's picture
Lead DeveloperDeveloperQuest Developer
2016-01-19 19:35
Last seen:
1 hour 8 min ago

Also moving this to the public forums while I work on it. Maybe it’ll help out some new folks, plus it’ll serve as a kick in the butt to actually get in completed...

Kevaar's picture
Lead DeveloperDeveloperQuest Developer
2016-01-19 19:35
Last seen:
1 hour 8 min ago

Creating Objects
After creating my quest journal, the next thing I want to do is make sure I have all the objects I need for the quest.  (An object is any item or character the player may interact with through the course of the quest.) The easiest way to do this is to go back to my original outline. For instance, in Kevaar Finds a Shiny, my quest is planned to go like this:

1) The player speaks with Kevaar, who talks to them about a ring he found. The player offers to find the ring’s original owner.
2) The player speaks to characters around town about the ring. The player finds out that the ring belongs to Fargoth, and gives it to them.
3) The player returns to Kevaar for their reward for returning the ring.

 I see that I need three unique objects for this quest: a Kevaar NPC, a Fargoth NPC, and a ring. When I go into the Construction Set, I see that while Fargoth already exists, neither Kevaar or a unique quest ring do. I will need to create them. (When working with claims, sometimes the NPCs and quest items already exist, and sometimes they don’t, so you will need to check!)

Creating Kevaar
I will first create my Kevaar NPC. I first navigate to the NPCs tab, right click within it, and click “New.” A window will open with lots of values to fill in, which I will explain briefly here.

First, the ID that I call my NPC for use in scripting. This is a unique identifier for the NPC and is read by the game engine only; it never appears ingame. While writing for TR, you should follow the naming conventions here (link).

The next part is the character’s name as it appear to players. With a few notable exceptions, all characters in TES3 have both a first name and last name, and no title. I notice that my quest design has failed to give Kevaar a last name, so I will come up with one now. I’ll call him Kevaar Ezran.

For now, I will ignore this, but it comes in handy later when telling the game engine to track the status of certain NPCs or giving them special abilities.

This governs what race the NPC will be. I want Kevaar to be a Dunmer, and so select Dark Elf.

This checkbox makes the NPC into a female. Kevaar is a male, so I will leave this unchecked.

The NPC’s class governs what skills they’re good at, what spells they have access to, and in some cases, generic dialogue available to them. I imagine Kevaar to be a simple peasant, and so give him the class of Commoner.

This governs how strong the character is. Since players will be meeting Kevaar in a low level area and he is not intended to be a fighter, I will set his level to 5.

Faction and Rank
Unlike the player, NPCs can only belong to one faction at a time. This classification typically effects an NPC’s disposition to the player, some generic dialogue, and some universal questlines. As I want Kevaar to be friendly to thief characters and don’t mind him giving thiefly advice, I will make him a Wet Ear in the Thieves Guild.

I will be leaving this one alone. Unlike later games, in TES3, all being essential does is tell the player they broke the main quest if they kill this NPC. It doesn’t make them immune to death.

Corpses Persist
If killed, this governs if the NPC’s body sticks around. This is useful for quests where you need to loot a unique item from the body, as it keeps the body from disappearing if the player inadvertently leaves the area before obtaining the quest item. As I don’t foresee this occurring in my quest, I will leave this checkbox alone.

This effects whether the NPC can respawn after being killed. Since Kevaar is unique and afaik doesn’t have nine lives, we won’t check this box.

Attributes and Skills
These are set automatically when you choose a Class and Level. However, if I wanted to change one of these manually, I could do so by unchecking “Auto Calculate Stats” and editting them to my tastes.

Head and Hair Listing
Unfortunately there is no easy way to preview these, and you must pick these by trial and error. I chose b_n_dark elf_m_head_07 and b_n_dark elf_m_hair_21, but if you are modding for Tamriel Rebuilt, this is a great opportunity to make use of some of the new meshes available!

This governs what is found in a NPC’s inventory when slain or pickpocketed. Please note that the Morrowind engine automatically equips the best items in the inventory, which then makes it impossible for those items to be pickpocketed. For instance, if I wanted Kevaar to have access to a pair of shoes for the player to steal, I would have to make sure the shoes he wears are more valuable than the shoes intending to be pickpocketed.

For the purposes of my quest, all I want to do is make sure Kevaar has some clothes on. I will not put the quest ring in his inventory, because giving this to the player will be handled by a script later on, and giving it to him now would cause duplicates.

These are automatically chosen dictated by the character’s Class and Race. But if I wanted to add some special spells to the NPC, I could do so here.

After setting all these attributes to my liking, I will click the Save button. I will also save my mod file!

Placing Kevaar: Keep Him From Wandering Off!
A player can’t talk to an NPC that isn’t in the game world! I will also want to pick a spot for to put my new Kevaar NPC. Since placing objects is already handled in other tutorials (link), I will only draw attention here to the Wander mechanic for NPCs.

Wander is a script automatically assigned to NPCs that makes them randomly walk about on their own. Most NPCs in exteriors will have this, while most NPCs in interiors won’t, as they have a tendency to climb on tables or get stuck behind crates otherwise. I want to put Kevaar in Seyda Neen’s Lighthouse, an interior, so I’ll want to make sure he doesn’t Wander.

To do this, I’ll want to open up his NPC window, and click on AI. In the list of AI Packages there should be one called Wander. I will double-click this, and set the distance to 0. I will then click Save in each window to save the change. Now Kevaar will stay put and not wander off.

Creating the Ring
Next, I want to create the ring. This is most easily done by finding an existing ring and tweaking it to my liking rather than making an entirely new one. First I will go to the Clothing tab and find a ring that seems close to what I want my quest ring to be. I’ve picked ring_keley. To create my ring from this one, I right-click on ring_keley, and click “Edit”. I then give this ring a new ID and click Save. I want to be very careful to tell the editor to create a New Object in the dialogue window that pops up, or else I will replace the existing version with my quest version, and thereby may break both my quest and any others that use ring_keley!

After saving my quest ring under a new ID, I can tweak the quest ring to my liking, such as changing the enchantment or the value. Since I don’t intend the player to be keeping this ring, I’m going to keep the value and enchantment trivial.

Creating a Reward?
Finally, I also want to give some consideration to what reward to give to the player once they have completed the quest. While most quest designs will specify the reward, mine didn’t, so I will have to come up with something. As appropriate to the ease of the quest, I think I will have Kevaar reward the player with 50 gold and a low level item. Though I could create a new, unique low level item to give the player, I don’t want to make more work for myself, and instead will choose something out of the existing item list. I want to be sure I pick something with a count greater than 1, so I don’t inadvertently give the player something that is a unique item for another quest.

I chose to give the player a silver staff. I do not need to place this reward in the game anywhere, as like the ring, giving it to the player will be handled by a special script.

I am now ready to go on to crafting the dialogue!

Rot's picture
Lead DeveloperQuest Developer
2014-03-16 17:45
Last seen:
2 days 13 hours ago

Nice, this may also be the place to add (@ Creating the Ring ) that having a small trivial enchantment on quest items that can be equipped doubles as a way to prevent the player from enchanting them (which would make it impossible for the quest to recognise it as the same item afterwards), without having to turn the item into a misc.