• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages

    Revision 13 as of 2012-11-21 04:57:30

    Clear message

    The City Resource objects can reference details about the various resources of city the script is run in.

    City resource objects can be referenced as:

    • m_city.cityManager.resource.property or city.resource.property

    The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the loyalty of the city with city.resource.support.

    Properties

    Property

    Type

    Description

    iron.workPeople

    stone.workPeople

    wood.workPeople

    maxPopulation

    workPeople

    support

    food

    food.amount

    food.increaseRate

    food.max

    food.storeRercent

    troopCostFood

    gold

    taxIncome

    iron

    iron.amount

    iron.increaseRate

    iron.max

    iron.storeRercent

    stone

    stone.amount

    stone.increaseRate

    stone.max

    stone.storeRercent

    wood

    wood.amount

    wood.increaseRate

    wood.max

    wood.storeRercent

    Some City resource objects to not follow the above format of city.resource.property. You can reference the following with m_city.cityManager.property or city.property. For example, city.reservedResource.food.

    Properties

    Property

    Type

    Description

    estResource.gold

    estResource.food

    estResource.wood

    estResource.stone

    estResource.iron

    ResourceProduction.food

    ResourceProduction.wood

    ResourceProduction.stone

    ResourceProduction.iron

    reservedResource.food

    reservedResource.gold

    reservedResource.iron

    reservedResource.stone


    Object City