Does anyone know how to make these two modifiers work?

thecrazyscot

Spiffy
Joined
Dec 27, 2012
Messages
2,460
So I'm attempting to do two separate things here:
  1. Add support ability to Military Engineers to allow escort units to ignore cliffs
  2. Have a built district buff a strategic resource only when the correct technology has been researched
The problems I've run into are straightforward, but frustrating: they just don't work. The Military Engineer just ignores all my attempts to attache a new modifier. The district buffs the strategic resources as soon as the district is built, regardless if the 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>
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.
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>
 
This is for a building rather than a district, and I am not trying to tie to a tech. Also I am not sure it will throw any light, but
Code:
	<BuildingModifiers>
		<Row>
			<BuildingType>BUILDING_STONEWORKS</BuildingType>
			<ModifierId>STONEWORKS_ADDSTONEPROD</ModifierId>
		</Row>
	</BuildingModifiers>
	<Modifiers>
		<Row>
			<ModifierId>STONEWORKS_ADDSTONEPROD</ModifierId>
			<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
			<SubjectRequirementSetId>RESOURCE_IS_STONE</SubjectRequirementSetId>
		</Row>
	</Modifiers>
	<ModifierArguments>
		<Row>
			<ModifierId>STONEWORKS_ADDSTONEPROD</ModifierId>
			<Name>Amount</Name>
			<Value>1</Value>
		</Row>
		<Row>
			<ModifierId>STONEWORKS_ADDSTONEPROD</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_PRODUCTION</Value>
		</Row>
	</ModifierArguments>
	<Requirements>
		<Row>
			<RequirementId>REQUIRES_STONE_IN_PLOT</RequirementId>
			<RequirementType>REQUIREMENT_PLOT_RESOURCE_TYPE_MATCHES</RequirementType>
		</Row>
	</Requirements>
	<RequirementArguments>
		<Row>
			<RequirementId>REQUIRES_STONE_IN_PLOT</RequirementId>
			<Name>ResourceType</Name>
			<Value>RESOURCE_STONE</Value>
		</Row>
	</RequirementArguments>
	<RequirementSets>
		<Row>
			<RequirementSetId>RESOURCE_IS_STONE</RequirementSetId>
			<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
		</Row>
	</RequirementSets>
	<RequirementSetRequirements>
		<Row>
			<RequirementSetId>RESOURCE_IS_STONE</RequirementSetId>
			<RequirementId>REQUIRES_STONE_IN_PLOT</RequirementId>
		</Row>
	</RequirementSetRequirements>
The thing with the military engineer I won't even try to comment on yet because I am still trying to wrap my head around all these modifiers and the required tables.
 
