1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[R&F] How can we limit the number of cities per civ

Discussion in 'Civ6 - Creation & Customization' started by Sandris, Feb 23, 2018.

  1. Sandris

    Sandris Rise and Rule

    Joined:
    Jun 1, 2005
    Messages:
    1,000
    Location:
    Rus
    How can we limit the number of cities per civilization... for example, to 3 own settled cities per civ.
     
  2. isau

    isau Warlord

    Joined:
    Jan 15, 2007
    Messages:
    2,751
    I don't know that you could set a hard limit, but you can could put a rising cost on each city created.
     
  3. dagriggstar

    dagriggstar Chieftain

    Joined:
    Mar 23, 2006
    Messages:
    527
    Location:
    Adelaide, Australia
    It's not well balanced at the moment, but I have a (currently private) mod where I replaced the entire civics tree. One of the things I did was to completely disable building of settlers, create basically a row of civics called "expansion" that will give you a settler in the capital as you complete the civic. That's the only way I can think of placing a hard limit on the number of settlers, to disable having them built and only can be created when you get to certain civics or techs.
     
  4. Sandris

    Sandris Rise and Rule

    Joined:
    Jun 1, 2005
    Messages:
    1,000
    Location:
    Rus
    Could you mention a formula (rows in *.xml) how to disable building of Settlers and to set up their appearance after civic`s completion?
    Just one example would be enough.
    Thank you very much in advance. :)
     
  5. dagriggstar

    dagriggstar Chieftain

    Joined:
    Mar 23, 2006
    Messages:
    527
    Location:
    Adelaide, Australia
    Disable settlers (CIVIC_SETTLER_20 is put at the very end of the civic tree, because I couldn't be bothered doing more than 20 of the same type of civic)

    Code:
    <GameData>
        <Units>
            <Update>
                <Where UnitType="UNIT_SETTLER"></Where>
                <Set MustPurchase="TRUE" PrereqCivic="CIVIC_SETTLER_20"></Set>
            </Update>
        </Units>
    </GameData>
    Creating the modifier
    Code:
        <Modifiers>
            <Row>
                <ModifierId>CIVIC_SETTLER</ModifierId>
                <ModifierType>MODIFIER_PLAYER_GRANT_UNIT_IN_CAPITAL</ModifierType>
                <RunOnce>true</RunOnce>
            </Row>
        </Modifiers>
        <ModifierArguments>
            <Row>
                <ModifierId>CIVIC_SETTLER</ModifierId>
                <Name>UnitType</Name>
                <Value>UNIT_SETTLER</Value>
            </Row>
            <Row>
                <ModifierId>CIVIC_SETTLER</ModifierId>
                <Name>Amount</Name>
                <Value>1</Value>
            </Row>
        </ModifierArguments>
    Attach modifier to civic
    Code:
        <CivicModifiers>
            <Row>
                <CivicType>CIVIC_SETTLER_1</CivicType>
                <ModifierId>CIVIC_SETTLER</ModifierId>
            </Row>
    </CivicModifiers>
     
  6. Sandris

    Sandris Rise and Rule

    Joined:
    Jun 1, 2005
    Messages:
    1,000
    Location:
    Rus
    Thank you very much for the help :)
     
  7. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,718
    In Rise and Fall you should actually be able to do this in a pretty straightforward way using the new effect EFFECT_ADJUST_PLAYER_UNIT_BUILD_DISABLED in conjunction with the requirement type REQUIREMENT_COLLECTION_COUNT_GREATERTHAN where you check if the collection COLLECTION_PLAYER_BUILT_CITIES is greater than 3 in order to disable Settler building. Just attach the modifier/requirement combo to the default leader trait and you should be good to go. You could create a second modifier with the effect EFFECT_ADJUST_DISABLE_SETTLING and the same requirement and you'd prevent players from being able to settle new cities as well with existing Settlers.
     
    isau likes this.
  8. Czaro

    Czaro Chieftain

    Joined:
    Mar 11, 2018
    Messages:
    1
    Gender:
    Male
    I don't really understand where should i to add this. Could you explain me?
     

Share This Page