• 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
    • Diff for "Castle"
    Differences between revisions 2 and 8 (spanning 6 versions)
    Revision 2 as of 2012-11-29 17:22:50
    Size: 1275
    Editor: Inanna
    Comment:
    Revision 8 as of 2014-02-10 18:40:32
    Size: 1452
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 16: Line 16:
    ||logUrl ||string || || ||logUrl ||string || path to the graphic icon of the city. ||
    Line 18: Line 18:
    ||[[TroopBean|troop]] ||object || || ||[[TroopStrBean|troop]] ||object || ||
    Line 20: Line 20:
    ||name ||string || || ||name ||string || name of the city ||
    Line 22: Line 22:
    ||ResourceBean|resource]] ||object || ||
    ||allowAlliance ||boolean || ||
    ||[[ResourceBean|resource]] ||object || ||
    ||allowAlliance ||boolean || if the embassy is open. Returns: True / False ||
    Line 25: Line 25:
    ||fieldId ||int || || ||[[FieldId|fieldId]] ||int || ||
    Line 28: Line 28:
    ||hasEnemy ||boolean || || ||hasEnemy ||boolean || if the city has incoming attacks. Returns: True / False ||
    Line 31: Line 31:
    ObjectCity ScriptObjects

    The Castle objects can reference details about the city the script is run in.

    Castle objects can be referenced as:

    • m_city.cityManager.castle.property or city.castle.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 name of the city with city.castle.name. Some castle properties are aliased via the city object as well, for example city.castle.name and city.name are the same thing.

    Properties

    Property

    Type

    Description

    herosArray

    array

    tradesArray

    array

    id

    int

    buffsArray

    array

    fortification

    object

    logUrl

    string

    path to the graphic icon of the city.

    goOutForBattle

    boolean

    troop

    object

    status

    int

    name

    string

    name of the city

    buildingQueuesArray

    array

    resource

    object

    allowAlliance

    boolean

    if the embassy is open. Returns: True / False

    usePACIFY_SUCCOUR_OR_PACIFY_PRAY

    int

    fieldId

    int

    buildingsArray

    array

    fieldsArray

    array

    hasEnemy

    boolean

    if the city has incoming attacks. Returns: True / False

    transingTradesArray

    array


    ScriptObjects

    Castle (last edited 2015-02-21 05:36:28 by tech)