Your missing a modifier in your Military Engineer to tell it to apply said ability to said units. You also need to create a Dynamic Modifer to attach said ability. Take a look at this code, you will see how I apply an ability to a unit via a building, It should not be too difficult to adapt that for a unit. Sorry cant be of more help right now, its 3.35am and I am off to the land of Nod.
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 11/20/2016 12:21:48 AM -->
<GameData>
   <Types>
       <!-- Training Buildings -->
       <Row Type="BUILDING_WATCHTOWER" Kind="KIND_BUILDING"/>
       <Row Type="BUILDING_TRAINING_GROUND" Kind="KIND_BUILDING"/>
       <Row Type="BUILDING_TRAINING_CAMP" Kind="KIND_BUILDING"/>
       <Row Type="BUILDING_TOURNAMENT_GROUND" Kind="KIND_BUILDING"/>
       <!-- Training Buildings Modifer -->
       <Row Type="MODIFIER_PLAYER_CITY_GRANT_SIGHT" Kind="KIND_MODIFIER"/>
       <Row Type="MODIFIER_PLAYER_CITY_GRANT_ABILITY" Kind="KIND_MODIFIER"/>
       <Row Type="MODIFIER_PLAYER_CITY_ATTACH_MODIFIER" Kind="KIND_MODIFIER"/>
       <!-- Training Abilities -->
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Kind="KIND_ABILITY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Kind="KIND_ABILITY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Kind="KIND_ABILITY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Kind="KIND_ABILITY"/>       
   </Types>
   <TypeTags>
       <!-- Academy -->
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_MELEE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_RANGED"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_HEAVY_CAVALRY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_LIGHT_CAVALRY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_RANGED_CAVALRY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_ANTI_CAVALRY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_HEAVY_CHARIOT"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_LIGHT_CHARIOT"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_MELEE_BERSERKER"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_COSSACK"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_REDCOAT"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_ANTI_AIR"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_VARU"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_NAGAO"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_CONQUISTADOR"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_GARDE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_HOPLITE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_ROUGH_RIDER"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_MAMLUK"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_WAR_CART"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_SAMURAI"/>
       <!-- Moar Units -->
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_COMPANION_CAVALRY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_CAMEL_ARCHER"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_MINUTEMAN"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_GERMAN_HUSSAR"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_CHOKONU"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_PHALANX"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_JINETE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_EQUITE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_DRUZHINA"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_MUGHAL_SOWAR"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_LONGBOWMAN"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_HIRDMAN"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_SOHEI"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_AMAZON"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_FATHERLAND_VOLUNTEER"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_HYKSOS_BOWMAN"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_GENDARME"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_GARDE_REPUBLICAINE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_BANDEIRANTE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_TERCIO"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_SEPOY"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_PANZER"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_VULTURE"/>
       <Row Type="ABILITY_MILITARY_ACADEMY_BUFF" Tag="CLASS_T34"/>
       <!-- Training -->
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_MELEE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_RANGED"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_HEAVY_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_LIGHT_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_RANGED_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_ANTI_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_HEAVY_CHARIOT"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_LIGHT_CHARIOT"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_MELEE_BERSERKER"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_COSSACK"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_REDCOAT"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_ANTI_AIR"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_VARU"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_NAGAO"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_CONQUISTADOR"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_GARDE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_HOPLITE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_ROUGH_RIDER"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_MAMLUK"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_WAR_CART"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_SAMURAI"/>
       <!-- Moar Units -->
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_COMPANION_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_CAMEL_ARCHER"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_MINUTEMAN"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_GERMAN_HUSSAR"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_CHOKONU"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_PHALANX"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_JINETE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_EQUITE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_DRUZHINA"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_MUGHAL_SOWAR"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_LONGBOWMAN"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_HIRDMAN"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_SOHEI"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_AMAZON"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_FATHERLAND_VOLUNTEER"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_HYKSOS_BOWMAN"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_GENDARME"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_GARDE_REPUBLICAINE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_BANDEIRANTE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_TERCIO"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_SEPOY"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_PANZER"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_VULTURE"/>
       <Row Type="ABILITY_TRAINING_GROUND_BUFF" Tag="CLASS_T34"/>
       <!-- Camp -->
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_MELEE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_RANGED"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_HEAVY_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_LIGHT_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_RANGED_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_ANTI_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_HEAVY_CHARIOT"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_LIGHT_CHARIOT"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_MELEE_BERSERKER"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_COSSACK"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_REDCOAT"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_ANTI_AIR"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_VARU"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_NAGAO"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_CONQUISTADOR"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_GARDE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_HOPLITE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_ROUGH_RIDER"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_MAMLUK"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_WAR_CART"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_SAMURAI"/>
       <!-- Moar Units -->
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_COMPANION_CAVALRY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_CAMEL_ARCHER"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_MINUTEMAN"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_GERMAN_HUSSAR"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_CHOKONU"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_PHALANX"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_JINETE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_EQUITE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_DRUZHINA"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_MUGHAL_SOWAR"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_LONGBOWMAN"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_HIRDMAN"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_SOHEI"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_AMAZON"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_FATHERLAND_VOLUNTEER"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_HYKSOS_BOWMAN"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_GENDARME"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_GARDE_REPUBLICAINE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_BANDEIRANTE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_TERCIO"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_SEPOY"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_PANZER"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_VULTURE"/>
       <Row Type="ABILITY_TRAINING_CAMP_BUFF" Tag="CLASS_T34"/>
       <!-- Tournament -->
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_MELEE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_RANGED"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_HEAVY_CAVALRY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_LIGHT_CAVALRY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_RANGED_CAVALRY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_ANTI_CAVALRY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_HEAVY_CHARIOT"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_LIGHT_CHARIOT"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_MELEE_BERSERKER"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_COSSACK"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_REDCOAT"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_ANTI_AIR"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_VARU"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_NAGAO"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_CONQUISTADOR"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_GARDE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_HOPLITE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_ROUGH_RIDER"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_MAMLUK"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_WAR_CART"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_SAMURAI"/>
       <!-- Moar Units -->
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_COMPANION_CAVALRY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_CAMEL_ARCHER"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_MINUTEMAN"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_GERMAN_HUSSAR"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_CHOKONU"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_PHALANX"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_JINETE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_EQUITE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_DRUZHINA"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_MUGHAL_SOWAR"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_LONGBOWMAN"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_HIRDMAN"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_SOHEI"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_AMAZON"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_FATHERLAND_VOLUNTEER"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_HYKSOS_BOWMAN"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_GENDARME"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_GARDE_REPUBLICAINE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_BANDEIRANTE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_TERCIO"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_SEPOY"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_PANZER"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_VULTURE"/>
       <Row Type="ABILITY_TOURNAMENT_GROUND_BUFF" Tag="CLASS_T34"/>
   </TypeTags>
   <UnitAbilities>
       <Row UnitAbilityType="ABILITY_TRAINING_GROUND_BUFF" Name="LOC_ABILITY_TRAINING_GROUND_BUFF_NAME" Description="LOC_ABILITY_TRAINING_GROUND_BUFF_DESCRIPTION" Inactive="true"/>
       <Row UnitAbilityType="ABILITY_TRAINING_CAMP_BUFF" Name="LOC_ABILITY_TRAINING_CAMP_BUFF_NAME" Description="LOC_ABILITY_TRAINING_CAMP_BUFF_DESCRIPTION" Inactive="true"/>
       <Row UnitAbilityType="ABILITY_TOURNAMENT_GROUND_BUFF" Name="LOC_ABILITY_TOURNAMENT_GROUND_BUFF_NAME" Description="LOC_ABILITY_TOURNAMENT_GROUND_BUFF_DESCRIPTION" Inactive="true"/>
       <Row UnitAbilityType="ABILITY_MILITARY_ACADEMY_BUFF" Name="LOC_ABILITY_MILITARY_ACADEMY_BUFF_NAME" Description="LOC_ABILITY_MILITARY_ACADEMY_BUFF_DESCRIPTION" Inactive="true"/>
   </UnitAbilities>
   <UnitAbilityModifiers>
       <Row>
           <UnitAbilityType>ABILITY_MILITARY_ACADEMY_BUFF</UnitAbilityType>
           <ModifierId>MILITARY_ACADEMY_BUFF</ModifierId>
       </Row>
       <Row>
           <UnitAbilityType>ABILITY_TRAINING_GROUND_BUFF</UnitAbilityType>
           <ModifierId>TRAINING_GROUND_BUFF</ModifierId>
       </Row>
       <Row>
           <UnitAbilityType>ABILITY_TRAINING_CAMP_BUFF</UnitAbilityType>
           <ModifierId>TRAINING_CAMP_BUFF</ModifierId>
       </Row>
       <Row>
           <UnitAbilityType>ABILITY_TOURNAMENT_GROUND_BUFF</UnitAbilityType>
           <ModifierId>TOURNAMENT_GROUND_BUFF</ModifierId>
       </Row>
   </UnitAbilityModifiers>
   <Buildings>
       <!-- Training Buildings -->
       <Row BuildingType="BUILDING_WATCHTOWER" Name="LOC_HMP_BUILDING_WATCHTOWER_NAME" Description="LOC_BUILDING_WATCHTOWER_DESC" PrereqTech="TECH_Geometry" PrereqDistrict="DISTRICT_CITY_CENTER" PurchaseYield="YIELD_GOLD" Cost="65" AdvisorType="ADVISOR_CONQUEST" Maintenance="1"/>
       <Row BuildingType="BUILDING_TRAINING_GROUND" Name="LOC_HMP_BUILDING_TRAINING_GROUND_NAME" Description="LOC_HMP_BUILDING_TRAINING_GROUND_DESC" PrereqCivic="CIVIC_MILITARY_TRADITION" PrereqDistrict="DISTRICT_CITY_CENTER" PurchaseYield="YIELD_GOLD" Cost="65" AdvisorType="ADVISOR_CONQUEST" Maintenance="2"/>
       <Row BuildingType="BUILDING_TRAINING_CAMP" Name="LOC_HMP_BUILDING_TRAINING_CAMP_NAME" Description="LOC_HMP_BUILDING_TRAINING_CAMP_DESC" PrereqTech="TECH_Milita_Training" PrereqDistrict="DISTRICT_ENCAMPMENT" PurchaseYield="YIELD_GOLD" Cost="90" AdvisorType="ADVISOR_CONQUEST" Maintenance="4"/>
       <Row BuildingType="BUILDING_TOURNAMENT_GROUND" Name="LOC_HMP_BUILDING_TOURNAMENT_GROUND_NAME" Description="LOC_HMP_BUILDING_TOURNAMENT_GROUND_DESC" PrereqCivic="CIVIC_FEUDALISM" PrereqDistrict="DISTRICT_ENCAMPMENT" PurchaseYield="YIELD_GOLD" Cost="150" AdvisorType="ADVISOR_CONQUEST" Maintenance="6"/>
   </Buildings>
   <BuildingPrereqs>
       <!-- Training Buildings -->
       <Row Building="BUILDING_TRAINING_CAMP" PrereqBuilding="BUILDING_TRAINING_GROUND"/>
       <Row Building="BUILDING_TOURNAMENT_GROUND" PrereqBuilding="BUILDING_TRAINING_CAMP"/>
   </BuildingPrereqs>
   <Building_YieldChanges>
       <!-- Training Buildings -->   
       <Row BuildingType="BUILDING_TRAINING_GROUND" YieldType="YIELD_FOOD" YieldChange="-1"/>
       <Row BuildingType="BUILDING_TRAINING_CAMP" YieldType="YIELD_FOOD" YieldChange="-2"/>
       <Row BuildingType="BUILDING_TOURNAMENT_GROUND" YieldType="YIELD_FOOD" YieldChange="-4"/>
   </Building_YieldChanges>
   <Building_GreatPersonPoints>
       <!-- Training Buildings -->
       <Row BuildingType="BUILDING_TRAINING_GROUND" GreatPersonClassType="GREAT_PERSON_CLASS_GENERAL" PointsPerTurn="1"/>
       <Row BuildingType="BUILDING_TRAINING_CAMP" GreatPersonClassType="GREAT_PERSON_CLASS_GENERAL" PointsPerTurn="2"/>
       <Row BuildingType="BUILDING_TOURNAMENT_GROUND" GreatPersonClassType="GREAT_PERSON_CLASS_GENERAL" PointsPerTurn="3"/>       
   </Building_GreatPersonPoints>
   <BuildingModifiers>
       <!-- Training Buildings -->
       <Row>
           <BuildingType>BUILDING_MILITARY_ACADEMY</BuildingType>
           <ModifierId>MILITARY_ACADEMY_BONUS</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_WATCHTOWER</BuildingType>
           <ModifierId>WATCHTOWER_BONUS_SIGHT</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TRAINING_GROUND</BuildingType>
           <ModifierId>TRAINING_GROUND_BONUS</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TRAINING_GROUND</BuildingType>
           <ModifierId>TRAINING_GROUND_HOUSING</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TRAINING_CAMP</BuildingType>
           <ModifierId>TRAINING_CAMP_BONUS</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TRAINING_CAMP</BuildingType>
           <ModifierId>TRAINING_CAMP_HOUSING</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TOURNAMENT_GROUND</BuildingType>
           <ModifierId>TOURNAMENT_GROUND_BONUS</ModifierId>
       </Row>
       <Row>
           <BuildingType>BUILDING_TOURNAMENT_GROUND</BuildingType>
           <ModifierId>BUILDING_TOURNAMENT_HOUSING</ModifierId>
       </Row>
   </BuildingModifiers>
   <DynamicModifiers>
       <Row>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_SIGHT</ModifierType>
           <CollectionType>COLLECTION_OWNER</CollectionType>
           <EffectType>EFFECT_ADJUST_UNIT_SIGHT</EffectType>
       </Row>
       <Row>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_ABILITY</ModifierType>
           <CollectionType>COLLECTION_CITY_TRAINED_UNITS</CollectionType>
           <EffectType>EFFECT_GRANT_ABILITY</EffectType>
       </Row>
       <Row>
           <ModifierType>MODIFIER_PLAYER_CITY_ATTACH_MODIFIER</ModifierType>
           <CollectionType>COLLECTION_OWNER</CollectionType>
           <EffectType>EFFECT_ATTACH_MODIFIER</EffectType>
       </Row>
   </DynamicModifiers>
   <Modifiers>
       <Row>
           <ModifierId>WATCHTOWER_BONUS_SIGHT</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_SIGHT</ModifierType>
           <SubjectRequirementSetId>CITY_HAS_GARRISON_UNIT_REQUIERMENT</SubjectRequirementSetId>
       </Row>
       <Row>
           <ModifierId>MILITARY_ACADEMY_BUFF</ModifierId>
           <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
       </Row>
       <!-- Training Abilities -->
       <Row>
           <ModifierId>TRAINING_GROUND_BUFF</ModifierId>
           <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_HOUSING</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_ATTACH_MODIFIER</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_HOUSING_MODIFIER</ModifierId>
           <ModifierType>MODIFIER_SINGLE_CITY_ADJUST_BUILDING_HOUSING</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BUFF</ModifierId>
           <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_HOUSING</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_ATTACH_MODIFIER</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_HOUSING_MODIFIER</ModifierId>
           <ModifierType>MODIFIER_SINGLE_CITY_ADJUST_BUILDING_HOUSING</ModifierType>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BUFF</ModifierId>
           <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_HOUSING</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_ATTACH_MODIFIER</ModifierType>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_HOUSING_MODIFIER</ModifierId>
           <ModifierType>MODIFIER_SINGLE_CITY_ADJUST_BUILDING_HOUSING</ModifierType>
       </Row>
       <!-- Training Buildings -->
       <Row>
           <ModifierId>MILITARY_ACADEMY_BONUS</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_ABILITY</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_BONUS</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_ABILITY</ModifierType>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BONUS</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_ABILITY</ModifierType>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BONUS</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITY_GRANT_ABILITY</ModifierType>
       </Row>   
   </Modifiers>
   <ModifierArguments>
       <Row>
           <ModifierId>WATCHTOWER_BONUS_SIGHT</ModifierId>
           <Name>Amount</Name>
           <Value>1</Value>
       </Row>
       <!-- Training Housing-->
       <Row>
           <ModifierId>TRAINING_GROUND_HOUSING</ModifierId>
           <Name>ModifierId</Name>
           <Value>TRAINING_GROUND_HOUSING_MODIFIER</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_HOUSING_MODIFIER</ModifierId>
           <Name>Amount</Name>
           <Value>-1</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_HOUSING</ModifierId>
           <Name>ModifierId</Name>
           <Value>TRAINING_CAMP_HOUSING_MODIFIER</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_HOUSING_MODIFIER</ModifierId>
           <Name>Amount</Name>
           <Value>-2</Value>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_HOUSING</ModifierId>
           <Name>ModifierId</Name>
           <Value>TOURNAMENT_GROUND_HOUSING_MODIFIER</Value>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_HOUSING_MODIFIER</ModifierId>
           <Name>Amount</Name>
           <Value>-3</Value>
       </Row>
       <!-- Training Abilities -->
       <Row>
           <ModifierId>MILITARY_ACADEMY_BUFF</ModifierId>
           <Name>Amount</Name>
           <Value>12</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_BUFF</ModifierId>
           <Name>Amount</Name>
           <Value>3</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BUFF</ModifierId>
           <Name>Amount</Name>
           <Value>6</Value>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BUFF</ModifierId>
           <Name>Amount</Name>
           <Value>9</Value>
       </Row>
       <!-- Training Buildings -->
       <Row>
           <ModifierId>MILITARY_ACADEMY_BONUS</ModifierId>
           <Name>AbilityType</Name>
           <Value>ABILITY_MILITARY_ACADEMY_BUFF</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_BONUS</ModifierId>
           <Name>AbilityType</Name>
           <Value>ABILITY_TRAINING_GROUND_BUFF</Value>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BONUS</ModifierId>
           <Name>AbilityType</Name>
           <Value>ABILITY_TRAINING_CAMP_BUFF</Value>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BONUS</ModifierId>
           <Name>AbilityType</Name>
           <Value>ABILITY_TOURNAMENT_GROUND_BUFF</Value>
       </Row>   
   </ModifierArguments>
   <ModifierStrings>
       <!-- Training Abilities -->
       <Row>
           <ModifierId>MILITARY_ACADEMY_BUFF</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_ABILITY_MILITARY_ACADEMY_BUFF_DESCRIPTION</Text>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_BUFF</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_ABILITY_TRAINING_GROUND_BUFF_DESCRIPTION</Text>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BUFF</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_ABILITY_TRAINING_CAMP_BUFF_DESCRIPTION</Text>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BUFF</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_ABILITY_TOURNAMENT_GROUND_BUFF_DESCRIPTION</Text>
       </Row>
       <!-- Training Buildings -->
       <Row>
           <ModifierId>MILITARY_ACADEMY_BONUS</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_HMP_BUILDING_MILITARY_ACADEMY_DESC</Text>
       </Row>
       <Row>
           <ModifierId>TRAINING_GROUND_BONUS</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_HMP_BUILDING_TRAINING_GROUND_DESC</Text>
       </Row>
       <Row>
           <ModifierId>TRAINING_CAMP_BONUS</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_HMP_BUILDING_TRAINING_CAMP_DESC</Text>
       </Row>
       <Row>
           <ModifierId>TOURNAMENT_GROUND_BONUS</ModifierId>
           <Context>Preview</Context>
           <Text>LOC_HMP_BUILDING_TOURNAMENT_GROUND_DESC</Text>
       </Row>
   </ModifierStrings>
