Possible to mod city-states to rebel?

Joined
Apr 11, 2015
Messages
438
Is it possible to mod city-states to make them rebel and defect like other cities (although maybe a bit harder)?
 
I'm pretty sure they do. I've had it happen. Though I was playing as Eleanor so that might have made it easier but it does happen every so often
 
Yes, you'd have to find the global define (I presume that's where it's coming from, or it's a modifier) that grants Loyalty per number of deployed Envoys. Decrease/disable that and they'll start falling like dominoes.

City States inherently can flip, but it's incredibly difficult to do so because of the above, which keeps their loyalty at a high.
 
Yes, you'd have to find the global define (I presume that's where it's coming from, or it's a modifier) that grants Loyalty per number of deployed Envoys. Decrease/disable that and they'll start falling like dominoes.

City States inherently can flip, but it's incredibly difficult to do so because of the above, which keeps their loyalty at a high.
I had a look, but couldn't find it.

I was thinking of a situation in a game where I had a city-state vassal in the middle of my empire, surrounded on all sides by my cities. In that sort of situation, I think there should be a chance they flip, especially if Amani is used, or Bread & Circus projects made.
 
You might also try negative values for those two global parameters. Worst case is the game will ignore the negative value and just use 0 or the absolute value of whatever you input. IE, "-1" might get used by the game as "1".
 
I tried changing "IDENTITY_PER_TURN_FROM_CITY_STATES" to -20 and 0, but didn't notice any immediate difference.

Here's a screenshot of the city-state that precipitated my wish for city-states to loyalty-flip when pressure is very high.

Spoiler :


I abandoned that game, so I don't know how things would have progressed when city populations grew in size.
 
Did you use a mod or change game files? What did the loyalty lens/dropdown show?
I didn't know one could click under the city banner in the loyalty lens to bring up an infobox with greater detail.

Here's a screenshot of the city I posted about earlier:

Spoiler :




The city-state has got very healthy loyalty. Even without the +20 City-State bonus, it's got full loyalty.

So probably it's best to decide earlier on any city-states one wants to incorporate into one's empire and then conquer them.

According to the Wiki, city-states cannot be loyalty-flipped:

City-States are a special case within the Loyalty pressure system, in that that they are practically excluded from it. They have a special extra loyalty feat which ensures that they can resist even the most powerful pressure from nearby civilizations. So, despite the new Loyalty mechanic, City-States remain always independent and loyal only to themselves (until conquered by someone, of course).

There's a number of things that can be done to try and loyalty-flip another city. From the Wiki:

Use the amplified effect of Ages if you are in a better Age than your opponent.

Use Spies to neutralize the target city's Governor and perform Foment Unrest missions.

Grow your bordering cities' Citizen6 Populations as quickly as possible, as described above.

Run Bread and Circuses projects to amplify your pressure; ideally they should be run in big cities surrounding the target.

"Flank" the target city by having numerous cities of your own surrounding it.

Use Governor Amani's Emissary title.

Convert the city to your religion.

GS-Only Use Great Works when playing as Eleanor of Aquitaine.

GS-Only Run the Move Capital project to move your Capital6 Capital to shift your Loyalty pressure when
playing as Dido.

GS-Only Slot the Hallyu policy card, purchase Rock Bands with the Indie promotion, and send them to perform concerts in the city. Two concerts will reduce the city's Loyalty to 20; a third will turn it into a Free City.
Without knowing the exact values of these things, it's difficult to demonstrate that it is mathematically impossible for a city-state to loyalty-flip, or know how to modify it to a desired level.
 
The city-state has got very healthy loyalty. Even without the +20 City-State bonus, it's got full loyalty.
From the screenshot, it doesn't look like your modified value for 'IDENTITY_PER_TURN_FROM_CITY_STATES' is being applied. It's still at +20.
According to the Wiki, city-states cannot be loyalty-flipped
Not true. CSs can be flipped it's just not particularly easy.
 
