New UnitStat comparisons in 1.6

Hi all,

Just had a quick look at the new UnitStat comparison stuff in 1.6, specifically the Marcher Archer GameModifier:

<GameModifier>
  <ModType>Unit</ModType>
  <Attribute>AdjustUnitStat</Attribute>
  <BoolVal1>1</BoolVal1>
  <StrVal>UnitStat_ChanceToCrit</StrVal>
  <StrVal2>UnitStat_IsBow</StrVal2>
  <Value>25</Value>
  <BonusValue>0.5</BonusValue>
  <Provides>+25 Critical Hit Chance when using a Bow</Provides>
</GameModifier>

 

So this mostly is fairly obvious.... I believe that the BonusValue is what is compared to.... so in this case presumably:

If UnitStat_IsBow > 0.5 then +25 UnitStat_ChanceToCrit

If UnitStat_IsBow < 0.5 then nothing.

The bit that i'm not sure about is the <BoolVal1>1</BoolVal1>, anyone want to take a guess or enlighten me on what that might be for?  Is that maybe the flag to decide if the StrVal evaluated belongs to the target or the user of the ability? 

If/when anyone figures it out before I get round to trying it would be great to know.

 

Thanks.

 

 

 

 

 

2,334 views 2 replies
Reply #1 Top

I am wondering the same things. Likely going to test it out soon, I'll let you know if I figure it out first.

But I bet Primal is figuring it out right now. He's a sharp one.

Reply #2 Top

An better comparison is to look at

      <AbilityBonusOption InternalName="DeathBlow">
            <DisplayName>Death Blow</DisplayName>
            <Description>+40 Attack vs enemies with less than 20 Hit Points</Description>
            <Icon>Ability_DeathBlow_Icon.png</Icon>
            <PerkTreePosX>6</PerkTreePosX>
            <PerkTreePosY>3</PerkTreePosY>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Attack_Boost</StrVal>
                <StrVal2>UnitStat_HitPoints</StrVal2>
                <Value>40</Value>
                <BonusValue>20</BonusValue>
                <Provides>+40 Attack vs enemies with less than 20 Hit Points</Provides>
                <vsLower>1</vsLower>
            </GameModifier>
            <IsCombatAbility>1</IsCombatAbility>
            <Type>Army</Type>
            <Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>ShadowStrike3</Attribute>
            </Prereq>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>

Here you see that BonusValue is 20, matching the hitpoints and <vsLower> looks to see if enemy is lower than 20 hit points.

I believe that the bool value may refer to which target to check. If 1 check yourself for the stat, if 0 (default) check opponent. I'm speculating as I've not tried it out yet. Currently going to look through to update all me mods and update a new addition.