Assistance tracking leader trait modifier error(s)

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,773
Location
Calgary, Canada
Hi... I am still a neophyte at creating leader traits. In the code below (ignore the hirdmann references), I am trying to create a trait that gives units +1 movement when moving out of a city center district with walls (I have changed that to +10 for testing purposes). Ideally, I will later limit the unit types to melee, but for now, I will settle for any unit getting the prescribed movement.

The code does not generate any Database log errors (although it seems to be screwing up my leader icons which now is a question mark). I am hoping someone here can point out some obvious errors I have made due to my ignorance.

In addition, once I have the code working, I have a question about whether the code will still work after a castle has been built... are the walls destroyed? or do I need to put in requirements for both castle and starfort as well (I am thinking not). As well, I mentioned that I'd like to restrict it to melee units. Another question is in regard to: MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT... would MODIFIER_PLAYER_UNITS_ADJUST_MOVEMENT be the better choice?

Here is the code:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited by Craig Sutter -->
<GameInfo>
    <Types>
        <Row Type="LEADER_ALFRED" Kind="KIND_LEADER"/>
        <Row Type="TRAIT_LEADER_CALLING_THE_FYRD" Kind="KIND_TRAIT"/>
        <Row Type="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Kind="KIND_TRAIT" />
    </Types>
    <Leaders>
        <Row LeaderType="LEADER_ALFRED" Name="LOC_LEADER_ALFRED_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
    </Leaders>
    <LeaderQuotes>
        <Row LeaderType="LEADER_ALFRED" Quote="LOC_PEDIA_LEADERS_PAGE_LEADER_ALFRED_QUOTE" QuoteAudio="Play_NORW_HH_MISC_PEP_TALK_B_1"/>
    </LeaderQuotes>
    <LeaderTraits>
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_CALLING_THE_FYRD"/>       
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN"/>
    </LeaderTraits>
    <Traits>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" Name="LOC_TRAIT_LEADER_CALLING_THE_FYRD_NAME" Description="LOC_TRAIT_LEADER_CALLING_THE_FYRD_DESCRIPTION"/>
        <Row TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Name="LOC_UNIT_DANISH_HIRDMANN_NAME" Description="LOC_UNIT_DANISH_HIRDMANN_DESCRIPTION"/>
    </Traits>
    <TraitModifiers>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" ModifierId="TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS"/>
    </TraitModifiers>
    <Agendas>       
        <Row AgendaType="AGENDA_DANELAW" Name="LOC_AGENDA_DANELAW_NAME" Description="LOC_AGENDA_DANELAW_DESCRIPTION"/>       
    </Agendas>
    <HistoricalAgendas>
        <Row LeaderType="LEADER_ALFRED" AgendaType="AGENDA_DANELAW"/>
    </HistoricalAgendas>   
    <AiListTypes>
        <Row ListType="AlfredCivics"/>
        <Row ListType="AlfredTechs"/>
        <Row ListType="AlfredWonders"/>
    </AiListTypes>
    <AiLists>
        <Row ListType="AlfredWonders" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Buildings"/>
        <Row ListType="AlfredCivics" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Civics"/>
        <Row ListType="AlfredTechs" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Technologies"/>
    </AiLists>
    <AiFavoredItems>
        <Row ListType="AlfredWonders" Item="BUILDING_GREAT_LIGHTHOUSE"/>
        <Row ListType="AlfredWonders" Item="BUILDING_TERRACOTTA_ARMY"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MILITARY_TRAINING"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MERCENARIES"/>
        <Row ListType="AlfredTechs" Item="TECH_SHIPBUILDING"/>
        <Row ListType="AlfredTechs" Item="TECH_IRON_WORKING"/>
    </AiFavoredItems>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT</ModifierType>
            <SubjectRequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <Name>Amount</Name>
            <Value>10</Value>
        </Row>
    </ModifierArguments>   
    <RequirementSets>   
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>   
    </RequirementSets>
    <RequirementSetRequirements>       
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
        </Row>
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
        </Row>           
    </RequirementSetRequirements>
    <Requirements>       
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
        </Row>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <Name>BuildingType</Name>
            <Value>BUILDING_WALLS</Value>
        </Row>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <Name>DistrictType</Name>
            <Value>DISTRICT_CITY_CENTER</Value>
        </Row>
    </RequirementArguments>
