Conversation

From DoomWiki.org

The Oracle is engaging in conversation with the player.

Conversations or dialogues are a feature of Strife: Quest for the Sigil, allowing peaceful interactions with NPCs.

A conversation takes place between the player and one NPC, sometimes with added commentary by BlackBird. Plot-relevant conversations usually feature a full-screen portrait of the character and voice-acting for his lines. During a conversation, inventory items can be given to or taken from the player (which is how shopping is implemented). Some items are coded to trigger actions normally associated with certain linedef types; these allow a limited form of level scripting to take place (for example, talking to a character may be necessary to open a door).

Conversations are stored in binary form in lumps named SCRIPTxy, where xy corresponds to that of the MAPxy map slot. In addition, the conversations stored in SCRIPT00 are valid on every map. If a conversation for an object cannot be found in the map's own script first, then the SCRIPT00 lump will be checked. If no specific one is found there either, then the first conversation defined in SCRIPT00 will be used as a fallback. In vanilla Strife, any objects without the MF_NODIALOG flag (0x8000) will converse with the player when not in combat.

The IDs used to identify actor types in the conversation data files are drawn from the mobjtype_t enumeration, and correspond to the order in which the object types were defined in the game's info.c source code file. This concept is also known in the Doom community as the DeHackEd number of the object. In ZDoom-based source ports, this number is referred to as the object's Conversation ID and is defined through DECORATE.

Conversation script format[edit]

Conversation node
Offset Length Name Content
0x0000 4 speaker An unsigned value corresponding to the talker's ID. This determines the type of actor that will use this conversation definition.
0x0004 4 dropitem A signed value corresponding to the ID of an item that the talker will drop if killed. If non-zero, this overrides any object the actor might ordinarily drop when it is killed. A negative value means no item is dropped.
0x0008 4*3 checkitem[3] Three signed values, the IDs of items that, if they are in the player's inventory, will provoke the conversation to jump to a different node instead of this one. If a checkitem value is zero, it is ignored. If the value is less than zero, then the check will always fail.
0x0014 4 link A signed value corresponding to the node to which the conversation should jump if all item checks were successful. If this value is zero, checkitem values are ignored entirely and the dialogue cannot be jumped past based on items possessed.
0x0018 1*16 name[16] A string corresponding to the talker's displayed name, if any. If empty, the mobjinfo definition for the object type speaking will then be checked for a name value. The default value "Person" is used if both of these strings are empty or unspecified.
0x0028 1*8 voice[8] A string corresponding to the name of the text's voice sound lump, if any. An empty string will still cause the previous voice sound playing, if any, to be cut off.
0x0030 1*8 backpic[8] A string corresponding to a picture lump to display as the backdrop for the conversation. If empty or not found, no background is displayed.
0x0038 1*320 dialogue[320] A string corresponding to what the talker says. If this message begins with the string "RANDOM_", then special behavior applies.[notes 1]
0x0178 228*5 choices[5] Five choice structures defining the player's possible responses:[notes 2]
Choice
Offset Length Name Content
x+0x00 4 givetype A signed value corresponding to the ID of an item that the talker will give to the player if this reply is chosen and successful. A negative value means no item is given.[notes 3]
x+0x04 4*3 needitem[3] Three signed values corresponding to the IDs of items the player must have in his inventory for the reply to be successful if chosen. Negative values are used to indicate that no items are required. The first value, if greater than zero, is reserved for gold.[notes 4]
x+0x10 4*3 needamount[3] Three signed values corresponding to the minimum amount of the items that the player must have in their inventory. Again, the first is reserved for gold. When the choice is successful, the corresponding amounts of each item will be removed from the player's inventory.
x+0x1C 1*32 text[32] A string corresponding to the text the player says if choosing this reply. An empty string means no message. If both this and link are empty, the reply is entirely ignored. If the first count value is positive, " for <count>" is automatically appended to the string in order to display a price for the item.
x+0x3C 1*80 yes[80] A string displayed as an ordinary message at the top of the screen if the reply is successfully chosen.[notes 5]
x+0x8C 4 link A signed value corresponding to the node to which this reply leads. A value of zero means that the conversation stops. If both this and choice are null, the reply is entirely ignored.
x+0x90 4 log An unsigned value corresponding to the ID of the message that will be recorded in the log if the reply is successfully chosen, printing the content of the LOG<number> lump and playing the VOC<number> sound.
x+0x94 1*80 no[80] A string displayed as an ordinary top message if the reply is unsuccessfully chosen.[notes 5]