</GameData>
 
I'm not certain why the second one wouldn't work, except that maybe it simply won't check a player-level requirement for a plot adjustment. You could try the REQUIREMENT_PLAYER_HAS_RESOURCE_VISIBILITY RequirementType, though if my first statement is true, this probably won't work either.

An alternate is to require the relevant improvement (a mine in the example) to be built on the tile, but that won't be a perfect solution either.

Another workaround is to attach a modifier to the Iron Working tech itself using MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER to attach one modifier to all of the player's cities, using a RequirementSet to require the building, and then use the modifier that it attaches to add production to the relevant plots. Wouldn't that work?

Something like this (Warning, nonfunctional and incomplete code intended as an example only, I'm sure you can figure out what I mean):

Spoiler :
Code:
    <Modifiers>
       <Row>
           <ModifierId>BRONZEWORKING_ATTACH_MODIFIER</ModifierId>
           <ModifierType>MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER</ModifierType>
           <SubjectRequirementSetId>CITY_HAS_BUILDING_REQUIREMENTS</SubjectRequirementSetId>
       </Row>
       <Row>
           <ModifierId>ADJUST_IRON_PLOT_YIELD</ModifierId>
           <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
           <SubjectRequirementSetId>PLOT_HAS_IRON_REQUIREMENTS</SubjectRequirementSetId>
       </Row>
   </Modifiers>
  
   <ModifierArguments>
       <Row>
           <ModifierId>BRONZEWORKING_ATTACH_MODIFIER</ModifierId>
           <Name>ModifierId</Name>
           <Value>ADJUST_IRON_PLOT_YIELD</Value>
       </Row>
   </ModifierArguments>
  
   <TechnologyModifiers>
       <Row>
           <TechnologyType>TECH_BRONZE_WORKING</TechnologyType>
           <ModifierId>BRONZEWORKING_ATTACH_MODIFIER</ModifierId>
       </Row>
   </TechnologyModifiers>
 
Last edited:
Thanks for your help, guys, I was able to get the Military Engineer working with @Horem's suggestion!

I tried all the suggestions to get the resource buff to work with varying success, but none of them worked 100% correctly. I think, think, I figured it out though!

After some testing I figured out that apparently RequirementSets only require one of the RequirementId's to be met in order to activate. As you can imagine, this was very frustrating (although I can see its utility). So, I decided to try using both SubjectRequirementSetId and OwnerRequirementSetId on the modifier, like so:
Code:
<Modifiers>
        <Row>
            <ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
            <OwnerRequirementSetId>PLAYER_HAS_TECH_BRONZE_WORKING</OwnerRequirementSetId>
            <SubjectRequirementSetId>PLOT_HAS_IRON</SubjectRequirementSetId>
        </Row>
</Modifiers>
This requires that the owner (the city whose plot yields will be adjusted) has Bronze Working, while the subject (the plot to be adjusted) has Iron. I've tested this once, and it seems to work. Off to test a bit more!
 
Thanks for your help, guys, I was able to get the Military Engineer working with @Horem's suggestion!

I tried all the suggestions to get the resource buff to work with varying success, but none of them worked 100% correctly. I think, think, I figured it out though!

After some testing I figured out that apparently RequirementSets only require one of the RequirementId's to be met in order to activate. As you can imagine, this was very frustrating (although I can see its utility). So, I decided to try using both SubjectRequirementSetId and OwnerRequirementSetId on the modifier, like so:
Code:
<Modifiers>
        <Row>
            <ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
            <OwnerRequirementSetId>PLAYER_HAS_TECH_BRONZE_WORKING</OwnerRequirementSetId>
            <SubjectRequirementSetId>PLOT_HAS_IRON</SubjectRequirementSetId>
        </Row>
</Modifiers>
This requires that the owner (the city whose plot yields will be adjusted) has Bronze Working, while the subject (the plot to be adjusted) has Iron. I've tested this once, and it seems to work. Off to test a bit more!

It is not the case that RequirementSets strictly require only one of the Requirements to be met. The RequirementSetType REQUIREMENTSET_TEST_ALL specifies that all the Requirements in the set must be met. REQUIREMENTSET_TEST_ANY specifies that at least one must be met.

Your Modifier TCS_ADD_IRON_RESOURCE_PRODUCTION has the district as its owner and city plot yields as its subjects. The reason why your original code did not work is that you cannot check whether a Player has a tech from a city's plot yields. It may be possible to do so from a district (which is what you've done in your recent edit).

