Site Tools


documentation:file_formats:games:deathkeep

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:file_formats:games:deathkeep [2024/04/14 07:00] vas.1987documentation:file_formats:games:deathkeep [2024/04/15 13:56] (current) vas.1987
Line 7: Line 7:
 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 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. Directions for the monsters means that monster is faced towards the named direction.
 +
 +I made an app, which reads all game data needed for 3D model export and for some level edit. You can edit every cube, but you can’t extend or shrink the palette. You can extract level to wavefront *.obj format. You can edit a gap between cubes before exporting (for some 3rd app needs). You can also test your suggestions by editing cube’s properties and test it later in the game. First select the target cube, edit its value and click this button “edit”. Then just save a new file or overwrite the an existing one.
 +
 +----
 + <font inherit/inherit;;#ff0000;;inherit>**Level editor with source**</font> : [[https://github.com/Versusvs/3DO-Deathkeep-level-editor|https://github.com/Versusvs/3DO-Deathkeep-level-editor]]
  
 __**Contents**__ __**Contents**__
Line 22: Line 27:
 **Savefile structure** **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. **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.
  
Line 648: Line 652:
 |FE  |   | |FE  |   |
 |FF  |Blank (N/A)  | |FF  |Blank (N/A)  |
- 
-I made an app, which reads all game data needed for 3D model export and for some level edit. You can edit every cube, but you can’t extend or shrink the palette. You can extract level to wavefront *.obj format. You can edit a gap between cubes before exporting (for some 3rd app needs). You can also test your suggestions by editing cube’s properties and test it later in the game. First select the target cube, edit its value and click this button “edit”. Then just save a new file or overwrite the an existing one. ( 
- <font inherit/inherit;;#e74c3c;;inherit>**LINK**</font> ) 
  
 **B) LEVEL DATA FILES** (\data2\levels\*data) **B) LEVEL DATA FILES** (\data2\levels\*data)
  
-Data file structure+Data file structure:
  
 ^Offset (HEX)  ^Length (HEX)  ^Description  ^Chapter  | ^Offset (HEX)  ^Length (HEX)  ^Description  ^Chapter  |
Line 704: Line 705:
  
 **Custom collision. ** \\ **Custom collision. ** \\
-Base cube’s collision is set by palette (see chapter B.4). But in some cases like stairs, ramps, doors or windows must have a more complex collision. It means that only selected cube’s wall zones must be transparent for any kind of object or the actors. Custom wall collision is encoded by 8 bytes. Each bit in 8×8 grid encodes the collision in the cell. Note that all frame in opening door animation has a corresponding custom collision. Some patterns are shown below. There is one exclusion in this bit cell rule, when bit pattern doesn’t work as shown in the game. It’s just an opening in the wall (level 1), but bit mask looks weird… (see pattern 8).+Base cube’s collision is set by palette (see chapter B.4). But in some cases like stairs, ramps, doors or windows must have a more complex collision. It means that only selected cube’s wall zones must be transparent for any kind of object or the actors. Custom wall collision is encoded by 8 bytes. Each bit in 8×8 grid encodes the collision in the cell. Note that all frame in opening door animation has a corresponding custom collision. There is one exclusion in this bit cell rule, when bit pattern doesn’t work as shown in the game. It’s just an opening in the wall (level 1), but bit mask looks weird… (see pattern 8). Some patterns are shown below.
  
