[R&F] [RESOLVED] Granting Governor Point from Pantheon Belief

PoundedChicken

Warlord
Joined
Nov 4, 2016
Messages
126
Just making simple Pantheon belief that grants a governor title/point. Have used the devs example religion mod as base. Below doesn't actually grant the title/point though when selected. Any help appreciated.

Code:
<GameInfo>

    <Types>
        <Row Type="BELIEF_FAITH_IN_POLITICS" Kind="KIND_BELIEF"/>
    </Types>
  
    <Beliefs>
        <Row BeliefType="BELIEF_FAITH_IN_POLITICS" Name="LOC_FAITH_IN_POLITICS_NAME" Description="LOC_FAITH_IN_POLITICS_DESCRIPTION" BeliefClassType="BELIEF_CLASS_PANTHEON"/>
    </Beliefs>

    <BeliefModifiers>
        <Row BeliefType="BELIEF_FAITH_IN_POLITICS">
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
        </Row>
    </BeliefModifiers>

    <Modifiers>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_GOVERNOR_POINTS</ModifierType>
            <RunOnce>true</RunOnce>
            <Permanent>true</Permanent>
        </Row>
    </Modifiers>

    <ModifierArguments>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
            <Name>Delta</Name>
            <Value>1</Value>
        </Row>
    </ModifierArguments>
  
</GameInfo>
 
Don't know why it does not work. Have you checked the Database for Errors?
Anyway, try adding this:
Code:
<GameModifiers>
        <Row ModifierId="PANTHEON_GRANT_GOVERNOR_TITLE"/>
</GameModifiers>
most of the Buildings that grant Governor Points use GameModifiers (except Casa de contrataction, GP, Civics..).
 
Don't know why it does not work. Have you checked the Database for Errors?
Anyway, try adding this:
Code:
<GameModifiers>
        <Row ModifierId="PANTHEON_GRANT_GOVERNOR_TITLE"/>
</GameModifiers>
most of the Buildings that grant Governor Points use GameModifiers (except Casa de contrataction, GP, Civics..).

No luck unfortunately. Have swapped the parent tag to GameData. Have added your suggestion. Have check DB and the records are there. Have even thrown in another modifier that's known to work but it still doesn't want to trigger anything on selection of the belief...
 
I think @The googles do nothing is on the correct track here.

BeliefModifiers are typically of a ModifierType that is either MODIFIER_ALL_CITIES_X or MODIFIER_ALL_PLAYERS_X with SubjectSetRequirementId of PLAYER_HAS_PANTHEON_REQUIREMENTS, CITY_FOLLOWS_PANTHEON_REQUIREMENTS, etc.

Many of the "X" in MODIFIER_ALL_CITIES_X and MODIFIER_ALL_PLAYERS_X are of a "ATTACH_MODIFIER" type, so if you look through the code of the Beliefs.xml files for the three expansions you find a lot of cases where MODIFIER_ALL_CITIES_ATTACH_MODIFIER and MODIFIER_ALL_PLAYERS_ATTACH_MODIFIER as ModifierType is used for the listed ModifierId in table BeliefModifiers. The Primary ModifierId listed in table BeliefModifiers only then grants the Secondary ModiiferId that is to be attached when the conditions of the SubjectSetRequirementId are met. The requirements are usually that the city or player follows the correct pantheon.

In the case of the Fertility Rites requirement set not only does the player need to have selected the correct Pantheon Belief associated to the original Primary ModifierId but there is a second RequirementSet attached to the second-level ModifierId that creates the unit (FERTILITY_RITES_BUILDER_MODIFIER) and which requires the player has at least one city. In the case of granting governor points it ought not really be necessary for the player to have at least one city since governors are player-level effects rather than actual map effects. If you have no cities you can still have Governor Titles available : you just can't use them until you have at least one tity.
 
Thanks everyone. Combination of mostly your help and some fresh eyes after two weeks resulted in success:


Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>

    <Types>
        <Row Type="BELIEF_FAITH_IN_POLITICS" Kind="KIND_BELIEF"/>
    </Types>
   
    <Beliefs>
        <Row BeliefType="BELIEF_FAITH_IN_POLITICS" Name="LOC_FAITH_IN_POLITICS_NAME" Description="LOC_FAITH_IN_POLITICS_DESCRIPTION" BeliefClassType="BELIEF_CLASS_PANTHEON"/>
    </Beliefs>

    <Modifiers>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
            <ModifierType>MODIFIER_ALL_PLAYERS_ATTACH_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_PANTHEON_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE_MODIFIER</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_GOVERNOR_POINTS</ModifierType>
            <RunOnce>true</RunOnce>
            <Permanent>true</Permanent>
        </Row>
    </Modifiers>

    <ModifierArguments>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
            <Name>ModifierId</Name>
            <Value>PANTHEON_GRANT_GOVERNOR_TITLE_MODIFIER</Value>
        </Row>
        <Row>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE_MODIFIER</ModifierId>
            <Name>Delta</Name>
            <Value>1</Value>
        </Row>
    </ModifierArguments>

    <BeliefModifiers>
        <Row>
            <BeliefType>BELIEF_FAITH_IN_POLITICS</BeliefType>
            <ModifierId>PANTHEON_GRANT_GOVERNOR_TITLE</ModifierId>
        </Row>

    </BeliefModifiers>

    <GameModifiers>
            <Row ModifierId="PANTHEON_GRANT_GOVERNOR_TITLE"/>
            <Row ModifierId="PANTHEON_GRANT_GOVERNOR_TITLE_MODIFIER"/>
    </GameModifiers>

</GameData>
 
Back
Top Bottom