SmokeyTheBear
Chieftain
- Joined
- Sep 7, 2008
- Messages
- 10
The Partisans event in Civ4 is bugged. 3.19 BTS
It is not supposed to occur for size 1 cities but it does anyway.
In CvEventManager.py, I found the cause. The line "if city.getPopulation > 1" is missing brackets, it should be "if city.getPopulation() > 1".
It almost always spawns 4~5 units because it uses the city's Tile Culture Level to calculate the number of partisan units. The Tile Culture Level of the plot a city is on grows extremely fast/is extremely high due to game mechanics.
I believe it was meant to use the City Culture level instead.
In CvRandomEventInterface.py, this defines the number of units created.
def getNumPartisanUnits(plot, iPlayer):
for i in range(gc.getNumCultureLevelInfos()):
iI = gc.getNumCultureLevelInfos() - i - 1
if plot.getCulture(iPlayer) >= gc.getGame().getCultureThreshold(iI):
return iI
return 0
How do I change it so that it uses the city's Culture Level instead of plot Culture Level?
It is not supposed to occur for size 1 cities but it does anyway.
In CvEventManager.py, I found the cause. The line "if city.getPopulation > 1" is missing brackets, it should be "if city.getPopulation() > 1".
It almost always spawns 4~5 units because it uses the city's Tile Culture Level to calculate the number of partisan units. The Tile Culture Level of the plot a city is on grows extremely fast/is extremely high due to game mechanics.
I believe it was meant to use the City Culture level instead.
In CvRandomEventInterface.py, this defines the number of units created.
def getNumPartisanUnits(plot, iPlayer):
for i in range(gc.getNumCultureLevelInfos()):
iI = gc.getNumCultureLevelInfos() - i - 1
if plot.getCulture(iPlayer) >= gc.getGame().getCultureThreshold(iI):
return iI
return 0
How do I change it so that it uses the city's Culture Level instead of plot Culture Level?