</GameInfo>

Thank-you for your anticipated assistance.
 
You can not effect units directly by Unit Modifiers(MODIFIER_PLAYER_UNIT_) unless they are a promotion. You have to apply it via EFFECT_ATTACH_MODIFIER then have the attached modifier point to your new "ability".

Code:
   <Modifiers>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER</ModifierType>
        </Row>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT</ModifierType>
            <SubjectRequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
    </Modifiers>
   <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <Name>ModifierID</Name>
            <Value>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
            <Name>Amount</Name>
            <Value>10</Value>
        </Row>
    </ModifierArguments>
 
I have made some progress. I tweaked the code you provided... but was still unsuccessful; however, I edited my tweaks by commenting out the portions that referred to BUILDING_WALLS requirement, and got the coded to work. I think the problem may be that the REQUIREMENT_CITY_HAS_BUILDING requirement does not associate itself to the plot and unit requirements. I was getting no errors when this was uncommented, but I was not getting a positive result either. When I commented out the walls (as highlighted in RED in the inserted code, I get the 10 movement unit.

I looked for RequirementTypes and found this... which I think may be the solution... REQUIREMENT_DISTRICT_HAS_BUILDING . I think I may be able to replace REQUIREMENT_CITY_HAS_BUILDING with this and put those requirements under the same RequirementId... Only thing I am uncertain of is how to do the Requirement Arguments. There are no examples (using Windows GREP) of REQUIREMENT_DISTRICT_HAS_BUILDING in use anywhere but in the Modifier.xml file, so I am uncertain what the arguments are. For example, can the arguments, RED and unhighlighted, that I have in the code already, be used? Or do I need a nested structure of some sort because DISTRICT needs to have separate arguments for REQUIREMENT_DISTRICT_HAS_BUILDING than for REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES? I will try the simplest solution first as nested requirements may be beyond my skill level as yet :).

I will appreciate it if anyone knows the answers to some of these questions... in the meantime, I will do some renewed testing and recoding.

PS Upon posting, it look like the code insert does not show RED highlighted text... so it may be simplest to copy the code to Note++ or some other editor to view the commented out sections more easily.

