Conversation files (file type DLG (dialog)) are used to have NPCs speak to players, and even each other.
Even given the age of the engine the conversation editor in NWN contains some very nifty abilities to allow easy looping and backtracking and can contain copious amounts of dialogue.
The game supports an easy way of having "single" responses when clicked on as well, utilising some default AI/script functionality.
There is also in NWN:EE some major improvements with Script Parameters allowing easy reuse of scripts with the conversation itself storing the required variables (Eg; "QUEST" being set to value "20" and the script using these).
Note that apart from when in a cutscene (Where escape will trigger the "exit cutscene" event) a player can always cancel conversations. There are two events to deal with this - on abort and on exit (one being unnatural - moving away/esc, one being normal, such as a conversation ending with a End Dialogue option).
There are some limitations on the entire format (or at least worthwhile guidelines!) due to the games age / network setup;
- Length of dialogue
- Amount of responses
Tokens represent non-standard text, the engine will do something with, such as highlighting it a certain colour, changing the words based on context or from a script value.
Tokens to Highlight Text
These will encompass text to make it a particular colour in game. Bioware generally defaulted to putting these in square brackets, which the conversation editor will also do for you by default.
|Token||Example Text||Output||Description and Notes|
|<StartAction></Start>||<StartAction>[You attempt to force the door]</Start>||[You attempt to force the door]||Green - RGB: 0, 255, 0|
|<StartHighlight></Start>||<StartHighlight>[You notice something]</Start> The door has a crack in it, just large enough to peer through.||[You notice something] The door has a crack in it, just large enough to peer through.||Blue - RGB: 0, 0, 255|
|<StartCheck></Start>||<StartCheck>[Animal Empathy]</Start> You attempt to calm the cat.||[Animal Empathy] You attempt to calm the cat.||Red - RGB: 255, 0, 0|
Tokens with Automatic Values
These are tokens, a word put between <>, automatically fill in based up on the PC speaking with the NPC, for instance <he/she> will become either "She" (female) or "He" (male/default). This simplifies having to use tokens - since all of these could be calculated and set in a script.
- Name: Aluvian Darkstar
- 12 Wizard / 2 Rogue
- Chaotic Neutral
- Deity: Erevan Ilesere
- Subrace: Wood Elf
|Token||Example Text||Output Options||Description and Notes|
|<Alignment>||Why would someone of <alignment> persuasion do this?||Why would someone of Chaotic Neutral persuasion do this?|
|<alignment>||Curse you and your <alignment> nature!||Curse you and your chaotic neutral nature!|
|<Boy/Girl>||<Boy/Girl> you will listen to me and sit down!||Girl you will listen to me and sit down!|
|<boy/girl>||What do you say, <boy/girl>?||What do you say, girl?|
|<Brother/Sister>||Welcome to our temple, <Brother/Sister>!||Welcome to our temple, Sister!|
|<brother/sister>||Well that'd make you kinda like a little <brother/sister>, wouldn't it?||Well that'd make you kinda like a little sister, wouldn't it?|
|<Class>||We need training staff. <Class> trainer would be your job, how about it?||We need training staff. Wizard trainer would be your job, how about it?||Uses the first class lot, so "unreliable" after level 1. Uses classes.2da tlk reference.|
|<class>||A <class> eh? Welcome aboard!||A wizard eh? Welcome aboard!||Uses the first class slot, so "unreliable" after level 1. Uses classes.2da tlk reference made lowercase|
|<Day/Night>||<Day/Night>times like this makes this all worthwhile.||Daytimes like this make this all worthwhile.|
Day is defined as:
Night is defined as:
|<day/night>||What a blasted <day/night>!||What blasted day!|
|<Deity>||For <Deity>'s sake!||For Erevan Illesre's sake!||The text-field "Deity" - also retrievable by GetDeity but otherwise unused by the engine.|
|<FirstName>||May change based on the language|
Morning is defined as:
Afternoon is defined as:
Evening is defined as:
Night is defined as:
|<Race>||Name from racialtypes.2da|
|<race>||Name from racialtypes.2da, but made lowercase|
Colour Custom Tokens
A subset of custom tokens - you can use <cRGB></c> where RGB is a RGB code but, of course since this isn't simple, it's not in number form but ASCII character reference...very odd
This means you can use a long ASCII string to find the right "number", eg;
This function can make a complete string that then could be passed, say, to a custom token for inclusion in a conversation. It can also be used in other text locations (eg; SpeakString, SendMessageToPC, etc.)
A simpler version is available in x0_i0_string.
The game uses the <cRGB></c> format internally so it can be used by modders to create any coloured text.
Anything that orders on the contents of a string - eg the feats or skills in a character sheet - can be made into a custom order using empty colour strings, eg:
Without the colour codes you will get the order "Feat 1, 2, 3, 4, 5, 6 Section 1, Section 2" but with them you get "Feat Section 1, 1, 4, 6, Section 2, 2, 3, 5"
Script basic information to follow.