[eINFO] Valueowner="PlayerSovereign"

Found this little gem inside a techdef

        <GameModifier>
            <Target>Player</Target>
            <ModType>Resource</ModType>
            <Attribute>DiplomaticCapital</Attribute>
            <!-- Use the sovereign's charisma stat to determine how much diplomatic capital they get -->
            <Calculate InternalName="Value" ValueOwner="PlayerSovereign">
                <Expression><![CDATA[ 5 * [UnitStat_Charisma]]]></Expression>
            </Calculate>
        </GameModifier>

End of quote

Since I don't really do spells, I just wanted to let people know about it. This came from inside a tech, so who knows if it works in spells (strategic or tactical, or tactical if sov isn't there).

I just did a very quick test and this appears to function (ie - high charisma sovereigns got much more benefit from these techs).

Oh, and I guess this means calculate can work outside a spelldef too.

2,213 views 3 replies
Reply #1 Top

Thanks for posting this.   This could be very helpful for some spells.

Reply #2 Top

Here's another one

  <AbilityBonus InternalName="City_Level_Ability_Research">
    <AbilityBonusType>City_Level</AbilityBonusType>

    <!-- Options -->
    <AbilityBonusOption InternalName = "City_Level_Ability_Research_Bonus">
      <DisplayName>Level Up Research Bonus</DisplayName>
      <Description>Tech Knowledge production bonus +%.0f%%</Description>
      <GameModifier InternalName="City_Level_Ability_Research_Bonus_Modifier">
        <ModType>ResourceMultiplier</ModType>
        <Attribute>Research</Attribute>
            <Calculate InternalName = "Percentage" ValueOwner="TargetCity">
          <Expression><![CDATA[[CityLevel] * 10]]></Expression>
        </Calculate>
        <Calculate InternalName = "Multiplier">
          <Expression><![CDATA[[Percentage] / 100]]></Expression>
        </Calculate>
        <Calculate InternalName = "Value">
          <Expression><![CDATA[[Multiplier] + 1]]></Expression>
        </Calculate>
        <PerTurn>1</PerTurn>
      </GameModifier>
    </AbilityBonusOption>
  </AbilityBonus>

End of quote

This is from the citylevelupbonuses.xml

ValueOwner="TargetCity"

also the data tag [CityLevel]

Who knows where it works or how. I'll leave that to the spellmakers.

Reply #3 Top

Maybe it is all down to using the correct target owner for each mod type. So Resource and ResourceMultiplier may only work for "TargetCity" and "PlayerSovereign" among others. Where as unit mod types require it to be the casting unit or the target unit etc. Definitely see some strategic spell options for this. Thanks for the heads up :thumbsup: