• 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 "Field"
    Differences between revisions 8 and 14 (spanning 6 versions)
    Revision 8 as of 2012-10-28 21:04:37
    Size: 1223
    Editor: jay777
    Comment:
    Revision 14 as of 2013-07-31 07:31:32
    Size: 1403
    Editor: tech
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
    ## page was renamed from Fields
    Line 11: Line 12:
    ||id ||int ||Displayes the ID number assigned to the valley from the server side ||
    ||level ||int ||Description here ||
    ||name ||String ||Description here ||
    ||type ||String ||Description here ||
    ||id ||int ||The fieldID of the valley ||
    ||level ||int ||Level of field 1-10 ||
    ||name ||String ||Name of field ("Forest","Desert","Hill","Swamp","Grassland","Lake") ||
    ||[[FieldTypes|type]] ||int ||Type of field in numerical format ||

    Line 18: Line 21:
       .''m_city.cityManager.fields.method '''or''' city.fields.method''
    Line 21: Line 22:
     . ''m_city.cityManager.fields.method '''or''' city.fields.method''
    Line 24: Line 26:
    ||length ||int ||Description here || ||length ||int ||How many fields are owned by the city ||


    Line 29: Line 34:
    example goes here echo FieldIdToCoords(city.fields[0].id)

    outputs the coords of field[0] using the associated FieldId
    Line 32: Line 39:






    Line 40: Line 40:
    ScriptObjects [[ObjectCity|City]]

    The Fields objects can reference details about valleys you own.

    Field objects can be referenced as:

    • m_city.cityManager.fields[#].property or city.fields[#].property

    The # will be which valley slot you are referencing, between 0-9. 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 level of the 5th valley you own with city.fields[4].level.

    Properties

    Property

    Type

    Description

    id

    int

    The fieldID of the valley

    level

    int

    Level of field 1-10

    name

    String

    Name of field ("Forest","Desert","Hill","Swamp","Grassland","Lake")

    type

    int

    Type of field in numerical format

    The following functions can give further information about valleys, but are used as:

    • m_city.cityManager.fields.method or city.fields.method

    Methods

    Method

    Type

    Description

    length

    int

    How many fields are owned by the city

    Examples

    • echo FieldIdToCoords(city.fields[0].id)
      
      outputs the coords of field[0] using the associated FieldId


    City

    Field (last edited 2014-02-10 18:48:46 by Inanna)