[bug/0.950) Sculla's Mace malfunctioning

This bug has been happening for several betas now, and still not fixed.

The item Sculla's Mace is seriously bugged. When I strike enemies with it, they end up like this:

 

1,357 views 6 replies
Reply #1 Top

This, I believe, is caused by a special set of circumstances. The spell Shrink is called from this modifier

<GameModifier>
<ModType>Unit</ModType>
<Attribute>MeleeAppliesSpell</Attribute>
<StrVal>Shrink</StrVal>
<Provides>Victims are shrunk, halving their Attack and giving them +50% to Dodge</Provides>
</GameModifier>
End of quote

The Shrink spelldef has this

        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Attack_Boost</StrVal>
            <DisplayName>Shrunk</DisplayName>
            <Duration>-1</Duration>
            <Calculate InternalName="Calc" ValueOwner="TargetUnit">
                <Expression><![CDATA[[UnitStat_CombinedAttack] * -0.5]]></Expression>
            </Calculate>
            <Calculate InternalName="Calc2" ValueOwner="TargetUnit">
                <Expression><![CDATA[[Unit_GetTroopCount]]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] / [Calc2]]]></Expression>
            </Calculate>
        </GameModifier>
End of quote

but that is not working and I think it is because when you
1) Call any spell from meleeappliesspell and
2) Use a calculate tag where ValueOwner="TargetUnit"
3) The value it returns is always 0 (divide by 0 returns the huge negative number)

in words, when you call a spell from MeleeAppliesSpell and it has a Calculate tag with ValueOwner="TargetUnit" this always fails to retrieve the value.

This used to work. I had several modded items and traits that I tested before 0.915 that used this method and they worked, but they no longer work now.


I really hope you will consider fixing the underlying issue instead of just changing the mace. It is a very useful tool when it comes to making interesting modded items and traits.

Reply #2 Top

You lost me heaven :D... But meaby you should make a huge deal about it so you can make a more interesting mod for me :P

Sincerely
~ Kongdej

Reply #3 Top

Not only would it be crazy helpful for modders, but I already spent ~10 hours making stuff that depended on it before they broke it. So yeah, I'll keep talking about it.

But none of that really changes the fact that there's a bug in the un-modded game that needs fixing.

Reply #4 Top

 

We have this fixed locally.  From the developer:

"The application of the modifiers coming from melee attack or defend was not setting the target unit, therefore it was not able to calculate things with "targetUnit" in the modifier."

But it won't be in in time for 0.951.  It will be in the next patch.

 

Reply #5 Top

Quoting Derek, reply 5
 

We have this fixed locally.  From the developer:

"The application of the modifiers coming from melee attack or defend was not setting the target unit, therefore it was not able to calculate things with "targetUnit" in the modifier."

But it won't be in in time for 0.951.  It will be in the next patch.

 
End of Derek's quote

 

That is a good news. It was a pain to prepare against huge fight and then killing it easily because of the 0 damage the monster was doing.

Reply #6 Top

Quoting Derek, reply 5
 

We have this fixed locally.  From the developer:

"The application of the modifiers coming from melee attack or defend was not setting the target unit, therefore it was not able to calculate things with "targetUnit" in the modifier."

But it won't be in in time for 0.951.  It will be in the next patch.

 
End of Derek's quote

Great news! I am standing by to un-comment my xml!