• 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 15 as of 2013-07-31 07:21:59

    Clear message

    

    Each city has up to 74 possible buildings on it, 32 spaces inside plus walls and town hall, and 40 spaces outside.

    The first building you start with is city.building[73] (The Town Hall) and each building you construct after that takes the next available number counting back to 0... (72,71,70,69,etc)

    In the following examples, x can be any number from 0-73:

    buildings[x].name

    Usage:

    city.buildings[x].name

    Example:

    city.buildings[0].name

    The name of the type of building ("Forge","Stable","Inn",etc.)

    buildings[x].positionId

    Usage:

    city.buildings[x].positionId

    Example:

    city.buildings[0].positionId

    The numbers below indicate the .positionId (city.building[x].positionId) (The Town Hall is in position -1)

    http://imageshack.us/a/img820/7558/positionid1.png http://imageshack.us/a/img10/8545/positionid2.png

    buildings[x].status

    Usage:

    city.buildings[x].status

    Example:

    city.buildings[0].status

    0 = building complete

    1 = upgrading

    2 = demolishing

    buildings[x].endTime

    Usage:

    city.buildings[x].endTime

    Example:

    city.buildings[1].endTime

    returns the time in UNIX timestamp format indicating when building will be finished upgrading or demolishing

    (returns 0 if it is not being worked on)

    buildings[x].startTime

    Usage:

    city.buildings[x].startTime

    Example:

    city.buildings[1].startTime

    returns the time in UNIX timestamp format indicating when building began being upgraded or demolished

    (returns 0 if it is not being worked on)

    buildings[x].typeId

    Usage:

    city.buildings[x].typeId

    Example:

    city.buildings[1].typeId

    The numerical code for the buildingType

    buildings[x].level

    Usage:

    city.buildings[x].level

    Example:

    city.buildings[1].level

    level of the building

    buildings.length

    Usage:

    city.buildings.length

    Example:

    city.buildings.length

    Total number of buildings in the current city


    City