Good news! 2 out of Athens 3 UHVs are functioning.
I'm only stuck on the 3rd UHV. Its not throwing up any errors, so I think its just not calling on the required function.
Here is the code, let me know if you have any ideas whats wrong with the code:
**************************************************************************************************************************************************************************************
def getWondersBuilt( self, iCiv ):
scriptDict = pickle.loads( gc.getGame().getScriptData() )
return scriptDict['lWondersBuilt'][iCiv]
def setWondersBuilt( self, iCiv, iNewValue ):
scriptDict = pickle.loads( gc.getGame().getScriptData() )
scriptDict['lWondersBuilt'][iCiv] = iNewValue
gc.getGame().setScriptData( pickle.dumps(scriptDict) )
**************************************************************************************************************************************************************************************
scriptDict = {
'lGoals': [[-1 for i in range(iNumCivs)] for j in range(iNumCivs)], #bluepotato: [[-1,-1,-1]]*con.iNumCivs would copy the same array over and over. see
https://stackoverflow.com/questions/2397141/how-to-initialize-a-two-dimensional-array-in-python
'iEnslavedUnits': 0,
'lSumerianTechs': [-1, -1, -1],
'lAthensTechs': [-1, -1, -1],
'lWondersBuilt': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
**************************************************************************************************************************************************************************************
elif civType == iAthens:
if self.getGoal(iAthens, 2) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 2, 0)
elif civType == iAthens:
if self.getGoal(iAthens, 1) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 1, 0)
**************************************************************************************************************************************************************************************
elif civType == iAthens:
if (self.getGoal(iAthens, 1) == -1):
if (iBuilding == building('Oracle') or iBuilding == building('Colossus') or iBuilding == building('Parthenon') or Building == building('Artemis')):
self.setWondersBuilt(iAthens, self.getWondersBuilt(iAthens) + 1)
if (self.getWondersBuilt(iAthens) == 4):
self.setGoal(iAthens, 1, 1)
*************************************************************************************************************************************************************************************