Code:
<GameInfo>
    <Types>
        <Row Type="LEADER_ALFRED" Kind="KIND_LEADER"/>
        <Row Type="TRAIT_LEADER_CALLING_THE_FYRD" Kind="KIND_TRAIT"/>
        <Row Type="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Kind="KIND_TRAIT" />
    </Types>
    <Leaders>
        <Row LeaderType="LEADER_ALFRED" Name="LOC_LEADER_ALFRED_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
    </Leaders>
    <LeaderQuotes>
        <Row LeaderType="LEADER_ALFRED" Quote="LOC_PEDIA_LEADERS_PAGE_LEADER_ALFRED_QUOTE" QuoteAudio="Play_NORW_HH_MISC_PEP_TALK_B_1"/>
    </LeaderQuotes>
    <LeaderTraits>
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_CALLING_THE_FYRD"/>      
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN"/>
    </LeaderTraits>
    <Traits>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" Name="LOC_TRAIT_LEADER_CALLING_THE_FYRD_NAME" Description="LOC_TRAIT_LEADER_CALLING_THE_FYRD_DESCRIPTION"/>
        <Row TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Name="LOC_UNIT_DANISH_HIRDMANN_NAME" Description="LOC_UNIT_DANISH_HIRDMANN_DESCRIPTION"/>
    </Traits>
    <TraitModifiers>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" ModifierId="TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS"/>
    </TraitModifiers>
    <Agendas>      
        <Row AgendaType="AGENDA_DANELAW" Name="LOC_AGENDA_DANELAW_NAME" Description="LOC_AGENDA_DANELAW_DESCRIPTION"/>      
    </Agendas>
    <HistoricalAgendas>
        <Row LeaderType="LEADER_ALFRED" AgendaType="AGENDA_DANELAW"/>
    </HistoricalAgendas>  
    <AiListTypes>
        <Row ListType="AlfredCivics"/>
        <Row ListType="AlfredTechs"/>
        <Row ListType="AlfredWonders"/>
    </AiListTypes>
    <AiLists>
        <Row ListType="AlfredWonders" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Buildings"/>
        <Row ListType="AlfredCivics" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Civics"/>
        <Row ListType="AlfredTechs" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Technologies"/>
    </AiLists>
    <AiFavoredItems>
        <Row ListType="AlfredWonders" Item="BUILDING_GREAT_LIGHTHOUSE"/>
        <Row ListType="AlfredWonders" Item="BUILDING_TERRACOTTA_ARMY"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MILITARY_TRAINING"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MERCENARIES"/>
        <Row ListType="AlfredTechs" Item="TECH_SHIPBUILDING"/>
        <Row ListType="AlfredTechs" Item="TECH_IRON_WORKING"/>
    </AiFavoredItems>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT</ModifierType>
        </Row>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</SubjectRequirementSetId>
            </Row>
    </Modifiers>
    <ModifierArguments>
            <Row>
                <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
                <Name>Amount</Name>
                <Value>8</Value>
            </Row>
            <Row>
                <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
                <Name>ModifierId</Name>
                <Value>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</Value>
            </Row>          
    </ModifierArguments>
    <RequirementSets>  
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>  
    </RequirementSets>
    <RequirementSetRequirements>      
        <!--<Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
        </Row>-->
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
        </Row>          
    </RequirementSetRequirements>
    <Requirements>      
        <!--<Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
        </Row>-->
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <!--<Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <Name>BuildingType</Name>
            <Value>BUILDING_WALLS</Value>
        </Row>-->
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <Name>DistrictType</Name>
            <Value>DISTRICT_CITY_CENTER</Value>
        </Row>
    </RequirementArguments>
</GameInfo>
 
My latest try failed... but at least I am getting an expected error.

Here is the relevant portion of GameEffect.log:

Spoiler From Gameeffects.log :

[1260548.207] [Turn: 17] Created Requirement <28970:PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT> with Owner <Player: 0> and Subject <Unit: 458757, Owner: 0, Type: 19 Position: -9999x-9999>.
[1260548.207] [Turn: 17] Warning: Failed to create Requirement <PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT> to <Unit: 458757, Owner: 0, Type: 19 Position: -9999x-9999> because <Unsupported Type>.
[1260548.207] [Turn: 17] Arguments:
[1260548.207] [Turn: 17] BuildingType: BUILDING_WALLS
[1260548.208] [Turn: 17] DistrictType: DISTRICT_CITY_CENTER


