Request #1. Gamemodifiers for DefendableDamage that stack with group size.
Problem: Units with multiple members have no good way to use modded abilities because the ability does not naturally scale with the members in the group. For example, if I have a special ability that says it "deals 5 fire attack and enemy has a 5% chance to lose next turn", this ability will yield exactly the same results if performed by a 1-man unit or a 9-man unit. Because of this, it is impossible to add active abilities to units with more than one member.
We can multiply values with their TroopCount, but it is not the same as having several individual rolls made. Consider an attack that has a 50% chance to miss due to accuracy vs dodge. If a 9-man unit uses this, it will either count as 9 men hitting or 9 men missing. In addition, multiplying by Troopcount is not a viable way to multiply damage because 5 men dealing 5 cutting damage each is not the same as 1 man dealing 25 cutting damage. The attack vs defense formula does not work like that.
Does the UI need change to reflect this? No. We can put in descriptions that the ability stacks with members in a unit, but there is no requirement for the modifiers to display dynamic text. Example: "Each member in a unit attempts to strike the enemy for 5 fire attack".
How is the AI going to interpret it? Given the new priority tags that Frogboy are implementing, and the fact that these units are not going to be swarmed in abilities (we keep them simple) the AI does not need modifying to make things like this work.
Thinking rationally, is it a major code change or a small change - or just an addition? It is a rather big change, because currently all abilities are single-effect. This would need to be rolled as a multi-effect, like Ranged Attacks are. Ranged Attacks have a separate set of modifiers to multiply an ability, and that is troublesome in itself.
How is it going to be reflected in XML tags that we can use? Either as a tag directly in the <Spelldef> called something like <MultiplyByUnitMembers>, or it can also be put inside each gamemodifier. This is a rather big issue because if 9 men are going to roll the same type of ability, there may be huge stacking issues. I would therefore prefer if the tag was put inside the gamemodifier, not the spelldef. That way, we could have an ability that "lowers initiative on target by -2, and each attacker attempts to strike the enemy for 5 fire attack". Note the difference here - the fire attack is rolled for each unit member, but the initiative loss obviously should NOT stack. The tag should not be restricted to modifiers with DefendableDamage.
<GameModifier>
<ModType>Unit</ModType>
<Attribute>DefendableDamage</Attribute>
<AttackStat>UnitStat_Attack_Fire</AttackStat>
<MultiplyByUnitMembers>1</MultiplyByUnitMembers>
</GameModifier>
Does it help anything for the un-modded content in the game? Yes, throwing knives currently suffer from this issue for trained units. The Throwing Knife ability currently deals one single 6 cutting attack strike. This damage is not in any way multiplied by the amount of members in the unit. A 9-man unit using Throwing Knives will deal exactly the same amount of damage as a 1-man unit will.
Note here why scaling abilities with group size is important. Because the cost of each ability scales with the unit size. A single Throwing Knife costs 2 metal - 9 throwing knives cost 18 metal. Therefore, each paid-for knife should get a roll to attack.
And most importantly - how does it help the modder in specific ways and what am I going to do with it? This change is "unlocking the flood gates" for putting special abilities on our trained multi-member units. With the aid of AI priority tags that frogboy are working on, this means we can give units abilities like: "Strike a Mounted enemy for 50% extra damage" to a spearman unit. "All members attempt to strike an enemy target, each hit reducing their moves by 1." to a Warg-rider or a Harasser unit.
The grander purpose is to allow us to create a deeper tactical combat by introducing additional choices in Unit Design AND in combat actions. Specifically, I am going to make 10 standard actions available to all factions, then 1 or 2 for each of my ExpandedFactions in Stormworld.
This has been implemented, although I am not 100% sure of the mechanics. Anyway, see how abilities like Impale and Cleave scale for standard units in LH.