If you haven't done so already, you should turn on diagnostic game effects logging in UserOptions. Open the GameEffects file in the Logs folder and search for the names of your Modifiers, Requirements, etc. If there is an actual problem with these components (as opposed to something working different from how you expected it), it will show up here.
 
Last edited:
It is not the case that RequirementSets strictly require only one of the Requirements to be met. The RequirementSetType REQUIREMENTSET_TEST_ALL specifies that all the Requirements in the set must be met. REQUIREMENTSET_TEST_ANY specifies that at least one must be met.

Your Modifier TCS_ADD_IRON_RESOURCE_PRODUCTION has the district as its owner and city plot yields as its subjects. The reason why your original code did not work is that you cannot check whether a Player has a tech from a city's plot yields. It may be possible to do so from a district (which is what you've done in your recent edit).

If you haven't done so already, you should turn on diagnostic game effects logging in UserOptions. Open the GameEffects file in the Logs folder and search for the names of your Modifiers, Requirements, etc. If there is an actual problem with these components (as opposed to something working different from how you expected it), it will show up here.
I've had logging enabled all along, and zero errors were recorded with any of my tests on this regardless if they actually worked or not.
 
I've had logging enabled all along, and zero errors were recorded with any of my tests on this regardless if they actually worked or not.

Do you have effects logging (not the logging set in AppOptions) set to '4'? The GameEffects.txt should be tens of thousands if not hundreds of thousands of lines long. There should be a clue somewhere as to what's going on.
 
