Skip to main content

Texts

From files to the game · Dialogue texts (TEXT.DAT) · Level data (INF) · Initial items (ITEM.DAT) · Fonts (FNT)

In brief​

The game's texts are in English, and all of them that the player can see are stored in four places: one text file, the 16 level files, the item file and the executable. This page says how many there are, what they are for and what shows them. It counts and does not quote them: the texts themselves belong to the game.

SourceHow manyWhat they areShown by
TEXT.DAT122 textsConversations, scenes and the contents of parchments.The dialogue screen and the parchment reader.
Level messages456 stringsMessages, prompt labels and answer labels of the level scripts.The scripts of each level.
Item names123 namesThe names of items, before and after identification.The inventory, the character sheet, the messages.
The executableabout 590 stringsStory captions, credits, menus, messages, names of classes and spells.The game's own routines.

CREDITS.TXT is a copy of the credits that the game writes and never reads. Monsters have no names in any file: Bestiary names them after their images. SETUP.EXE is not covered.

Where the game's texts are and what shows them: TEXT.DAT, 122 texts, shown by the dialogue screen and the parchment reader; the level files, 456 strings of their scripts; ITEM.DAT, 123 item names, shown by the inventory, the character sheet and the messages; the executable, about 590 strings used by its own routines.
Four places hold every text the player can see.

TEXT.DAT​

The file holds 122 numbered texts in 22,463 bytes, of which 244 are the offset table and the rest the texts with their end bytes: about 4,000 words, the longest text 878 bytes. Three texts are a single space, numbers 20, 37 and 88. Across the file there are 15 page breaks, 14 colour changes and 86 forced line ends; the dialogue screen wraps everything else. The layout of the file is under dialogue texts.

Each text has one main user:

Named byTextsWhich
Dialogue instructions of the level scripts94Listed by level in the next table.
The conversations with Insal, Calandra and Shorn121 to 3 (Insal), 4 to 7 (Calandra), 8, 9 and 102 to 104 (Shorn).
Parchments810, 11, 12, 38, 62 and 105 lie in the levels; 15 is created on level 4; 27 is left by Insal.
Scenes run by the executable376, the defeat scene; 99, the dream on level 3; 120, Dran's change of form.
Nothing found537, 39, 40, 70 and 88.

Text 1 also serves the Tome, an item that lies nowhere. Text 20, the single space, is by far the most used: 86 of the 168 text instructions of the scripts show it, to display their prompt alone; 14 levels use it, and the executable uses it as well.

Level messages​

Each INF file ends its script data with a list of zero-terminated strings. Scripts use them in three ways: printed in the message area with Print a message, as the label of the prompt after a dialogue text, or as the label of an answer button of a question. Every string of every level is named by a script that the cell bindings can reach. Scenes and conversations of each level are told, not quoted, on the level pages.

Printed, Prompts and Answers count different strings used that way; a string may have several uses. Bytes include the end bytes. The last two columns count the TEXT.DAT texts that the level's scripts name, then the dialogue instructions that do so.

FileStringsBytesPrintedPromptsAnswersTEXT.DAT textsInstructions
LEVEL1.INF331,473321024
LEVEL2.INF422,242411015
LEVEL3.INF321,296320000
LEVEL4.INF17536827810
LEVEL5.INF311,0512416811
LEVEL6.INF381,178331444
LEVEL7.INF3294525251315
LEVEL8.INF512,14545332469
LEVEL9.INF361,9322934922
LEVEL10.INF512850000
LEVEL11.INF321,392273278
LEVEL12.INF351,1163032712
LEVEL13.INF21855172299
LEVEL14.INF55332044
LEVEL15.INF351,3432834514
LEVEL16.INF1124492066
All45617,929388293994193

The longest string has 207 characters, in LEVEL2.INF. Eight files hold one empty string each: in LEVEL1.INF it is printed, and in levels 8, 9, 11, 12, 13, 14 and 15 it is a prompt with no label.

Item names​

ITEM.DAT holds 123 name slots of 35 bytes, read up to their first zero. The longest name has 29 characters, and slot 1 is empty. The 434 item records name each slot at least once: 117 slots as the name shown before identification and 11 as the name shown after it. Slot 1 is the second name of 403 records, which tells the game to build the identified name from the item's kind and value, using the name parts of the executable. The names by type and kind are listed in Items of the game.

Strings of the executable​

START.EXE keeps the strings below, in its data segment and in its overlay data. A label repeated in several places counts once per stored copy. File names, and strings that only format a number or a name, are left out.

StringsCountWhat they areWho shows them
Introduction captions20The story under the pictures.The introduction.
Ending captions20The story of the end of the game; three have more than one line.The ending.
Credits1One text of 281 lines, 2,315 characters: 59 lines of text, 3 in the small font, 8 that name a picture, the others empty.The credits, which also write it to CREDITS.TXT.
Camp list73Menu titles and items, questions, refusals, save and load failures, the defeat question, transfer warnings.The camp menu and the question box.
Messages of the play screen78Resting, taking and eating, potions, horns, inventory refusals, spells, attacks, doors, level gains, spells running out.The message area: rest, potions, horns, inventory, level gains, doors, spells.
Button labels4014 different labels, such as OK, MORE, ABORT and yes.Dialogues, conversations, the question box.
Portrait and sheet labels18Results of a hand such as MISS, the states of a character, the titles of the character sheet.The hand results and the character sheet.
Attributes, races, classes, alignments5412 names of attributes, short and long; 12 of race and sex; 15 of classes; 6 of base classes; 9 of alignments.Creation and the character sheet: classes, base classes, races, alignments.
Ordinal words5First to Fifth, reached through a table of far pointers; their use is unknown.Not traced: see the ordinal words and their pointers.
Creation screens10Prompts and help of the party creation screens.The party creation screen.
Character names10The four of the prepared party and the six recruitable characters.Character creation and recruitment.
Item name parts254 ring names, 8 potion names, 8 wand names and 5 kinds, such as Wand.The item names, from these lists.
Spell names12361 short names, 32 mage and 29 cleric, and 62 full names of spell definitions.The spell book and menus and the spell definitions; see the mage and cleric spells.
Start menu6Five items and the version label.The start menu and its screen.
Save and load screen4Button labels of the slot menus.The slot buttons.
Preferences and spell counter5Two lines of the preferences menu, two further strings that no button shows, and the count of remaining spells.The camp menu and the spell menu.
Party transfer screen4Two instructions and two level labels.The transfer screen.
Protection question51One prompt, and a list of 50 single words that are inferred to be its answers, kept in the executable file.The protection check.
Defeat scene1One line printed over the KHELDRAN picture.The defeat scene.
Technical messages4019 file errors, then errors of memory, overlays, fonts, decorations, and the start-up refusals.The file helpers and the error paths of each routine.
All588

The six recruitable characters' names are stored with their records. The camp list has 74 entries, the first one empty.

CREDITS.TXT​

The reference file is 2,316 bytes long, the end byte included, and is byte-identical to the credits text stored in the executable. The ending writes it when it starts, replacing any older file, and the game never reads it: deleting it changes nothing.

Saved games also hold short texts, the descriptions that the player types; see saved games and the slot descriptions.

Sources​

The counts come from reading the reference files with the schemas TEXT_DAT.ksy, INF.ksy and ITEM_DAT.ksy. Uses by the scripts come from following every script of the 16 levels as script_decoder.py does. Uses by the executable are listed under the executable reference: the TEXT.DAT loader, the dialogue routines, the conversations, the parchment reader, the dream and Dran's change of form; for the strings, the introduction's texts, the ending's tables, the transfer questions and the entries linked from the table above. The parchment values are read from ITEM.DAT; see parchments and tomes.