[eINFO] Modding the Maul mechanic

I noticed a debuff on the Bears doing the maul attacks. Sure enough, there's XML linked up to the maul debuff.

It begins in the ElementalDefs.xml:

<MaulDebuffSpell>MaulDebuff</MaulDebuffSpell>

and in CoreSpells.xml you will find

    <SpellDef InternalName="MaulDebuff">
        <DisplayName>Maul Debuff</DisplayName>
        <Description>Effect after a successful Maul attack</Description>
        <IconFG>Ability_Maul_Icon.png</IconFG>
        <IconColor>210,110,210</IconColor>
        <SpellType>Tactical</SpellType>
        <SpellClass>Defensive</SpellClass>
        <SpellSubClass>Debuff</SpellSubClass>
        <SpellTargetType>Self</SpellTargetType>
        <HideInHiergamenon>1</HideInHiergamenon>
        <IsCastable>0</IsCastable>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Accuracy</StrVal>
            <Duration>1</Duration>
            <Value>-4</Value>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>5</AIPriority>
        </AIData>
    </SpellDef>

The debuff is lacking <CanStack>0</CanStack> which means it does stack.

To test if it was working properly, I put this in instead

        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Accuracy</StrVal>
            <Duration>1</Duration>
        <Multiplier>0</Multiplier>
        </GameModifier>

and gave a unit 200 accuracy and maul. Result: Maul was triggered from first hit, second hit always misses at 0 Accuracy.

This one would decrease Accuracy and Physical damage by 25% of original value for every hit performed while in Maul-mode.

<SpellDef InternalName="MaulDebuff">
    <DisplayName>Maul Debuff</DisplayName>
    <Description>Effect after a successful Maul attack</Description>
    <IconFG>Ability_Maul_Icon.png</IconFG>
    <IconColor>210,110,210</IconColor>
    <SpellType>Tactical</SpellType>
    <SpellClass>Defensive</SpellClass>
    <SpellSubClass>Debuff</SpellSubClass>
    <SpellTargetType>Self</SpellTargetType>
    <HideInHiergamenon>1</HideInHiergamenon>
    <IsCastable>0</IsCastable>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Accuracy</StrVal>
        <Duration>1</Duration>
        <Multiplier>0.75</Multiplier>
    </GameModifier>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Attack_Blunt</StrVal>
        <Duration>1</Duration>
        <Multiplier>0.75</Multiplier>
    </GameModifier>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Attack_Pierce</StrVal>
        <Duration>1</Duration>
        <Multiplier>0.75</Multiplier>
    </GameModifier>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Attack_Cutting</StrVal>
        <Duration>1</Duration>
        <Multiplier>0.75</Multiplier>
    </GameModifier>
    <AIData AIPersonality="AI_General">
        <AIPriority>5</AIPriority>
    </AIData>
</SpellDef>

Since the value is given immediately after the first hit, the maximum amount of damage a unit with this could deal is 1+0.75+0.5+0.25=2.5.

 

Let me just remind everyone, since this is somewhat of a hot topic, that reporting feedback on a modded game is very, very stupid, and your feedback will have no value, in fact it will make the devs' job harder.

6,790 views 4 replies
Reply #1 Top

I'm confused. Is the multiplier being subtracted each time from 1 to get 1 + .75 + .5 +.25? If it is a multiplier agains the reduced value would it not be 1 + .75 + .5625 + .421875 ...etc for a total closer to 2.75? Maybe to much engineering on the brain after a long work day.

Beyond that I love the fix. I was going to look at only allowing a followup strike if the target was knocked prone and boosting the reductions.

Great work.

Reply #2 Top

These are additive modifiers.

First hit: no debuff. 100% damage

Second hit. One stack of the debuff. 100 - (100*(1-0.75)) = 75%

Third hit. Two stacks of the debuff. 100 - (100*(1-0.75)) - (100*(1-0.75)) = 50%

 

In other words, using a <Multiplier>0.75</Multiplier> is the same as creating a negative modifier with 25% of the original value. Since it repeatedly takes the original value, there are no compound effects.