Craig_Sutter
Deity
I have created a unit ability for my Hirdmann unit for my mod. Two of the abilities are that the unit has +5 Combat Strength on land adjacent to coast and +5 Combat Strength on plots adjacent to rivers.
I have a suspicion that the code I used will be additive on plots both adjacent to a river and a coastal hex (+10). This is not my intent... I would prefer that the two not be additive.
Is this possible using the xml provided? If possible, how should I change the code listed?
The code as created does not generate any errors.
Here is the code for the unit (ignore the Drekar stuff, and the +5 on attack for Hirdmann which should be additive.):
Thank-you for your advice.
I have a suspicion that the code I used will be additive on plots both adjacent to a river and a coastal hex (+10). This is not my intent... I would prefer that the two not be additive.
Is this possible using the xml provided? If possible, how should I change the code listed?
The code as created does not generate any errors.
Here is the code for the unit (ignore the Drekar stuff, and the +5 on attack for Hirdmann which should be additive.):
Code:
<GameInfo>
<Types>
<Row Type="UNIT_DANISH_HIRDMANN" Kind="KIND_UNIT"/>
<Row Type="ABILITY_HIRDMANN" Kind="KIND_ABILITY"/>
<Row Type="UNIT_DANISH_DREKAR" Kind="KIND_UNIT"/>
</Types>
<UnitAiInfos>
<Row UnitType="UNIT_DANISH_HIRDMANN" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_DANISH_HIRDMANN" AiType="UNITAI_EXPLORE"/>
<Row UnitType="UNIT_DANISH_HIRDMANN" AiType="UNITTYPE_MELEE"/>
<Row UnitType="UNIT_DANISH_HIRDMANN" AiType="UNITTYPE_LAND_COMBAT"/>
<Row UnitType="UNIT_DANISH_DREKAR" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_DANISH_DREKAR" AiType="UNITAI_EXPLORE"/>
<Row UnitType="UNIT_DANISH_DREKAR" AiType="UNITTYPE_MELEE"/>
<Row UnitType="UNIT_DANISH_DREKAR" AiType="UNITTYPE_NAVAL"/>
</UnitAiInfos>
<Tags>
<Row Tag="CLASS_HIRDMANN" Vocabulary="ABILITY_CLASS"/>
<Row Tag="CLASS_DREKAR" Vocabulary="ABILITY_CLASS"/>
</Tags>
<TypeTags>
<Row Type="ABILITY_HIRDMANN" Tag=CLASS_HIRDMANN"/>
<Row Type="UNIT_DANISH_HIRDMANN" Tag="CLASS_HIRDMANN"/>
<Row Type="UNIT_DANISH_HIRDMANN" Tag="CLASS_MELEE"/>
<Row Type="UNIT_DANISH_DREKAR" Tag="CLASS_NAVAL_RAIDER"/>
<Row Type="UNIT_DANISH_DREKAR" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="UNIT_DANISH_DREKAR" Tag="CLASS_DREKAR"/>
</TypeTags>
<UnitReplaces>
<Row CivUniqueUnitType="UNIT_DANISH_HIRDMANN" ReplacesUnitType="UNIT_SWORDSMAN"/>
<Row CivUniqueUnitType="UNIT_DANISH_DREKAR" ReplacesUnitType="UNIT_GALLEY"/>
</UnitReplaces>
<Units>
<Row UnitType="UNIT_DANISH_HIRDMANN" BaseMoves="2" Cost="110" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_LAND_COMBAT" Name="LOC_UNIT_DANISH_HIRDMANN_NAME" Description="LOC_UNIT_DANISH_HIRDMANN_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_MELEE" Maintenance="2" Combat="40" TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" PrereqTech="TECH_IRON_WORKING" MandatoryObsoleteTech="TECH_REPLACEABLE_PARTS"/>
<Row UnitType="UNIT_DANISH_DREKAR" BaseMoves="3" Cost="65" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_SEA" FormationClass="FORMATION_CLASS_NAVAL" Name="LOC_UNIT_DANISH_DREKAR_NAME" Description="LOC_UNIT_DANISH_DREKAR_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_NAVAL_MELEE" Maintenance="1" Combat="30" TraitType="TRAIT_CIVILIZATION_UNIT_DANISH_DREKAR" PrereqTech="TECH_SAILING" MandatoryObsoleteTech="TECH_ELECTRICITY"/>
</Units>
<UnitUpgrades>
<Row Unit="UNIT_DANISH_HIRDMANN" UpgradeUnit="UNIT_MUSKETMAN"/>
<Row Unit="UNIT_DANISH_DREKAR" UpgradeUnit="UNIT_CARAVEL"/>
</UnitUpgrades>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_HIRDMANN" Name="LOC_ABILITY_HIRDMANN_NAME" Description="LOC_ABILITY_HIRDMANN_DESCRIPTION"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_HIRDMANN</UnitAbilityType>
<ModifierId>HIRDMANN_COMBAT_COASTAL_LAND</ModifierId>
</Row>
<Row>
<UnitAbilityType>ABILITY_HIRDMANN</UnitAbilityType>
<ModifierId>HIRDMANN_COMBAT_RIVER_LAND</ModifierId>
</Row>
<Row>
<UnitAbilityType>ABILITY_HIRDMANN</UnitAbilityType>
<ModifierId>UNIT_HIRDMANN_ATTACK</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>HIRDMANN_COMBAT_COASTAL_LAND</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
<SubjectRequirementSetId>HIRDMANN_PLOT_IS_COASTAL_LAND_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>HIRDMANN_COMBAT_RIVER_LAND</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
<SubjectRequirementSetId>HIRDMANN_PLOT_IS_RIVER_LAND_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>UNIT_HIRDMANN_ATTACK</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
<SubjectRequirementSetId>UNIT_HIRDMANN_ATTACK_REQUIREMENTS</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>HIRDMANN_COMBAT_COASTAL_LAND</ModifierId>
<Name>Amount</Name>
<Value>5</Value>
</Row>
<Row>
<ModifierId>HIRDMANN_COMBAT_RIVER_LAND</ModifierId>
<Name>Amount</Name>
<Value>5</Value>
</Row>
<Row>
<ModifierId>UNIT_HIRDMANN_ATTACK</ModifierId>
<Name>Amount</Name>
<Value>5</Value>
</Row>
</ModifierArguments>
<RequirementSets>
<Row>
<RequirementSetId>HIRDMANN_PLOT_IS_COASTAL_LAND_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>HIRDMANN_PLOT_IS_RIVER_LAND_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>UNIT_STRONG_ATTACKER_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>HIRDMANN_PLOT_IS_COASTAL_LAND_REQUIREMENTS</RequirementSetId>
<RequirementId>HIRDMANN_ADJCOAST_REQUIREMENT</RequirementId>
</Row>
<Row>
<RequirementSetId>HIRDMANN_PLOT_IS_RIVER_LAND_REQUIREMENTS</RequirementSetId>
<RequirementId>HIRDMANN_ADJRIVER_REQUIREMENT</RequirementId>
</Row>
<Row>
<RequirementSetId>UNIT_STRONG_ATTACKER_REQUIREMENTS</RequirementSetId>
<RequirementId>UNIT_STRONG_ATTACKER_REQUIREMENT</RequirementId>
</Row>
</RequirementSetRequirements>
<Requirements>
<Row>
<RequirementId>HIRDMANN_ADJCOAST_REQUIREMENT</RequirementId>
<RequirementType>REQUIREMENT_PLOT_IS_COASTAL_LAND</RequirementType>
</Row>
<Row>
<RequirementId>HIRDMANN_ADJRIVER_REQUIREMENT</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_TO_RIVER</RequirementType>
</Row>
<Row>
<RequirementId>UNIT_STRONG_ATTACKER_REQUIREMENT</RequirementId>
<RequirementType>REQUIREMENT_PLAYER_IS_ATTACKING</RequirementType>
</Row>
</Requirements>
</GameInfo>
Thank-you for your advice.