Change tolerance

hefan

Chieftain
Joined
Mar 15, 2010
Messages
3
Hi everyone,

Can someone tell me how to change the tolerance of expanding outside of the historical boundaries? I want to make the tolerance a little bit more relaxed to build a larger empire;) Thank you!
 
Locate Beyond the Sword\Mods\Rhye's and Fall of Civilization\Assets\Python\Stability.py

Line #455:
Code:
                        iNumPlotsAbroad = max(0,self.getOwnedPlotsLastTurn(iPlayer)-[COLOR="Red"]32[/COLOR])
The value 32 is the number of plots allowed outside of historical area - change it to whatever you want. :king:

This is some code I used in a historical scenario (additions/changes in red):
Code:
[COLOR="Red"]                        if (iPlayer == con.iMongolia or iPlayer == con.iGermany):
                                iDiscount = 0
                        elif (iPlayer == con.iRussia):
                                iDiscount = 50
                        else:
                                iDiscount = 32[/COLOR]
                        iNumPlotsAbroad = max(0,self.getOwnedPlotsLastTurn(iPlayer) - [COLOR="Red"]iDiscount[/COLOR])
What it does is it allows no non-historical plots for the Germans and the Mongols. The Russians get to have 50 foreign plots. If you use this template you could set individual values for any Civ. :king:

You'll find the values/constants for all the Civs in the Consts.py file - but you need to add the "con." prefix to fetch those values. Or you could just use the integer values as is. This code does exactly the same thing:
Code:
                        if (iPlayer == 23 or iPlayer == 17):
                                iDiscount = 0
                        elif (iPlayer == 18):
                                iDiscount = 50
                        else:
                                iDiscount = 32
                        iNumPlotsAbroad = max(0,self.getOwnedPlotsLastTurn(iPlayer) - iDiscount)
 
Just about anything is possible once you learn Python. :king: You could customize your game any way you want to. My own copy of RFC is pretty much redesigned by now, and I'm still learning...

An idea for a modmod: Adjusted expansion stability. Every Civ could get a individual setting on how many foreign tiles can be owned before negative stability hits. The values could be stored in Consts.py just like any other constants, so it would be really easy to adjust by anyone.

If anyone is interested in this approach I could probably whip something up rather quickly. Then it would be up to you good people to test out various values and see what happens. :goodjob:
 
What is considered outside the histroical area?, outside core area, normal area or broader area? :confused:

thanks
 
I would say its a combination of all, and then some. Refer to the Stability Maps for the specifics.
 
Dark Green=You want control over this, no one else should even have a tile of it
Light Green=Not "Necessary" but recommended
Yellow=Still within historical bounds but not quite stable
Orange=Not a good area out of bounds
Red=Fastest way to FUBAR your country is get lots of this
 
Thank you! This is exactly what I want! One more question, if I make change to the python file right now, will the changes also be effective for existing games?
 
The Python will be loaded every time you load the game, so yes. You don't even have to restart the game for the changes to take effect, so you could start a save, open up a .py file, make your edits and save the file, and continue playing with the changes taking effect. :eek:
 
Baldyr is right - whenever a python file is modified Civ4 detects it somehow and you'll see the message "reloading python modules" appear at the top of your game screen :)
 
Top Bottom