1) What does each level file contain? (XX is the id of the level)
Spoiler
DBXXMOD contains all the models used in the level.
DBXXROT seems to handle the animations of npcs and enemies as well as duke in a level. (possibly rotation data)
DBXXTMP (LOTB exclusive) is placements of props and maybe items as well - this is unlike TTK.
DBXXFRM is animation related data for npcs, enemies and duke (possibly frame data)
DBXXHIE swapping caused duke and enemies to go invisible, guessing it's some model related stuff.
DBXXLP stands for LevelPlacements, and at least in TTK, includes duke spawn points, enemies, items and props.
DBXXAI seems to be AI pathfinding nodes and routes.
DBXXANM seems to be an index table for all animations used in a level.
DBXX0A/0B.RAW (TTK exclusive) are the texture assets for each level.
TEXPOS.DAT (TTK exclusive) seems to contain where each texture is used in the level? or some generic textures, not quite sure. This might be TTK's equivalent of DBXXTEX.
DBXXTEX (LOTB exclusive) seems to have textures/or offsets for general effects like firing, hitting something, crosshair, etc.
SND.DAT (TTK exclusive) contains all the sounds used in the level.
SNDXX.WB (LOTB exclusive) it's a table containing the filenames and offsets of the sounds used in the WBX file.
SNDXX.WBX (LOTB exclusive) contains the sounds used in the level.
DBXXTBX (LOTB exclusive) is effectively the equivalent of the RAW files from TTK, condensed into one file. In other words, it contains all of the textures used in the level.
LEVELXX.BIN contains all the level geometry and seemingly scripting and lighting. Also where each texture gets placed?
LEVELXX.COL contains the level's collision code.
LEVELXX.OVR/BASEOVR.OVR Overlay of some sort? needs testing.
DBXXMOD contains all the models used in the level.
DBXXROT seems to handle the animations of npcs and enemies as well as duke in a level. (possibly rotation data)
DBXXTMP (LOTB exclusive) is placements of props and maybe items as well - this is unlike TTK.
DBXXFRM is animation related data for npcs, enemies and duke (possibly frame data)
DBXXHIE swapping caused duke and enemies to go invisible, guessing it's some model related stuff.
DBXXLP stands for LevelPlacements, and at least in TTK, includes duke spawn points, enemies, items and props.
DBXXAI seems to be AI pathfinding nodes and routes.
DBXXANM seems to be an index table for all animations used in a level.
DBXX0A/0B.RAW (TTK exclusive) are the texture assets for each level.
TEXPOS.DAT (TTK exclusive) seems to contain where each texture is used in the level? or some generic textures, not quite sure. This might be TTK's equivalent of DBXXTEX.
DBXXTEX (LOTB exclusive) seems to have textures/or offsets for general effects like firing, hitting something, crosshair, etc.
SND.DAT (TTK exclusive) contains all the sounds used in the level.
SNDXX.WB (LOTB exclusive) it's a table containing the filenames and offsets of the sounds used in the WBX file.
SNDXX.WBX (LOTB exclusive) contains the sounds used in the level.
DBXXTBX (LOTB exclusive) is effectively the equivalent of the RAW files from TTK, condensed into one file. In other words, it contains all of the textures used in the level.
LEVELXX.BIN contains all the level geometry and seemingly scripting and lighting. Also where each texture gets placed?
LEVELXX.COL contains the level's collision code.
LEVELXX.OVR/BASEOVR.OVR Overlay of some sort? needs testing.
2) How is the LP file structured?
Spoiler
the general gist of entity placement in TTK and LOTB goes like this
each one is like 38 bytes long
first byte is 01, then 3 00 bytes, then the entity id in question which is XX XX
the rest I didn't mess with it but seems tobe coordinates
XYZ stuff, you get the gist
then it's immediately followed by another of these
38 bytes, then another one, then another one, rinse and repeat
LOTB ids are different from what I can tell.
As a general rule of thumb, if the item/prop/entity you replace has no assets in the level, it will not show up in the level at all.
Pigcops I should note seem to use a universal id, the only thing that changes (not counting suicide bombers here, the regular shotgun pigcops) is their model and texture per era.
the general gist of entity placement in TTK and LOTB goes like this
each one is like 38 bytes long
first byte is 01, then 3 00 bytes, then the entity id in question which is XX XX
the rest I didn't mess with it but seems tobe coordinates
XYZ stuff, you get the gist
then it's immediately followed by another of these
38 bytes, then another one, then another one, rinse and repeat
LOTB ids are different from what I can tell.
As a general rule of thumb, if the item/prop/entity you replace has no assets in the level, it will not show up in the level at all.
Pigcops I should note seem to use a universal id, the only thing that changes (not counting suicide bombers here, the regular shotgun pigcops) is their model and texture per era.
3) TTK ids for LevelPlacements (INCOMPLETE)
Spoiler
01 00 00 00 XX XX means an entity
05 00 is the bed next to the BDSM mistress
0b 00 is a random crate that's not fully rendered (prob submerged crate meant for sewers)
0e 00 is a random red chair
10 00 is blue cola machine
14 00 is brown indestructible crate used in LA and challenge levels
16 00 is part of bootylicius, it's those little walls inside the joint where people sit down. IDK the english term.
1A 00 is Green pistol wielding Drak
1E 00 same as below?
1F 00 seems to be a non level 0 prop/enemy
20 00 is Duke
21 00 is Pistol ammo
22 00 is Energy weapon
23 00 seems to be a non level 0 prop/enemy, doesn't load.
24 00 same as above
25 00 flamethrower
26 00 flamethrower fuel
27 00 some kind of dark gray metal wall that's from the sewers/subway section from level00
28 00 one of the brown walls from the subway section
29 00 is gatling gun
2A is some sort of test entity using LA piggie model
2B 00 non level 0 prop?
2C 00 same as above
2D 00 is throwing knife
2E 00 is level0 ladder
2F 00 is RPG
30 00 non level 0 prop
31 00 same
32 00 same
33 00 same
34 00 no parking sign
35 00 marker peacomb sign from lvl00
36 00 is pipebomb (though I can't pick it up? might be placement issue tho)
37 00 green base for the green statue at the start of lvl00
38 00 Phone (no pole tho!)
39 00 Pigcop
3a 00 Pipebombs pickup
3b 00 some sort of prop, might be an item?
3C 00 non level 0 prop
3D 00 same
3E 00 same
3F 00 same
40 00 same
41 00 is shotgun ammo
42 00 is shotgun
43 00 is mirror in BDSM room (doesn't render mirror but renders the rest i.e. handwasher)
44 00 is krool cig machine
45 00 is groceries machine from lvl00
46 00 non lvl00 propenemy
47 00 same
48 00 same
49 00 statue from the start of lvl00
4a 00 test arrow thing glitchily textured (it's model id 00/01 in the betas)
4b 00 red stop sign
4c 00 stripper pole from lvl00
4D 00 is Train
4e 00 subway sign
4f 00 is bootylicius table
50 00 is toilet
51 00 is non level0 propenemy
7B 00 is Level 0 female stripper
9F 00 wrecked present era car
A7 00 is a BDSM mistress (level0)
A9 00 is brown subway station door from level0
A0 00 is lamppost
AA 00 red conelight for train/subway
AB 00 red light sign right before pigcop with subway access card
AC 00 non level0 prop
B0 00 is red crystal
B1 00 is blue crystal
B5 00 is one of the crystal devices
C0 00 is the top of the time machine device
CE 00 is sewer valve
D2 00 is wall grate used in sewers
D3 00 is white wall grate that's at the very start of the game
D4 00 is a railing used in sewers
D5 00 is yellow explosive cannister
D6 00 is some sort of sewer device, looks like a black round figure
D7 00 doesn't display, likely not level00 entity
E5 00 is a hanging lamp
33 01 door in bootylicious that leads to the lara croft secret
as a sidenote, the first 7b 00 bytes in level00 is the stripper closest to the cash register, and the second is the one furthest.
01 00 00 00 XX XX means an entity
05 00 is the bed next to the BDSM mistress
0b 00 is a random crate that's not fully rendered (prob submerged crate meant for sewers)
0e 00 is a random red chair
10 00 is blue cola machine
14 00 is brown indestructible crate used in LA and challenge levels
16 00 is part of bootylicius, it's those little walls inside the joint where people sit down. IDK the english term.
1A 00 is Green pistol wielding Drak
1E 00 same as below?
1F 00 seems to be a non level 0 prop/enemy
20 00 is Duke
21 00 is Pistol ammo
22 00 is Energy weapon
23 00 seems to be a non level 0 prop/enemy, doesn't load.
24 00 same as above
25 00 flamethrower
26 00 flamethrower fuel
27 00 some kind of dark gray metal wall that's from the sewers/subway section from level00
28 00 one of the brown walls from the subway section
29 00 is gatling gun
2A is some sort of test entity using LA piggie model
2B 00 non level 0 prop?
2C 00 same as above
2D 00 is throwing knife
2E 00 is level0 ladder
2F 00 is RPG
30 00 non level 0 prop
31 00 same
32 00 same
33 00 same
34 00 no parking sign
35 00 marker peacomb sign from lvl00
36 00 is pipebomb (though I can't pick it up? might be placement issue tho)
37 00 green base for the green statue at the start of lvl00
38 00 Phone (no pole tho!)
39 00 Pigcop
3a 00 Pipebombs pickup
3b 00 some sort of prop, might be an item?
3C 00 non level 0 prop
3D 00 same
3E 00 same
3F 00 same
40 00 same
41 00 is shotgun ammo
42 00 is shotgun
43 00 is mirror in BDSM room (doesn't render mirror but renders the rest i.e. handwasher)
44 00 is krool cig machine
45 00 is groceries machine from lvl00
46 00 non lvl00 propenemy
47 00 same
48 00 same
49 00 statue from the start of lvl00
4a 00 test arrow thing glitchily textured (it's model id 00/01 in the betas)
4b 00 red stop sign
4c 00 stripper pole from lvl00
4D 00 is Train
4e 00 subway sign
4f 00 is bootylicius table
50 00 is toilet
51 00 is non level0 propenemy
7B 00 is Level 0 female stripper
9F 00 wrecked present era car
A7 00 is a BDSM mistress (level0)
A9 00 is brown subway station door from level0
A0 00 is lamppost
AA 00 red conelight for train/subway
AB 00 red light sign right before pigcop with subway access card
AC 00 non level0 prop
B0 00 is red crystal
B1 00 is blue crystal
B5 00 is one of the crystal devices
C0 00 is the top of the time machine device
CE 00 is sewer valve
D2 00 is wall grate used in sewers
D3 00 is white wall grate that's at the very start of the game
D4 00 is a railing used in sewers
D5 00 is yellow explosive cannister
D6 00 is some sort of sewer device, looks like a black round figure
D7 00 doesn't display, likely not level00 entity
E5 00 is a hanging lamp
33 01 door in bootylicious that leads to the lara croft secret
as a sidenote, the first 7b 00 bytes in level00 is the stripper closest to the cash register, and the second is the one furthest.
I wanted to post the exe offsets, but turns out my stupid ass either forgot to archive them or lost em entirely. However I still have the exe offsets of the TTK beta (I believe this is for July)
Spoiler
duke stuff
speed ratio 4096 in hex 1000 ac1a0
jump gravity 430 in hex 1ae
jump thrust 150
run jump thrust 190
thrust up -325
look yaw frames 250 ac1a2
look yaw min rate 100 ac1a4
look yaw max rate 1800 ac1a6
look pitch frames 250 in hex fa ac1a8
look pch min rate 100 ac1aa
look pch max rate 1800 in hex 708 ac1ac
idle yaw frames 100 in hex 64 ac1ae
idle yaw min rate 400 ac1b0
idle yaw max rate 1900 ac1b2
mov yaw frames 150 ac1b4
mov yaw min rate 800 in hex 320 ac1b6
mov yaw max rate 1900 in hex 76c ac1b8
jump yaw frames 200 in hex c8 ac1ba
jump yaw min rate 40 in hex 28 ac1bc
jump yaw max rate 400 in hex 190 ac1be
pitch frames 150 ac1c0
pitch min rate 130 ac1c2
pitch max rate 1300 ac1c4
roll frames 150 in hex 96 AC1C6
roll min rate 130 in hex 82 AC1C8
roll max rate 1300 in hex 514 AC1CA
strafe frames 100 in hex 64 AC1CC
strafe min rate 300 in hex 12c AC1CE
strafe max rate 3000 in hex bb8 LOCATION AC1D0 OF EXE
enemy stuff
speed ratio 4096 in hex 1000 ad554
duke stuff
speed ratio 4096 in hex 1000 ac1a0
jump gravity 430 in hex 1ae
jump thrust 150
run jump thrust 190
thrust up -325
look yaw frames 250 ac1a2
look yaw min rate 100 ac1a4
look yaw max rate 1800 ac1a6
look pitch frames 250 in hex fa ac1a8
look pch min rate 100 ac1aa
look pch max rate 1800 in hex 708 ac1ac
idle yaw frames 100 in hex 64 ac1ae
idle yaw min rate 400 ac1b0
idle yaw max rate 1900 ac1b2
mov yaw frames 150 ac1b4
mov yaw min rate 800 in hex 320 ac1b6
mov yaw max rate 1900 in hex 76c ac1b8
jump yaw frames 200 in hex c8 ac1ba
jump yaw min rate 40 in hex 28 ac1bc
jump yaw max rate 400 in hex 190 ac1be
pitch frames 150 ac1c0
pitch min rate 130 ac1c2
pitch max rate 1300 ac1c4
roll frames 150 in hex 96 AC1C6
roll min rate 130 in hex 82 AC1C8
roll max rate 1300 in hex 514 AC1CA
strafe frames 100 in hex 64 AC1CC
strafe min rate 300 in hex 12c AC1CE
strafe max rate 3000 in hex bb8 LOCATION AC1D0 OF EXE
enemy stuff
speed ratio 4096 in hex 1000 ad554
The duke vars and enemy speed ratio var IIRC are structrued identically in LOTB's final exe, so it shouldn't be too hard to find those again either.
I'd like to do an improvement mod for these games, removing the tank controls and polishing up a few other things if doable (like making Duke less janky overall, toning down the hitscanners in TTK, etc) but idk if I'll ever get to it.