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. In the example below the current city funds are returned in the variable nCityFunds.

    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 or trade route. In the example below, the current population is returned in the variable nPopulation.

    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 or a trade route. In the example below, the current culture rating is returned in the variable nCulture.

    uint nCultureRating = 0;
    game.GetCultureRating(out nCulture);

GetFavorRating(out uint outFavor)

Returns the current favor rating. This can be useful as a trigger, for example to unlock a building or a trade route. Note that the returned value appears to be the "rounded up" version. In the example below, the current favor rating is returned in the variable nFavor.

    uint nFavorRating = 0;
    game.GetFavorRating(out nFavor);

GetProsperityRating(out uint outRating)

Returns the current prosperity rating. This can be useful as a trigger, for example to unlock a building. In the example below, the current prosperity rating is returned in the variable nProsperity.

    uint nProsperityRating = 0;
    game.GetProsperityRating(out nProsperity);

GetSecurityRating(out uint outRating)

Returns the current prosperity rating. This can be useful as a trigger, for example to unlock a building. In the example below, the current security rating is returned in the variable nSecurity.

    uint nSecurityRating = 0;
    game.GetSecurityRating(out nSecurity);

GetGovernorPersonalFunds(out int outFunds)

Returns the amount of personal savings you currently have. This could be used to trigger certain events, such as a raid or wage rise. In the example below, the current value of the savings is returned in the variable nGovernorFunds.

    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 the GetGovernorSalaryLevel method as a trigger, for example plebs and equites may ask for a wage rise if paying more than entitled; or some reward could be granted if the player is paying less than the salary entitled. Note that, since the rank doesn’t change in a scenario, there is no absolute need to use this method; however, it may be useful for a reusable method (and also to catch any changes you might make during the development of your scenario). In the example below, the governor's rank is returned in the variable nRank.

    uint nRank=0;
    game.GetGovernorRank(out nRank);

GetGovernorSalaryLevel(out uint outLevel)

Returns the current salary level, which could be used in conjunction with the GetGovernorRank method to compare it with what the governor is entitled to take as salary. In the example below, the governor's current salary level is returned in the variable nSalaryLevel.

    uint nSalaryLevel=0;
    game.GetGovernorSalaryLevel(out nSalaryLevel);

< Previous: Sending messages | Editor Guide | Next: Buildings and resources >