Part 2: City ratings and other stats
GetCityFunds(out int outFunds)
Returns the current city funds. This can be useful to trigger (for example) a wage increase or an invasion.
int nCityFunds = 0; game.GetCityFunds(out nCityFunds);
GetPopulation(out int outPopulation)
Returns the current city population. This can be useful as a trigger, for example to unlock a building.
int nPopulation = 0; game.GetPopulation(out nPopulation);
GetCultureRating(out uint outRating)
Returns the current culture rating. This can be useful as a trigger, for example to unlock a building. Example use:
uint nCultureRating = 0; game.GetCultureRating(out nCultureRating);
GetFavorRating(out uint outFavor)
Returns the current favor rating. This can be useful as a trigger, for example to unlock a building. Note: the returned value appears to be the "rounded up" version. Example usage:
uint nFavorRating = 0; game.GetFavorRating(out nFavorRating);
GetProsperityRating(out uint outRating)
Returns the current prosperity rating. This can be useful as a trigger, for example to unlock a building.
uint nProsperityRating = 0; game.GetProsperityRating(out nProsperityRating);
GetSecurityRating(out uint outRating)
Returns the current prosperity rating. This can be useful as a trigger, for example to unlock a building. Example use:
uint nSecurityRating = 0; game.GetSecurityRating(out nSecurityRating);
GetGovernorPersonalFunds(out int outFunds)
Returns the amount of savings you currently have. This could be used to trigger certain events, such as a raid or wage rise.
int nGovernorFunds = 0; game.GetGovernorPersonalFunds(out nGovernorFunds);
GetGovernorRank(out uint outRank)
Returns the specified rank of the governor. This could be used in conjunction with GetGovernorSalaryLevel as a trigger, e.g. wage rise if paying more than entitled; or some reward if paying less than entitled. Note that, since the rank doesn't change in a scenario, there is no absolute need to call this function; however, it may be useful in a reusable function (and also to catch any changes you make when designing the scenario).
uint nRank = 0; game.GetGovernorRank(out nRank);
GetGovernorSalaryLevel(out uint outLevel)
Returns the current salary level, which could be used in conjunction with GetGovernorRank to compare it with what the governor is entitled to take as salary.
uint nSalaryLevel = 0; game.GetGovernorSalaryLevel(out nSalaryLevel);
< Previous: Sending messages | Editor Guide | Next: Buildings and resources >