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)

documentation/file_formats/games/deathkeep.1713007298.txt.gz · Last modified: 2024/04/13 07:21 by vas.1987