Author : juniroxors
Original Thread : Sample Mod Pack for those who want a starting point to mess about.

Sample Mod Pack for those who want a starting point to mess about.
Edit: Updated with new repack - see the Readme below, pack contains proper mod pack and onscreen text work around in the form of a none-mod pack.

ETW is my first foray into the TW series and along with others I've been put off by some bugs & AI issues which I'm sure will be addressed in time but I became a bit curious about tinkering with the data in the game and whilst I'm a total nub at this was able to follow some tutorials and use the packfile manager.

Credits to LtChambers, The Phemon (and others whose threads I read - too numerous to recall tbh but tx anyway) as well as MrThib for helping me troubleshoot.

I had actually messed about with extracting files from the db and creating "independent" packs which ran as mods before the tips from CA were posted but it helped sort a few issues I had getting things to work properly.

Anyway, I thought I'd post an example of where things are gonna go in the form of a small mod that does a couple of things that most ppl have done by swapping the patch file and so on, namely enable factions and add a custom unit. It's basic in that I've enabled Scotland and added a custom unit for it but that's the idea. It's merely to serve as a "template" for those who want to edit the lesser elements of the database if you like, and it's quite stipped down, but for those who want to cut to the chase and tweak a few things to the battle game, add custom units and tweak their stats, enable factions etc. I'd like to think it's pretty useful, especially for beginners. And best of all, because it's a mod you can mess with it as much as you like without affecting your proper game files.

Hope some of you get some benefit from it. Download the attached file.

README (INCLUDED WITH FILE)
WARNING: This is a basic mod made with CA guidelines but if you have altered your patch_en.pack (text pack) please know that it will be ignored. If you do not wish this then do not use the my_loc.pack which includes all default text as normal plus that needed for this modification to work fully. Not using my_loc.pack will only mean that the custom unit has no name or description in game but you can still explore other elements of the mod itself. The main thing is that it does not alter your official gamefiles or change your data in any way.

Necessary tools - LtChambers pack file manager 1.9.9 and his mod manager 1.0.1

Mod action - In short this mod enables Scotland as a playable faction in battle mode and adds a custom_unit known as "Irwin's Privates". The custom_unit was cloned from higland_clansmen and the stats and abilities tweaked. At the same time original highland_clansmen unit was disabled.
To add the mod simply put user.empire_script.txt in your C:\Documents and Settings\username\Application Data\The Creative Assembly\Empire\scripts (XP)and place my_pack.pack and my_loc.pack in your C:\Program Files\Steam\SteamApps\common\empire total war\data folder (XP).
Those who have other mods already installed and understand the use of user.empire_script.txt will know they can edit their own script and rename the mod pack to what is suitable for them. To delete the mod remove the line entry for the mod from the script and delete both pack files.
You can use LtChambers mod manager to enable or disable the mod as well.
It was my intention to make a compact pack so users could mess about with the basic elements and tinker with things like creation of custom units (based on existing ones by cloning and editing) and unlocking factions. The main parts of the database are included in my_pack_starter.pack as an example so users can easily browse through it without going through all the complexities that have been detailed in previous tutorials. i.e. importing/exporting files/tsvs into the main & patch packs etc.


Starting up
my_pack_starter.pack has most entries in so that users might experiment with cloning units and editing to see what can be achieved. This has been trimmed down to give the final working my_pack.pack
I've unlocked Scotland as an example and created a custom_unit exclusive to Scotland called Irwin's Privates (Irwin is a friend of mine from Scotland who plays the game ) The unit is based on the highland_clansmen which I've disabled so you don't see 2 similar units (it was available in the early period). I've cranked the stats and abilities a fair bit to make the unit nice and elite for my friend hehe.
I used LtChambers packfile manager and referred to tutorials posted by The Phenom and was able to troubleshoot issues with the help of MrThib and I thank them all personally.
Sometimes it was easy to edit values in the packfile manager and others it wouldn't have it so I had to edit the exported tsv (eg. changing TRUE/FALSE values).

Faction enabling - just look at the factions table and you can see what's enabled and what's not. As I say I enabled Scotland only for the purpose of this mod.
Note that I haven't looked at anything to do with the campaign mode but the building units allowed is included as an example of one of the things needed to start including your unit in campaign mode. building_units_allowed has "custom_unit" entered as an effect for army_barracks in the first row and in campaign mode you'd make additions similar to the sample defaults I've left depending on your requirements. Other fragments of the db necessary for the campaign can be exported from the main.pack and imported by you to edit as you gain experience and understanding of what does what.
The other database fragments have at least one additional row at the bottom with "custom_unit" in the first field.
To add proper structure to the mod pack all the database fragments were renamed with the prefix "my_" in order that when they load they don't completely overwrite the essential db fragments. (eg. units becomes my_units).

Finally - adding text to the game isn't as easy as adding it to your mod pack which most ppl have found out. At the time of writing this the only way to do this is to overwrite the full existing localisation.loc file but whist some have been importing an edited version into thier patch_en.pack I strongly recommend against messing with the proper game files. It's too much hassle and there's an easy solution for now. Simply export the localisation.loc and import it into a new patch file (starting with m preferably because patches are parsed in order and trying other aphabetic positions doesn't necessarily work). This pack MUST be patch type and don't add it to your script. I've included mine as my_loc.pack
I've added new entried for euro_highlanders_irwin (short and long descriptions) and the onscreen name for the custom_unit - "Irwin's Privates" to the localisation.loc (export to tsv and search the text to understand how it's done. The text must be saved in uncicode type. The euro_highlanders_irwin is my custom entry. It's referenced from the 13th entry of the custom_unit row in the my_units db fragment.

PLEASE UNDERSTAND THAT WORK IS ONGOING BY VARIOUS PEOPLE AND IT'S NOT ENOUGH JUST TO SKIM OVER THINGS IN TUTORIALS AND DISCUSSION. NOTE EVERYTHING IS FINALISED AND I LIKE EVERYBODY AM STILL LEARNING.

GOOD LUCK AND I HOPE YOU ENJOY FIDDLING

CUSTOM UNIT WITH ONSCREEN NAME AND CUSTOM DESCRIPTION