Tutorial:Attaching the Horde Mechanic to a Specific Agent
Originally by Sam8872
As a preface, this is not a guide to creating a new faction that utilises the horde mechanic, it’s a guide that allows you to attach the horde mechanic to a specific agent (Agent in this regard means lords since that’s how they are referred to in the DB)
So, to start off, we will be using RPFM as it’s an incredibly useful tool used for editing the DB, and while you don’t need to be very familiar with the DB and how to use the tools, it would be useful.
What you need
What is a horde with regards to Total War: Warhammer then? It allows the specified lord to gain population, build buildings, and thus if specified, gain the ability to recruit units or use certain army abilities, among others.
There are a few tables that we will have to mess around with so I’ll go through them one by one and explain the important things as we go on.
Right, so in this hypothetical scenario, I want to attach the horde mechanic to an agent and allow this particular agent to build certain buildings of which give them the ability to recruit units (Just a disclaimer, I won’t be telling you how to make new buildings or give them effects, this was done perfectly by Vandy, available here.)
Nothing complicated here, all you have to do is write a unique key. (Can’t stress this enough, it needs to be unique else it could cause problems for you and others down the line.)
- Key – Write up a unique key that will be linked to other tables, call it anything, I like to name it after the agent of which the horde will be attached to, helps me remember.
Few more fields here than the last but again, nothing too complicated, helps link your force_type, of which we just made, to slots that enable the buildings to be attached to the horde.
- Force_Type – Unique key that you wrote up in the previous table.
- Primary Slot Template – Links to buildings such as the settlement chain (Province capital main building) you can call this what you want, I call mine the force type and then ‘_Primary’ added in after it.
- Primary Slot Type – Into here we want to add in ‘horde_primary’, this doesn’t do too much, essentially tells the game we can convert but not destroy the building, as with regular primary slots.
- Secondary Slot Template – Links to any other building aside from the ‘main’ building, you can call it force type with ‘_Secondary’ added in after it.
- Secondary Slot Type – Same as the Primary Slot Type, into here we type in ‘horde_secondary’.
This table attaches a feature to a force type.
- Feature – The features we want here are ‘character_bound’ & ‘general_is_irreplaceable’ if you don’t want the lord to be replaced, otherwise, you can be rid of the latter, there are a couple more things available that you could add, for example ‘upkeep_increase_exempt’ but it’s not necessary, you can however find the full list of features in the military_force_type_feature_junctions_tables.
- Force Type – Self-explanatory, put your unique key in here.
This allows your force to convert to another force_type.
- From – Here you would put in your force type in the first row and ‘ARMY’ or whatever the default force type of the faction is in the second.
- To – Here you would put in ‘ARMY’ or whatever the default force type of the faction is in the first row and your force type in the second.
- Automatic – You want ‘ARMY’ -> your force to be automatic, your force -> ‘ARMY’ to be not automatic.
Remember when we added in our slot templates into the military_type_horde_details_tables, yeah, we need to actually create a template for it to work and link to.
- Key – Take the key you created from military_type_horde_details_tables (Primary slot template and Secondary) and add them both into here.
This links the buildings you want to add to your slot templates, as I said previously, I’m not here to tell you how to make new buildings, refer to the guide made by Vandy or any other reference. Just ensure that you have a unique ID, and that the primary slot template that we made links to the primary building in the horde, ergo, buildings like the settlement chain. Everything else can go into secondary.
This table connects quite a few tables that control many elements of a campaign such as pooled resources or settlement occupation, fortunately, we only need to focus on a select few. It’ll help us to connect our agent to our military force, our horde.
- Id – Unique key, feel free to call it the same as the military force unique key, easier that way.
Links the campaign group table to a member.
- Id – Into here goes another unique key, can still be the same as the campaign group key but if it helps you differentiate between the two, you can call it something different.
- Group – Our campaign group unique id goes here.
This table links our group member to our agent.
- Member – The Id from the campaign_group_members_tables goes into here.
- Agent_Subtype – Agent subtype key goes into here.
This table links our campaign group to our military force type.
- Valid Group – Campaign groups Id goes into here.
- Military Force Type – Force type key goes into here.
This table allows you to attach a feature such as the ability of a faction to own regions or occupy settlements, important stuff right? We’ll be using it to allow a faction to support horde armies, all you need to know is, does the faction I’m adding a horde into support hordes, if yes, you can skip this table entirely, if no, it’s very simple.
- Feature – Into here we type in ‘CAN_SUPPORT_HORDES’.
- Feature Set – ‘STANDARD_FACTION’ goes into here.
Right let’s take a little breath here, congratulations, you’ve actually introduced the horde mechanic to your agent at this point, unfortunately we’re not done yet and have a few more tables, fortunately, it’s only a few more tables. I’d take this time to go over everything you’ve done, perhaps get your buildings all nice and finished up, attaching them all to the superchain and what not. Alright, let’s continue…
Right, so if you wanted to check if everything worked, you’d probably be disappointed, you can’t build anything, recruit anything, you’re stuck with a horde that doesn’t work, no worries, I’ll be taking you through the steps.
This table is used to link the faction(s) you want the horde to be attached to a stance. First things first, if the faction you want to add the horde to supports hordes, it’s more than likely you don’t need to add anything in. To ensure if you can skip this step, head on over to the same table in data and have a look at the faction you want to add the horde to. If you want the horde to use its horde mechanics, ergo, building and recruiting on land and sea, you want to ensure both ‘MILITARY_FORCE_ACTIVE_STANCE_TYPE_PATROL’ & ‘MILITARY_FORCE_ACTIVE_STANCE_TYPE_SETTLE’ are included, if you want it to only work on the sea like a Black Ark, it’s only Patrol, if you want it to only work on land like Nakai, it’s settle.
- Faction – Pretty self-explanatory, you put in the faction you want the horde associated with in here, you get the exact key from factions_key.
- Stance – Right, so there are a lot of stances that can be attached to a faction from raise dead to stalking to settle, a lot of important things. We want to add in ‘MILITARY_FORCE_ACTIVE_STANCE_TYPE_PATROL’ & ‘MILITARY_FORCE_ACTIVE_STANCE_TYPE_SETTLE’, if you want it to only work on the sea however like a Black Ark, it’s only Patrol, if you want it to only work on land like Nakai, it’s settle, if you want your horde to work on both, you add them both in.
This table is important due to the fact that it attaches the stance(s) we attached to our faction in the previous table to an effect, else it’ll just be an empty stance. If you didn’t need to add anything in the previous table, you can skip this too, otherwise, you’ll need to do a bit of digging, head on over the same table in data and have a look at what sort of effect you want attached to your stances, patrol only has two, one for the Vampire Coast and one for Dark Elf Black Arks. If you want to see the exact effects, follow the breadcrumbs, the effect bundle effect links to, you guessed it, effect_bundles_to_effects_junctions_tables. Do the same for settle and decide on what you want.
- Stance – Stance(s) we added in the previous table go here.
- Effect bundle – Read the small paragraph above, decide on what you want your stance to do.
- Culture – Do you want this to apply to an entire culture? If you’re doing this for multiple factions, it’s easier than doing it for each faction.
- Subculture – You want this to apply to a subculture, if so, which one?
- Faction – Do you want this to apply to an entire faction?
- Force Type – Right, so this is the one we probably want, you don’t really have to put anything into the previous three since we might want different effects for different hordes, so, put in your unique force type key.
Right, so this table isn’t really needed, but can add a bit of flavour, it essentially brings up the scene whenever a lord on the campaign map goes into a stance, so when an Empire general goes into the encamp stance, a bunch of cool tents pop up out of the ground, why wouldn’t I want this right? Well, the next tables we’ll be having a look at essentially takes over their role, if we add both in, it’ll work but just kind of clash and get mixed in together.
- Group – Campaign group Id goes into here.
- Stance – The stances we added go here.
- Composite Scene – Do a bit of digging in the same folder in data to find the one that matches your faction, so an empire camp would be ‘empire_camp’, etc.
This table is the reasoning for me telling you to exclude the last table as it essentially links the main settlement chain building to a scene.
- Key – You’ll need to put in a new unique key into here, you can name it after the building you want to link to the scene, though if it’s a vanilla building, change the key around a bit since it might be the same within the vanilla files. Do one for each building level.
- Building level key – The primary buildings, the main settlements chain, whatever you want to call it goes here, one for each level of the chain.
- Building_Model_Id – Right, so this basically decides if you’re going to need two more tables or not, if you want to use, for example, the same ones as Nakai or the Vampire Coast shipbuilding scenes, all you have to do is copy the vanilla mode Id from the data file into here. If you want more customisation, you’ll need these two tables:
- Your unique building model id from the previous table goes here.
- I’d suggest looking at the same table in data for this, all you need is a unique key, the model id that you made in the previous table, and a building Bmd that you can attach that links to the scene. Horde buildings don’t have anything else, there are other things like construction Bmd and Damaged Bmd but those are used for settlements.
This table allows us to attach an immunity to a faction. If you don’t want all of your horde armies to be immune to infighting, you can skip this.
- Attrition – Feel free to add any other attrition immunity into here but for hordes, the one we want, or don’t, I don’t control you, is ‘horde_infighting’.
- Faction – The faction you’ve got the hordes attached to goes here.
Right, so we’ve pretty much finished everything we need to add a horde to an agent, and I know I said I wasn’t going to touch upon buildings, but it’s kind of important here so I’ll have to. The next few tables are used to create certain buildings that you can attach to the horde from the get-go such as the primary building. I won’t be going through them in too much depth since it focuses on other things that the guide isn’t meant for such as buildings and effects, but I’ll try my best to explain what’s going on without delving too deep.
First we need to create a new effect in the effects_tables of which you can call anything, I’ll just call mine starting_buildings_(Whatever), you can leave the icon and icon negative blank and priority at 0, the category will be ‘campaign’ and the positive value good should be ticked.
Next, the effect_bonus_value_building_set_junctions_tables is needed to attach the bonus value Id ‘num_buildings_to_spawn_for_new_horde_army’ to our building set, you can this the same as the effect we just made but it’s up to you, then into effect goes our, you guessed it, effect that we just made.
The effect_bundles_to_effects_junctions_tables is needed next to attach our effect to our faction, so what we need to do is grab our effect bundle key which would be linked to our faction, so for High Elves, it would be ‘wh2_main_faction_trait_high_elves’, have a look in the data folder to find the correlating one. Then we add our effect into effect key, the effect scope would be ‘faction_to_faction_own_unseen’, value of ‘1’ and advancement stage of ‘start_turn_completed’.
We then create a new building set within the building_sets_tables, nothing too fancy, key the same as the one we put in earlier, icon can be ‘placeholder’, sort order ‘0’ and the colours all ‘255’.
Lastly, we need to attach our building set to out buildings, for this we’ll need to use the building_set_to_building_junctions_tables of which we’ll be adding in our unique building set key that we made previously and the building level of which we want to be included into our starting buildings, keep chain empty and exclude unticked.
Congratulations, you’ve reached the end, from here you can launch your game and a horde should appear within the army and the buildings that you have wanted to attach have done so, this is the time for you to get more creative, if you already haven’t done so, create custom buildings, abilities, units to add to your horde, the possibilities are quite literally endless.