Increasing City Nationality

OrionVeteran

Deity
Joined
Dec 25, 2003
Messages
2,443
Location
Newport News VA
I need a python function to increase city nationality percentage for the owner of the city, without adding any culture. Here is my current function which adds culture to increase city nationality.
This is a culture exploit, because it adds free culture to the city.

Spoiler :

def doCultureChange(pCity, iCultureToAdd):
........pCity.setOccupationTimer(0)
........iCityOwner = pCity.getOwner()
........iNumTurnsApplied = 60

........for i in range(iNumTurnsApplied):
................pCity.changeCultureTimes100(iCityOwner, iCultureToAdd / iNumTurnsApplied, True)

................if (iNumTurnsApplied > 0):
........................pCity.changeCultureTimes100(iCityOwner, iCultureToAdd % iNumTurnsApplied, False)
 
Last edited:
The game has no separate concept of nationality, the nationality percentage is simply player culture divided by total culture. If you want to change the nationality percentage of a player without changing total culture, you need to add/remove culture from all other players as well to compensate. Think of adding nationality for player A as converting culture from all other players to player A culture.
 
The game has no separate concept of nationality, the nationality percentage is simply player culture divided by total culture. If you want to change the nationality percentage of a player without changing total culture, you need to add/remove culture from all other players as well to compensate. Think of adding nationality for player A as converting culture from all other players to player A culture.

You are correct! I removed city culture for adversary civs, using negative numbers, and added culture to the city owner. The code has lots of restrictions and there is a unit strength penalty and a huge diplomatic penalty for committing a war crime, i.e. killing innocent civilians. I watched, as each war crime executed caused every civ, one by one (except allied civs), to have furious diplomatic relations with me. It all works great and will be released with OGI 4.03, which should be posted in just a few days.
 
That's great!
 
Back
Top Bottom