ciruela
Warlord
- Joined
- Sep 24, 2015
- Messages
- 202
in my Game of Throne FFH2 modmod v2.00,due to first time to involve Python changes,and now I have some question need experienced modders to answer:
1.How to Save Python Variable in Savegame and get value of these Python Variable after loaded savegame file.
add a lot variable in CvEventHandler.py to run a Season System and mark current Season,mark current climate.
All things Work well until reload a savegame, all Python Variable's value initialized,can't continue to follow the season's trace.
2.add a minor civ or add a civ permanent war with all other civs.
now I can add a civ and declare war to all other civs,but they will make peace after 10 or more turns.
1.How to Save Python Variable in Savegame and get value of these Python Variable after loaded savegame file.
add a lot variable in CvEventHandler.py to run a Season System and mark current Season,mark current climate.
Spoiler :
Code:
class CvEventManager:
def __init__(self):
#Ciruela Season 20171014
self.iSeason = 0
self.sSeason = 0
self.iSeasonRatio = 2
self.iSeasonACRatio = 1
self.iSeasonTurn = 150
self.iSeasonTurnLeft = 150
self.iMaxX = -1
self.iMaxY = -1
self.iCurrentColdY1 = -1
self.iCurrentColdY2 = -1
self.iMinColdY = -1
self.iMinPlainY = -1
self.iMinTundraY = -1
self.iMinSnowY = -1
self.iPlotYChangeRef = 0.125
self.iSeasonPCRatio = 1
self.iCurrentPlainY = -1
self.iCurrentTundraY = -1
self.iCurrentSnowY = -1
2.add a minor civ or add a civ permanent war with all other civs.
now I can add a civ and declare war to all other civs,but they will make peace after 10 or more turns.
Last edited: