Total War: WARHAMMER II

Total War: WARHAMMER II

65 ratings
Effects
By Cryswar
This guide explains how effects work in TWW2. After reading this, you should be able to make your own custom effects and link them to the desired bonus values.
5
   
Award
Favorite
Favorited
Unfavorite
Preface
As with every other guide, I will open by shilling the Rusted Pack File Manager[github.com], hereafter referred to as RPFM. It is BY FAR the best modding tool in your arsenal, vastly superior to the formerly popular PFM which hasn't been seriously updated in a long time whereas RPFM is actively updated and has many many features PFM does not. I will not be explaining the basics of RPFM in this guide though, I've done it too many times in previous guides and there are other excellent resources out there like Vandy's modding basics guide to teach it.
What Is An Effect?
Effects are many things in many contexts, but the simplest way to put them is that they connect a skill, ancillary, building, technology, effect bundle, etc. to the bonus value ID that they claim to give, and tell the game what to do with that value and where to put it. For example, when a character skill says that it gives +5 melee attack to Chaos Warriors, it doesn't ACTUALLY do anything by itself - it is attached to an effect called wh_dlc08_effect_battle_melee_attack_increase_chaos_warriors, which is in turn linked to the melee_attack_mod bonus value ID in the effect_bonus_value_ids_unit_sets table.

Effects are always attached to a scope, usually in a X_to_effects_junctions table, which tells the game who to apply it to - scopes vary wildly, but in general this is where you tell the game "ok, apply this buff to my entire army" or just to the lord or to the entire faction. The most common scopes you'll use are character_to_force_own for army buffs, (same as general to force own but also works for heroes), faction to X for factionwide buffs or unit cap stuff, or region/province to X for local effects.

Effects also have a value, also usually in the X_to_effects_junctions table, which is where you tell the game HOW MUCH of your desired bonus value to give to the unit(s). For example, If the value here is 5, that means 5 melee attack. If it was an upkeep effect, you might use -15, which translates to -15% upkeep. Effects that just activate an ability usually just have a value of 1.

Does that all sound kinda complicated? Well... honestly, it can be. I know it kinda messed me up at first too. However, that degree of separation lets you attach alllll kinds of values to all kinds of things in a very similar manner, so once you get used to the idea that effects are basically just messengers that link two tables together, you'll be able to pick up how to do all of the above very easily - adding an effect to an ancillary is the exact same mechanic, using almost the same tables, as adding an effect to a character skill.
effects_tables
This table just registers your effect to the game - it doesn't DO anything yet, but this does decide what the icon is and how high priority it is in a list of effects.

  • The Effect column is basically just Key in every other table - name it what you want, and save it in notepad or something 'cuz it's gonna come up a lot.
  • Icon and Icon Negative are very simple to copy from vanilla; if you want this effect to give extra Melee Attack to Hexwraiths, filter the vanilla table Icon column by "melee" and oh hey, "melee.png", we gucci. Generally speaking you just use the same icon for both positive and negative.
  • Priority tells the game where the effect goes in a list of effects - priority 1 goes at the top, 600+ is gonna be way down at the bottom. Most vanilla effects range from 50-110 and yours probably should too, but effects that grant abilities tend to be in the 600s for whatever reason. It doesn't REALLY matter, just an aesthetic thing. Try to use different priorities for different effects granted by the same skill (50 and 51, not 50 and 50).
  • Category tells the game if this effect will be used for battle related stuff (ex. boosting melee attack) or campaign stuff (ex. upkeep).
  • Is Positive Value Good is primarily relevant for upkeep and spell cost reductions - most effects you can just toggle it on, but if the effect is negative but good (ex. -30% upkeep, -1 cost to Fireball) then turn this off, otherwise the text will be in red despite it being a good effect.
---Common Effect Tables---
As a preface, I do not list every single table related to effects below - just the most commonly used ones and what they're typically used for.
effect_bonus_value_ids_unit_sets
This is probably the overall most used effect table - it's used for direct stat boosts from effects. The layout is fairly simple thankfully!

Bonus Value ID is crucial - this is how the game actually knows what the heck the effect DOES. Definitely look up values in vanilla, most are pretty easy to figure out from there. mod_land_movement_battle gives movespeed in battle - big surprise there. ammo_mod increases your ammo, who would have guessed. Note that weapon damage is split into four separate IDs, the main four are;

melee_damage_ap_mod_mult
melee_damage_mod_mult
melee_damage_ap_mod_add
melee_damage_mod_add

Mult just means it's a multiplier, so when you define the # value of the skill later, 30 actually means 30%. Add, surprise, means it's added - so a 30 there means you ADD 30 damage.

Note that the game adds them separately, so if you want a skill that gives +30% total damage, you need to attach the effect to both melee_damage_ap_mod_mult AND melee_damage_mod_mult in two separate rows. You can just add melee_damage_ap_mod_mult by itself if you want purely +30% ap damage, though.

Effect is just the link to the effect we made in the last section.

Unit Set is related to, surprise, unit sets! I explained them in a fair bit of detail in my unit creation guide, but to summarize, you define the set in unit_sets, add units to it in unit_set_to_unit_junctions, and then this bonus value will apply to all units in that set once you turn the effect on (usually via a skill). Vanilla already has a bunch of unit sets defined; If you want your skill to buff ALL chaos units, for example, you can just use the existing chs_all.
effect_bonus_value_unit_ability_junctions
This is a very simple table - you attach an effect to an ability, and tell the game how to interpret it. Does your effect enable a skill? Reduce the Winds of Magic cost of one? Make it recharge faster? Use vanilla examples for reference on how to do a specific task.

Note that the unit_abilities table is where you're drawing from here, NOT unit_special_abilities.
effect_bonus_value_unit_attribute_junctions
Literally the exact same as the last table, just for attributes (Fear, Vanguard, Stalk, etc). Remember that if you want to edit a unit's BASE attributes you do that in the land_units table, this table is used to add attributes to a unit mid game, often from character skills.
effect_bonus_value_unit_set_unit_ability_junctions
This is... similar to the last set of tables but more complex; as you may notice on the right, you're relying on the unit_set_unit_ability_junctions table to tell the game to apply this ability to an entire set of units; the first vanilla example to come to mind is the Tomb Kings banner that gives Frenzy to all Ushabti. But you can use this with skills too, for example, giving the Frenzy ability to all Empire Swordsmen in your army.

It's actually not that complex, you just go to unit_set_unit_ability_junctions, attach the unit set to the unit ability, give that a key, and use that key as the 'Unit Set Ability' back in this table. On the left you put in the Effect key you (hopefully) made earlier.

The Bonus Value ID has a variety of options; enable/disable, uses_mod (how many extra charges you want to give it), cooldown change, etc.
effect_bonus_value_unit_set_unit_attribute_junctions
Same as last section but for attributes.
effect_bonus_value_agent_junctions
This table and effect_bonus_value_agent_subtype_junctions are used to make agents available or add to their caps. Not much to explain here honestly, it's very straightforward.
effect_bonus_value_military_force_ability_junctions
You know how some factions can give themselves abilities on the sidebar on the right? Black Ark bombardments, Lizardmen spawning those clever girls or the Holy Stella, Skaven spawning Clanrats with The Menace Below, all that stuff? We do that here. Pretty simple for the most part.

Note that you'll need a secondary table - army_special_abilities - to actually attach the ability to its so called "army special ability", which also lets you check the Enables Siege Assault box if you're doing something like Vaul's Hammer.

Note that unless your faction already has army abilities in vanilla, you will most likely need to import the UI for it to look good. You can make your own if you're a gfx wizard I guess, or just import it from data_2; go to ui>skins, extract both hexagon_ability_frame and hexagon_ability_holder, then create a folder following that path + the faction key in your mod replicating how it looks in vanilla, ex. ui>skins>wh_main_chs_chaos if you're going to be giving army abilities to Chaos.
effect_bonus_value_special_ability_phase_record_junctions
Phases are the buffs/debuffs that abilities apply for a certain length of time. Contact phases in particular are debuffs like poison, sundered armor, Discouraged, etc. I go into much more detail in my Unit Abilities guide, this is just the tl;dr version.

