Ordoor
Portmanteau of Order Door, a remake project for Warhammer 40,000: Chaos Gate, the game from 1998.
You must have a copy of the original game data to use this project
No game yet, nothing even close. I'm in the very early stages of trying to understand the various file formats. Until then, you can play WH40K: Chaos Gate in a WinXP VM, disconnected from the internet. It doesn't need 3D rendering!
WH40K.exe is the existing game engine, and WH40K_TD.exe is the map editor. Allows things to be saved as .MAP or as .SMF ("Super Macro File").
Building from source
I'm writing code in Go at the moment, so you'll need to have a Go runtime installed on your system:
$ go version
go version go1.10 linux/amd64
Clone the source tree to $GOPATH/src/ur.gs/ordoor
. You can then run
make all
to get the binaries that exist at present.
They're not very interesting :D.
Place your WH40K: Chaos Gate installation in ./orig
to benefit from automatic
path defaults. Otherwise, point to it with -game-path
The view-map
binary attempts to render a map, and is the current focus of
effort. Once I can render a whole map, including pre-placed characters (cultist
scum), things can start to get more interesting.
To run:
$ make view-map
$ ./view-map -map orig/Maps/Chapter01.MAP -text orig/Maps/Chapter01.TXT
Use the arrow keys to scroll around the map, the mouse wheel to zoom, and the
1
- 7
keys to change Z level.
Unlike the game, currently I only render the Z level you're actually on.
Dependency management uses govendor
. Unless you're contributing code you
shouldn't have to worry about it.
dep
bug https://github.com/golang/dep/issues/1725 means I can't use it.
Miscellany
"Mission Setup" includes information about available squad types
From EquipDef.cpp Dumo: CEquipment we learn the following object types:
- DELETED
- WEAPON
- GRENADE
- MEDIPACK
- SCANNER
- GENESEED
- CLIP
- DOOR KEY
- DOOR KEY
- DOOR KEY
- DOOR KEY
And we learn they can be "on"....
- CHARACTER
- VEHICLE
- CANISTER
Hypothesis: Idx/WarHammer.idx points objects into bitmap data in Anim/WarHammer.ani
We can use WH40K_TD.exe and investigate reads of .idx followed by reads of .ani to test this.
WH40K_TD.exe opens files in this order:
- Data/USEng.dta
- WH40K_TD.exe (?)
- Cursor/Cursors.cur
- pread64(fd, 23, 0) = 23
- _llseek(fd, 0, [0], SEEK_CUR) = 0
- _llseek(fd, 0, [0], SEEK_CUR) = 0
- _llseek(fd, 40666, [40666], SEEK_SET) = 0
- _llseek(fd, 0, [0], SEEK_SET) = 0
- close(fd) = 0
- read(fd, "\x26\x00\x00\x00\x20\x00\x00\x00\x30\x01\x00\x00\x50\x01\x00\x00\x8a\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 32) = 32
- (...)
- _llseek(15</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Cursor/Cursors.cur>, 39868, [39868], SEEK_SET) = 0
- read(15</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Cursor/Cursors.cur>, "...", 798) = 798
- (some statting of Idx/WarHammer.idx, no reading that I saw)
- Anim/WarHammer.ani
- read(15</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Anim/WarHammer.ani>, "...", 32) = 32
- (some clones of child procs, I didn't follow them)
- Sounds/wh40k.ds
- pread64(31</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 23, 0) = 23
- read(31</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 417792) = 417792
- read(31</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 4096) = 4096
- Data/Sounds.dat
- pread64(34</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/Sounds.dat>, "#**********************", 23, 0) = 23
- ...
- Pic/wh40k.pcx
- read(34</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Pic/wh40k.pcx>, "...", 168509) = 168509
- Sets/*
- (lots of statting these)
- Data/Randchar.dat
- pread64(34</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/RandChar.dat>, "#**********************", 23, 0) = 23
- read(34</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/RandChar.dat>, "#***************************************************************"..., 4096) = 4096
- ...
- Data/WeapDef.dat
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/WeapDef.dat>, "#**********************", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/WeapDef.dat>, "#***************************************************************"..., 4096) = 4096
- ...
- Data/SpellDef.dat
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/SpellDef.dat>, "#**********************", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/SpellDef.dat>, "#***************************************************************"..., 4096) = 4096
- ...
- Data/AniObDef.dat
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/AniObDef.dat>, "# ******** ANIMATED OBJ", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/AniObDef.dat>, "# ******** ANIMATED OBJECT DEFINITIONS **************\r\n#\t\t0 : **"..., 4096) = 4096
- ...
- Data/VehicDef.dat
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/VehicDef.dat>, "# ******** VEHICLE DEFI", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/VehicDef.dat>, "# ******** VEHICLE DEFINITIONS **************\r\n#\t\t0 : *** VEHICL"..., 4096) = 4096
- ...
- Data/StdWeap.dat
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/StdWeap.dat>, "# ******** SQUAD STANDA", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/StdWeap.dat>, "# ******** SQUAD STANDARD WEAPONS **************\r\n#\t\t0 : *** SQU"..., 4096) = 4096
- ...
- Data/Ultnames.dat
- Data/Chanames.dat
- Data/keymap.dta
- Filters/wh40k.flt
- _llseek(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 0, [0], SEEK_SET) = 0
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "\x01\x00\x00\x00", 4) = 4
- _llseek(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 4, [4], SEEK_SET) = 0
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "...", 72) = 72
- _llseek(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 1444, [1444], SEEK_SET) = 0
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "...", 327680) = 327680
- Misc/occlusio.lis
- pread64(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Misc/occlusio.lis>, "62 # Number of Absol", 23, 0) = 23
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Misc/occlusio.lis>, "62 # Number of Absolute Deltas.\r\n # These Deltas are off"..., 4096) = 982
- read(35</home/lupine/.wine/drive_c/GOG Games/ChaosGate/Misc/occlusio.lis>, "", 3114) = 0
- Data/GDestroy.dat
- (stat Obj/destroy.obj)
- Data/minimap.dat
- Misc/occlusio.list
- Obj/specials.obj
- Obj/Man_Shadow.obj
- Sets/map01.set
- Data/Defs.dat
Assign/jungtil.asn
Obj/jungtil.obj
- (more assign + obj pairs)
- Data/Cycle.cyc