Hello,
I'm trying to make some skills based on the weapon unit is using. There are supposed to be some, for example Master Archer skill:
<AbilityBonus InternalName="MasterArcherAbility">
<AbilityBonusOption InternalName="MasterArcher">
<DisplayName>Master Archer</DisplayName>
<Description>+25 Critical Hit Chance when using a Bow</Description>
<Icon>Ability_MasterArcher_Icon.png</Icon>
<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>
<vsHigher>1</vsHigher>
</GameModifier>
<IsCombatAbility>1</IsCombatAbility>
<Type>Ability</Type>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
</AbilityBonusOption>
</AbilityBonus>
I have copied it and tried to make a skill based on it. However when I choose it in Unit Design, it simply adds bonuses even when the unit does not use bows:
<AbilityBonus InternalName="ArcheryAbility">
<AbilityBonusType>Unit_Design</AbilityBonusType>
<AbilityBonusOption InternalName="Archery">
<DisplayName>Archery Training</DisplayName>
<Description>+10 Attack and +10 Accuracy when using Bow. +10 Critical Hit Chance when using a Bow.</Description>
<Icon>Ability_Archery_Icon.png</Icon>
<ProductionRequirement>
<Type>Resource</Type>
<Attribute>Gold</Attribute>
<Value>2</Value>
</ProductionRequirement>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<BoolVal1>1</BoolVal1>
<StrVal>UnitStat_Attack_Boost</StrVal>
<StrVal2>UnitStat_IsBow</StrVal2>
<Value>10</Value>
<BonusValue>0.5</BonusValue>
<!-- <PerLevel>1</PerLevel> -->
<Provides>+10 Attack per level when using Bow.</Provides>
</GameModifier>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<BoolVal1>1</BoolVal1>
<StrVal>UnitStat_Accuracy</StrVal>
<StrVal2>UnitStat_IsBow</StrVal2>
<Value>1</Value>
<BonusValue>0.5</BonusValue>
<!-- <PerLevel>1</PerLevel> -->
<Provides>+10 Accuracy per level when using Bow.</Provides>
</GameModifier>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<BoolVal1>1</BoolVal1>
<StrVal>UnitStat_ChanceToCrit</StrVal>
<StrVal2>UnitStat_IsBow</StrVal2>
<Value>10</Value>
<BonusValue>0.5</BonusValue>
<Provides>+10 Critical Hit Chance when using a Bow</Provides>
<!-- <vsHigher>1</vsHigher>
<vsLower>1</vsLower> -->
</GameModifier>
<AdditionalTrainingTurns>10</AdditionalTrainingTurns>
<Type>Army</Type>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
</AbilityBonusOption>
</AbilityBonus>
Any ideas how to make it right? Does it have to be "Ability" type? What is the tag BonusValue doing?
Also I have tried to make some racial class skills and have failed miserably. Apparently only one Prereq is required, if two are present game checks for only one. I have tried different things, making the ability as Spell type didn't really helped (one skill worked others didn't). Restricting ability didn't worked either (added all the bloods except the one that was supposed to have it, all but the first restrictedability got ignored).
Any idea how to make it right? If this is even possible?
Help. Anyone who knows how to do it or has seen any mod achieved those, please let me know.