Site Tools


documentation:file_formats:games:deathkeep

This is an old revision of the document!


The unofficial 3DO Deathkeep files format specifications by Versus (vas.1987), 2024 (version 1.0)

Note:
All data is BIG ENDIAN.
Directions for stairs and ramps means that named direction must have considered from lower to upper part of the structure. i.e. North direction for the ramp means that I’m sliding from the top towards South.
Directions for the monsters means that monster is faced towards the named direction.

Contents

Overview

Introduction

Level voxel files (\data2\levels\*)

Level data files (\data2\levels\*data)

Global data files (\data2\DK Data*)

Savefile structure


OVERVIEW. This description covers almost all game data files, which contains level geometry, level textures, inventory items and monsters. Movies, sounds, music and separate cel files are excluded from documenting. I also tried to investigate savefile data structure.

INTRODUCTION.
3DO and PC port have identical levels, but level files have different format.
Both 3DO and PC levels consist of voxels. Every voxel is a 3D cube which may contain different combinations of level elements. It may contain ramp or stair only or teleport or level exit. Every level must fit in parallelogram with dimensions 64 by 32 by 8. Where 8 is height and as we could say the number of Floors. We have 16384 voxels in total! Pretty much, isn’t it?
3DO levels consist of two files. First one contains voxel table, Second contains textures, animation data, teleports and other logic, items and monsters.

A) LEVEL VOXEL FILES (\data2\levels\*)

Each level voxel file is 131 072 bytes. Each voxel in 3DO version is encoded by 8 bytes. So, there are 16 384 voxels. If voxel has 0xFF value, it’s blank for the game engine. Every variation from it means that voxel is used by the game. It can be just walls, ceiling and floor with textures, it can be ramp or stairs, item or monster can be placed in. Blank voxels may be located inside large halls, in the center of the room, if the room is big enough.
First voxel in file has position in 0,0,0 (X, Y, Z). Second voxel has position 0,0,1 (X, Y, Z). It means that second voxel is located directly above the first one. First 8 voxels are located one above another. Voxel number 9 is located near to first column in the width direction on the coordinates: 0,1,0 (X, Y, Z).

1.jpg

Voxel file structure

Offset (HEX)Length, bytesDescriptionChapter
08Voxel #0A
88Voxel #1
0x108Voxel #2
0x1FFF88Voxel #16383

Each voxel is encoded by 8 bytes and they are numbered from 0 to 7.

Voxel structure

Byte #Length, bitsDescriptionChapter
08Stairs, Steps, Ramps. (also linked with byte 7 when set to teleports, Elevators)A.1
14Doors, closed doorsA.2
4Brightness, Flickering
28First number for the cube's palette specsA.3
34Always zeroA.4
4Second number for the cube's palette specs
48Always zeroA.5
58Additional item’s specsA.6
68Always zeroA.7
78Item&Enemy (also bound with byte 0 when set to teleport, elevator)A.8

A.1)

Byte #0. It contains data about ramps, steps and stairs. Various values can encode all directions of the ramp or stair. Both ramps and stairs can be 2 types. The first type encodes a ramps or stair in lower half of the cube height. The second type encodes the ramp or stair in upper half of the cube height to the top of the cube. Values in range 0x80 – 0x9A are for game inner logic (teleports, elevators, monster and fireballs triggers, etc.).

stair_ramp.jpg

This byte also encodes a steps, if I may say so. This steps have a various elevation from the floor ground and have flat surface. Using different values, you may do a fine tuning for your level design.

steps.jpg

I found some values which affects a level in a weird way and not actually present in the game. May be there are more, I didn’t test others.

weird1.jpgweird2.jpgweird3.jpgweird4.jpg

All known values of Byte #0 are in the table below.

