Hi.
I want to change abilities in the paths depending on the race like replacing 'Tinker-Ability' for Mancers with a better one, giving a bonus of +2. Therefor I need a way to enable the new ablity for Mancers only (easily done) and disable the normal Tinker-ability for Mancers (the problem).
So I've tested a few ways to disable ablilities with <prereq>. The results where strange.
with these additions, the ablility completely vanishes (no Button anymore, position free for other ablility):
<Prereq>
<Type>AbilityBonusOption</Type>
<Target>Unit</Target>
<Attribute>whatever</Attribute>
</Prereq>
<Prereq>
<Type>AbilityBonusOption</Type>
<Target>Player</Target>
<Attribute>whatever</Attribute>
</Prereq>
<Prereq>
<Type>Allegiance</Type>
<Attribute>Empire/Kingdom</Attribute>
</Prereq>
with these additions, the ablility only becomes 'outgreyed' (not selectable, but the button remains and the position is blocked for other abilities):
<Prereq>
<Type>RestrictedAbilityBonusOption</Type>
<Target>Unit</Target>
<Attribute>whatever</Attribute>
</Prereq>
<Prereq>
<Type>RestrictedAbilityBonusOption</Type>
<Target>Player</Target>
<Attribute>whatever</Attribute>
</Prereq>
<Prereq>
<Type>Race</Type>
<Attribute>Race_Type_whatever</Attribute>
</Prereq>
<Prereq>
<Type>UnitStat</Type>
<Attribute>UnitStat_whatever</Attribute>
<Value>1</Value>
</Prereq>
Now for the questions:
1) Is there a way to make an ability vanish using any of the 'restricted'-Types or a workaround to query if something is NOT true?
2) Can you give an ability (in game not with SelectedAbilityBonusOption) to a unit in another way than selecting it manually in the path? Unlocking by using a unitstat is no problem, but the unit needs to have the ability for this to work.
3) Is it possible to make a ability only selectable for a sovereign? Giving UnitStat_IsSovereign works, but I hope there is an already build-in way to identify a unit as sovereign.
4) Is it possible to give cities a stat like 'CityStat_Mult' and use this stat in calculations for Improvements.
<GameModifier>
<ModType>Resource</ModType>
<Attribute>Mana</Attribute>
<PerTurn>1</PerTurn>
<Provides>More Mana</Provides>
<Calculate InternalName="Value" ValueOwner="OwnerCity">
<Expression><![CDATA[[TileYieldEssence] * [CityStat_Mult]]]></Expression>
</Calculate>
</GameModifier>
Many thanks in advance for your help.