[eINFO] Modding War injuries

One of my requests over in the requests threads was that war injuries would be handled better. Specifically, that injuries should honor the prereq tags we place in them. Well, it looks like some things have been implemented in the latest patch (0.915), and not only that but it functions great as well.

First, just a copy-paste of what a war injury looks like

<AbilityBonus InternalName="Injury_AfraidOfDying">
        <AbilityBonusType>Unit_Injury</AbilityBonusType>
        <AbilityBonusOption InternalName="AfraidOfDying">
            <DisplayName>Afraid of Dying</DisplayName>
            <Description>-30 Accuracy vs higher level enemies</Description>
        <Icon>Ability_AfraidOfDying_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Accuracy</StrVal>
                <StrVal2>UnitStat_Level</StrVal2>
                <Value>-30</Value>
                <vsHigher>1</vsHigher>
            </GameModifier>
            <HideWhenUpgraded>0</HideWhenUpgraded>
        </AbilityBonusOption>
    </AbilityBonus>

When a champion falls in combat, it effectively "escapes" combat. In doing so, it suffers a random war injury such as the one above. The war injury is randomly selected from all AbilityBonus containers with <AbilityBonusType>Unit_Injury</AbilityBonusType> (note how that tag is outside the AbilityBonusOption). If a champion suffers all possible war injuries, it doesn't get any more and instead only costs mana and gets immobilized when it escapes like normal.

So what's the good news?

Two new ways to limit or enable war injuries.

 


 

First,

<Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>Blood_Undead</Attribute>
    </Prereq>

if this modifier is inserted, the war injury can only be suffered by anyone with a trait with internalname Blood_Undead. So we can now design war injuries based on race or other traits selected such as Paths - a Path of the Mage might suffer "Melted Mind - Minus 50% Spell Mastery" which cannot be suffered by any other path. This also opens up the possibility of having injuries become aggravated. If you once suffer "Blind in one eye" it may unlock a new war injufy - "Blind on both eyes".

 

 


 

Second,

<Prereq>
        <Type>RestrictedAbilityBonusOption</Type>
        <Attribute>Blood_Undead</Attribute>
        <Target>Unit</Target>
</Prereq>

if this modifier is inserted, the war injury cannot be suffered by anyone with a trait with internalname Blood_Undead. So if a war injury seems completely nuts for the race, you can simply remove it for that race. For example, it makes no sense whatsoever that a skeleton could in any way suffer from being "Blind in one eye" since it has no eyes. Other applications are also possible - positive traits that prevent certain injuries.

 

Moreover, the game handles war injuries modified in this way in a good way. A champion that dies will randomly select a war injury from the injuries it is able to receive. So if there are 10 base injuries, 3 are restricted, and 5 more have been unlocked due to previous traits, a champion would roll for 1 out of 12.

 


 

Note that despite the above modifiers working well, the following does NOT work and is simply ignored:

<Prereq>
      <Type>UnitStat</Type>
      <Attribute>UnitStat_FirebreathingCollar</Attribute>
      <Value>1</Value>
</Prereq>

 

4,371 views 9 replies
Reply #1 Top

This sounds great.  You might want to also remove "Flesh Wound"/"Gangrene Hand"/"Rotting Wound" from Undead (since I think all Undead are skeletons in your mod) and add some specific to Undead like "Lost Bones"/"Damaged Finger Joints"/"Damaged Spirit" which could be the Undead counterparts to the above three, or you could make them different functionalities instead. :)  Lots of possibilities, it's great! :)   Would you also like a modding ability to weight the likelihood of certain injuries, or do you prefer the simplicity of completely random excluding all injuries that have been suffered already?

Reply #2 Top

I would prefer a lot of things, but random is what we have. Likelihood randomness for war injuries would be close to the bottom of my priorities though.

Reply #4 Top

This would be handy for assigning Dominions type injuries that are based on the creature type, number of limbs, heads and any other oddities. 

Reply #5 Top

For the Angels: Broken Wing

Reply #6 Top

Technically you could adjust the probabilities by having duplicate entries of common injuries... though it would be lots of extra work without much real gain.

Reply #7 Top

And then it would be possible to have multiple instances of the same injury, since they would get treated as different injuries. =)

Reply #8 Top

I would love it if certain injuries led to more severe injuries, but you don't want a unit to be getting 3 broken legs. 

Reply #9 Top

Looks like this

<Prereq>
      <Type>UnitStat</Type>
      <Attribute>UnitStat_FirebreathingCollar</Attribute>
      <Value>1</Value>
</Prereq>

might work after all for limiting injuries. Be sure to test it if you use it, as I remember seeing some odd results when using it.