Conversation file format and invisible quests

A forum for discussing all things regarding modding of Eschalon: Book III
Post Reply
User avatar
SpottedShroom
Captain Magnate
Captain Magnate
Posts: 1366
Joined: June 4th, 2010, 6:18 pm

Conversation file format and invisible quests

Post by SpottedShroom » April 21st, 2014, 11:53 pm

Although support for mods that will let you create custom conversations is still a ways off, I thought I'd work out the format of the conversation files anyway. If you don't have a decrypted datapak and want to follow along, look in the eb3_text_files_100.zip file from this thread: http://www.basiliskgames.com/forums/vie ... =34&t=9036

Each file is named <npc name>.txt or <npc number>.txt (in the case of Lilith, who is really two NPCs), and consists of a series of 14-line entries. The first entry (0) is where your first conversation with the NPC starts, and the second entry (1) is where all later ones start.

The contents of each entry are:

Code: Select all

1 The entry number, starting at 0
2 The "choice group" number this entry is a member of, 0 for entries 0 and 1
3 The player text choice that leads to this response, or blank for entries 0 and 1
4 The NPC's text, or blank for direct links in line 5
5 Choice group number, or if negative, a direct link to a specific entry number. Negative values are often used to implement "[Back]" links
6 Quest number - only display if quest is in following state, 0 if unused
7 Quest state for line 6, 0 if unused
8 Quest number - don't display if quest is in following state, 0 if unused
9 Quest state for line 8, 0 if unused
10 Item required to display this option, blank if unused
11 Script to run after this option is selected, blank if unused
12-14 reserved, always contain the exact text "reserved"
So for example, when you first meet Lilith, she asks, "Do you not remember me?" (entry 0, line 4). Line 5 of that entry is "2", meaning that the engine displays all of the entries with choice group 2, which are entry 2 (line 3: "Yes <en>, of course I remember you!") and entry 4 (line 3: "No, I do not remember you. We've met before?").

Often a choice only appears in certain circumstances. That's where lines 6-10 come in. 6 and 7 represent a quest that must be in a certain state for the option to appear. For example, options that assign quests usually use the quest number and 0 here to ensure that you're not already on the quest. For example, you will only have the option to ask Seamus, "What do you do here in Rockhammer?" if you're not already on quest 3, A Hammer for Seamus.

Lines 8 and 9 are the opposite: a quest and state that will prevent the option from appearing. For example, the option "I have killed all the roaches that were in the mine." only appears in Logi's dialog if (1) quest 106 is in state 6 (lines 6-7) and (2) quest 4 (Exterminator, At Your Service) is NOT in state 9.

Finally, line 10 is the name of an item that you must have for the option to appear. For example, "I found the Crafting Hammer we talked about" only appears in Seamus's dialog if quest 3 (A Hammer for Seamus) is in state 1, AND if you have a Crafting Hammer. You can give an amount of gold here, like the "gold 300" Leisle wants for Logi's bar tab, but not for other items - the pearls quest is implemented in a different way.

To really take advantage of the conversation engine, you'll want to make good use of quests. Many of the quests used in conversations aren't "real" quests, though. They don't show up in the quest log, and you don't get messages about failing or completing them. You interact with them in the usual way with the quest-related scripting commands and lines 6 and 8 above. These "invisible" quests are numbered 100-150 (normal ones are 1-30), but I don't know if that's a limitation in the engine or just convention.

If you're going to make your own invisible quests, you will need to avoid the ones that already exist in the game. Depending on how mod support shakes out, we may eventually also need to keep a registry of allocated number ranges for different mods to allow mods to co-exist.

Anyway, here are the existing invisible quests with a brief description. Note that the last one is evidently special and set by the game engine itself rather than using the "quest" script command or similar.

Code: Select all

100 Met Morwen
101 Arima told you about Lilith
105 Lilith explained things to you
106 Counter for roach egg sacs (need 6)
107 Counter for scorption kills in the mine (need 12)
108 Dealt with Logi's tab
109 Asked Shelta Marie about Blackened Bone tavern
110 Note for Ranimer unsealed
112 Dannia gave you advice about Alundar (not fully implemented)
113 Lilith is dead
114 Madam Glida read your fortune (not fully implemented)
115 Ranimer gave you the odd note
116 You found the note's meaning
117 You agreed to kill scorpions for Logi
118-119 Well cranks that open seawardens guild
120 You made a deal with the Akadai kingspawn
121 Training available from Alywin
122 Basilisk spawned in Moonrise Underground
123 You chose to take the kingspawn's head
124 You selected a skill point or an ability point from the secret area
125 Something about the goblins and cataclysm - affects Baizel and Lilith 2's dialog
127 Talked to Magpie
128 Baizel's apparatus destroyed
129 Baizel appeared
130 Counter for kills in the seawardens guild (need 15)
131 Shrock told you about deadly skills permit
133 Lilith gave you Erubor's second letter
134 Lilith is at Macross Point
136-137 Mutually exclusive levers in the Wizardtorium
138 Counter for goblin kills (need 7)
139 Baizel is dead
141 Set after talking to Erubor
142 Edgar is dead
143 You have 10 pearls. Set by cond_special 3
150 The moon is in the sky
Last edited by SpottedShroom on April 22nd, 2014, 3:27 pm, edited 1 time in total.

User avatar
BasiliskWrangler
Site Admin
Posts: 3789
Joined: July 6th, 2006, 10:31 am
Location: The Grid
Contact:

Re: Conversation file format and invisible quests

Post by BasiliskWrangler » April 22nd, 2014, 8:01 am

Here's my dialog editor. Play with it. It's crude and unrefined (as most "internal" tools are) but it might help you decipher the file format.

Originally, the dialog to Eschalon was going to be like the early Might & Magic (NPCs give you non-interactive dialog that changes based on quest completion). Then I added branching dialog and conditions- so, the file format for dialogs ended up sort of messy. I never bothered to optimize it.
Attachments
b3_dialog.zip
(771.38 KiB) Downloaded 124 times
See my ramblings and keep up with the latest news on Twitter & Facebook.

User avatar
SpottedShroom
Captain Magnate
Captain Magnate
Posts: 1366
Joined: June 4th, 2010, 6:18 pm

Re: Conversation file format and invisible quests

Post by SpottedShroom » April 22nd, 2014, 12:44 pm

BasiliskWrangler wrote:Here's my dialog editor. Play with it. It's crude and unrefined (as most "internal" tools are) but it might help you decipher the file format.

Originally, the dialog to Eschalon was going to be like the early Might & Magic (NPCs give you non-interactive dialog that changes based on quest completion). Then I added branching dialog and conditions- so, the file format for dialogs ended up sort of messy. I never bothered to optimize it.
Is that to say that the above is incomplete? It seems correct to me. Interested though I am to play with your internal editor, I'm not sure it rises to the level of tracking down a Windows install :)

User avatar
IJBall
Major
Major
Posts: 1684
Joined: August 31st, 2008, 11:07 am
Location: Southern California

Re: Conversation file format and invisible quests

Post by IJBall » April 22nd, 2014, 2:51 pm

Prismatic Maelstrom wrote:http://s9.postimg.org/m93ovsf1r/Nickolas_Divination.png

Interesting editor. Thank you for letting us play with it.
Wait! - Was the thing about Divination Magic training already in there? Or did you add that?

If it was already in there, how come that option never went "live" in Book III so that we could get Father Nickolas to train us?!...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests