Total War: WARHAMMER III

Total War: WARHAMMER III

Not enough ratings
How to Add Unit to Warband Upgrade System (updated for UI)
By BAGHolder
A simple modding guide
   
Award
Favorite
Favorited
Unfavorite
Requirement
You will need RPFM + a basic knowledge in db table.

For reference, please also grab this mod: Warband Upgrade Extended. This mod provides enlarged UI panel + 20 race-unique UI categories + 2 empty UI tabs to work with.

For compatible unit examples, you may check out Lily's Bretonnia Overhaul and its unit pack.

These example mods are more explanatory than this guide :-)
If you encounter any issue or question, then continue reading.
If you don't find answer below, throw me a question in comment section.
The Simple Way
The simplest way is to add to existing upgrade groups. In this case, there are two tables involved:
table 1: unit_to_unit_group_junctions_tables (put your unit into a unit group)
table 2: unit_upgrade_groups_table (name the unit group)


Example 1:

To add units to existing chaos groups, all you need is table 1:
1. find a suitable group from the CA db in table 1;
2. create a new db under table 1 folder, and add in the unit name | unit group.

Say you made another exalted daemon, called my_cute_daemon. The proper group from table 1 would be wh3_main_chs_daemonette_exalted.

So, create a new db under table 1, name it uniquely (e.g., cute_table), and add the following row to the new db:
my_cute_daemon | wh3_main_chs_daemonette_exalted

Done! Now the upgrade will appear in game.



Example 2:

To add units in non-chaos race, locate the race db under table 1 in Warband Extended Mod, find a proper unit group, and add your unit id | group in a unique table 1 db.

I will use what I did for Lily's Bretonnia Overhaul as example: it has a new longbow variant called zayli_royal_longbow.

Locate table 1 folder in the extended mod, and open TLA_upgrade_brt db. Find the proper group you would like to add to. I used the yeomen archer group there, called "TLA_brt_elite_bow".

Next, in your unit mod, create a new db under table 1 folder with unique name (say Zayli_brt). Then add the following row:
zayli_royal_longbow | TLA_brt_elite_bow

Then, go to table 2 folder, and create a db of same name (Zayli_brt). Then add the unit group
TLA_brt_elite_bow
into the entry. (This step is needed so your mod do not throw error without the Warband Extension mod.)

Done! Your unit mod will work by itself; and with the upgrade mod subscribed, there will be an upgrade path to your unit.

You can find more examples in Lily's main Bretonnia mod and the unit submod.
The Advanced Way
Now, if you would like to create a new group and / or new upgrade path (rather than existing ones in vanilla or my mod),

you will also need
table 3: unit_upgrade_group_ui_infos_tables (specify the location and UI tab category of each unit)
table 4: unit_upgrade_group_ui_links_tables (specify the arrow link between two unit groups).
table 5: unit_upgrade_to_unit_groups_tables (specify the base and target group for upgrade).

You will need to create new group via table 2, associate your units to the group in table 1.
Then, add your group ui info in table 3, create new upgrade link in table 5, and specify the link directions in table 4.

If you are doing unit variant swapping, then table 4 is not needed.

If you are looking into this, I believe you are an db expert & can figure out the remaining on your own by looking at my mod & how it works in game --- or ask me here in this guide if you have any trouble. Again, my main mod and Lily's units submod provides perfect examples on how to add units.

On unique UI tab and UI category
In the table 3 (the ui_infos_tables), there is a category for each entry.

Those categories are specified in
table 6: unit_upgrade_group_ui_categories_tables.
In CA's database, it only has 5 categories for each chaos god.

If you specify a new category in Table 6, it will not work --- because those categories are also linked with the UI tabs in warband_upgrades.twui.xml.

There are three ways:
1. Use the 5 chaos god categories (undivided, khorne, etc.)
2. Use a new category from table 6 of my warband extended mod.
3. Create your own twui file.


Method 1:
Easy to work with, compatible with my mod, but not necessarily other warband mods.
This is because some other mods may enable cross-race units (say immortal landmarks) & mess up the UI tab. The UI tabs can be too small if you have too many units.


Method 2:
My Warband extended mod customized the file for 23 unique categories, and enlarged UI tabs that can fit >70 units per tab (vanilla tab can only fits 20).

Each race has a unique tab associated (BRT, EMP, HEF, etc.). Most tabs still have space for >30 units. You may also re-arrange the vanilla units position to suit your mod.

Then there are two empty category (MOD1, MOD2) dedicated to submod usage. Each category can fit 70 units each, sufficient for almost any mod. If you have modded units of multiple races, they can all fit into these two categories. (So long each unit is unique to one race only, there will be no UI clutter).