This table lets you give them to whatever the scope of the effect is. As far as I'm aware you can't attach it to a unit set, it's always defined as 'to everyone in the scope you use', so you can use a character_to_character_own scope to apply it only to the character, but otherwise it applies to the entire army. No in between.
effect_bonus_value_faction_junctions
This table lets you affect diplomacy with specific factions, with their keys taken from the factions_tables as needed. For example, if you're making a special item that gives +10 relations with the Empire, you'll need this table.
effect_bonus_value_subculture_junctions
Unlike the previous table, this table works for entire subcultures rather than specific factions - good if you want to torpedo relations with ALL dwarfs for example, but the previous table is better if you specifically want to lower relations with Har Ganeth instead.
effect_bonus_value_battle_context_junctions
There's a couple of very similar tables that all work basically the same way so I'll just focus on this one - these tables are for effects that only kick in under certain contexts, like one that gives bonus attack while at sea, or physical resistance when fighting any Chaos culture, or sieging an enemy walled settlement. They generally work the same as the basic versions I detailed earlier in the guide. Just rip off vanilla scopes or look it up in DAVE.

Note that these context tables DO NOT support unit sets - you can't do "regeneration to dwarf warriors while underground", only "regen to all units in army while underground."
effects.loc
As a pleasant surprise, you only have one prefix needed for effect localization files - effects_description_

In practice, this will end up looking something like effects_description_spearman_MA

On the flip side, the actual text part is a lot more complicated since any good effect will reflect the number you give it in character_skill_level_to_effects or ancillaries_to_effects. How? Well... let's go over a few common tools.

  • %+n displays the number as itself, no fancy stuff. Good if you want a flat boost, like +5 MA.
  • %+n% displays the number followed by a %, used if the effect is a % boost like +30% AP damage.
  • {{tr:rank7}} gives you that fancy little chevron dealio that the vet rank 7 skills use.

Surprisingly those are the only three you'll really need for much, if an effect grants an ability or attribute you just type it out, ex. "Passive ability 'Frenzy' for all Empire Swordsmen."
---Examples---
Example 1: Range Bonus to Army
For this example we will look at how King Wakhaf's range bonus to his entire army works.

The effect wh_main_effect_force_unit_stat_missile_range is defined, linked to his innate in character_skill_level_to_effects_junctions, and attached to the range_mod bonus value ID in effect_bonus_value_ids_unit_sets. Note that the unit_set is listed as all_units; if you wanted to ONLY give Skeleton Archers that bonus, you would instead use their unit set, ex. wh2_dlc09_tmb_skeleton_archer.
Example 2: Frenzy to Empire State Troops
Same as always, we start by defining the effect and naming it something relatively simple.

We visit the unit_abilities table to find out what the heck Frenzy is actually called in the files - turns out it's wh_main_unit_passive_frenzy

We then visit unit_sets_to_unit_junctions in order to find out that the emp_state_troops unit set already exists; if it didn't, we'd set one up in unit_sets and fill it out in unit_sets_to_unit_junctions

Knowing those two keys, we can finally hit unit_set_unit_ability_junctions and link the emp_state_troops unit set to the wh_main_unit_passive_frenzy unit ability, and put a key in there.

Finally, we go back to effect_bonus_value_unit_set_unit_ability_junctions and enable the key for the unit set ability we just created, attaching it to the Effect we made at the start.

Note that you still need to attach the Effect to a skill, building, weapon, technology, banner, etc. in order to finally get the effect ingame.
Example 3: Changing Settra's Faction Bonuses
You know what, it sucks that Settra doesn't get any benefit from his first Warsphinx building since he starts with one. For the purposes of this example, let's change that!

There's a few ways to go about figuring out HOW to do this, global searching "settra" for example, but for the sake of simplicity I'll just go ahead and say that faction effects are in the effet_bundles_to_effects table. So we're gonna go there and look for settra, which will pretty quickly take us to wh2_dlc09_lord_trait_tmb_settra being the bundle we want to add the effect to.

Of course, we need to actually HAVE that effect, and again there are two ways to do it; make a custom effect, or just go to the effects table and find one that gives unit cap to warsphinxes. wh2_dlc09_effect_unit_cap_tmb_veh_khemrian_warsphinx_0 looks promising, and is the effect the Warsphinx building has it turns out, so we'll use that.

If you look at how the building is set up, you'll notice that unit caps are scoped with X_to_faction_own, but this is a faction effect, not a building, so instead of building_to_faction_own we'll use faction_to_faction_own, or faction_to_faction_own_unseen, it doesn't really matter.

Value is easy - however many we want to add. In this case, we just want to make every building count, so we'll do 1. That means he starts with 1 cap for his starting sphinx, and making a warsphinx building will add +1 cap, total of 2, meaning he can instantly build one.

