Sunday, June 11, 2017

Halo Wars ModManifest.txt

I'm semi-back after a short hiatus. During my brief time away from the Halo Wars modding community, a patch to the game was released that added support to load a TXT file that describes other directories which contain game data. This makes it so you don't have to rebuild or even use ERA files for testing or distributing your game changes.

For example, if all you wanted to do was change data/leaders.xml to give you more Spartan population, you could use this new "ModManifest.txt" to point to a folder that contains the said file with your changes. Then when the game loads, it would consume this loose file in favor of whatever file may be in an ERA.

I originally posted the following in the Halo Wars modding Discord chat about a month ago, but I guess no one really paid attention or picked up what was going on:

In the UserRoot folder (the same folder gameconfig.dat exists) you can now add a new file:
“ModManifest.txt”

[Example]
C:\Users\<username>\AppData\Local\Packages\Microsoft.BulldogThreshold_8wekyb3d8bbwe\LocalState\ModManifest.txt
C:\Users\<username>\AppData\Local\Halo Wars\ModManifest.txt

The file format is simple, just a directory per line. You can use the semicolon character (;) to essentially comment out a directory if you want to disable it.
[Example]
e:\temp\TestMod

Now, the content of each of the directories will override files in the base game’s archive packages.

[Example]
Directory of E:\temp\TestMod\Art\unsc\vehicle\warthog_01

05/11/2017  12:00 PM    <DIR>          .
05/11/2017  12:00 PM    <DIR>          ..
08/11/2016  03:54 PM         5,592,528 warthog_01_df.ddx

You of course need to replace the "<username>" part of these paths with your account name. The first path is if you use the Windows Store copy of the game. The second path is if you own the Steam copy.

You could place your data/leaders.xml file in this theoretical "E:\temp\TestMod" folder too. Basically you need to remember that any files you wish to override via a directory in the Manifest must maintain the same directory tree as it appears in the ERA files.