• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • 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

    Fortification objects can reference details about the wall defenses of your cities.

    Fortification objects can be referenced as as:

    • m_city.cityManager.fortification.property or city.fortification.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 current count of trebs built on your walls with city.fortification.rockfall.

    Properties

    Property

    Type

    Description

    fortification.arrowTower

    int

    Get the current number of ATs on the walls.

    fortification.abatis

    int

    Get the current number of abatis on the walls.

    fortification.rockfall

    int

    Get the current number of trebs on the walls.

    fortification.rollingLogs

    int

    Get the current number of logs on the walls.

    fortification.trap

    int

    Get the current number of traps on the walls.

    fortificationsRequirement.arrowTower

    int

    Get the number of ATs to be built in the city's goals.

    fortificationsRequirement.abatis

    int

    Get the number of abatis to be built in the city's goals.

    fortificationsRequirement.rockfall

    int

    Get the number of trebs to be built in the city's goals.

    fortificationsRequirement.rollingLogs

    int

    Get the number of logs to be built in the city's goals.

    fortificationsRequirement.trap

    int

    Get the number of traps to be built in the city's goals.

    Examples

    • // Find the current number of trebs in the city, and build enough more to total 11k.
      current = city.fortification.rockfall
      need = 11000 - current
      echo "We have " + current + " trebs, and need to build " + need + " more to total 11k."
      execute "walldefense tre " + need


    ScriptObjects

    Fortification (last edited 2014-02-10 18:51:06 by Inanna)