Party and character data
Data · Routines · Address index
The characters and the party's position; the tables of classes, hit points, experience and saving throws; party creation. The data page explains how the entries are written.
DS:0x0c05, DS:0x0c8d, DS:0x0ccd, DS:0x0d55 — Spell slot tables
- Layout: rows of eight bytes, one per spell level: cleric (
0x0c05, 17 rows by level), wisdom bonus (0x0c8d, 8 rows for wisdom 12 to 19), paladin (0x0ccd, 17 rows), mage (0x0d55, 17 rows). - Role: Slots per spell level read by the memorize and pray menus. The wisdom table is directly followed by the paladin table, which a wisdom above 19 reads.
- Used by: Spell slots › Spell slots per level, Spell slots
DS:0x1ec8 — Number of class levels
- Layout: one byte per class
- Role: How many base classes, and so levels, a class has: 1 for the six single classes, then 2, 2, 2, 3, 2, 2, 3, 2, 2. Experience awards and hit-point gains are divided by it; special event 2 loops over it.
- Used by: Attributes and classes › Classes, Run a special event › Level gain (event 2)
DS:0x1ed7 — Saving-throw and hit-roll group of each class
- Layout: one byte per class: 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 3, 2, 0, 0, 2
- Role: 0 warriors, 1 wizards, 2 priests, 3 rogues: always the group of the class's first base class. Read by the character saving throw, the damage calculation and the character hit roll. At creation, a nonzero byte (a class without a fighter, paladin or ranger component) limits strength to 18 in the creation limits.
- Comparative source: REF-SCUMM-017,
_charClassModifieringenerateStats. - Used by: Saving throws › A character's saving throw, Saving-throw categories › How the saving throw is rolled, Creating a party › Rolling the attributes
DS:0x1f9a — Class mask table
- Layout: 15 bytes
- Role: Maps each class to its
CharacterClassMaskbits, used by the class restriction check. Entry 13, RANGER/CLERIC (DS:0x1fa7), is0x05, the fighter and cleric bits, like entry 6, FIGHTER/CLERIC; the ranger bit0x20is missing. - Used by: Character class masks, Condition expression tokens › Operand layouts, Anomalies and bugs
DS:0x1fa9 — Alignment names
- Layout: 9 far pointers
- Role: Names printed on the character sheet for
alignment0 to 8: LAWFUL GOOD, NEUTRAL GOOD, CHAOTIC GOOD, LAWFUL NEUTRAL, TRUE NEUTRAL, CHAOTIC NEUTRAL, LAWFUL EVIL, NEUTRAL EVIL, CHAOTIC EVIL. Also the items of the alignment menu. - Used by: Attributes and classes › Attributes, Characters of the game, Texts
DS:0x1fcd, DS:0x2871 — Ordinal words
- Layout: five far pointers at
DS:0x1fcd, then five zero-terminated strings,First,Second,Third,FourthandFifth, atDS:0x2871,0x2877,0x287e,0x2884and0x288b - Status: the code that reads the pointers has not been traced; the use of the words is unknown.
- Role: The ordinal words of the game's text, reached through a table of far pointers.
- Used by: Texts
DS:0x346a — Turn-undead thresholds
- Layout: rows of 14 signed bytes, by turn resistance; rows 0 to 9 hold thresholds (−1 destroy, 99 never), the bytes from row 10 on belong to other data
- Role: Read by the turn-undead threshold at index
14 × resistance + min(level, 14). Column 0 is never read, and index 14 is
the first byte of the next row (
ANOMALY-131). - Used by: Attack spells
DS:0x5559, DS:0x3462–DS:0x3469, DS:0x328f–DS:0x32e7 — Combat tables
- Layout: words and signed bytes; see the role
- Role:
0x5559: six word pairs (damage flag, immunity) of the monster damage calculation: (0x01,0x10), (0x02,0x20), (0x80,0x400), (0x20,0x800), (0x40,0x80), (0x400,0x40).0x3462and0x3466: the to-hit step (1, 1, 2, 1) and level divisor (1, 3, 3, 2) of the four class groups of0x1baa9, the group beingDS:0x1ed7[class].0x3299(base0x3298),0x32bc(base0x32bb),0x32d5(base0x32d4): strength hit (scores 1–25), strength damage (1–25) and dexterity hit (1–19) modifiers; the score-1 values are −5, −4 and −6. The dexterity table's bytes for scores 20–22 overlap the following data.0x328f/0x3294and0x32b2/0x32b7: exceptional-strength limits 1, 51, 76, 91, 100 with hit modifiers 1, 2, 2, 2, 3 and damage modifiers 3, 3, 4, 5, 6.- Monsters save with the warriors' threshold table at
0x31ed.
- Used by: Hit rolls › A character's hit roll, Damage to a monster › How the damage is reduced, Kinds of damage dealt to a monster, Level data (INF), Tools, Anomalies and bugs
DS:0x31ac–DS:0x3237 — Saving-throw thresholds
- Layout: four tables of signed bytes, one row of steps per category
0–4: priests
0x31ac(5 × 7), rogues0x31cf(5 × 6), warriors0x31ed(5 × 10), wizards0x321f(5 × 5). - Role: Thresholds read by the table lookup;
the values are in a character's saving throw.
The warriors' tenth column is never read. The rogues' bytes at
0x31da(7) and0x31e0(4) are the anomaly. - Used by: Saving throws › A character's saving throw, Saving throws › A monster's saving throw, Saving-throw categories, Tools, Anomalies and bugs
DS:0x3238–DS:0x3261 — Saving-throw group parameters
- Layout: indexed by group 0–5: at
0x3238six far pointers to the threshold tables (warriors, wizards, priests, rogues, warriors, warriors); at0x3250six level caps (17, 21, 19, 21, 17, 17); at0x3256six divisors (2, 5, 3, 4, 2, 2); at0x325csix row lengths (10, 5, 7, 6, 10, 10). - Role: Read by the saving-throw table lookup. No class uses groups 4 and 5.
- Used by: Saving throws › A character's saving throw, Saving-throw categories › How the saving throw is rolled
DS:0x319a, DS:0x31a0, DS:0x31a6 — Hit-point tables
- Layout: six signed bytes each, one per base class (fighter, mage, cleric, thief, paladin, ranger)
- Role: Hit die (10, 4, 8, 6, 10, 10), last level rolled (9, 10, 9, 10, 9, 9) and fixed gain above it (3, 1, 2, 2, 3, 3), read by hit points for a level.
- Used by: Attributes and classes › Classes
DS:0x3262 — Class components
- Layout: 15 × 3 bytes
- Role: The base classes of each class, in order,
0xfffor none (base classes 0 fighter, 1 mage, 2 cleric, 3 thief, 4 paladin, 5 ranger); read by the class component routines. - Used by: Attributes and classes › Classes, Spell slots › Spell slots per level
DS:0x3319 — Constitution hit-point modifiers
- Layout: signed bytes indexed by constitution
- Status: the byte at score 0 (−1) has no established owner; score 25 reads the first byte (0) of the mage experience table. Only a character transferred from Eye of the Beholder I can have such a score.
- Role: −3, −2, −2, −1, −1, −1, then 0 from 7 to 14, then +1 to +5 for 15 to 19, +6 for 20 to 22 and +7 for 23 and 24; read by the constitution modifier.
- Used by: Experience and levels › Gaining a level
DS:0x3332–DS:0x3461 — Experience tables
- Layout: five tables of 14 signed dwords — mage
0x3332, fighter0x336a, cleric0x33a2, thief0x33da, paladin and ranger0x3412— and at0x344asix far pointers to them by base class. - Role: Experience needed for levels 1 to 13; entry 13 is −1. Read by the threshold routine.
- Used by: Experience and levels › Experience and levels, Tools
DS:0x5545–DS:0x5558 — Saving-throw constitution adjustment
- Layout: 20 signed bytes indexed by
constitution0–19: 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5. - Role: Subtracted from the threshold by the saving throw when its race argument is 3 or 5 and the category 0, 1 or 4, or 4 and the category 1 or 4. A constitution of 20 to 25 would read the following combat table: 1, 0, 16, 0, 2, 0.
- Used by: Saving throws › The constitution adjustment, Saving-throw categories › How the saving throw is rolled
DS:0x6dd2 — Party block
- Layout: word
- Role: The block where the party stands.
- Used by: Change level or load monster resources › Behavior, Identify items › Behavior, Level 4: the forest › In brief
DS:0x6dd4 — Party direction
- Layout: word
- Role: The direction the party faces, a
Directionvalue. The turn commands and turn the party keep it in 0–3; the script assignment at0x25acfstores the sign-extended script byte as is, and the tables indexed by it are read with that value until the next turn: unmasked readers at0x1aeb5(table of four-byte entries),0x1c176and0x1c1af(a 4-byte local table of block offsets),0x1c601and0x1e64a. - Used by: Change level or load monster resources › Behavior, Condition expression tokens › Operand layouts, Level 4: the forest › In brief, Set walls or a direction › Behavior, Turn the party or flying objects › Behavior, Directions › Where it is used
DS:0xe608 — Characters
- Layout: 6 records of
0x159bytes - Role: The party's characters, one
CharacterRuntimeeach. - Used by: Character record › In brief, Identify items › Behavior, Saving and restoring › What a saved game holds, Values passed on to other routines › The routines, Transferring a party from Eye of the Beholder I, Saved games (SAV)
DS:0xef2e — Copy of the party block
- Layout: word
- Role: Set to the party block before the game loop (
0x1ca17) and at the start of every pass (0x1ca23). No instruction of the resident image or the overlays reads it. - Used by: —
DS:0x2724, DS:0x1f46 — Class names
- Layout: 15 strings (file offset
0x30a84); 15 far pointers to them atDS:0x1f46 - Role: The names of the 15 character classes, in class order. The pointers are the items of the class menu.
- Used by: Character class masks › The class table, Characters of the game, Texts
DS:0x27d0 — Base-class names
- Layout: six strings (file offset
0x30b30) - Role: The six base-class names, in the bit order of
CharacterClassMask. - Used by: Character class masks › The class table, Texts
DS:0x268c, DS:0x1f16 — Race and sex names
- Layout: 12 strings; 12 far pointers to them at
DS:0x1f16 - Role: HUMAN MALE, HUMAN FEMALE, ELF MALE, ELF FEMALE, HALF-ELF MALE,
HALF-ELF FEMALE, DWARF MALE, DWARF FEMALE, GNOME MALE, GNOME FEMALE,
HALFLING MALE, HALFLING FEMALE: the items of the
race menu, whose choice is stored in
race_and_sex. The race is that value divided by 2. - Used by: Creating a party › Creating the party, Races, Characters of the game, Texts
DS:0x079f–DS:0x0966 — Creation tables
- Layout:
DS:0x079frace modifiers, 6 races × 6 signed words;DS:0x07e7starting levels, 15 classes × 4 bytes (three levels, then the number of classes);DS:0x0823race minimums andDS:0x086brace maximums, 6 × 6 words;DS:0x08b3class minimums, 15 × 6 words. Attributes are in the order strength, intelligence, wisdom, dexterity, constitution, charisma; races in the order of the race names. A strength maximum of0x6412is 18 with a percentage of 100. - Role: Read by generate a character and the creation limits. The values are listed on the party page.
- Comparative source: REF-SCUMM-017,
_raceModifiersandgenerateStats. - Used by: Creating a party › Rolling the attributes
DS:0x096f, DS:0x0987 — Creation menu masks
- Layout:
DS:0x096f6 dwords, one per race;DS:0x098715 dwords, one per class - Role: Bit n of a race's mask allows class n in the
class menu:
0x003f,0x07bb,0x77fb,0x00f1,0x08f1,0x00b1. Bit n of a class's mask allowsalignmentn in the alignment menu:0x1fffor FIGHTER, MAGE, CLERIC, FIGHTER/CLERIC, FIGHTER/MAGE, FIGHTER/CLERIC/MAGE and CLERIC/MAGE;0x7for RANGER and RANGER/CLERIC;0x1for PALADIN;0x1fefor the others. - Comparative source: REF-SCUMM-017,
_classMenuMasksand_alignmentMenuMasks. - Used by: Creating a party › Race, class and alignment
DS:0x0af2, DS:0x0b02 — Starting armour lists
- Layout:
DS:0x0af24 far pointers to the armour records;DS:0x0b0215 words, the list of each class (0 fighter, paladin or ranger component; 1 MAGE; 2 CLERIC, CLERIC/THIEF, CLERIC/MAGE; 3 THIEF, THIEF/MAGE) - Role: Read by starting status and items.
- Comparative source: REF-SCUMM-017,
finish(classDefaultItemsListIndex,itemList0–itemList3). - Used by: Entering the game › Entering the game
DS:0x0b20–DS:0x0b57 — Prepared-party tables
- Layout:
DS:0x0b204 far pointers to the names ALLABAR, WILLIAM, CIRCE and APHRODITE (DS:0x0b78…); then 4 words each of portrait (DS:0x0b30: 23, 7, 31, 29),class_index(DS:0x0b38: 2, 5, 3, 4),race_and_sex(DS:0x0b40: 0, 0, 3, 1),alignment(DS:0x0b48: 0, 1, 1, 1) and level (DS:0x0b50: 6, 7, 7, 7).DS:0x0b58starts the text "Entering game. Please wait." - Role: Read by the prepared party, which reads six entries of each, two past the end of every table.
- Used by: Entering the game › A prepared party, Characters of the game, Texts
DS:0xcb78 — Current creation box
- Layout: word, 0–3
- Role: The box, and so the character record, that the creation routines work on.
- Used by:
DS:0xe4d2 — Resting flag
- Layout: word
- Role: Set to 1 by the monster rounds while resting
around their monster and flying-object updates, then cleared. While it is
set, a monster's move plays no sound (
0x1a090in check a candidate move), the scene redraw skips its final copy to the screen (0x3f77c), and the routine at0x22d19plays sound0x23and returns. - Comparative source: REF-SCUMM-019,
_partyResting. - Used by: Obstacles and other monsters › The move check, Sound effects
DS:0xee20 — Character being swapped
- Layout: signed byte;
0xffwhen no swap is under way - Role: The first character chosen by swap two characters; its portrait shows "Swapping" until the second choice.
- Comparative source: REF-SCUMM-018,
_exchangeCharacterId. - Used by: Formation › Changing the formation
DS:0xcc18, DS:0xcb64 — Creation limits
- Layout: two arrays of 7 words: minimums at
DS:0xcc18, maximums atDS:0xcb64; entries 0–5 are the attributes, entry 6 (DS:0xcc24,DS:0xcb70) the hit points - Role: Set by the creation limits and, for hit points, by modify a character from the hit-point limits.
- Used by: The creation screen › Portraits, names and controls, The creation screen
DS:0xd0b2, DS:0xd17a — Creation shapes
- Layout: 67 far pointers,
DS:0xd0b2–0xd1bd - Role: Filled by load the creation images:
entries 0–43 the portraits, entries 50–59 (
DS:0xd17a) the box-animation frames. The other 13 stay null. All 67 are released, and not cleared, by release the creation images. - Used by:
DS:0x0eee, DS:0x0f19, DS:0x0f28, DS:0x0f3a, DS:0x0f53, DS:0x0f6b — Rest texts
- Layout: zero-terminated strings
- Role: Printed by the rest and its
helpers: the refusal while the rest refusal flag is set (
0x0eee, at0x45107); the recovered cleric and mage spell (0x0f19,0x45341;0x0f28,0x45407); a healer's cure (0x0f3a,0x455c9); the hours counter (0x0f53,0x45b4a); the refusal when monsters are near (0x0f6b,0x45d0d). These are file offsets of overlay code. - Used by: Resting › Resting, Texts, Resting: special cases
DS:0x14a0, DS:0x1598, DS:0x15f6 — Recruitment texts
- Layout: zero-terminated strings
- Role:
CANCEL(0x14a0) and the prompt to choose the character to drop (0x1598), both used by make room (overlay code at file offsets0x4aca0,0x4acaf); the default text of the shared join (0x15f6,0x4aea9), which no known caller selects. - Used by: Recruiting and dismissing characters › Recruiting and dismissing characters
DS:0x163b, DS:0x1661, DS:0x167d — Menu labels and the dream picture
- Layout: zero-terminated strings
- Role:
ABORT, the last choice of the character pick and of the resurrection menu (overlay code at file offsets0x4b26aand0x4b7b9), andDREAM, the picture of the dream sequence (0x4bcdf). - Used by: Resting › Whether the party can rest, Texts, Resting: special cases
DS:0x16ce — Item types kept by a party transfer
- Layout: one byte per item type, indexed by the type of an Eye of the
Beholder I item read as a signed byte, with no bound check (overlay code at file offset
0x4c507); bytes for types 0–59 lie before other data atDS:0x170a, the chooser's label positions - Status: where the table ends is inferred: the last nonzero byte is type 50 and the bytes for types 51–59 are zero.
- Role: Read by convert an item: 0 drops the
item. The types with a nonzero byte are 0, 1, 2, 4, 5, 7, 9–16, 18–22,
24, 25, 27–32, 34, 35, 39, 41–44, 47, 48 and 50. The byte of type 4 (
DS:0x16d2) is 1, although the item table holds no item of type 4 to take its name from, so such an item is always deleted with the conversion-failure message. - Comparative source: REF-SCUMM-017,
TransferPartyWiz::convertItem(_itemTable). - Used by: Transfer: spells and items › Anomalies of the transfer, Run a sequence › Without a level change, Anomalies and bugs
DS:0x1779 — Item conversion failure
- Layout: zero-terminated format string
- Role: The message of convert an item
when no item of the table gives a name, formatted with the Eye of the
Beholder I item's type, icon, value and flags (overlay code at file offsets
0x4c77a–0x4c7ed). - Used by: Transfer: spells and items › Items
DS:0x17e1, DS:0x1816, DS:0x184b, DS:0x1852 — Party transfer screen texts
- Layout: zero-terminated strings
- Role: Printed by the chooser: its two
instructions (
0x17e1,0x1816, overlay code at file offsets0x4cc19,0x4cc34) and the labelsCANCELandOK(0x184b,0x1852;0x4ccb8,0x4ccd4). - Used by: Transferring a party from Eye of the Beholder I › Transferring a party from Eye of the Beholder I, Texts, Transfer: spells and items
DS:0x5590 — Level gain text
- Layout: zero-terminated format string
- Role: The message of gain a level, formatted with
the character's name (
0x20211). - Used by: Experience and levels › Gaining a level, Texts