Advancement Stage is just start_turn_completed for faction effects. Honestly I have no idea how much that matters, just copy vanilla and call it a day.

If you go ingame and test it, you'll see that it works fine now. You get the +1 cap, and on the top right on the campaign map, in faction bonuses, it'll say +1 cap to that unit. But... we have a problem. The lord select doesn't say anything about it. Weird, right? Did we do something wrong?

THAT happens because frontend faction select uses a totally different table full of dummy effects, called frontend_faction_effect_junctions_tables. Filling it out is pretty easy, same basic mechanic, but note that there are different groups for Vortex and Mortal Empires versions of each lord - so you'll have to add our new bonus there twice, once for wh2_dlc09_settra_faction, once for wh2_dlc09_vor_settra_faction. Once again, this table is PURELY VISUAL - it has literally no effect whatsoever in campaign - but filling it out properly makes things look nice on faction select.
83 Comments
最後 Hero 21 Oct, 2022 @ 8:52pm 
Hello, I need some help with making a mod for kholek. I want him to gain more damage, health, splash attack along with changing his melee attack interval. Would I make a new table for him in the effects area and what would I put in the table?
sgssk 18 Oct, 2022 @ 3:10am 
I just find that in 「battle context unit ability」, the key may have to be the same with the name of the effect that refers the context? I named the context as abc then the game can never run, and then named it with the name of effect, it run smoothly.
what a strange bug... Anyway, thanks for the help of this wonderful guide!
Lyedo 14 Sep, 2022 @ 4:39am 
Yes, It was it ! I picked the wrong effect scope, it was a character to faction, but the true effect scope was character to own armies. Thanks for your help mate !
Cryswar  [author] 14 Sep, 2022 @ 12:07am 
Maybe the effects aren't linked to bonus value IDs, or the wrong unit sets?
Lyedo 12 Sep, 2022 @ 8:30am 
Hello, I am trying to add custom effects in order to improve chaos warriors units for the Daemon Prince. In my packfile, my files seems good, but when I am in the game, the effects, while correctly displayed by the UI, doesn't seems to work. After a few hours of research, I couldn't find the problem. Can someone help me with it ?
italiangamer89[schizoprhenic] 5 Sep, 2022 @ 5:08pm 
hi, i need a bit of a help, i'm trying to create a mod that makes the lord and heroes gain a certain amount of exp per turn, but i can't figure it out how, i see that i works with normal units, but not with lords, heroes and legendary lord.
MrSoul 31 Aug, 2022 @ 9:01pm 
my kingdom for a "enable_replenishment_in_hostile_seas" id

Weirdest part to me too, can get a Black Ark to replenish itself at sea, suggesting that "enable_replenishment_in_foreign_territory" works for this, but try to apply to anything within it's sphere of influence AT SEA, nope, go F yourself even if right beside it (makes no diff game code just logically it is a bizarre decision by CA imho), oh but land about 2 miles way on land within the sphere, surrounded by hostile cities and armies? no problem, replenishment all day long.

Makes a lot of sense lol, and just wish any way we could edit that.
ONZE 17 Apr, 2022 @ 4:50pm 
Can anyone help me?
I am trying to add the Bloodshield_of_khaine effect to the Death Hag's "Bride of Khaine" skill, i am trying to follow the guide but am having troubles.
ONZE 23 Mar, 2022 @ 1:51pm 
i am trying to add an effect to the dark elfs "favour the Fortunate" army skill but i keep having the same problem in "effect_bonus_value_ids_unit_sets_tables" it's a warning that states "no reference column found in referenced table for colum "bonus_Value_id" " Ihave already generated a dependancy cache, can anyone help at all?
DecayWolf 8 Mar, 2022 @ 12:48pm 
We don't even have visual aid, nor the drop down box is not well organized, cannot use word searching, too easy to get lost into. And it doesn't contain everything about the same subject.

I mean... When an architect is working on a program, to develop a house per say...
The program pretty much does everything you can think off. It's so much easy, because you just need to know what you want and how to use the tool.
Instead of having to waste time learning where stuff is arbitrarily hidden, what needs what to be created, no proper explanation of chain of interactions and such.

It's unnecessarily time consuming for no bloody reason, except lack of care.
Modding is such a pain, for absolutely no reason at all. I don't know why people are ok with that, but... It's just not for me.