Where does the game store how many turns have been worked on a tile?

Evalis

Prince
Joined
Mar 2, 2009
Messages
496
I'm interested in designing a function that increases the number of turns a tile has been worked by 'x' ammount. But I'm pretty sure I will need to 'get' a variable with python. The issue is that I don't know what the variable is called.

Any help would be appreciated.
 
You can use the getUpgradeProgress(), changeUpgradeProgress(int iChange) or setUpgradeProgress(int iNewValue) methods of CyPlot for this.

So for example to increase the number of worked turns of tile (x, y) by n, you'd use:
Code:
CyGlobalContext().getMap().plot(x, y).changeUpgradeProgress(n)
 
Thank you so much!! This worked like a charm!

Literally! It was a spell =D
 
Great :) You're welcome.
 
Top Bottom