To customize background and button for the empty category, you may supply "background_images_mod1.png", "background_images_mod2.png" (and also the button images) in your mod. You will also need to name your mod properly (first letter higher than T), so it loads higher than the main mod.


Method 3:
If you don't like 1 & 2, then you can always reference my modified twui file (e.g., search "mod1" category and track the changes), and create your own UI tabs. There are several things to do (replace GUID, and link GUID properly). So only try this if you are pretty good at xml file.



28 Comments
The Kerminator Oct 9, 2023 @ 1:56pm 
I got it working by editing authors line on upgrading tzar guard into self, and simply making the target the ice guard. Looks great in game, but obviously tzar guards can no longer upgrade between versions. A bit of a dirty fix but it works. Thanks for a great mod!
The Kerminator Oct 9, 2023 @ 1:17pm 
I'm trying to add a link from tzar guards to ice guards in my kislev run, but keep getting an error that the game isn't a fan of "TLA_ksl_inf_tzar_to_ice". Both units are already in your table, so I've added the TLA_kls_inf_tzar as "Base unit" and "Parent unit" with "TLA_ksl_inf_ice" as target / child with appropriate costs/requirements following your example. Does anyone know why TLA_ksl_inf_tzar_to_ice doesn't work?
chris_sansom Sep 15, 2023 @ 2:11pm 
Ah sorry - not that you asked but posting here in case anyone else finds they want to do the same thing ever...

The below was not enough on it's own. It did succesfully hide all your entries from the UI, but because some of the upgrade paths between my groups and yours had duplicates (e.g. Lothern Sea Guard to Lothern Sea Guard with shields) but with different level requirements / tech requirements, the UI didn't know which to present.

To get around that, I added a new 'empty_group' entry to 'unit_upgrade_groups_tables', and then set this as the target group for all the entries that I wished to disable in 'db/unit_upgrade_to_unit_groups_tables'.

Sorry for spamming!
chris_sansom Sep 15, 2023 @ 10:16am 
@bagholder - thanks very much!

I was able to achieve the desired affect by adding a new 'DISABLED' entry to 'unit_upgrade_group_ui_categories_tables'

...and then applying that to the unit_upgrade_group_ui_infos_tables groups that I wanted to hide.

(Of course, as you alluded to, I also had to name my table unit_upgrade_group_ui_infos_tables with a higher priority than yours).
BAGHolder  [author] Sep 14, 2023 @ 7:14pm 
@chris_sansom

to overwrite, the table name in your mod needs to have higher priority (letter higher than T, for example).

There is a RoR mod by Yuudachi that overwrites some entries in every table, you may take a look.
chris_sansom Sep 14, 2023 @ 6:05pm 
@BAGHolder

Thanks for making this mod, and this modding guide, really appreciate it!

How would I go about overwriting one of your panels with my own unit upgrade groups?
I'd like to maintain compatibility with your mod, while overwriting one of the tabs and only display my own upgrade paths / groups for the High Elves.

I think the only tables I want to overwrite are the _hef specific ones in:
unit_to_unit_group_junctions_tables, unit_upgrade_group_ui_infos_tables, unit_upgrade_group_ui_links_tables, unit_upgrade_groups_tables, unit_upgrade_to_unit_groups_tables

I feel like this should be possible, but can't get the two mods to load together when overwriting the above tables, whichever load order I set.

I've looked at the Radious submod, which also overwrites some of your tables, but couldn't work anything out from that.

Do you please have any advice on steps I might have missed / how I should be trying to partially overwrite your mod? Sorry for such a long question.
BAGHolder  [author] Apr 15, 2023 @ 8:52am 
@Sparkle Eldar

Sure, not a problem.

Those ids are unique but also linked in various places, so take a lot of time to add

Just remember to grab the new twui file in the main mod, every time a new DLC race is added.
Sparkle Eldar Apr 15, 2023 @ 8:24am 
@BAGHolder

Hi, BAGHolder, may I use your ui content for my ogre mod? I am making a new warband system with newly created units. Really have no idea about the hexadecimal ids, are they for each icon?
BAGHolder  [author] Oct 28, 2022 @ 4:44am 
@Urgat

Yes you can find me there.
It is easier to just use the empty category, MOD1, MOD2, and ART --- if this is just a mod for greenskin.
Urgat Oct 28, 2022 @ 2:16am 
Yeah, no, I have to make it work, too much bloat in my mod otherwise. You wouldn't happen to be on Discord by any chance so I can ask a couple questions w/o spamming this place? Lots of TWW modders on Da Modding Den.