• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days (this includes any time you see the message "account suspended"). For more updates please see here.

Settlement limits for ages?

Riconatic

Prince
Joined
Sep 2, 2024
Messages
347
If anyone stumbles upon setting for settlement limits and how to mod that and wants to share that I would be very very grateful!

Thanks!

P.S. I would decrease them to half or something for the medium map...
 
So you cannot easily decrease it by map size as far as I can see (it will always be 3 and then up.
If you want to modify the initial limit of an age it is in civilization-gameeffects.xml

```
<Modifier id="TRAIT_INITIAL_SETTLEMENT_CAP" collection="COLLECTION_OWNER" effect="EFFECT_PLAYER_ADJUST_SETTLEMENT_CAP">
<Argument name="Amount">3</Argument>
</Modifier>
```
I'll let you make a proper mod following one of the tutorial.
 
So you cannot easily decrease it by map size as far as I can see (it will always be 3 and then up.
If you want to modify the initial limit of an age it is in civilization-gameeffects.xml

```
<Modifier id="TRAIT_INITIAL_SETTLEMENT_CAP" collection="COLLECTION_OWNER" effect="EFFECT_PLAYER_ADJUST_SETTLEMENT_CAP">
<Argument name="Amount">3</Argument>
</Modifier>
```
I'll let you make a proper mod following one of the tutorial.

Thank you!

This is second time in history I have been checking these things for civ. And I do not do SQL at all.

Would there be XML-action to modify these modifier arguments? Do you know? Or would this be SQL-script mod? As I only found SQL-script examples for modifiers.

In case of SQL-script I need more time and my proper computer to do this.
 
You need to make a mod with an update statement to that value. Try to follow this: https://forums.civfanatics.com/threads/example-gameplay-mod.694844/#post-16765589
I actually used that as base. But with this understanding I have that mod template has two actions it can do and neither work for the values that settlement limit uses:

Actions that example template can do are UpdateDatabase and UpdateText. With my very limited understanding neither of those can do modifiers and their arguments?
XML:
<?xml version="1.0" encoding="utf-8"?>
    <ActionGroups>
        <ActionGroup id="solver-mod-actions" scope="game" criteria="always">
            <Actions>
                <UpdateDatabase>
                    <Item>data/units.xml</Item>
                </UpdateDatabase>
            </Actions>
        </ActionGroup>
        <ActionGroup id="solver-mod-text" scope="game" criteria="antiquity-age-current">
            <Actions>
                <UpdateText>
                    <Item>text/en_us/UnitText.xml</Item>
                </UpdateText>
            </Actions>
        </ActionGroup>
    </ActionGroups>

</Mod>
 
I am also, interested in this. I have only dabbled in mods in Civ 6 but want to look into this as well.
 
You
I actually used that as base. But with this understanding I have that mod template has two actions it can do and neither work for the values that settlement limit uses:

Actions that example template can do are UpdateDatabase and UpdateText. With my very limited understanding neither of those can do modifiers and their arguments?
XML:
<?xml version="1.0" encoding="utf-8"?>
    <ActionGroups>
        <ActionGroup id="solver-mod-actions" scope="game" criteria="always">
            <Actions>
                <UpdateDatabase>
                    <Item>data/units.xml</Item>
                </UpdateDatabase>
            </Actions>
        </ActionGroup>
        <ActionGroup id="solver-mod-text" scope="game" criteria="antiquity-age-current">
            <Actions>
                <UpdateText>
                    <Item>text/en_us/UnitText.xml</Item>
                </UpdateText>
            </Actions>
        </ActionGroup>
    </ActionGroups>

</Mod>
In your case you only need to update the database as you are not changing any text so you would then only keep the UpdateDatabase Action group but with the antiquity critieria.
Then in your xml file (the file refered to in Item) you would write that I think:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Database>
    <ModifierArguments>
        <Update>
            <Where ModifierId="TRAIT_INITIAL_SETTLEMENT_CAP"/>
            <Set Value="10"/>
        </Update>
    </ModifierArguments>
</Database>

To give everyone a 10 city limit in antiquity.
 
Last edited:
Would you be willing to put this together as a completed mod. I even toss you a few bucks via PayPal.
 
You

In your case you only need to update the database as you are not changing any text so you would then only keep the UpdateDatabase Action group but with the antiquity critieria.
Then in your xml file (the file refered to in Item) you would write that I think:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Database>
    <ModifierArguments>
        <Update>
            <Where ModifierId="TRAIT_INITIAL_SETTLEMENT_CAP"/>
            <Set Value="10"/>
        </Update>
    </ModifierArguments>
</Database>

To give everyone a 10 city limit in antiquity.
With you tireless help I was able to do the mods. Thank you!

First I did not originally understand that UpdateDatabase action is so suitable for updating ModifierArguments also. Your example was super helpful on that!

Second I could not create modinfo + mod that share civilizations-gameeffects.xml for three different ages and does different values. So I have now set of three mods!
All of which are tied to only one module (antiquity, exploration, modern) as per Solver's example.

I tested this by making advanced start game for every age.

Attached is initial version now: https://forums.civfanatics.com/resources/settlementlimitsbyrico.31865/
 
Last edited:
For your 3 ages just make 3 different files in the same mod and in the modinfo definition tell it which item to load based on the criteria.
The fact you mentioned trying to fit all in civilizations-gameeffects.xml may be a misunderstanding of the tutorial. While the original value for this is in civilizations-gameeffects.xml, the file that YOU use does not need to share the name. Modders often use the names for clarity only.
 
For your 3 ages just make 3 different files in the same mod and in the modinfo definition tell it which item to load based on the criteria.
The fact you mentioned trying to fit all in civilizations-gameeffects.xml may be a misunderstanding of the tutorial. While the original value for this is in civilizations-gameeffects.xml, the file that YOU use does not need to share the name. Modders often use the names for clarity only.
You are absolutely correct. I did not understand that filename does not need to be shared.
Next step combining now to one mod!

Thanks again!
 
Back
Top Bottom