As can be seen, PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT is working correctly (but I already knew that given the success of the code in post #4)... however, it looks like the arguments are improperly applied for PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT . As mentioned, I can find no examples of its use. Is there any way I can determine the proper arguments to apply? It seems to need the building and district types, and I have given those... I am going to look through the GameEffect file for Requirements that likely need to have two arguments and see how they are similarly handled via Windows GREP, but if anyone knows, suggestions are welcome.

Regards, thank-you.


Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited by Craig Sutter -->
<GameInfo>
    <Types>
        <Row Type="LEADER_ALFRED" Kind="KIND_LEADER"/>
        <Row Type="TRAIT_LEADER_CALLING_THE_FYRD" Kind="KIND_TRAIT"/>
        <Row Type="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Kind="KIND_TRAIT" />
    </Types>
    <Leaders>
        <Row LeaderType="LEADER_ALFRED" Name="LOC_LEADER_ALFRED_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
    </Leaders>
    <LeaderQuotes>
        <Row LeaderType="LEADER_ALFRED" Quote="LOC_PEDIA_LEADERS_PAGE_LEADER_ALFRED_QUOTE" QuoteAudio="Play_NORW_HH_MISC_PEP_TALK_B_1"/>
    </LeaderQuotes>
    <LeaderTraits>
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_CALLING_THE_FYRD"/>       
        <Row LeaderType="LEADER_ALFRED" TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN"/>
    </LeaderTraits>
    <Traits>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" Name="LOC_TRAIT_LEADER_CALLING_THE_FYRD_NAME" Description="LOC_TRAIT_LEADER_CALLING_THE_FYRD_DESCRIPTION"/>
        <Row TraitType="TRAIT_LEADER_UNIT_DANISH_HIRDMANN" Name="LOC_UNIT_DANISH_HIRDMANN_NAME" Description="LOC_UNIT_DANISH_HIRDMANN_DESCRIPTION"/>
    </Traits>
    <TraitModifiers>
        <Row TraitType="TRAIT_LEADER_CALLING_THE_FYRD" ModifierId="TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS"/>
    </TraitModifiers>
    <Agendas>       
        <Row AgendaType="AGENDA_DANELAW" Name="LOC_AGENDA_DANELAW_NAME" Description="LOC_AGENDA_DANELAW_DESCRIPTION"/>       
    </Agendas>
    <HistoricalAgendas>
        <Row LeaderType="LEADER_ALFRED" AgendaType="AGENDA_DANELAW"/>
    </HistoricalAgendas>   
    <AiListTypes>
        <Row ListType="AlfredCivics"/>
        <Row ListType="AlfredTechs"/>
        <Row ListType="AlfredWonders"/>
    </AiListTypes>
    <AiLists>
        <Row ListType="AlfredWonders" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Buildings"/>
        <Row ListType="AlfredCivics" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Civics"/>
        <Row ListType="AlfredTechs" LeaderType="TRAIT_LEADER_CALLING_THE_FYRD" System="Technologies"/>
    </AiLists>
    <AiFavoredItems>
        <Row ListType="AlfredWonders" Item="BUILDING_GREAT_LIGHTHOUSE"/>
        <Row ListType="AlfredWonders" Item="BUILDING_TERRACOTTA_ARMY"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MILITARY_TRAINING"/>
        <Row ListType="AlfredCivics" Item="CIVIC_MERCENARIES"/>
        <Row ListType="AlfredTechs" Item="TECH_SHIPBUILDING"/>
        <Row ListType="AlfredTechs" Item="TECH_IRON_WORKING"/>
    </AiFavoredItems>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT</ModifierType>
        </Row>
        <Row>
            <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</SubjectRequirementSetId>
            </Row>
    </Modifiers>
    <ModifierArguments>
            <Row>
                <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</ModifierId>
                <Name>Amount</Name>
                <Value>8</Value>
            </Row>
            <Row>
                <ModifierId>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS</ModifierId>
                <Name>ModifierId</Name>
                <Value>TRAIT_BURH_CITY_CENTER_MOVEMENT_BONUS_MODIFIER</Value>
            </Row>           
    </ModifierArguments>
    <RequirementSets>   
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>   
    </RequirementSets>
    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
        </Row>
        <Row>
            <RequirementSetId>PLOT_MOVEMENT_HAS_WALLS_AND_CITY_CENTER_REQUIREMENTS</RequirementSetId>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
        </Row>   
    </RequirementSetRequirements>
    <Requirements>       
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_DISTRICT_HAS_BUILDING</RequirementType>
        </Row>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <Name>BuildingType</Name>
            <Value>BUILDING_WALLS</Value>
        </Row>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_WALLS_REQUIREMENT</RequirementId>
            <Name>DistrictType</Name>
            <Value>DISTRICT_CITY_CENTER</Value>
        </Row>
        <Row>
            <RequirementId>PLOT_MOVEMENT_HAS_CITY_CENTER_REQUIREMENT</RequirementId>
            <Name>DistrictType</Name>
            <Value>DISTRICT_CITY_CENTER</Value>
        </Row>
    </RequirementArguments>
</GameInfo>
 
I have done some testing myself, I do not think it is directly possible to hook a Building as a req for a Unit Ability. The game engine always seem to look for the Building on the Unit not the Plot (there is no requirement for Plot Has Building). I also vaguly remember running into a similar situation for one of my Military buildings in ToT, it just slippe dmy mind completely. (Done so many modifiers since then)
 
Back
Top Bottom