1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Leader Trait to add +1 Great General Points to Palace [Solved]

Discussion in 'Mod Creation Help' started by kingchris20, Feb 2, 2018.

  1. kingchris20

    kingchris20 Wisdom Seeker

    Joined:
    Jul 30, 2012
    Messages:
    1,319
    Location:
    Resident of Heaven; Currently in the Waiting Room
    Is there a way to add +1 Great General Points to the Palace for a specific leader trait?

    I've tried a few different things and maybe I'm just overthinking it....my current workaround is to have a "companion building" to the palace with its only effect to generate +1GG points, which I don't really like because it 1) shows up as a unique building on the loading screen, and 2) shows up as a building in the city details screen.
     
  2. criZp

    criZp Chieftain

    Joined:
    Jul 19, 2013
    Messages:
    684
    Location:
    Nidaros, Norway
    I know aztecs have GGP at their arena replacement building, so you can check that code?
     
  3. kingchris20

    kingchris20 Wisdom Seeker

    Joined:
    Jul 30, 2012
    Messages:
    1,319
    Location:
    Resident of Heaven; Currently in the Waiting Room
    Yeah, I started with a replacement building to the palace, but the palace seems to be hardcoded to start with a city, so when I did it, I ended up with 2 palaces, even if I set it as a replacement for the palace, and even if I set the 2 buildings as mutually exclusive.

    I was wondering if there was a way to update the palace to include GGP but only for my leader.....but I couldn't think of a way to do that (the update would affect all palaces, and I don't know how to tie an update to a leader trait)...so basically my current workaround is just having a 2nd "palace" that has none of the palace effects, but adds a GGP.
     
  4. kingchris20

    kingchris20 Wisdom Seeker

    Joined:
    Jul 30, 2012
    Messages:
    1,319
    Location:
    Resident of Heaven; Currently in the Waiting Room
    For anyone else that may stumble upon this thread and wants to add Great Person points to the palace through a trait.

    Found my solution with an EffectType that is used no where else in the game that I can see and created a Dynamic Modifier with a requirement that the city has the palace.

    *thanks to ChimpanG for this - https://forums.civfanatics.com/thre...-collectiontypes-and-requirementtypes.624159/

    Code:
        <LeaderTraits>
            <Row LeaderType="LEADER_KC20_TES_YSGRAMOR" TraitType="LEADER_KC20_TES_YSGRAMOR_NIGHT_OF_TEARS_TRAIT"/>
        </LeaderTraits>
        <TraitModifiers>
            <Row>
                <TraitType>LEADER_KC20_TES_YSGRAMOR_NIGHT_OF_TEARS_TRAIT</TraitType>
                <ModifierId>TRAIT_YSGRAMOR_NIGHT_OF_TEARS</ModifierId>
            </Row>
        </TraitModifiers>
        <DynamicModifiers>
            <Row>
                <ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_GREAT_PERSON_POINTS</ModifierType>
                <CollectionType>COLLECTION_PLAYER_CITIES</CollectionType>
                <EffectType>EFFECT_ADJUST_GREAT_PERSON_POINTS</EffectType>
            </Row>
        </DynamicModifiers>
        <Modifiers>
            <Row>
                <ModifierId>TRAIT_YSGRAMOR_NIGHT_OF_TEARS</ModifierId>
                <ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_GREAT_PERSON_POINTS</ModifierType>
                <SubjectRequirementSetId>YSGRAMOR_CITY_HAS_PALACE_REQUIREMENTS</SubjectRequirementSetId>
            </Row>
        </Modifiers>
        <ModifierArguments>
            <Row>
                <ModifierId>TRAIT_YSGRAMOR_NIGHT_OF_TEARS</ModifierId>
                <Name>GreatPersonClassType</Name>
                <Value>GREAT_PERSON_CLASS_GENERAL</Value>
            </Row>
            <Row>
                <ModifierId>TRAIT_YSGRAMOR_NIGHT_OF_TEARS</ModifierId>
                <Name>Amount</Name>
                <Value>1</Value>
            </Row>
        </ModifierArguments>
        <!--  -->
        <!-- REQUIREMENTS -->
        <!--  -->
        <RequirementSets>
            <Row>
                <RequirementSetId>YSGRAMOR_CITY_HAS_PALACE_REQUIREMENTS</RequirementSetId>
                <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
            </Row>
        </RequirementSets>
        <RequirementSetRequirements>
            <Row>
                <RequirementSetId>YSGRAMOR_CITY_HAS_PALACE_REQUIREMENTS</RequirementSetId>
                <RequirementId>REQUIRES_YSGRAMOR_CITY_HAS_PALACE</RequirementId>
            </Row>
        </RequirementSetRequirements>
        <Requirements>
            <Row>
                <RequirementId>REQUIRES_YSGRAMOR_CITY_HAS_PALACE</RequirementId>
                <RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
            </Row>
        </Requirements>
        <RequirementArguments>
            <Row>
                <RequirementId>REQUIRES_YSGRAMOR_CITY_HAS_PALACE</RequirementId>
                <Name>BuildingType</Name>
                <Value>BUILDING_PALACE</Value>
            </Row>
        </RequirementArguments>
    
     
    Last edited: Feb 4, 2018
    raen likes this.

Share This Page