Tes3Mod:Creating dialogue in Morrowind

Based on "Morrowind dialog tutorial" by Jac. The original can be found at GHF.

Note: Before creating new dialogue, it is recommended that you familiarize yourself with the Dialogue Window of the Construction Set first.

Adding dialogue
Adding dialogue is a very straightforward process depending upon what and where you’re adding dialogue to.

  (e.g. "latest rumors"):

Find and select the topic from the topics tab.
In the info/response box, right-click on an existing topic response and select new.
Type in your new dialogue and select any filters you want for the topic.

  is the same but you must add the topic first:

To add a new topic, right click in the tab window and select new.
Type in your topic name, and then add the dialogue to the info/response window.
Your topic will be added and the list will repopulate in alphabetical order.

A note on the info/response window: dialogue is read from the very top line to the bottom, line by line, until the very first line that meets all of the speaker condition filters. This includes the disposition. An easy mistake to make is to have a line with disposition filter set at zero and have a line below it with a higher disposition. In this case, the line with the disposition filter of zero will always show while the line below it never will. These two lines would need to be swapped around for them to show properly.

 :

First create a new journal topic by clicking in the tab window and selecting new. Give your new journal topic a unique name (usually your initials and whatever else you like to use, e.g. jac_jasmine).
In the blank info/response window, select new and then type in the quest/journal name – this is what shows up in the journal’s topic name screen in game.
Click the box in the Speaker Condition window that says “Quest Name” and give it an index of zero (0).
Add journal entries with the first entry starting just under the quest name (this is usually the initial entry the player gets when starting a quest) and give it an index number of ten (10).
Additional entries should go in order below it, starting with index twenty and increasing by ten for each entry. This will give you nine possible entries.

Example:

Quest name (index 0)
Initial entry – Gives the player the quest and where to start (index 10)
Mid-quest entry – The player got the item or killed the monster, or went somewhere, but hasn’t finished the quest yet (index 20)
Finished entry – The player finished the quest (index 30, also the finished box was checked in speaker condition).

The Choice function
The choice function is a very powerful and versatile dialogue tool. It allows you to:

Split long dialogue into more manageable chunks by adding a continue choice.
Add options for the player to select, which adds to role playing.
Add functionality to NPCs, like companions and others (e.g. "give your orders" mods).

You can have from 1 to 999 choices, but remember that you have to enter each choice so choose how many you want before you implement them.

 The format is Function->choice =  reverse numerical order , with the highest number at top counting down to the line that gives the choice. The results box for the info/response line with the choice command is Choice “ ” 1 “ 

Tip: You do not have to start with 1 as your first choice, but it’s easier to keep track of them that way.

The "continue" choice
The continue choice is used to split up dialogue that exceeds the 512 character limit into two or more “paragraphs.”

To implement this:

Enter the first paragraph, and then use the abovementioned choice command in the results box: Choice “Continue” 1.
 Insert a blank line above this info line and then enter the second paragraph. Set the filters as follows:  

Adding additional choices
Adding additional choices is a matter of adding them to the choice command and inserting the choices above the choice line.

Tip: A good rule of thumb is to filter by NPC ID so that you do not have to worry about your choices overlapping with those from other mods or from the ones Bethesda has already entered.

Note: Two lines can use the same choice # provided they have a different NPC ID or other filters set. Otherwise, the line that’s on top will be displayed while the one below will not. If you’re having issues with choices not being shown, make sure that you do not have two lines with the same filters set.

Simple quest tutorial
This tutorial will show how to write a simple quest. It includes creating journal entries, filtering, and adding info/responses to dialogue topics.

 , open up the Construction Set (CS) and then the dialogue window (either by selecting Character->Dialogue or by clicking on the text balloon at the top).

 , click on the journal tab and add the journal topic “ _mudcrab”. Add a new info/response line of “Finding mudcrab meat” and set that to the quest name. (note that journal topic names and dialogue topics names CANNOT be the same. If they are, you will receive errors.) Below the quest name, add a new line “Teleri has asked me to retrieve some mudcrab meat for her.” Set the index to 10. Below that, add another line: “I returned some meat to Teleri and she gave some gold in exchange.” Set the index to 20 and click the finished box. This tells the game that this is the finished entry and it’s to be moved off of the player’s active quests list.

 , add the topic “mudcrab meat” by clicking on any dialogue topic and selecting “new”. In the info/response box, add a new dialogue line and type “Yes, I am short of mudcrab meat. I'll pay you if you find me some, %PCName.” (%PCName will show the player’s name in dialogue.) Set the filters to:

 ID: Teleri Helvi

Function/Variable: Journal->”your journal entry id”  

 , click on the entry and select new to create a blank entry above it. Type: “I don't see any mudcrab meat on you, %PCName.” Set the filters to:

 ID: Teleri Helvi

Function/Variable: Journal->”your journal entry id” = 10.

Function/Variable: Item->ingred_crab_meat_01  

 , add a new line to the very top and type, “Oh, thank you, %PCName. Here's some gold for your troubles.” (Note, you can copy the previous line and change the filters). Set the filters to:

 

In the Results box, add:

 

Click the OK button to save your dialogue. Save your plugin and load it up to make sure you didn’t miss anything.

Tips on adding and creating dialogue
When creating dialogue topics, try to keep them as unique as possible. The reason for this is best explained by Psyringe:

  


Etiquette: Some modders use symbols (+ = * / - ) at the front of their topics while others use short phrases or change the letters of a topic name (e.g. t0gether). Whichever method you choose, it’s important to make it unique. Remember that topic names will show up in dialogue as hyperlinked (in blue) if an NPC’s info/response line contains the same words or phrase.


Tip: AddTopic should be avoided if you want the NPC adding the topic to be able to talk about it after it has added because topics added with that function won’t show up until the player quits dialogue and reenters it. If you’re adding a topic that another NPC will talk about, then AddTopic is fine.


Etiquette: When adding info/response lines to an existing topic (i.e. one you did not add) or a greeting, it’s preferable to place the new line(s) somewhere in the middle of the topic or greeting if possible and to clean the insertion points. Adding lines to existing topics causes the CS to mark the line above and below as changed and this could lead to conflicts with other mods that add dialogue to that topic or greeting.

 

 To use TESAME, save your mod and close the CS. Open up TESAME and load your mod. Click on the Type tab to sort by type and scroll down until you see the [DELETE] lines. Click on each one, press the space bar to select it, and then press the  


Tip: Sometimes you need to make a greeting, that will start a script, and you want it to be filtered not for a single NPC but for a class or a faction. Such a greeting will, of course, block some vanilla greetings and may conflict with other mods, but there is a way to avoid this. As a condition for your greeting add a unique global variable and in the result window start a script that begins with these lines:

 

In the same frame that the player starts a dialogue with an NPC, the dialogue window will close (player will not see your greeting) and the NPC will greet the player using vanilla greeting.

See also
Dialogue Window 
Morrowind Mod Maker's Manual (Dialogue window) 
Creation and Management of Factions