'Stache
Chieftain
- Joined
- Jan 10, 2019
- Messages
- 19
Hello! I made this .xml file for my civ, that should give my units a +10 attack bonus in their own territory.
There are no error messages in my Database.log and the game runs fine, yet the effect never appears.
I think the game swallows my code, but it never thinks its conditions are met.
I am still fairly new to modding civ, and this is my first attempt at requirements, so I am sorry if the answer is painfully obvious.
Thank you very much for any help!
There are no error messages in my Database.log and the game runs fine, yet the effect never appears.
I think the game swallows my code, but it never thinks its conditions are met.
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
<Types>
<Row Type="ABILITY_MILITIA" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
<Row Type="ABILITY_MILITIA" Tag="CLASS_MELEE"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_RANGED"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_RECON"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_HEAVY_CAVALRY"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_LIGHT_CAVALRY"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_RANGED_CAVALRY"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_ANTI_CAVALRY"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_NAVAL_RANGED"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="ABILITY_MILITIA" Tag="CLASS_HEAVY_CHARIOT"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_MILITIA" Name="LOC_ABILITY_MILITIA" Description="LOC_ABILITY_MILITIA" Inactive="true"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_MILITIA</UnitAbilityType>
<ModifierId>MILITIA_ADJUST_IN_TERRITORY_COMBAT</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>MILITIA_ADJUST_IN_TERRITORY_COMBAT</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
<SubjectRequirementSetId>REQUIREMENTS_UNITS_IN_OWNER_TERRITORY</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>MILITIA_ADJUST_IN_TERRITORY_COMBAT</ModifierId>
<Name>Amount</Name>
<Value>10</Value>
</Row>
<Row>
<ModifierId>MILITIA_ADJUST_IN_TERRITORY_COMBAT</ModifierId>
<Name>AbilityType</Name>
<Value>ABILITY_MILITIA</Value>
</Row>
</ModifierArguments>
<RequirementSets>
<Row>
<RequirementSetId>REQUIREMENTS_UNITS_IN_OWNER_TERRITORY</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>REQUIREMENTS_UNITS_IN_OWNER_TERRITORY</RequirementSetId>
<RequirementId>UNIT_IN_OWNER_TERRITORY_REQUIREMENT_MILITIA</RequirementId>
</Row>
</RequirementSetRequirements>
<Requirements>
<Row>
<RequirementId>UNIT_IN_OWNER_TERRITORY_REQUIREMENT_MILITIA</RequirementId>
<RequirementType>REQUIREMENT_UNIT_IN_OWNER_TERRITORY</RequirementType>
</Row>
</Requirements>
</GameInfo>
I am still fairly new to modding civ, and this is my first attempt at requirements, so I am sorry if the answer is painfully obvious.
Thank you very much for any help!