Byte #0 (HEX) Description
0 N/A
01 Stairs South Low
02 Stairs North Low
03 Stairs West Low
04 Stairs East Low
05 Stairs South Upper
06 Stairs North Upper
07 Stairs West Upper
08 Stairs East Upper
09 Columns in cube's corners
0A 2 steps pyramid. Pedestal
0B Double square wall in the center
0C Big square column in the center
0D
0E
0F Step. Height 16. Default texture on the walls. Without top texture
10 Elevator path definer. Must be set in addition with other bytes (Byte #7, Block 4)
11 Step. Height 1
12 Step. Height 2
13 Step. Height 3
14 Step. Height 4
15 Step. Height 5
16 Step. Height 6
17 Step. Height 7
18 Step. Height 8
19 Step. Height 9
1A Step. Height 10
1B Step. Height 11
1C Step. Height 12
1D Step. Height 13
1E Step. Height 14
1F Step. Height 15
20
21 Step. Height 1. Without vert. textures
22 Step. Height 2. Without vert. textures
23 Step. Height 3. Without vert. textures
24 Step. Height 4. Without vert. textures
25 Step. Height 5. Without vert. textures
26 Step. Height 6. Without vert. textures
27 Step. Height 7. Without vert. textures
28 Step. Height 8. Without vert. textures
29 Step. Height 9. Without vert. textures
2A Step. Height 10. Without vert. textures
2B Step. Height 11. Without vert. textures
2C Step. Height 12. Without vert. textures
2D Step. Height 13. Without vert. textures
2E Step. Height 14. Without vert. textures
2F Step. Height 15. Without vert. textures
30 Step. Height 0. Jump up 1 floor
31 Step. Height 1. Without vert. textures. Jump up 1 floor
32 Step. Height 2. Without vert. textures. Jump up 1 floor
33 Step. Height 3. Without vert. textures. Jump up 1 floor
34 Step. Height 4. Without vert. textures. Jump up 1 floor
35 Step. Height 5. Without vert. textures. Jump up 1 floor
36 Step. Height 6. Without vert. textures. Jump up 1 floor
37 Step. Height 7. Without vert. textures. Jump up 1 floor
38 Step. Height 8. Without vert. textures. Jump up 1 floor
39 Step. Height 9. Without vert. textures. Jump up 1 floor
3A Step. Height 10. Without vert. textures. Jump up 1 floor
3B Step. Height 11. Without vert. textures. Jump up 1 floor
3C Step. Height 12. Without vert. textures. Jump up 1 floor
3D Step. Height 13. Without vert. textures. Jump up 1 floor
3E Step. Height 14. Without vert. textures. Jump up 1 floor
3F Step. Height 15. Without vert. textures. Jump up 1 floor
40 Step. Height 0. Jump up 2 floors
41 Step. Height 1. Without vert. textures. Jump up 2 floors
42 Step. Height 2. Without vert. textures. Jump up 2 floors
43 Step. Height 3. Without vert. textures. Jump up 2 floors
44 Step. Height 4. Without vert. textures. Jump up 2 floors
45 Step. Height 5. Without vert. textures. Jump up 2 floors
46 Step. Height 6. Without vert. textures. Jump up 2 floors
47 Step. Height 7. Without vert. textures. Jump up 2 floors
48 Step. Height 8. Without vert. textures. Jump up 2 floors
49 Step. Height 9. Without vert. textures. Jump up 2 floors
4A Step. Height 10. Without vert. textures. Jump up 2 floors
4B Step. Height 11. Without vert. textures. Jump up 2 floors
4C Step. Height 12. Without vert. textures. Jump up 2 floors
4D Step. Height 13. Without vert. textures. Jump up 2 floors
4E Step. Height 14. Without vert. textures. Jump up 2 floors
4F Step. Height 15. Without vert. textures. Jump up 2 floors
50 Step. Height 0. Jump up 3 floors
51 Step. Height 1. Without vert. textures. Jump up 3 floors
52 Step. Height 2. Without vert. textures. Jump up 3 floors
53 Step. Height 3. Without vert. textures. Jump up 3 floors
54 Step. Height 4. Without vert. textures. Jump up 3 floors
55 Step. Height 5. Without vert. textures. Jump up 3 floors
56 Step. Height 6. Without vert. textures. Jump up 3 floors
57 Step. Height 7. Without vert. textures. Jump up 3 floors
58 Step. Height 8. Without vert. textures. Jump up 3 floors
59 Step. Height 9. Without vert. textures. Jump up 3 floors
5A Step. Height 10. Without vert. textures. Jump up 3 floors
5B Step. Height 11. Without vert. textures. Jump up 3 floors
5C Step. Height 12. Without vert. textures. Jump up 3 floors
5D Step. Height 13. Without vert. textures. Jump up 3 floors
5E Step. Height 14. Without vert. textures. Jump up 3 floors
5F Step. Height 15. Without vert. textures. Jump up 3 floors
60 Step. Height 0. Jump up 4 floors
61 Step. Height 1. Without vert. textures. Jump up 4 floors
62 Step. Height 2. Without vert. textures. Jump up 4 floors
63 Step. Height 3. Without vert. textures. Jump up 4 floors
64 Step. Height 4. Without vert. textures. Jump up 4 floors
65 Step. Height 5. Without vert. textures. Jump up 4 floors
66 Step. Height 6. Without vert. textures. Jump up 4 floors
67 Step. Height 7. Without vert. textures. Jump up 4 floors
68 Step. Height 8. Without vert. textures. Jump up 4 floors
69 Step. Height 9. Without vert. textures. Jump up 4 floors
6A Step. Height 10. Without vert. textures. Jump up 4 floors
6B Step. Height 11. Without vert. textures. Jump up 4 floors
6C Step. Height 12. Without vert. textures. Jump up 4 floors
6D Step. Height 13. Without vert. textures. Jump up 4 floors
6E Step. Height 14. Without vert. textures. Jump up 4 floors
6F Step. Height 15. Without vert. textures. Jump up 4 floors
70 Step. Height 0. Jump up 5 floors
71 Step. Height 1. Without vert. textures. Jump up 5 floors
72 Step. Height 2. Without vert. textures. Jump up 5 floors
73 Step. Height 3. Without vert. textures. Jump up 5 floors
74 Step. Height 4. Without vert. textures. Jump up 5 floors
75 Step. Height 5. Without vert. textures. Jump up 5 floors
76 Step. Height 6. Without vert. textures. Jump up 5 floors
77 Step. Height 7. Without vert. textures. Jump up 5 floors
78 Step. Height 8. Without vert. textures. Jump up 5 floors
79 Step. Height 9. Without vert. textures. Jump up 5 floors
7A Step. Height 10. Without vert. textures. Jump up 5 floors
7B Step. Height 11. Without vert. textures. Jump up 5 floors
7C Step. Height 12. Without vert. textures. Jump up 5 floors
7D Step. Height 13. Without vert. textures. Jump up 5 floors
7E Step. Height 14. Without vert. textures. Jump up 5 floors
7F Step. Height 15. Without vert. textures. Jump up 5 floors
80 Teleport. Set Byte #7 to 0xE4 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
81 Trigger for the door. Set Byte #7 to 0xE5 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
82 Elevator related DOWN. Set Byte #7 to 0xE6, set Byte #0 along the path to 0x10 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
83 This cube points on cubes around elevators. Set Byte #7 to 0xE7 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
84 Wall fireball trigger. Set Byte #7 to 0xE8 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
85 Floor flame trigger. Set Byte #7 to 0xE9 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
86 Ceiling fireball trigger. Wait an attack from above. Set Byte #7 to 0xEA and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
87 Wall fireball trigger (blue fireball). Set Byte #7 to 0xEB and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
88 Switching off the light (reduces brightness). Set Byte #7 to 0xEC and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
89
8A
8B This cube points on some Monsters nearby. Triggers monsters to active state. Set Byte #7 to 0xEF and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
8C N/A. Not working. Present only in levels #3, 7, 13, 14 basically outside level cubes.
8D N/A
8E N/A
8F N/A
90 N/A
91 N/A
92 N/A
93 N/A
94 This cube points on cubes. Flickering light turns on in those cubes in case of triggering. Set Byte #7 to 0xF8 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
95 Elevator DOWN. Set Byte #7 to 0xF9, set Byte #0 on the path to 0x10 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
96 Elevator UP. Set Byte #7 to 0xFA, set Byte #0 on the path to 0x10 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
97 Elevator DOWN. Set Byte #7 to 0xFB, set Byte #0 on the path to 0x10 and use blocks 4, 5 (See chapter B, LEVEL DATA FILES)
98
99
9A
9B
9C
9D
9E
9F
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0 Ramp West. Low
F1 Ramp West. High
F2 Ramp East. Low
F3 Ramp East. High
F4 Ramp North. Low
F5 Ramp North. High
F6 Ramp South. Low
F7 Ramp South. High
F8 N/A?
F9 N/A?
FA N/A?
FB N/A?
FC N/A?
FD N/A?
FE N/A?
FF

A.2)