-{{..:media:deathkeep:ramplow.png?nolink&547x561}}+{{..:media:deathkeep:ramplow.png?nolink&300x308}}
  
 Pattern 1. Ramp, low ( Pattern 1. Ramp, low (
Line 713: Line 714:
  <font inherit/inherit;;inherit;;#3498db>0x0F</font>  <font inherit/inherit;;inherit;;#3498db>0x0F</font>
  <font inherit/inherit;;inherit;;#ff0000>0x3</font> 0 0 0 0).  <font inherit/inherit;;inherit;;#ff0000>0x3</font> 0 0 0 0).
 +
 +{{..:media:deathkeep:ramphigh.png?nolink&300x308}}
 +
 +Pattern 2. Ramp, high (
 + <font inherit/inherit;;inherit;;#ffff00>0xFF</font>
 + <font inherit/inherit;;inherit;;#66cc66>0xFF</font>
 + <font inherit/inherit;;inherit;;#f39c12>0xFF</font>
 + <font inherit/inherit;;inherit;;#009900>0xFF</font>
 + <font inherit/inherit;;inherit;;#ff0000>0x3F</font>
 + <font inherit/inherit;;inherit;;#0066cc>0x0F</font>
 + <font inherit/inherit;;inherit;;#66ccff>0x3</font> 0).
 +
 +{{..:media:deathkeep:roundholeinthecenter.png?nolink&300x308}}
 +
 +Pattern 3. Round hole in the center (
 + <font inherit/inherit;;inherit;;#66cc99>0xFF</font>
 + <font inherit/inherit;;inherit;;#f39c12>0xFF</font>
 + <font inherit/inherit;;inherit;;#66ccff>0xFF</font>
 + <font inherit/inherit;;inherit;;#999999>0xE7</font>
 + <font inherit/inherit;;inherit;;#ffcc00>0xE7</font>
 + <font inherit/inherit;;inherit;;#ffff00>0xFF</font>
 + <font inherit/inherit;;inherit;;#0066ff>0xFF</font>
 + <font inherit/inherit;;inherit;;#ff0000>0xFF</font> ).
 +
 +{{..:media:deathkeep:openingdoor1.png?nolink&300x308}}
 +
 +Pattern 4. Opening door, frame 1 (
 + <font inherit/inherit;;inherit;;#ffff00>0xE7</font>
 + <font inherit/inherit;;inherit;;#66ff99>0xE7</font>
 + <font inherit/inherit;;inherit;;#66ff00>0xE7</font>
 + <font inherit/inherit;;inherit;;#00ccff>0xE7</font>
 + <font inherit/inherit;;inherit;;#ffff99>0xE7</font>
 + <font inherit/inherit;;inherit;;#ffcc99>0xE7</font>
 + <font inherit/inherit;;inherit;;#ff0000>0xFF</font>
 + <font inherit/inherit;;inherit;;#33cc00>0xFF</font> ).
 +
 +{{..:media:deathkeep:openingdoor2.png?nolink&300x308}}
 +
 +Pattern 5. Opening door, frame 2 (
 + <font inherit/inherit;;inherit;;#ffff00>0xC3</font>
 + <font inherit/inherit;;inherit;;#66ff99>0xC3</font>
 + <font inherit/inherit;;inherit;;#66ff00>0xC3</font>
 + <font inherit/inherit;;inherit;;#66ccff>0xC3</font>
 + <font inherit/inherit;;inherit;;#ffff99>0xC3</font>
 + <font inherit/inherit;;inherit;;#ffcc99>0xE7</font>
 + <font inherit/inherit;;inherit;;#ff0000>0xFF</font>
 + <font inherit/inherit;;inherit;;#33cc00>0xFF</font> ).
 +
 +{{..:media:deathkeep:openingdoor3.png?nolink&300x308}}
 +
 +Pattern 6. Opening door, frame 3 (
 + <font inherit/inherit;;inherit;;#ffff00>0x81</font>
 + <font inherit/inherit;;inherit;;#66cc66>0x81</font>
 + <font inherit/inherit;;inherit;;#33ff00>0x81</font>
 + <font inherit/inherit;;inherit;;#0099cc>0x81</font>
 + <font inherit/inherit;;inherit;;#ff0000>0x81</font>
 + <font inherit/inherit;;inherit;;#ffcc33>0xC3</font>
 + <font inherit/inherit;;inherit;;#bbbbbb>0xFF</font>
 + <font inherit/inherit;;inherit;;#66ccff>0xFF</font> ).
 +
 +{{..:media:deathkeep:corner.png?nolink&300x308}}
 +
 +Pattern 7. Corner (
 + <font inherit/inherit;;inherit;;#ffff00>0x80</font>
 + <font inherit/inherit;;inherit;;#339966>0xC0</font>
 + <font inherit/inherit;;inherit;;#00ff00>0xE0</font>
 + <font inherit/inherit;;inherit;;#3399ff>0xF0</font>
 + <font inherit/inherit;;inherit;;#ff0000>0xF8</font>
 + <font inherit/inherit;;inherit;;#ffcc66>0xFC</font>
 + <font inherit/inherit;;inherit;;#bbbbbb>0xFE</font>
 + <font inherit/inherit;;inherit;;#33ccff>0xFF</font> ).
 +
 +{{..:media:deathkeep:openingframe.png?nolink&300x308}}
 +
 +Pattern 8. Opening frame (0 0
 + <font inherit/inherit;;inherit;;#00ff00>0x78</font> 0
 + <font inherit/inherit;;inherit;;#ff0000>0xF0</font>
 + <font inherit/inherit;;inherit;;#ffcc66>0xE8</font> 0
 + <font inherit/inherit;;inherit;;#66ccff>0xB4</font> ).
 +
 +All patterns used in the game see table below.
 +
 +^Bytes (HEX)^^^^^^^^Description|
 +|FF|FF|FF|FF|FF|FF|FF|FF|Closed door|
 +|C3|C3|C3|C3|C3|C3|C3|FF|Opening type 1|
 +|81|81|81|81|81|81|81|FF|Opening type 2|
 +|FF|3F|0F|03|0|0|0|0|Ramp low|
 +|FF|FF|FF|FF|FF|3F|0F|03|Ramp high|
 +|FF|FF|81|81|C3|E7|FF|FF|Triangle window|
 +|81|81|81|81|81|81|C3|FF|Opening with thick sides|
 +|FF|FF|FF|FF|C3|C3|C3|FF|Window in the upper part|
 +|FF|FF|81|81|81|99|99|FF|Double window type 1|
 +|C3|C3|C3|C3|C3|C3|FF|FF|Opening type 3|
 +|C0|C0|C0|C0|E0|F0|FF|FF|Half of the arch|
 +|F8|F8|F8|F8|F8|F8|FF|FF|Opening single-door|
 +|C0|C0|C0|C0|C0|C0|FF|FF|Opening single-door|
 +|C3|C3|C3|C3|C3|C3|C3|FF|Narrow opening|
 +|FF|FF|FF|C3|C3|C3|C3|FF|Double window type 2|
 +|C3|C3|C3|C3|C3|E7|FF|FF|Opening|
 +|FF|FF|99|99|99|99|FF|FF|Double narrow window|
 +|FF|FF|C3|C3|C3|E7|FF|FF|Arch window|
 +|FF|FF|81|81|81|FF|FF|FF| |
 +|F0|F0|F0|F0|FF|FF|FF|FF|Half of the arch|
 +|FF|C3|C3|C3|C3|C3|C3|FF| |
 +|FF|FF|A5|A5|A5|A5|FF|FF|Triple window|
 +|F0|F0|F0|F0|F0|F0|F0|F0|Window with side column|
 +|FF|FF|FF|E7|E7|FF|FF|FF|Hole in the center|
 +|0|0|0|0|0|0|C3|FF|Arch on the top. Without side collisions|
 +|E7|E7|E7|E7|E7|E7|E7|FF|Opening double door|
 +|C3|C3|C3|C3|C3|C3|C3|FF|Opening double door|
 +|81|81|81|81|81|81|C3|FF|Opening double door|
 +|FF|C3|81|81|81|81|C3|FF|Big hole|
 +
 +**B.2) Block 1** \\
 +Block 1 has constant size of 0x300 and consist of 3 equal parts. Part 1 (size = 0x100) is for backgrounds, Part 2 is for wall animation offsets, Part 3 is for repeated animation? (torches, reflections on the walls). Wall texture ID is linked to the Part 1(2, 3) offsets. If offset = 0, wall texture has no texture ID override or animation.\\
 +Block 1 has the following structure:
 +
 +^Offset (HEX)^Length (HEX)^Description|
 +|0|0x100|Part 1|
 +|0x100|0x100|Part 2|
 +|0x200|0x100|Part 3|
 +
 +1) Game engine looks to Part 1 offset = Texture ID. Value at this offset = texture ID override. It means that this new texture will draw instead of previous one.
 +
 +2) Game engine looks to Part 2 offset = Texture ID. Value at this offset = Block 2 offset. Part 2 is for single use animation (like doors).
 +
 +3) Game engine looks to Part 3 offset = Texture ID. Value at this offset = Block 2 offset. Part 3 is for repeated animations (like torches reflections).
 +
 +**B.3) Block 2** \\
 +Block 2 describes animation sequences texture IDs. Offsets values from Part 2 and 3 from Block 1 points to animation sequence beginning in this block. Block structure is the follows:
 +
 +^Offset (HEX)^Length^Description|
 +|0|1|Block 2 size (with this byte)|
 +|1|1|Base (background) texture?|
 +| |1|Key? (for doors)|
 +| |1|0? (for doors), First frame? (for animated objects)|
 +| |1|Animation speed|
 +| |1|Frames quantity|
 +| |various|Texture IDs (animation sequences)|
 +| |…|…|
 +| |1|Base (background) texture?|
 +| |1|Key? (for doors)|
 +| |1|0? (for doors), First frame? (for animated objects)|
 +| |1|Animation speed|
 +| |1|Frames quantity|
 +| |various|Texture IDs (animation sequences)|
 +| |…|…|
 +
 +If there are no animations on the level, Block 2 structure is the follows:
 +
 +^Offset (HEX)^Length (HEX)^Description|
 +|0|1|Block 2 size in bytes (with this byte)|
 +|1|3|0|
 +
 +**B.4) Block 3** \\
 +Block 3 is the Palette. Palette consist of 16-byte entries and each stores all texture IDs for each side of the cube, base collisions, additional collisions, floor damage flags, resting zone flags, low friction flags and textures for vertical stair’s polygons. Numeration begins from 0. Two Bytes #2, #3 (see chapter A.3, A.4) combined gives the palette #.\\
 +Block 3 structure is the follows:
 +
 +^Offset (HEX)^Length (HEX)^Description|
 +|0|4|Block 3 size in 16-byte entries (without this bytes)|
 +|4|0xF|16-byte entry n|
 +|4+0xF*1|0xF|16-byte entry n+1|
 +|4+0xF*2|0xF|16-byte entry n+2|
 +|…|…|…|
 +|4+0xF*(Block 3 size)/0xF|0xF|16-byte entry n*(Block 3 size)|
 +
 +16-bytes entries have the following structure:
 +
 +^Byte #^Description|
 +|1|Texture ID West|
 +|2|Texture ID South|
 +|3|Texture ID East|
 +|4|Texture ID North|
 +|5|Texture ID NW-SE (non-transparent from North)|
 +|6|Texture ID NE-SW (non- transparent from South)|
 +|7|Texture ID NW-SE (non- transparent from South)|
 +|8|Texture ID NE-SW (non- transparent from North)|
 +|9|Floor texture ID|
 +|10|Ceiling texture ID|
 +|11|?|
 +|12|Textures ID for vertical stair’s polygons, Low friction, Resting, Damage|
 +|13|?|
 +|14|?|
 +|15|Additional Collision. Non-visible obstacles, some thin columns inside the cube, etc.|
 +|16|Collision|
 +
 +Byte #12 structure
 +
 +|Texture for stairs (vertical)||||||||
 +|Low friction|Damage (not applicable on Bonus level)|Resting (except stairs and ramps. Applies only on a flat surfaces)| | | | | |
 +|Bit #7|Bit #6|Bit #5|Bit #4|Bit #3|Bit #2|Bit #1|Bit #0|
 +
 +Byte #16 collisions structure
 +
 +|North wall|South wall|East wall|West wall|Diag. NE-SW|Diag. NW-SE|Ceiling|Floor|
 +|Bit #7|Bit #6|Bit #5|Bit #4|Bit #3|Bit #2|Bit #1|Bit #0|
 +
 +**B.5) Level entry and exit coordinates** \\
 +8 bytes encoding level start and exit positions. Structure is the follows:
 +
 +^Byte #^Description|
 +|1|Start level X coordinate|
 +|2|Start level Y coordinate|
 +|3|Start level Z coordinate|
 +|4|Start level rotation|
 +|5|Exit level X coordinate|
 +|6|Exit level Y coordinate|
 +|7|Exit level Z coordinate|
 +|8|Always = 0?|
 +
 +Level exit coordinates may be 0 when Monster is triggering exit? Rotation values range:\\
 +0 = West dir, 0x40 = South dir, 0x80 = East dir, 0xC0 = North dir. Interpolation may be applied.
 +
 +**B.6) Block 4** \\
 +Block 4 stores offsets for teleports, elevators, collapsing floors and other such data type. These offsets are linked with Block 5 (see chapter B.7). Note that Byte #0 and Byte #7 (see chapter A) must be set to their corresponding values together. Block 4 starts with it’s size (4 bytes) and always equal 0x6C without this 4 bytes. All offsets in the table below starts after the block’s size. I.e. if Byte #7 and Byte #0 (see chapter A) are set, and value on offset in Block 4 is not 0, all data is located in Block 5 (see chapter B.7). Note that offset value for standart teleport in Block 4 is always 0, but teleport data may be in Block 5 (see chapter B.7).
 +
 +^Offset (HEX)^Byte #7 (Chapter A)^Byte #0 (Chapter A)^Description|
 +|0|0xE4|0x80|Standart Teleport. Works with zero byte set to 0x80 and blocks 4, 5|
 +|0x4|0xE5|0x81| |
 +|0x8|0xE6|0x82|Elevator down. Works with zero byte set to 0x82, blocks 4, 5 and 0xE7(0x83).|
 +|0xC|0xE7|0x83|This cube points on cubes around elevators. Use blocks 4, 5. Works with zero byte set to 0x83. May be one cube per level, may be some of them.|
 +|0x10|0xE8|0x84|Wall fireball trigger. Works with zero byte set to 0x84.|
 +|0x14|0xE9|0x85|Floor flame trigger. Works with zero byte set to 0x85.|
 +|0x18|0xEA|0x86|Ceiling fireball trigger. Wait an attack from above. Works with zero byte set to 0x86.|
 +|0x1C|0xEB|0x87|Wall fireball trigger (blue). Works with zero byte set to 0x87.|
 +|0x20|0xEC|0x88|Switch off the light (reduces brightness). Works with zero byte set to 0x88.|
 +|0x24|0xED|0x89| |
 +|0x28|0xEE|0x8A| |
 +|0x2C|0xEF|0x8B|This cube points on some Monsters to set to active mode. Works with zero byte set to 0x8B and blocks 4, 5|
 +|0x30|0xF0|0x8C| |
 +|0x34|0xF1|0x8D| |
 +|0x38|0xF2|0x8E| |
 +|0x3C|0xF3|0x8F| |
 +|0x40|0xF4|0x90| |
 +|0x44|0xF5|0x91| |
 +|0x48|0xF6|0x92| |
 +|0x4C|0xF7|0x93| |
 +|0x50|0xF8|0x94| |
 +|0x54|0xF9|0x95|Elevator related DOWN. Works with zero byte set to 0x95, blocks 4, 5 and 0xE7 (0x83). Byte #0 (see chapter A) in all cubes along the elevator’s way must be set to 0x10. Platform returns up?|
 +|0x58|0xFA|0x96|Elevator UP. Works with zero byte set to 0x96, blocks 4, 5 and 0xE7(0x83). Поднимается снизу наверх. Byte #0 (see chapter A) in all cubes along the elevator’s way must be set to 0x10. Platform returns down.|
 +|0x5C|0xFB|0x97|Elevator DOWN. Works with zero byte set to 0x97, blocks 4, 5 and 0xE7(0x83). Byte #0 (see chapter A) in all cubes along the elevator’s way must be set to 0x10.|
 +|0x60|0xFC|0x98| |
 +|0x64|0xFD|0x99| |
 +|0x68|0xFE|0x9A| |
 +
 +**B.7) Block 5** \\
 +Block 5 contains all special events logic (teleports, elevators, wall and ceiling triggers, etc.). All data in this block is linked with Block 4 offsets (see chapter B.6). If there are no data for block 5 (block is missing), Block 5 is 4 bytes length and = 4. In order to be working, Byte #0 and Byte #7 must be set (see chapter A).
 +
 +^Offset (HEX)^Length, bytes (HEX)^Description|
 +|-|4|Block 5 size (without these bytes)|
 +|0|1|Teleports or elevators quantity (or other types quantity)|
 +|1|3|Teleport or elevator or other entrance (trigger) (X, Y, Z)|
 +|4|1|Delimiter (always = 1 for teleports type). In other cases = number of dependent cubes.|
 +|5|3 x n|Teleport exit (X, Y, Z) or dependent cubes (3xn) for other types. n = number of dependent cubes. n=1 for teleports, because teleport has only one dependent cube (exit).|
 +|5+ 3 x n|3|Next teleport or elevator or other entrance (trigger) (X, Y, Z)|
 +| |1|Next delimiter (always = 1 for teleports type). In other cases = number of dependent cubes.|
 +| | |…|
 +
 +If dependent cube is an another trigger, this new trigger will be activated instead of the first triggering cube (non-teleport related).
 +
 +**C) ANIMBACK** \\
 +These objects appear in the cube then value on corresponding offsets in Block 1 (see chapter B.2) is not zero. ANIMBACK are usually animated objects which have no collision and may resides always near walls (torches, flames, huge challises etc…) and in the cube’s center (sparkles, hanging objects, candelabras, etc…). May be only two different ANIMBACK object types per level. Some these objects may be observed in 3D in game. These objects may be attached to the top or to the bottom of the cube.\\
 +I didn’t dive deeply into the investigation for this type of objects, because it wasn’t necessary for building a 3D model, which was my primary objective. Object’s structure is fairly investigated, but the base is clear.
 +
 +^Offset (HEX)^Length, bytes (HEX)^Description|
 +|0|4|1|
 +|4|4|Header size in bytes|
 +|8|1|Bytes left before “ANIM” header?|
 +|9|1|Frames quantity|
 +|0xA|1|?|
 +|0xB|1|?|
 +|0xC|1|Animation speed? Frames selection?|
 +|…|…|…|
 +| |4|“ANIM” section size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +
 +**D) ANIMENEMIES** \\
 +This objects placed in level are monsters. Enemy placement encoded in Byte #7 (see chapter A.8). May be three of monster types per level maximum. I also didn’t investigate this objects deeply. Object’s structure is shown below.
 +
 +^Offset (HEX)^Length (HEX)^Description|
 +|0|4|Monster types quantity|
 +|4|4|Header size in bytes|
 +|8|1|Offset to monster’s name|
 +|9|1|0?|
 +|0xA|1|?|
 +|0xB|1|?|
 +|0xC|1|Animation speed|
 +|0xD|1|Z coordinate. Loading at this altitude in the level cube|
 +|0xE| |Transparency or translucency|
 +|0xF| |Z coordinate. While walking|
 +|0x10| |?|
 +|0x11| |?|
 +|0x12| |?|
 +|0x13| |Z coordinate. Walking coordinate? Attacking coordinate?|
 +|0x14| |?|
 +|0x15| |?|
 +|0x16| |?|
 +|0x17| |?|
 +|0x18| |?|
 +|0x19| |?|
 +|0x1A| |?|
 +|0x1B| |?|
 +|0x1C| |?|
 +|0x1D| |Health? Armor?|
 +|0x1E| |?|
 +|0x1F| |?|
 +|0x20| |?|
 +|0x21| |?|
 +|0x22| |?|
 +|0x23| |Health|
 +|0x24| |Speed|
 +|0x25| |?|
 +|0x26| |First frame ID?|
 +|0x27| |?|
 +|0x28| |First attacking frame ID?|
 +|0x29| |Frame ID?|
 +|0x2A| |Frame ID?|
 +|0x2B| |Frame ID?|
 +|0x2C| |Frame ID?|
 +|0x2D| |Frame ID?|
 +|0x2E| |Frame ID?|
 +|…| |….|
 +| |4|“ANIM” section size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +
 +**E) ANIMOBJ** \\
 +This objects are for level decoration (stalactites, stalagmites, standalone columns, tables, fountains, graves, hanging skeletons, gargoyles, debris, etc…). Object placement encoded in Byte #7 (see chapter A.8). May be four of these object types per level maximum. Object may be observed as 3D in the game. No deep investigation also, sorry.
 +
 +^Offset (HEX)^Length (HEX)^Description|
 +|0| |Object types quantity available|
 +|4| |Header size in bytes|
 +|8| |?|
 +|9| |Frames quantity|
 +|0xA| |?|
 +|0xB| |?|
 +|0xC| |Animation speed|
 +|0xD| |Z coordinate|
 +|0xE| |Transparency. 0-No transparency, > 0 - more transparency …… To black non-transparency|
 +|0xF| |0?|
 +|0x10| |0|
 +|0x11| |Collision (=4 only?)|
 +|…| |…|
 +| |4|“ANIM” section size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +
 +**F) OBJECTS** \\
 +These objects are unique items which could be found on a level (Keys, Ancestral Artefacts, Feast, etc…). Object placement encoded in Byte #7 (see chapter A.8). May be three or four of these object types per level maximum. In some levels 4th object exist in level file, but kind of ‘blank’. Object may be observed as plain texture in the game. No deep investigation also, sorry.
 +
 +^Offset (HEX)^Length (HEX)^Descripton|
 +|0|4|Object types quantity available|
 +|4|1|Item ID (see Byte #7 in chapter A.8)|
 +|5|1|0|
 +|6|1|0|
 +|7|1|Header size in bytes|
 +|8|1|Offset to object’s name|
 +|9|1|Frames quantity|
 +|0xA|1|?|
 +|0xB|1|?|
 +|0xC|1|Animation speed|
 +|0xD|1|Z coordinate|
 +|0xE|1|Transparency. 0-No transparency, > 0 - more transparency …… To black non-transparency|
 +|0xF|1|0?|
 +|0x10|1|0|
 +|0x11|1|0?|
 +|0x12|1|?|
 +|0x13|1|?|
 +|0x14|1|?|
 +|0x15|1|?|
 +|0x16|1|?|
 +|0x17|1|?|
 +|0x18|1|?|
 +|0x19|1|?|
 +|0x1A|1|?|
 +|0x1B|1|Item ID again (see Byte #7 in chapter A.8)|
 +|0x1C|1|?|
 +|0x1D|1|?|
 +|0x1E|1|?|
 +|0x1F|1|?|
 +|0x20|1|?|
 +|0x21|various|Object’s name|
 +| |4|“ANIM” section size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +
 +**G) END OF FILE** \\
 +End of the file mark (-1) is located after objects block (see chapter F). After this mark level name follows.
 +
 +^Offset (HEX)^Length^Description|
 +|0|4|0xFFFFFF|
 +|4|various|Level name|
 +| |1|0x20 (dot)|
 +
 +**H) GLOBAL DATA FILES** (\data2\DK Data*)\\
 +This three files contains all item textures (also small item textures in inventory), explosions animations, weapons animations, inventory backgrounds and huge amount of unknown data.\\
 +File structure is the follows.
 +
 +^Offset (HEX)^Length, bytes (HEX)^Descripttion|
 +|0|0xD0|Character name and default skills|
 +|0xD0|4|Block 1 size in bytes including this 4 bytes|
 +| |various|Block 1|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 2 size in bytes including this 4 bytes|
 +| |various|Block 2|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 3 size in bytes including this 4 bytes|
 +| |various|Block 3|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 4 size in bytes including this 4 bytes|
 +| |various|Block 4|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 5 size in bytes including this 4 bytes|
 +| |various|Block 5|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 6 size in bytes including this 4 bytes|
 +| |various|Block 6|
 +| |4|‘APPL’ identifier string|
 +| |4|Block 7 size in bytes including this 4 bytes|
 +| |various|Block 7|
 +| |4|‘APPL’ identifier string|
 +| |4|0x63 for DK Data 1 file, 0x64 for DK Data 2 file, 0x69 for DK Data 3 file|
 +| |4|Item ID or index # (zero-length header)|
 +| |4|“ANIM” size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +| | |…|
 +| |1|Item ID or index # (zero-length header)|
 +| |4|“ANIM” size in bytes|
 +| |4|‘ANIM’ identifier string|
 +| |various|“ANIM” data|
 +| |4|“ANIM” or “CCB” header size in bytes|
 +| |1|If equal to zero, item’s texture is below. If not, take texture from this item’s ID|
 +| |1|0|
 +| |1|Item ID|
 +| |4|“ANIM” or “CCB” size in bytes|
 +| |4|‘ANIM’ or ‘CCB’ identifier string|
 +| |various|“ANIM” or ‘CCB’ data|
 +
 +**I) SAVEFILE STRUCTURE** \\
 +Savefile size is 356 bytes. I tried a lot of tests and now I know some bytes are used for. Some bytes have secondary meaning, may be character dependent. I made a table with all investigated data. Each cell is a byte. Number of columns and rows are equal to HEX-editor in GameGuru.
 +
 +|—  |—  |—  |—  |—  | <font inherit/inherit;;inherit;;#ff99ff>Savegame slot # minus 1</font>  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  | <font inherit/inherit;;inherit;;#3498db>Difficulty 0 - 2</font>  | <font inherit/inherit;;inherit;;#ffff00>Level#</font>  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +| <font inherit/inherit;;inherit;;#9b59b6>Character Name</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  | <font inherit/inherit;;inherit;;#9b59b6>xxx</font>  |—  | <font inherit/inherit;;inherit;;#d35400>Character specs. Str, Int, Wis, Dex, Con</font>  |—  | <font inherit/inherit;;inherit;;#d35400>xxx</font>  | <font inherit/inherit;;inherit;;#d35400>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#d35400>xxx</font>  | <font inherit/inherit;;inherit;;#d35400>xxx</font>  | <font inherit/inherit;;inherit;;#d35400>xxx</font>  |Health current  |—  |—  |—  |—  |
 +|—  |—  |—  |Health Max  |Fighter at level #. Text description on the loading screen  |Arrows quantity  |Food. 0xFF max  |—  |
 +|—  |Character level  |—  |—  | <font inherit/inherit;;inherit;;#bdc3c7>Experience. 0x7F FF FF FF max</font>  | <font inherit/inherit;;inherit;;#bdc3c7>xxx</font>  | <font inherit/inherit;;inherit;;#bdc3c7>xxx</font>  | <font inherit/inherit;;inherit;;#bdc3c7>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#7f8c8d>Experience (spells?). 0x7F FF FF FF max (?)</font>  | <font inherit/inherit;;inherit;;#7f8c8d>xxx</font>  | <font inherit/inherit;;inherit;;#7f8c8d>xxx</font>  | <font inherit/inherit;;inherit;;#7f8c8d>xxx</font>  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |Level completition (time). 0 = infinite. Max - 0xFF (10 seconds)  |
 +| <font inherit/inherit;;inherit;;#f1c40f>Hands and wearable. Non-predictable???</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#f1c40f>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>Backpack ???? (low priority with non-predictable items in)</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  | <font inherit/inherit;;inherit;;#66ff66>xxx</font>  |—  |—  |—  |
 +|—  |—  |—  |—  | <font inherit/inherit;;inherit;;#ecf0f1>Armor, Burning hands, Magic missile</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Melf's Acid arrow, Improved identify, Ray of enfeeblement</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Fireball, Fly, Lightning bolt</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Fear, Ice storm, Stoneskin</font>  |
 +| <font inherit/inherit;;inherit;;#ecf0f1>Cone of cold, Feeblemind, Hold monster</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Death fog, Disintegrate, True Seeing</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Acid storm</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Abi-Dolzin's Horrid Wilting</font>  | <font inherit/inherit;;inherit;;#ecf0f1>Meteor Swarm</font>  |—  |—  |—  |
 +|—  | <font inherit/inherit;;inherit;;#ff0000>(All red in these bytes nearby are Ability Powerups also) Armor</font>  | <font inherit/inherit;;inherit;;#ff0000>Storm Giant Strength</font>  | <font inherit/inherit;;inherit;;#ff0000>Hill Giant Strength</font>  | <font inherit/inherit;;inherit;;#ff0000>Fly</font>  | <font inherit/inherit;;inherit;;#ff0000>True Seeing</font>  | <font inherit/inherit;;inherit;;#ff0000>Speed</font>  | <font inherit/inherit;;inherit;;#ff0000>Invulnerability</font>  |
 +| <font inherit/inherit;;inherit;;#cc9933>0-0xFF Invisibility</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Acid</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Cold</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Electricity</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Fire</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Gas</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Magic</font>  | <font inherit/inherit;;inherit;;#cc9933>Protection from Poison</font>  |
 +| <font inherit/inherit;;inherit;;#ff0000>Heroism</font>  | <font inherit/inherit;;inherit;;#ff0000>Super Heroism</font>  |—  |Artefacts  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  |—  |—  |—  |—  |—  |
 +|—  |—  |—  | <font inherit/inherit;;inherit;;#2ecc71>Left hand (4 cells up)</font>  | <font inherit/inherit;;inherit;;#2ecc71>Left hand (3 cells up)</font>  | <font inherit/inherit;;inherit;;#2ecc71>Left hand (2 cells up)</font>  | <font inherit/inherit;;inherit;;#2ecc71>Left hand (1 cell up)</font>  | <font inherit/inherit;;inherit;;#2ecc71>Left hand (active)</font>  |
 +| <font inherit/inherit;;inherit;;#669933>Right hand (4 cells up)</font>  | <font inherit/inherit;;inherit;;#669933>Right hand (3 cells up)</font>  | <font inherit/inherit;;inherit;;#669933>Right hand (2 cells up)</font>  | <font inherit/inherit;;inherit;;#669933>Right hand (1 cell up)</font>  | <font inherit/inherit;;inherit;;#669933>Right hand (active)</font>  |Body  |Hands  |Ring #1  |
 +|Ring #2  |Boots  |Amulet  |Head  | <font inherit/inherit;;inherit;;#9999ff>Backpack items IDs (high priority) Upper left corner</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#9999ff>Lowest left corner</font>  | <font inherit/inherit;;inherit;;#9999ff>Second column. Upper</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>3rd column upper</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>4th column upper</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  | <font inherit/inherit;;inherit;;#9999ff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#ffcc00>Left hand item charges quantity *2 (4 up)</font>  | <font inherit/inherit;;inherit;;#ffcc00>Left hand item charges quantity *2 (3 up)</font>  | <font inherit/inherit;;inherit;;#ffcc00>Left hand item charges quantity *2 (2 up)</font>  | <font inherit/inherit;;inherit;;#ffcc00>Left hand item charges quantity *2 (1 up)</font>  | <font inherit/inherit;;inherit;;#ffcc00>Left hand item charges quantity *2 (Lighting orb) (Bottom, active)</font>  | <font inherit/inherit;;inherit;;#ff6633>Right hand item charges quantity *2 (4 up)</font>  | <font inherit/inherit;;inherit;;#ff6633>Right hand item charges quantity *2 (3 up)</font>  | <font inherit/inherit;;inherit;;#ff6633>Right hand item charges quantity *2 (2 up)</font>  |
 +| <font inherit/inherit;;inherit;;#ff6633>Right hand item charges quantity *2 (1 up)</font>  | <font inherit/inherit;;inherit;;#ff6633>Right hand item charges quantity *2 (Lighting orb) (Bottom, active)</font>  | <font inherit/inherit;;inherit;;#00ccff>If ==1, character is wearing it. Armor</font>  |Gauntlets  |Ring low  |Ring upper  |Boots on the Character (==1)  | <font inherit/inherit;;inherit;;#00ccff>Amulet</font>  |
 +| <font inherit/inherit;;inherit;;#00ccff>Helm</font>  | <font inherit/inherit;;inherit;;#99cc66>Backpack items charges</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#99cc66>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>Wearable. Additional specs, weight, etc…</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#ff9999>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>Backpack. Additional specs for items. 40 == normal item. 43 == item with specs +3</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  |
 +| <font inherit/inherit;;inherit;;#99ccff>xxx</font>  | <font inherit/inherit;;inherit;;#99ccff>xxx</font>  |Zero  |Zero  |Not a byte  |Not a byte  |Not a byte  |Not a byte  |
 +
 +Bytes for pells for Fighter/Mage occupies these bytes: Armor, Burning hands, Magic missile Melf's Acid arrow, Improved identify, Ray of enfeeblement Fireball, Fly, Lightning bolt Fear, Ice storm, Stoneskin\\
 +Cone of cold, Feeblemind, Hold monster Death fog, Disintegrate, True Seeing Acid storm Abi-Dolzin's Horrid Wilting Meteor Swarm
 +
 +Artefacts byte and its possible values with marked artefacts colors avalable in inventory:
 +
 +^Artefacts colors^^^Value (HEX)|
 +|Red available|Green available|Blue available|0xF, 0xE|
 +| |Green available|Blue available|0xD, 0xC|
 +|Red available| |Blue available|0xB, 0xA|
 +| | |Blue available|0x9, 0x8|
 +|Red available|Green available| |0x7, 0x6|
 +| |Green available| |0x5, 0x4|
 +|Red available| | |0x3, 0x2|
  
  
documentation/file_formats/games/deathkeep.1713092423.txt.gz · Last modified: 2024/04/14 07:00 by vas.1987