How to get an era from a turn number

r2d2

Chieftain
Joined
Aug 23, 2012
Messages
20
Hi,

I am wondering if there is a way to get the era from a turn number.

Indeed I would like to detect in which Era a city have been founded using City:GetGameTurnFounded().

Thanks, r2d2
 
You'd need to hook the GameEvents.TeamSetEra(teamId, eEra) event and build an array of arrays (by player, by era) to store the turn the player enters the era and then use that to work out which era the city was founded ... or you could detect the founding of cities and store era (by player by city). Either way you'll need to persist the data across save games (eg TableSaverLoader or SaveUtils)
 
Back
Top Bottom