Byte #1. Contains data about cube’s inner brightness, light flickering, and partially doors logic. To ensure the Door is working properly it’s animation must be set in blocks 1-3 (see chapter B).
Bit #1 indicates that this cube has a door, Bit #3 indicates that door is closed or not (requires key). Bits must be set in both cubes (both door sides). Bit #1 == 1 means door presence in the cube. Bit #3 == 1 means that door requires a key. Setting these bits to make a door is necessary but not enough. Most common situation is when door may be opened from both sides. In this case two cubes which have the door, must have Bit #1 bit enabled. I can make a one-way path using a closed door bit (Bit #3) from one side only. So, this area may be accessed but there is no way back without a key.
Byte #1, bits #0-3:
Bit #1 = 1 means that a door is present
Bit #3 = 1 means that a door is locked
You can play with first 4 bits of Byte #1:
0x2 – door present
0xA – door present and locked
0 – door doesn’t exist

Bits #4-7 within Byte #1 describes cube’s inner brightness or light flickering.

Byte #1, bits #4-7 (HEX)Description
1Brightness 14 (brighter)
2 Brightness 7
3Brightness 13
4Brightness 6
5Brightness 12
6Brightness 5
7Brightness 11
8Brightness 4
9Brightness 10
ABrightness 3
BBrightness 9
CBrightness 2
DBrightness 8
EBrightness 1 (darker)
FFlickering light

