Not knowing exactly what you are doing, you can produce a similar effect by utilizing the special slot. Create a special unit for particular race. Mercenaries should be hirable from the Capitar and thus, you can add another unit (like the Golem and Juggernaut) and call this one Merc. If you choose merc you get a variety of traits that you can force this unit to have and not have utilizing supported model type. You can then reproduce all the traits and abilities and add these special requirements for this particular unit. For example, you choose this unit you cannot get ironskin or fast, but you do get the cheap bonus.
Well, the problem is there is a hard-coded limit on how many designed units I can set up. It's male/female/other and that's it.
So races like Ironeers and Yithril are screwed because they have both Golem and Jugg for 'other' slot.
quoting post
For example, If a unit has "Mercenary" (-10 gold when quene, -2 gold per turn, -50 production), I don't want the unit to be able to have "Fast" or "Ironskin". I will be thankful for any input for this particular issue.
I am curious. Would you be so kind to explain how you achieve that structure of costs? That sounds very smart and impressive!
Yes, here is my crappy code.
Code: xml
- <AbilityBonus InternalName="MercenaryAbility">
- <AbilityBonusType>Unit_Design</AbilityBonusType>
- <AbilityBonusOption InternalName="Mercenary">
- <DisplayName>Mercenaries</DisplayName>
- <Description>Very fast recruitment with upfront cost and additional wages</Description>
- <Icon>Ability_Zealotry_Icon.png</Icon>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>Gold</Attribute>
- <Value>3</Value>
- </ProductionRequirement>
- <GameModifier>
- <ModType>Resource</ModType>
- <Provides>-2 Gilders per season</Provides>
- <Attribute>Gold</Attribute>
- <Duration>-1</Duration>
- <PerTurn>1</PerTurn>
- <Value>-2</Value>
- </GameModifier>
- <AdditionalTrainingTurns>-50</AdditionalTrainingTurns>
- <Type>Army</Type>
- <AIData AIPersonality="AI_General">
- <AIPriority>5</AIPriority>
- </AIData>
- </AbilityBonusOption>
- </AbilityBonus>