Auto Theming Modifier

Joined
Mar 23, 2006
Messages
800
Location
Adelaide, Australia
So trying to mod the forbidden palace so that instead of giving a free wild card slot, instead it automatically themes all (relevant) wonders. So for instance, if you have built the Great Library AND have filled it with ANY two great works of writing AND have built the Forbidden Palace, you will get a theming bonus. Under any other circumstances (Although I've just made it really difficult rather than impossible) there should be no theming bonus from world wonders.

Code that I've used but can't get to work so far

Code:
    <BuildingModifiers>
        <Row>
            <BuildingType>BUILDING_FORBIDDEN_CITY</BuildingType>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
        </Row>
    </BuildingModifiers>
    <Modifiers>
        <Row>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_AUTO_THEMED_BUILDING</ModifierType>
            <Permanent>true</Permanent>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
            <Name>BuildingType</Name>
            <Value>BUILDING_GREAT_LIBRARY</Value>
        </Row>
    </ModifierArguments>
    <Building_GreatWorks>
        <Update>
            <Where BuildingType="BUILDING_GREAT_LIBRARY"></Where>
            <Set ThemingUniquePerson="true" ThemingSameEras="true" ThemingUniqueCivs="true" ThemingYieldMultiplier="50" ThemingTourismMultiplier="50" NonUniquePersonYield="1" NonUniquePersonTourism="1" ThemingBonusDescription="LOC_MAGIL_BUILDING_THEMINGBONUS_WRITING"></Set>
        </Update>
    </Building_GreatWorks>

The result of the code is that a theming bonus will appear as being possible in the game, however upon building the forbidden palace it will not theme the great library.
 
Yo man, try it this way:

Code:
    <BuildingModifiers>
        <Row>
            <BuildingType>BUILDING_GREAT_LIBRARY</BuildingType>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
        </Row>
    </BuildingModifiers>
    <Modifiers>
        <Row>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_AUTO_THEMED_BUILDING</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_BUILT_FORBIDDEN_CITY_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>THEMED_GREAT_LIBRARY</ModifierId>
            <Name>BuildingType</Name>
            <Value>BUILDING_GREAT_LIBRARY</Value>
        </Row>
    </ModifierArguments>
    <RequirementSets>
        <Row>
            <RequirementSetId>PLAYER_HAS_BUILT_FORBIDDEN_CITY_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>PLAYER_HAS_BUILT_FORBIDDEN_CITY_REQUIREMENTS</RequirementSetId>
            <RequirementId>REQUIRES_PLAYER_HAS_FORBIDDEN_CITY</RequirementId>
        </Row>
    </RequirementSetRequirements>
    <Requirements>
        <Row>
            <RequirementId>REQUIRES_PLAYER_HAS_FORBIDDEN_CITY</RequirementId>
            <RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_PLAYER_HAS_FORBIDDEN_CITY</RequirementId>
            <Name>BuildingType</Name>
            <Value>BUILDING_FORBIDDEN_CITY</Value>
        </Row>
    </RequirementArguments>
 
Top Bottom