MattFiler / OpenCAGE

A modding toolkit for Alien: Isolation that gives access to scripting, assets, configurations, and behaviour trees.
http://opencage.co.uk
MIT License
254 stars 12 forks source link

Support COMMANDS.BIN in the script editor #62

Open mc68k opened 2 years ago

mc68k commented 2 years ago

Feature request to allow OpenCAGE to load/save the Switch format of commands.pak. The script files in this version are stored in gzip archives. Extracting the archive yields a commands.bin that OpenCAGE doesn't recognize.

While playing, I had noticed that some script issues have been fixed. Example, locking the door at the top of the stairs on the way to pick up the revolver in order to skip the hack when returning.

I can provide a plethora of commands.bin.gz files for testing.

MattFiler commented 2 years ago

A:I's scripting "commands" files have two formats:

Windows (Steam/EGS) is 32-bit, along with Xbox 360 & PS3. Everything else is 64-bit. I opted to investigate the PAK version rather than BIN as OpenCAGE primarily targets the EGS/Steam versions of the game.

The BIN.GZ variant is a version that Feral introduced for the Switch and iOS/Android ports which is a compressed version of the 64-bit BIN if I remember correctly.

Adding support for BIN scripts is on the roadmap after getting further with PAK support, and I have already done a lot of investigating of the format of that file, but not implemented any of it yet into the editor as it adds some extra complexity. Once it has been implemented, supporting the BIN.GZ variant should be very simple.

Will keep this issue open to highlight the above info!

mc68k commented 2 years ago

I had some questions about the ms store/gamepass version, so I did some digging. The exe is compiled as 32 bit. The game contains both commands.pak and commands.bin. So I tried installing some mods, none of them worked. Seems this version doesn't use the pak format despite being 32 bit.

I confirmed this by deleting the level .pak files and starting a new game. No issues at all. Then I restored the .pak files and deleted the commands.bin files. This caused the game to CTD.

I would appear that despite being a 32 bit exe, it's using the 64 bit commands.bin files.

Also, there is an additional folder called entity in the env directory, that contains behavior_tree.db and material_mappings.pak

MattFiler commented 2 years ago

Yep, the Windows Store version of the game is "next-gen" and uses the 64-bit BIN version, as I say it's only Steam/EGS that use the 32-bit PAK version.

MattFiler commented 2 years ago

The game just released on GOG today, which also uses the 32-bit PAK found in the Steam/EGS releases.

Just updated OpenCAGE to v0.9.2.4 which adds GOG support!