Do you have effects logging (not the logging set in AppOptions) set to '4'? The GameEffects.txt should be tens of thousands if not hundreds of thousands of lines long. There should be a clue somewhere as to what's going on.
Ah, no I did not. That's very helpful...thanks!
 
Thanks for your help, guys, I was able to get the Military Engineer working with @Horem's suggestion!

I tried all the suggestions to get the resource buff to work with varying success, but none of them worked 100% correctly. I think, think, I figured it out though!

After some testing I figured out that apparently RequirementSets only require one of the RequirementId's to be met in order to activate. As you can imagine, this was very frustrating (although I can see its utility). So, I decided to try using both SubjectRequirementSetId and OwnerRequirementSetId on the modifier, like so:
Code:
<Modifiers>
        <Row>
            <ModifierId>TCS_ADD_IRON_RESOURCE_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
            <OwnerRequirementSetId>PLAYER_HAS_TECH_BRONZE_WORKING</OwnerRequirementSetId>
            <SubjectRequirementSetId>PLOT_HAS_IRON</SubjectRequirementSetId>
        </Row>
</Modifiers>
This requires that the owner (the city whose plot yields will be adjusted) has Bronze Working, while the subject (the plot to be adjusted) has Iron. I've tested this once, and it seems to work. Off to test a bit more!

It seems that you solved your problem. I was wondering, it's not the same situation like the one with watermill and rice/wheat?
I would like a mod that gives extra production/ food to mines and farms build on resources, like it was in civ 4. Let's say a plot has 2 food, iron (once the player research bronze working) gives +1 production, and a mine on iron gives +2 production, where the mines on hills, without resources, just +1. For quarries it's easy since they can only be built on resources, for mines and farms, a bit harder.
 
Last edited:
It seems that you solved your problem. I was wondering, it's not the same situation like the one with watermill and rice/wheat?
I would like a mod that gives extra production/ food to mines and farms build on resources, like it was in civ 4. Let's say a plot has 2 food, iron (once the player research bronze working) gives +1 production, and a mine on iron gives +2 production, where the mines on hills, without resources, just +1. For quarries it's easy since they can only be built on resources, for mines and farms, a bit harder.

You should be able to create a Modifier using the Modifier Type that adjusts plot yields. Then the RequirementSet will require that the plot has a Mine and a Resource. However, I'm pretty sure the bonus yields will not appear in the tooltips, which is a downside.
 
Top Bottom