I asked in the topic about adding a new sovereign ability, but my question was answered and I felt it was more relevant and useful to others to create a new topic.
For example, say a Sovereign has Earth Mastery as one of their talents. I want to give them a 20% boost to essence, rather than just a 10% boost. But I'm not quite sure how to do this. I've tried looking around, but I don't think I'm using <Calculate> properly.
Here's what I've got so far. Forgive how scabby it is.
Code: xml
- <AbilityBonuses>
-
- <AbilityBonus InternalName = "MoM_ShardMaster">
-
- <AbilityBonusType>Champion_Talent</AbilityBonusType>
-
- <AbilityBonusOption InternalName = "Sovereign_Ability_ShardMaster">
- <DisplayName>Shard Master</DisplayName>
- <Description>An extra 100% essence for all units for each shard controlled.</Description>
- <Icon>Talent_Brilliant.png</Icon>
- <Cost>5</Cost>
-
- <GameModifier>
- <ModType>Player</ModType>
- <Attribute>AbilityBonus</Attribute>
- <StrVal>A_UnitStat_Essence</StrVal>
- <Calculate InternalName = "ShardBonus" ValueOwner = "PlayerSovereign">
- <Expression><![CDATA[[UnitStat_NumAllShards] * 100]]></Expression>
- </Calculate>
- <Calculate InternalName = "Value" ValueOwner = "PlayerSovereign">
- <Expression><![CDATA[[100 + ShardBonus]]]></Expression>
- </Calculate>
- <Provides>An extra 100% essence for all units for each shard controlled.</Provides>
- </GameModifier>
-
- </AbilityBonusOption>
-
- </AbilityBonus>
-
- </AbilityBonuses>
I'm not sure how to use <Calculate> properly, I know that much. I most certainly have no idea how to use ValueOwner.
Also, please ignore the 100% bonus, as it's just to make sure it's making a massive and very visible difference.
Any help is greatly appreciated!