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.
| Source | How many | What they are | Shown by |
|---|---|---|---|
TEXT.DAT | 122 texts | Conversations, scenes and the contents of parchments. | The dialogue screen and the parchment reader. |
| Level messages | 456 strings | Messages, prompt labels and answer labels of the level scripts. | The scripts of each level. |
| Item names | 123 names | The names of items, before and after identification. | The inventory, the character sheet, the messages. |
| The executable | about 590 strings | Story 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.
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 by | Texts | Which |
|---|---|---|
| Dialogue instructions of the level scripts | 94 | Listed by level in the next table. |
| The conversations with Insal, Calandra and Shorn | 12 | 1 to 3 (Insal), 4 to 7 (Calandra), 8, 9 and 102 to 104 (Shorn). |
| Parchments | 8 | 10, 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 executable | 3 | 76, the defeat scene; 99, the dream on level 3; 120, Dran's change of form. |
| Nothing found | 5 | 37, 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.
| File | Strings | Bytes | Printed | Prompts | Answers | TEXT.DAT texts | Instructions |
|---|---|---|---|---|---|---|---|
LEVEL1.INF | 33 | 1,473 | 32 | 1 | 0 | 2 | 4 |
LEVEL2.INF | 42 | 2,242 | 41 | 1 | 0 | 1 | 5 |
LEVEL3.INF | 32 | 1,296 | 32 | 0 | 0 | 0 | 0 |
LEVEL4.INF | 17 | 536 | 8 | 2 | 7 | 8 | 10 |
LEVEL5.INF | 31 | 1,051 | 24 | 1 | 6 | 8 | 11 |
LEVEL6.INF | 38 | 1,178 | 33 | 1 | 4 | 4 | 4 |
LEVEL7.INF | 32 | 945 | 25 | 2 | 5 | 13 | 15 |
LEVEL8.INF | 51 | 2,145 | 45 | 3 | 3 | 24 | 69 |
LEVEL9.INF | 36 | 1,932 | 29 | 3 | 4 | 9 | 22 |
LEVEL10.INF | 5 | 128 | 5 | 0 | 0 | 0 | 0 |
LEVEL11.INF | 32 | 1,392 | 27 | 3 | 2 | 7 | 8 |
LEVEL12.INF | 35 | 1,116 | 30 | 3 | 2 | 7 | 12 |
LEVEL13.INF | 21 | 855 | 17 | 2 | 2 | 9 | 9 |
LEVEL14.INF | 5 | 53 | 3 | 2 | 0 | 4 | 4 |
LEVEL15.INF | 35 | 1,343 | 28 | 3 | 4 | 5 | 14 |
LEVEL16.INF | 11 | 244 | 9 | 2 | 0 | 6 | 6 |
| All | 456 | 17,929 | 388 | 29 | 39 | 94 | 193 |
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.
| Strings | Count | What they are | Who shows them |
|---|---|---|---|
| Introduction captions | 20 | The story under the pictures. | The introduction. |
| Ending captions | 20 | The story of the end of the game; three have more than one line. | The ending. |
| Credits | 1 | One 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 list | 73 | Menu 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 screen | 78 | Resting, 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 labels | 40 | 14 different labels, such as OK, MORE, ABORT and yes. | Dialogues, conversations, the question box. |
| Portrait and sheet labels | 18 | Results 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, alignments | 54 | 12 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 words | 5 | First to Fifth, reached through a table of far pointers; their use is unknown. | Not traced: see the ordinal words and their pointers. |
| Creation screens | 10 | Prompts and help of the party creation screens. | The party creation screen. |
| Character names | 10 | The four of the prepared party and the six recruitable characters. | Character creation and recruitment. |
| Item name parts | 25 | 4 ring names, 8 potion names, 8 wand names and 5 kinds, such as Wand. | The item names, from these lists. |
| Spell names | 123 | 61 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 menu | 6 | Five items and the version label. | The start menu and its screen. |
| Save and load screen | 4 | Button labels of the slot menus. | The slot buttons. |
| Preferences and spell counter | 5 | Two 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 screen | 4 | Two instructions and two level labels. | The transfer screen. |
| Protection question | 51 | One prompt, and a list of 50 single words that are inferred to be its answers, kept in the executable file. | The protection check. |
| Defeat scene | 1 | One line printed over the KHELDRAN picture. | The defeat scene. |
| Technical messages | 40 | 19 file errors, then errors of memory, overlays, fonts, decorations, and the start-up refusals. | The file helpers and the error paths of each routine. |
| All | 588 |
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.