From the screenshot, it doesn't look like your modified value for 'IDENTITY_PER_TURN_FROM_CITY_STATES' is being applied. It's still at +20.
Yeah, maybe it needs a later load order. Here's the code I added. Expansion2 adds the exact same code (with different Value), so I guess they are both being loaded at the same time.
Code:
<GameInfo>
    <GlobalParameters>
        <Replace Name="IDENTITY_PER_TURN_FROM_CITY_STATES" Value="0" />
    </GlobalParameters>
</GameInfo>
In any case, reducing City-State Loyalty bonus slightly is not going to effect the situation in the screenshot, at least not until the cities have grown bigger.

Another alternative, which probably is not supportable by the game code, is for city-states to rebel if they become an enclave. So if all the city-state's borders touch the borders of a Major Civ, then they would rebel. In the screenshot, this would happen if a city were built to the south of the city-state.
 
Yeah, maybe it needs a later load order. Here's the code I added. Expansion2 adds the exact same code (with different Value), so I guess they are both being loaded at the same time.
Code:
<GameInfo>
    <GlobalParameters>
        <Replace Name="IDENTITY_PER_TURN_FROM_CITY_STATES" Value="0" />
    </GlobalParameters>
</GameInfo>
Honestly, you should add a high LoadOrder to any modinfo block that makes changes to the database just to be safe.
I don't really use XML, but I think you want
Code:
<Update>
   <Where Name="IDENTITY_PER_TURN_FROM_CITY_STATES"/>
   <Set Value="0"/>
</Update>
or in SQL
Code:
UPDATE GlobalParameters
SET    Value = 0
WHERE  Name = 'IDENTITY_PER_TURN_FROM_CITY_STATES';
In any case, reducing City-State Loyalty bonus slightly is not going to effect the situation in the screenshot, at least not until the cities have grown bigger.
Yeah, if you're only depending on passive loyalty pressure from citizens, but there's many ways to actively affect pressure.

Just for laughs, I changed that parameter to -50:

 
...
I don't really use XML, but I think you want
Code:
<Update>
   <Where Name="IDENTITY_PER_TURN_FROM_CITY_STATES"/>
   <Set Value="0"/>
</Update>
or in SQL
Code:
UPDATE GlobalParameters
SET    Value = 0
WHERE  Name = 'IDENTITY_PER_TURN_FROM_CITY_STATES';
Replace will work just fine in XML so long as the table has a Primary key, which GlobalParemeters does.
Code:
CREATE TABLE "GlobalParameters" (
		"Name" TEXT NOT NULL,
		"Value" TEXT NOT NULL,
		PRIMARY KEY(Name));
In such cases Replace acts in a nearly-identical manner as an Update and as far as the average modder is concerned can be considered an equivalent code.

Just as in an Update however there can be issues where a table has more than one primary key, such as ModifierArguments, which has the combination of "ModifierId" and "Name" as its primary key, so a <Replace> command would have to be replacing that combination in order for it to act as an Update: otherwise an entirely new row will be added to the table.

Update in such a case would attempt to Update all rows that qualified if only the ModifierId was provided as the Where argument, or it would do nothing if no combination of a ModifierId and Name argument specified in the Where clause already existed within the table. This is true regardless of whether the Update was provided as XML or SQL.

XML <Replace> is exactly equivalent to SQL's INSERT OR REPLACE INTO
 
Update in such a case would attempt to Update all rows that qualified if only the ModifierId was provided as the Where argument, or it would do nothing if no combination of a ModifierId and Name argument specified in the Where clause already existed within the table. This is true regardless of whether the Update was provided as XML or SQL.

XML <Replace> is exactly equivalent to SQL's INSERT OR REPLACE INTO
Yep, exactly! You could also just use REPLACE INTO in SQL. Personally, I tend to refrain from overly using INSERT OR REPLACE INTO when a simple UPDATE statement will suffice.
 
Top Bottom