A.3)

Byte #2. First palette byte. (See chapter B, LEVEL DATA FILES). This byte is used as a first palette ID part for the walls, ceiling, floors and the textures. This byte must be considered with Byte #3.

A.4)
Byte #3
. First 4 bits are always zero. The next 4 bits are used as a second palette ID part for the walls, ceiling, floors and the textures like Byte #2. Textures encodes inner surfaces of the scenery cube and cube’s collisions. This byte must be considered with Byte #3.
Bytes #2, #3 together represents palette ID in *data file. (See chapter B, LEVEL DATA FILES).
Example:
Byte #2 = 0xF4.
Byte #3 = 0xA.
Palette number = 0xF4A.

A.5)
Byte #4
. This byte isn’t used by the game and always equals zero.

A.6)
Byte #5
. This byte adds additional data for character’s items from Byte #7 (0x50-0xC3). Helms, Armor, Weapons can gain additional specs, i.e. Helm +2, Long sword +1, where +2 and +1 are additional specs. Possible values: 0 to 0x7F.

A.7)
Byte #6
. This byte isn’t used by the game and always equals zero.

A.8)
Byte #7
. This byte contains data about all items placed on the level. Health potions, weapons, food, amulets, decor and so on. It also encodes an enemy placement with chosen enemy direction. Item may be placed in the level, but some items are visible to Mage, but not visible for Dwarf or Half-Elf FighterMage.

