ivancich@utah-cs.UUCP (Eric Ivancich) (11/15/85)
Because of the many requests, I'm posting this information on the format
of the Dungeon of Doom character data file. This will allow you to
alter a character with a disk editing program such as MacTools or
Fedit. I've done my best to make this easy to understand, but there may
be hazy areas. Also, I do not guarantee any of this information. I
suggest you back up your disk prior to any modifications. For the
record, I congratulate the author of Dungeon of Doom, he did a fantastic
job. I hope he doesn't mind this information, for some of us are just
plain lazy. Please mail me any additions or corrections, and I'll try
to maintain this informaiton. Have fun!
UUCP: {ihnp4, seismo, hplabs, decvax, arizona}!utah-cs!ivancich
ARPA: ivancich@utah-cs
Dungeon of Doom stores it's character data in a hidden file named
'Character Data'. I will describe as much of the format of this file as
I've figured out. First of all, let's make sure we use the same
notation. Any byte in a file can be described by two numbers, the block
(relative to the beginning of the file), and the byte within the block.
To notate this, I will separate the block number and byte number by a
colon, and these numbers (as will all numbers) will be in hexedecimal
notation (i.e. 02:1A3 is block 2, byte 419d). Now, let's get started.
This file is always of length 02:095.
The name of the character is stored starting as 00:008 in ascii,
terminated by a 00 (DoD was written in C). I'm not sure what the
maximum length is.
The strength, intelligence, wisdom, dexterity, constitution, and
charisma are stored respectively in 6 consecutive bytes starting at
00:108. These bytes may have values from 00 to 19 (25d).
The maximum hit points for the character is stored in 00:13F. And the
hitpoints at the time of save are stored in 00:13D. These seem to be
unsigned bytes, but because of the gap, they may be stored as words.
Now for the inventory. This is difficult because some possesions
(potions, scrolls, wands, and rings) can give many descriptions:
copper wand - visual description
wand of digging? - guessed description (questionable)
wand of fear - actual description
Also, possesions can have a value:
wand of digging? +5? - questionable object and value
wand of fear +3 - nothing questionable
The question marks follow the parts of a description that are
questionable. You learn the actual description by observing its effects
or by using an Identify scroll. Also, you can forget all actual
descriptions of objects by reading a scroll of Amnesia. All items may
have a value, but I'm not sure if they make sense for some objects (i.e.
food, Orb, ...). There is also the attribute of enchantment or
cursedness(?), which I haven't yet figured out yet, but I can probably
point you in the right direction.
Let's discuss the inventory's format. Every item takes 8 bytes. The
first item is stored from 00:146 to 00:14D, and the second item is
stored from 00:14E to 00:155, and so on. I will refer to each of these
segments as records. I'm not sure what the maximum number of allowed
items is, disregarding the constraint of weight. The count of the
character's items is stored at 02:093. Anything beyond that number of
records is ignored. Every possible object is associated with a number
(see Table 1). This number is stored in the 1st byte of the record.
The second byte holds the actual value of the object, where the fourth
byte holds the 'guessed' value of the object. While viewing the
inventory from the DoD, the computer will show the 'guessed' value
unless it is 9D (-99d) in which case it will show the actual value. I'm
not sure of the meaning of the remaining bytes, but, I often see 01's in
the fifth through the eighth bytes, which leads me to think that they
are boolean values (enchantment or cursedness(?) possibly). See Table 2
for a synopsis.
There is still another aspect to the objects. For instance, once you
accurately identify an object, you will accurately identify all similar
objects, unless you read an Amnesia scroll. This information is not
stored with your inventory, rather, it is stored in a separate table.
During any one game, visual descriptions will always correspond to an
actual description (i.e. a blue potion will always be a Healing potion),
but this changes from game to game (character to character). The table
that has this information starts at 01:1A5, and each entry is three
bytes long. The first entry corresponds to object 00 (Confusion
potion), the second entry to object 01 (Extra-Healing potion), and so
on. Once again, I will refer to each entry as a record. The first byte
in the record seems to be a boolean. If it is true, all objects of
this type will be described by either their actual or 'guessed'
description. On the other hand, if this value is false, all objects of
that type will be described by their visual description. The second
byte is the number corresponding to the guessed description or FF to
indicate the actual description (see Table 1). Finally, the third byte
is the visual description of the object (see three letter codes in Table
1). "Huhh?", you say? See Table 3 for a synopsis. How about some
examples:
i in the 46th record, the bytes are 00 FF 2F
therefore, all Hunger rings will be described as "diamond ring"
ii in the 46th record, the bytes are 01 2A 2F
therefore, all Hunger rings will be described as "Resist Fire ring?"
iii in the 46th record, the bytes are 01 FF 2F
therefore, all Hunger rings will be described as "Hunger ring"
Well, that's about all I've figured out. There are some bytes that
remain a mystery to me. If you have anything to add or correct, please
send me mail.
------------------------------------------------------------------------------
Table 1
Potions Scrolls Wands
00 Confusion blu 11 Gain Level kal 1F Lightning cop
01 Extra-Healing red 12 Identify nau 20 Fire sil
02 Resist Fire whi 13 Enchant Armor bon 21 Ice iro
03 Healing cle 14 Magic Mapping pap 22 Death ivo
04 Invisibility swi 15 Teleport vel 23 Striking woo
05 Levitation oil 16 Enchant Weapon bal 24 Fear bra
06 Poison dbl 17 Protection sha 25 Digging tin
07 Speed gol 18 Wishing owe 26 Sleep ebo
08 Muscle glo 19 Intelligence shl 27 Polymorph bro
09 Resist Cold gre 1A Wisdom bin 28 Teleport bam
0A Dexterity sil 1B Remove Curse mor 29 Invisibility map
0B Constitution mag 1C Amnesia oha
0C Charisma hot 1D Joke anu
0D Blindness cya 1E Words On A Scroll bog
0E Worthless bro
0F Strength ora
10 Life yel
Rings Armor Weapons
2A Resist Fire gol 31 Elven Cloak 39 Long Sword
2B Resist Cold rub 32 Plate 3A Two-Handed Sword
2C Regeneration eme 33 Banded 3B 'Death Blade'
2D Slowness jad 34 Chain 3C Mace
2E Hunger pea 35 Leather 3D Dagger
2F X-ray dia 36 Shield 3E Leather Whip
30 Monster opa 37 Gloves 3F Sling
38 Helmet 40 Small Rock
41 Large Rock
Food Treasures 42 512K Macintosh
45 Food Ration (bad) 4A Diamond 43 Spear
46 Food Ration (good) 4B Ruby 44 Dart
47 Fruit 4C Emerald
48 Spider 4D Plastic Ball
49 Lizard 4E The Orb of Carnos
------------------------------------------------------------------------------
Table 2
======== ======== ======== ======== ======== ======== ======== ========
Object # Actl Val ???????? Gesd Val ???????? ???????? ???????? ????????
------------------------------------------------------------------------------
Table 3
================ ================ ================
actul or dscrptv actual or guess descriptive
01 00 FF xx xx
------------------------------------------------------------------------------
Table 4
Terms I invented for ease in explaining:
item - an object in the character's inventory (see object)
item record - 8 consecutive bytes used to describe an item
object - any of 4F (79d) tangible objects that the character can
manipulate
object record - 3 consecutive bytes used to describe an object
------------------------------------------------------------------------------
--
UUCP: {ihnp4, seismo, hplabs, decvax, arizona}!utah-cs!ivancich
ARPA: ivancich@utah-cs