First I need to explain that this method has one important drawback:
This method will cause all factions using the unit to use the same textures
OK, now I assume you read the readme for the unpacker, so you can already edit files, and the results of your editing shows up in the game.
We're going to be editing 3 files and copying some files around. There are four steps and it doesn't matter which order we do them in.
Step 1 - battlemodels.modeldb
The first file we want is battle_models.modeldb and it's a notoriously horrible file to work with. The first horrible thing about it's vanilla form is it's format, and in the examples that follow I'm using a battle_models.modeldb which has been nicely rearranged. But what we're about to do is so simple that even the horrible vanilla format isn't going to get in our way.
So here is a unit entry in battle_models.modeldb that we want to make available to everyone. Now this is amazingly easy, just change it to this:
Where I've typed '4 merc' is where it used to have '6 france'. Faction names now don't matter as long as we edit the EDU accordingly.Code:11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 4 merc 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 4 merc 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0 1 4 None 16 MTW2_Fast_Bowman 19 MTW2_Adv_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary
Step 2 - export_descr_units.txt
So now to open export_descr_units.txt. Find the entry for the unit and add mercenary_unit, on the attributes line. This is the setting that forces the game to read from the 4 merc section of our battle_models.modeldb entry.
If you want you can specify individual factions instead of using 'all' on the ownership line.Code:type Scots Guard dictionary Scots_Guard ; Scots Guard category infantry class skirmish voice_type Heavy banner faction main_missile banner holy crusade soldier Scots_Guard, 56, 0, 0.9 officer Dismounted_Feudal_Knights_ug1 officer northern_captain_early_flag attributes sea_faring, hide_forest, hardy, can_withdraw, start_not_skirmishing, stakes, mercenary_unit move_speed_mod 0.95 formation 1.2, 1.2, 2.4, 2.4, 3, square stat_health 1, 7 stat_pri 7, 1, composite_arrow4, 160, 30, missile, melee_blade, piercing, none, 0, 1 ;level 7 stat_pri_attr area stat_sec 10, 3, no, 0, 0, melee, melee_blade, slashing, sword, 40, 1 ;level 5 stat_sec_attr no stat_pri_armour 13, 16, 0, metal stat_sec_armour 0, 0, flesh stat_heat 6 stat_ground 1, -3, 5, 3 stat_mental 12, disciplined, highly_trained stat_charge_dist 10 stat_fire_delay 0 stat_food 60, 300 stat_cost 1, 3000, 300, 300, 300, 1085, 4, 200 armour_ug_levels 4 armour_ug_models Scots_Guard ownership all era 0 all era 1 all era 2 all recruit_priority_offset 35
And you can also set up individual factions for custom battles on the era lines. It prevents them showing up when the player clicks 'all eras' while they're making a custom battle, which in turn saves a lot of moving files around if, for example, the unit is only to be made available to one 1 new faction.
Step 3 - export_descr_buildings.txt
Now we're almost done, and it's time for export_descr_buildings.txt. All we have to do here is add the factions we want to the list of those that can produce the unit.
You don't need to see examples of this, you just need to be able to find the unit in export_descr_buildings.txt, and then literally add the name of the faction where you find other factions listed on the same line.
Step 4 - Unit cards and Unit info pictures
The final thing to do is to copy the unit card pictures to the '...\UI\units\merc' folder.
And the unit info scroll pictures to the '...\UI\unit_info\merc'
So there we have it, the whole process is extremely easy!
And I wonder how useful it is for mods like TA:TW that only have textures for one faction... Enjoy
---------------------------------------------------------------------------
Please give me feedback, criticism, tips to improve, ask questions, etc. Thanks