Byte #7 (HEX) Description
0 Monster. 1st type. N
01 Monster. 1st type. NE
02 Monster. 1st type. E
03 Monster. 1st type. SE
04 Monster. 1st type. S
05 Monster. 1st type. SW
06 Monster. 1st type. W
07 Monster. 1st type. NW
08 Monster. 1st type. N. Moving by default
09 Monster. 1st type. NE. Moving by default
0A Not used by the game?
0B
0C Monster. 1st type. S Moving by default
0D Monster. 1st type. SW Moving by default
0E Monster. 1st type. W Moving by default
0F Monster. 1st type. NW Moving by default
10 Monster. 2nd type. N
11 Monster. 2nd type. NE
12 Monster. 2nd type. E
13 Monster. 2nd type. SE
14 Monster. 2nd type. S
15 Monster. 2nd type. SW
16 Monster. 2nd type. W
17 Monster. 2nd type. NW
18 Monster. 2nd type. N. Moving by default
19 Monster. 2nd type. NE. Moving by default
1A Monster. 2nd type. E. Moving by default
1B Monster. 2nd type. SE. Moving by default
1C Monster. 2nd type. S. Moving by default
1D Monster. 2nd type. SW. Moving by default
1E Monster. 2nd type. W. Moving by default
1F Monster. 2nd type. NW. Moving by default
20 Monster. 3rd type. N
21 Monster. 3rd type. NE
22 Monster. 3rd type. E
23 Monster. 3rd type. SE
24 Monster. 3rd type. S
25 Monster. 3rd type. SW
26 Monster. 3rd type. W
27 Monster. 3rd type. NW
28 Monster. 3rd type. N. Moving by default
29 Monster. 3rd type. NE. Moving by default
2A Monster. 3rd type. E. Moving by default
2B Monster. 3rd type. SE. Moving by default
2C Monster. 3rd type. S. Moving by default
2D Monster. 3rd type. SW. Moving by default
2E Monster. 3rd type. W. Moving by default
2F Monster. 3rd type. NW. Moving by default
30 Decor1, N
31 Decor1, NE
32 Decor1, E
33 Decor1, SE
34 Decor1, S
35 Decor1, SW
36 Decor1, W
37 Decor1, NW
38 Decor2, N
39 Decor2, NE
3A Decor2, E
3B Decor2, SE
3C Decor2, S
3D Decor2, SW
3E Decor2, W
3F Decor2, NW
40 Decor 3, N
41 Decor 3, NE
42 Decor 3, E
43 Decor 3, SE
44 Decor 3, S
45 Decor 3, SW
46 Decor 3, W
47 Decor 3, NW
48 Decor 4, N
49 Decor 4, NE
4A Decor 4, E
4B Decor 4, SE
4C Decor 4, S
4D Decor 4, SW
4E Decor 4, W
4F Decor 4, NW
50 Feast (Food)
51 Not used by the game
52 Dwarven Key, Tower Key, Fortress Key
53 Ancestral artifact RED
54 Ancestral artifact GREEN
55 Ancestral artifact BLUE
56 Rations
57 Healing potion
58 Potion of speed
59 Scroll of Acid protection
5A Rock
5B Dart
5C Scrying Glass
5D Orb of Lighting
5E Wand of Fear
5F Winged Boots
60 Helm
61 Bracers
62 Ring of Flying
63 Ring of Protection
64 Amulet of magic resistance (round)
65 Amulet of imminent return (knife type)
66 Dagger
67 Long Sword
68 Longbow
69 Spellbook
6A Cloak
6B Chain Mail
6C Scroll Spell
6D Defender Sword
6E Vorpal Sword
6F Battle Axe
70 Hammer
71 Staff
72 Sling
73 Arrow
74 Gauntlets
75 Shield
76 Flame Tongue
77 Crossbow
78 Not used by the game
79 Not used by the game
7A Amulet of Power
7B
7C
7D
7E
7F
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
documentation/file_formats/games/deathkeep.1713034614.txt.gz · Last modified: 2024/04/13 14:56 by vas.1987