Tarquelne
Mar 12, 2008, 07:39 AM
Can I make the thawing from the "Thaw" option last longer by altering a python or XML file? (Which, where, how?) I'd like to try having the ice and snow stick around for much of the early game.
|
View Full Version : Longer Thaw? Tarquelne Mar 12, 2008, 07:39 AM Can I make the thawing from the "Thaw" option last longer by altering a python or XML file? (Which, where, how?) I'd like to try having the ice and snow stick around for much of the early game. Vehem Mar 12, 2008, 03:57 PM Can I make the thawing from the "Thaw" option last longer by altering a python or XML file? (Which, where, how?) I'd like to try having the ice and snow stick around for much of the early game. Using Python, in Assets\Python\CvEventMangager.py def onGameStart(self, argsList): 'Called at the start of the game' introMovie = CvIntroMovieScreen.CvIntroMovieScreen() introMovie.interfaceScreen() if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_T HAW): iDesert = gc.getInfoTypeForString('TERRAIN_DESERT') iGrass = gc.getInfoTypeForString('TERRAIN_GRASS') iPlains = gc.getInfoTypeForString('TERRAIN_PLAINS') iSnow = gc.getInfoTypeForString('TERRAIN_SNOW') iTundra = gc.getInfoTypeForString('TERRAIN_TUNDRA') for i in range (CyMap().numPlots()): pPlot = CyMap().plotByIndex(i) if pPlot.getFeatureType() == -1: if pPlot.getImprovementType() == -1: if pPlot.isWater() == False: iTerrain = pPlot.getTerrainType() if iTerrain == iTundra: pPlot.setTempTerrainType(iSnow, CyGame().getSorenRandNum(90, "Bob") + 10) if iTerrain == iGrass: pPlot.setTempTerrainType(iTundra, CyGame().getSorenRandNum(90, "Bob") + 10) if iTerrain == iPlains: pPlot.setTempTerrainType(iTundra, CyGame().getSorenRandNum(90, "Bob") + 10) if iTerrain == iDesert: pPlot.setTempTerrainType(iPlains, CyGame().getSorenRandNum(90, "Bob") + 10) "setTempTerrainType" takes a terrain type that will be applied, followed by an integer number of turns that the terrain will last for. In the original case, Kael has made this duration a Random Number between 0 and 89 + 10 Turns. (so 10-99 turns total). If you want to make it guaranteed to be longer, change the "10" for a greater value. If you want a chance for it to be longer, change the "90". CyGame().getSorenRandNum(180, "Bob") + 20) would give you a slow thaw over the first 200 turns. CyGame().getSorenRandNum(90, "Bob") + CyGame().getSorenRandNum(90, "Bob") + 20) Would "normalize" the thawing, so that most thawing took place around the 100-120 turn mark, with some occurring before or after (less likely to occur very early or late than with the other method). Tarquelne Mar 12, 2008, 05:38 PM Thanks! I saw that section, but I was wrong about what it does. I guess that shows the limits of just guessing. :) Not adjusted for game speed, it seems. I bet that's why it seemed too short to me. |
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.