thecrazyscot
Spiffy
- Joined
- Dec 27, 2012
- Messages
- 2,460
So I'm attempting to do two separate things here:
Here is the code:
Military Engineer...this attempts to duplicate the structure of the Medic ability to no avail.
Strategic Resources...this utilizes the ability to have multiple Requirements within a single RequirementSet. It's just applying one of the Requirements. The tech is set to Iron Working for testing purposes.
- Add support ability to Military Engineers to allow escort units to ignore cliffs
- Have a built district buff a strategic resource only when the correct technology has been researched
Here is the code:
Military Engineer...this attempts to duplicate the structure of the Medic ability to no avail.
Code:
<GameInfo>
<Types>
<Row Type="ABILITY_TCS_ENABLE_CLIMB_CLIFFS" Kind="KIND_ABILITY"/>
</Types>
<Tags>
<Row Tag="CLASS_MILITARY_ENGINEER" Vocabulary="ABILITY_CLASS"/>
</Tags>
<TypeTags>
<Row Type="ABILITY_TCS_ENABLE_CLIMB_CLIFFS" Tag="CLASS_MILITARY_ENGINEER"/>
<Row Type="UNIT_MILITARY_ENGINEER" Tag="CLASS_MILITARY_ENGINEER"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_TCS_ENABLE_CLIMB_CLIFFS" Name="LOC_ABILITY_TCS_ENABLE_CLIMB_CLIFFS_NAME" Description="LOC_ABILITY_TCS_ENABLE_CLIMB_CLIFFS_DESCRIPTION"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_TCS_ENABLE_CLIMB_CLIFFS</UnitAbilityType>
<ModifierId>MILITARY_ENGINEER_BONUS_IGNORE_CLIFF_WALLS</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>MILITARY_ENGINEER_BONUS_IGNORE_CLIFF_WALLS</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_CLIFF_WALLS</ModifierType>
<SubjectRequirementSetId>TCS_MILITARY_ENGINEER_ADJACENT</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>MILITARY_ENGINEER_BONUS_IGNORE_CLIFF_WALLS</ModifierId>
<Name>Ignore</Name>
<Value>true</Value>
</Row>
</ModifierArguments>
<RequirementSetRequirements>
<Row>
<RequirementId>TCS_REQUIRES_MILITARY_ENGINEER</RequirementId>
<RequirementSetId>TCS_MILITARY_ENGINEER_ADJACENT</RequirementSetId>
</Row>
</RequirementSetRequirements>
<RequirementSets>
<Row>
<RequirementSetId>TCS_MILITARY_ENGINEER_ADJACENT</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<Requirements>
<Row>
<RequirementId>TCS_REQUIRES_MILITARY_ENGINEER</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_TO_OWNER</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>TCS_REQUIRES_MILITARY_ENGINEER</RequirementId>
<Name>MinDistance</Name>
<Value>0</Value>
</Row>
</RequirementArguments>
</GameInfo>
Code:
<GameInfo>
<Modifiers>
<!--Iron-->
<Row>
<ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLAYER_HAS_BRONZE_WORKING_IRON_RESOURCE</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<!--Iron-->
<Row>
<ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
</ModifierArguments>
<RequirementSets>
<!--Iron-->
<Row>
<RequirementSetId>PLAYER_HAS_BRONZE_WORKING_IRON_RESOURCE</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<!--Iron-->
<Row>
<RequirementId>REQUIRES_TECH_BRONZE_WORKING</RequirementId>
<RequirementSetId>PLAYER_HAS_BRONZE_WORKING_IRON_RESOURCE</RequirementSetId>
</Row>
<Row>
<RequirementId>TCS_REQUIRES_PLOT_HAS_TAG_IRON_RESOURCE</RequirementId>
<RequirementSetId>PLAYER_HAS_BRONZE_WORKING_IRON_RESOURCE</RequirementSetId>
</Row>
</RequirementSetRequirements>
<Requirements>
<!--Iron-->
<Row>
<RequirementId>REQUIRES_TECH_BRONZE_WORKING</RequirementId>
<RequirementType>REQUIREMENT_PLAYER_HAS_TECHNOLOGY</RequirementType>
</Row>
<Row>
<RequirementId>TCS_REQUIRES_PLOT_HAS_TAG_IRON_RESOURCE</RequirementId>
<RequirementType>REQUIREMENT_PLOT_RESOURCE_TAG_MATCHES</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<!--Iron-->
<Row>
<RequirementId>REQUIRES_TECH_BRONZE_WORKING</RequirementId>
<Name>TechnologyType</Name>
<Value>TECH_IRON_WORKING</Value>
</Row>
<Row>
<RequirementId>TCS_REQUIRES_PLOT_HAS_TAG_IRON_RESOURCE</RequirementId>
<Name>Tag</Name>
<Value>CLASS_TCS_IRON_RESOURCE</Value>
</Row>
</RequirementArguments>
<DistrictModifiers>
<Row>
<DistrictType>DISTRICT_ENCAMPMENT</DistrictType>
<ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
</Row>
</DistrictModifiers>
</GameInfo>