Notes[edit]

  1. When a message begins with "RANDOM_", the seven following characters will be matched (case-insensitively) against built-in sets of dialogue strings. The possible values that will be respected include "PEASANT", "REBEL", "AGUARD", "BEGGAR", and "PGUARD". When a match is found, the actor will then select one of ten random strings from the matched group as the message for the conversation node. These are used to define the default responses for peasants, rebels, acolytes, beggars, and templars respectively, without those messages having to be repeated multiple times in the SCRIPT00 lump.
  2. The final option in the dialogue is always used to dismiss it without making a selection, and in vanilla Strife will always be one of the randomly chosen strings "BYE!", "Thanks, Bye!", or "See you later!". Pressing the escape key to exit a dialogue is exactly equivalent to selecting this last choice.
  3. If the player cannot hold the object given, the message "You seem to have enough!" will be displayed.
  4. Aside from ordinary inventory items, it is also possible to check if the player possesses keys, Sigil pieces, and quest flags by providing the proper item IDs. For quest flags, 31 special token object types are defined by the game expressly for this purpose. Notably, it is not possible to check if the player possesses a certain weapon.
  5. 5.0 5.1 Strife will never print a message consisting only of an underscore ("_") character, so this is often used as the value for options which have no special top message responses. In Strife v1.31 only, an additional special value of a period (".") is supported and will actively clear any message still on the player's screen.

Special speaker behaviors[edit]

In vanilla Strife, all merchants have special behaviors when engaged in dialogue. They will set themselves to certain hard-coded states while conversing. When a conversation is started, they will enter their "greetings" state. If the player selects a choice successfully, they will enter their "yes" state. If the player fails a choice (ie., by attempting to buy something without enough gold) or leaves the conversation using the last choice or by pressing the escape key, they will enter the "no" state.

Special given item behaviors[edit]

If an item has the MF_GIVEQUEST flag (0x800), then its speed value will be interpreted as a quest flag value from 1 to 32, and the corresponding quest flag will be awarded to the player along with the item.

When one of the 31 quest token items is given (object IDs 312 through 342), the quest flag awarded is determined by the item's ID itself, such that quest token 1 awards quest flag 1, quest token 2 awards quest flag 2, and so on. The item's name as defined in mobjinfo will be used as the message for the item received.

Other item effects are determined by the item's sprite or object type. Only items with special behaviors are listed here. Other items will simply be inserted into the player's inventory and in some cases will be automatically used first if applicable. Items such as weapons and ammunition mostly have the same effects as if they were collected from the level directly by the player. Note that weapons cannot be given if the player already owns them; they will not award any ammunition in this case.

Sprite ID Chocolate Strife name Effect
HELT Any - Awards one stamina, one accuracy, and an increasing amount of gold in multiples of 300. This is normally used by the "donnytrump" cheat code.
TOKN 138 MT_KEY_HAND Gives the player the "severed hand" key.
TOKN 172 MT_MONY_300 Gives 300 gold. Normally awarded by Macil.
TOKN 298 MT_TOKEN_AMMO Gives 50 bullets. Normally given by Feris.
TOKN 299 MT_TOKEN_HEALTH Gives a differing amount of health depending on the skill level. Normally given by Gerard.
TOKN 301 MT_TOKEN_ALARM Sets off the alarm. If a Spectre C is present on the level, it will also be awakened.
TOKN 302 MT_TOKEN_DOOR1 Opens all sectors tagged 222 as doors.
TOKN 303 MT_TOKEN_SHOPCLOSE Closes all sectors tagged 222 as doors.
TOKN 304 MT_TOKEN_PRISON_PASS Opens all sectors tagged 223 as doors. If given on the town map, it will also place itself into the player's inventory normally.
TOKN 305 MT_TOKEN_DOOR3 Closes all sectors tagged 224 as doors.
TOKN 306 MT_TOKEN_STAMINA Instantly awards 10 stamina and fully heals the player.
TOKN 307 MT_TOKEN_NEW_ACCURACY Instantly awards 10 accuracy.
TOKN 343 MT_SLIDESHOW Starts a finale sequence. If in the New Front Base, quest flag 17 is awarded.

Special dropped item behaviors[edit]

Certain objects have special effects if they are dropped by an actor due to a conversation. Note that an object dropping any Sigil piece will immediately increment the player's current Sigil type if possible, and cause the player to change to the newest version of the Sigil. In all of these cases, no object is actually spawned in the map.

ID Chocolate Strife name Effect
301 MT_TOKEN_ALARM Sets off the alarm and prints the message, "You Fool! You've set off the alarm"
303 MT_TOKEN_SHOPCLOSE Closes all sectors tagged 222 as doors, sets off the alarm, and prints the message, "You're dead! You set off the alarm."
304 MT_TOKEN_PRISON_PASS Opens all sectors tagged 223 as doors.
305 MT_TOKEN_DOOR3 Opens all sectors tagged 224 as doors.

Extensions[edit]

USDF, short for Universal Strife Dialogue Format, is a text script meant to replace use of the binary SCRIPT lumps in modern source ports. It is currently supported by ZDoom and several of its derivatives. ZDoom further defines its own USDF extension called ZSDF, which defines additional features only useful in explicitly compatible ports. USDF can be compiled to the binary script format if no extended features are used, which is useful for creating new vanilla-compatible dialogue lumps.

External links[edit]