Is there a way to find what turn a wonder was built?

anandus

Errorist
Joined
Oct 27, 2005
Messages
3,862
Location
Amsterdam, Netherlands
I'm looking for a way to find the turn a wonder was built.

I know you can find when a city was built with City:GetGameTurnFounded
Is there also something like that for wonders?

Does anybody know?

Also, but this is secondary, what is the easiest way to convert the turn to the year?
 
There's nothing direct in the API to get the turn a building was constructed. A wonder is just another type of building.

The only reliable method is to subscribe to GameEvents.CityConstructed and look for construction of the building/wonder you are interested in. When it is constructed you can then grab the game-turn data, player, city info and save that using one of the persisting data methods so that you can reload the information when a user saves the game and reloads it later on.
 
Back
Top Bottom