With the release of the Pack files manager 1.9.9 (LTChambers and Alpaca are doing a superb work), it's now easy to create mods as they’re supposed to be done by CA, so I will try to explain the feature of this new format and why it should be used over the old patch method.
The mod format will overwrite the patch format at start of the game, so there’s no more troubles finding wich patch load first (this is one of the interests of this format).
For this tutorial, I will include my work to change the standard bearer / musician for some units.
I will not explain here how to make these changes but more of the mod structure to limit the overwriting/conflicting problems that could happen when using multiple mods.
The first thing to note is that even if I respect the structure of the pack file, my adds aren’t named like the default ones, this way I can add or overwrite just the entry that concern me in the original pack:
As showed in this screen, I’ve just put my new entries to the battle_personnalities_table in a new file called ottomans_personnalities, this way I don’t have to put the whole original battle_personnalities and I’m sure that my file will not conflict with other mods affecting this file.
At start, the game will start loading the normal pack files then my mod, when it finds my new file it knows from my file structure that this is concerning the battle_personnalities_table but because of a different name he will not overwrite the original, just add my new rows.
NOTE: unless you're really attempting to overwrite all the native file you must use a different name.
If I had called my ottomans_personalities battle_personalities, the game will overwrite the original battle_personalities with my new one containing only three rows and probably crash.
That was stated by Jerome from CA:
I’ve worked the same way with the battle_stat_land file except that I want to overwrite the Information concerning some units (not all of them!) so I just put the lines that concern me in this file.
Note that if I had named it units_stat_land in place of my custom name it would have overwritten the whole original.
Now that I’m done with my modifications I just have to check that my mod is in the correct format and then save it.
DONE !!!!!
Not really in fact, if you try to run the game now, your mod will not work!
To activate the mod, you’ve got to create a little text file in the script folder which contain the preferences files
Edit: There's a link above for a tool that take care of this (and much more) so you can skip this part
You can use this link to download the mod manager created by LTChambers, this tool will take care of the text editing for you as well as managing your mods at start of the game and their loading order, it's simple and effective: http://www.twcenter.net/forums/showthread.php?t=240335 (a must have for modders and mod users)On Win XP, it’s situated at: C:\Documents and Settings\[USER-NAME]\Application Data\The Creative Assembly\Empire\scripts
On Vista: C:\Users\[USER-NAME]\AppData\Roaming\The Creative Assembly\Empire\scripts
(Thanks to Phenom)
(The saves are near this too by the way…)
If you have troubles finding the folder, check that in your windows options you’ve checked the show hidden files stuff.
Now that you’re here, there should be a text file called “preferences.empire_script.txt”, just leave it and create a new one called: “user.empire_script.txt”
Open your newly created file and add this line: mod [MOD NAME].pack;
For my mod it’s: mod MrThib-ottomans-textures.pack;
Save.
Thanks to Waronmars for finding out this:
And now your mod is fully functional in game.
So, why the text file stuff? Because with this you can activate/deactivate mods without moving/deleting the mods files, this way if some mods are conflicting you can just delete the entry in this file one by one to find the problem.
Happy modding!!
PS: I join my little mod and the text file so you can check by yourself