sman1975
Emperor
Hi!
Am working on a mod that would like to be able to determine which game turn a building in a city was completed.
I've looked at the pCity:GetBuildingOriginalTime(Building Type) method, which returns the "year" the building was completed, e.g. "-4000" for the Palace in a game starting in the Ancient Era, etc.
Have tested with other buildings for several turns, and this seems to be the way the method works - returning an integer "year" when the building was built.
I haven't found any method that returns the exact game turn a building was created, or a way of "converting" a year into a game turn.
I suppose I could calculate the approximate turn, using the game speed - but it gets a little fuzzy if a different mod introduces a new game speed.
Anyone have any suggestions on how to a game turn for building creation?
Thanks!
Am working on a mod that would like to be able to determine which game turn a building in a city was completed.
I've looked at the pCity:GetBuildingOriginalTime(Building Type) method, which returns the "year" the building was completed, e.g. "-4000" for the Palace in a game starting in the Ancient Era, etc.
Have tested with other buildings for several turns, and this seems to be the way the method works - returning an integer "year" when the building was built.
I haven't found any method that returns the exact game turn a building was created, or a way of "converting" a year into a game turn.
I suppose I could calculate the approximate turn, using the game speed - but it gets a little fuzzy if a different mod introduces a new game speed.
Anyone have any suggestions on how to a game turn for building creation?
Thanks!