2018-03-22 20:17:02 +00:00
# Ordoor
2018-02-24 13:50:35 +00:00
2018-03-22 20:17:02 +00:00
Portmanteau of Order Door, a remake project for Warhammer 40,000: Chaos Gate,
the game from 1998.
2018-02-24 13:50:35 +00:00
**You must have a copy of the original game data to use this project**
2018-03-17 04:16:14 +00:00
No game yet, nothing even close. I'm in the very early stages of trying to
2018-03-18 04:23:34 +00:00
understand the various file formats. Until then, you can play WH40K: Chaos Gate
2018-03-17 04:16:14 +00:00
in a WinXP VM, disconnected from the internet. It doesn't need 3D rendering!
2018-03-22 20:17:02 +00:00
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").
2018-03-18 04:23:34 +00:00
## Building from source
2018-03-17 04:16:14 +00:00
2018-03-18 04:23:34 +00:00
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
```
2018-03-22 20:35:19 +00:00
In addition, you'll also need the following packages installed, at least in
Debian:
```
apt-get install libx11-dev libxcursor-dev mesa-common-dev libxrandr-dev \
libxinerama-dev libgl1-mesa-dev libxi-dev
```
2018-03-22 20:31:10 +00:00
Clone the source tree to `$GOPATH/src/ur.gs/ordoor` . You can then run
2018-03-22 20:17:02 +00:00
`make all` to get the binaries that exist at present.
2018-03-18 04:23:34 +00:00
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`
2018-03-22 20:17:02 +00:00
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.
2018-03-18 05:53:01 +00:00
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.
2018-03-18 04:23:34 +00:00
2018-03-22 20:17:02 +00:00
## Miscellany
2018-03-17 04:16:14 +00:00
"Mission Setup" includes information about available squad types
2018-02-24 13:50:35 +00:00
From EquipDef.cpp Dumo: CEquipment we learn the following object types:
0. DELETED
1. WEAPON
2. GRENADE
3. MEDIPACK
4. SCANNER
5. GENESEED
6. CLIP
7. DOOR KEY
8. DOOR KEY
9. DOOR KEY
10. DOOR KEY
And we learn they can be "on"....
0. CHARACTER
1. VEHICLE
2. 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:
1. Data/USEng.dta
1. WH40K_TD.exe (?)
1. Cursor/Cursors.cur
1. pread64(fd, 23, 0) = 23
1. _llseek(fd, 0, [0], SEEK_CUR) = 0
1. _llseek(fd, 0, [0], SEEK_CUR) = 0
1. _llseek(fd, 40666, [40666], SEEK_SET) = 0
1. _llseek(fd, 0, [0], SEEK_SET) = 0
1. close(fd) = 0
1. 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
1. (...)
1. _llseek(15< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Cursor/Cursors.cur>, 39868, [39868], SEEK_SET) = 0
2018-03-18 04:23:34 +00:00
1. read(15< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Cursor/Cursors.cur>, "...", 798) = 798
2018-02-24 13:50:35 +00:00
1. (some statting of Idx/WarHammer.idx, no reading that I saw)
1. Anim/WarHammer.ani
2018-03-18 04:23:34 +00:00
1. read(15< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Anim/WarHammer.ani>, "...", 32) = 32
2018-02-24 13:50:35 +00:00
1. (some clones of child procs, I didn't follow them)
1. Sounds/wh40k.ds
2018-03-18 04:23:34 +00:00
1. pread64(31< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 23, 0) = 23
1. read(31< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 417792) = 417792
1. read(31< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Sounds/wh40k.ds>, "...", 4096) = 4096
2018-02-24 13:50:35 +00:00
1. Data/Sounds.dat
1. pread64(34< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/Sounds.dat>, "#**********************", 23, 0) = 23
1. ...
1. Pic/wh40k.pcx
2018-03-18 04:23:34 +00:00
1. read(34< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Pic/wh40k.pcx>, "...", 168509) = 168509
2018-02-24 13:50:35 +00:00
1. Sets/*
1. (lots of statting these)
1. Data/Randchar.dat
1. pread64(34< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/RandChar.dat>, "#**********************", 23, 0) = 23
1. read(34< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/RandChar.dat>, "#***************************************************************"..., 4096) = 4096
1. ...
1. Data/WeapDef.dat
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/WeapDef.dat>, "#**********************", 23, 0) = 23
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/WeapDef.dat>, "#***************************************************************"..., 4096) = 4096
1. ...
1. Data/SpellDef.dat
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/SpellDef.dat>, "#**********************", 23, 0) = 23
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/SpellDef.dat>, "#***************************************************************"..., 4096) = 4096
1. ...
1. Data/AniObDef.dat
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/AniObDef.dat>, "# ** ****** ANIMATED OBJ", 23, 0) = 23
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/AniObDef.dat>, "# ** ****** ANIMATED OBJECT DEFINITIONS ** ************\r\n#\t\t0 : ** "..., 4096) = 4096
1. ...
1. Data/VehicDef.dat
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/VehicDef.dat>, "# ** ****** VEHICLE DEFI", 23, 0) = 23
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/VehicDef.dat>, "# ** ****** VEHICLE DEFINITIONS ** ************\r\n#\t\t0 : ** * VEHICL"..., 4096) = 4096
1. ...
1. Data/StdWeap.dat
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/StdWeap.dat>, "# ** ****** SQUAD STANDA", 23, 0) = 23
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Data/StdWeap.dat>, "# ** ****** SQUAD STANDARD WEAPONS ** ************\r\n#\t\t0 : ** * SQU"..., 4096) = 4096
1. ...
1. Data/Ultnames.dat
1. Data/Chanames.dat
1. Data/keymap.dta
1. Filters/wh40k.flt
1. _llseek(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 0, [0], SEEK_SET) = 0
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "\x01\x00\x00\x00", 4) = 4
1. _llseek(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 4, [4], SEEK_SET) = 0
2018-03-18 04:23:34 +00:00
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "...", 72) = 72
2018-02-24 13:50:35 +00:00
1. _llseek(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, 1444, [1444], SEEK_SET) = 0
2018-03-18 04:23:34 +00:00
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Filters/wh40k.flt>, "...", 327680) = 327680
2018-02-24 13:50:35 +00:00
1. Misc/occlusio.lis
1. pread64(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Misc/occlusio.lis>, "62 # Number of Absol", 23, 0) = 23
1. 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
1. read(35< /home/lupine/.wine/drive_c/GOG Games/ChaosGate/Misc/occlusio.lis>, "", 3114) = 0
1. Data/GDestroy.dat
1. (stat Obj/destroy.obj)
1. Data/minimap.dat
1. Misc/occlusio.list
1. Obj/specials.obj
1. Obj/Man_Shadow.obj
1. Sets/map01.set
1. Data/Defs.dat
2018-03-18 04:23:34 +00:00
1. [`Assign/jungtil.asn` ](docs/formats/obj.md#assign )
1. [`Obj/jungtil.obj` ](docs/formats/obj.md )
2018-02-24 13:50:35 +00:00
1. (more assign + obj pairs)
1. Data/Cycle.cyc