• 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 "Army"
    Differences between revisions 2 and 23 (spanning 21 versions)
    Revision 2 as of 2012-10-23 13:41:46
    Size: 3142
    Editor: Inanna
    Comment:
    Revision 23 as of 2012-10-25 22:37:40
    Size: 2477
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
     The Army objects can reference details about the armies marching to or from your cities.
    Line 3: Line 3:
    m_city.cityManager.selfArmies[0].missionType '''Incoming enemy armies can be referenced as: '''
    Line 5: Line 5:
    m_city.cityManager.selfArmies[0].king  . ''m_city.cityManager.enemyArmies[x].property '''or''' city.enemyArmies[x].property''
    Line 7: Line 7:
    m_city.cityManager.selfArmies[0].startFieldId '''Incoming friendly armies can be referenced as: '''
    Line 9: Line 9:
    m_city.cityManager.selfArmies[0].targetPosName  . ''m_city.cityManager.friendlyArmies[x].property '''or''' city.friendlyArmies[x].property''
    Line 11: Line 11:
    m_city.cityManager.selfArmies[0].direction '''Your own armies can be referenced as: '''
    Line 13: Line 13:
    m_city.cityManager.selfArmies[0].restTime  . ''m_city.cityManager.selfArmies[x].property '''or''' city.selfArmies[x].property''
    Line 15: Line 15:
    m_city.cityManager.selfArmies[0].startTime The '''[x] '''will signify which army it is - starting with 0 being the first one. If you had 5 marching farm crews for example, you would reference these with ''city.selfArmies[0].property'' through ''city.selfArmies[5].property''.
    Line 17: Line 17:
    m_city.cityManager.selfArmies[0].startPosName 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 lord name of the person that the third incoming attack wave belongs to with ''city.enemyArmies[2].king ''
    Line 19: Line 19:
    m_city.cityManager.selfArmies[0].heroLevel Some properties can have further details, for example resource and troop. Click the links in the table below to get the extra types of properties these can have. As an example, to see how much food your first returning npc farming crew is carrying, you could use ''city.selfArmies[0].resource.food''. Another example of troops, you can check how many scouts are in the second incoming reinforcement from your alliance mate by using'' city.friendlyArmies[1].troop.scouter.''
    Line 21: Line 21:
    m_city.cityManager.selfArmies[0].reachTime '''Properties'''
    ||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' ||
    ||alliance ||String ||Alliance of the player who sent the army ||
    ||armyId ||int ||army ID ||
    ||[[ArmyDirection|direction]] ||int || ||
    ||hero ||String ||Hero name ||
    ||heroLevel || || ||
    ||king ||String ||Lord name of the player who sent the army ||
    ||[[MIssionType|missionType]] ||int ||Type of each wave being sent from the rally point: 1 - transport, 2 - reinforce, 3 - scout, 4 - build city, 5 - attack ||
    ||reachTime || || ||
    ||[[ResourceBean|resource]] ||Object ||Object describing the army resources ||
    ||restTime || || ||
    ||startFieldId ||int ||FieldId of the army origination point ||
    ||startPosName || || ||
    ||startTime || || ||
    ||targetFieldId ||int ||FieldId of the army destination point ||
    ||targetPosName || || ||
    ||[[TroopStrBean|troop]] ||Object ||Object describing the army troops ||
    Line 23: Line 40:
    m_city.cityManager.selfArmies[0].hero
    Line 25: Line 41:
    m_city.cityManager.selfArmies[0].targetFieldId
    Line 27: Line 42:
    m_city.cityManager.selfArmies[0].alliance

    m_city.cityManager.selfArmies[0].troop.peasants

    m_city.cityManager.selfArmies[0].troop.militia

    m_city.cityManager.selfArmies[0].troop.scouter

    m_city.cityManager.selfArmies[0].troop.pikemen

    m_city.cityManager.selfArmies[0].troop.swordsmen

    m_city.cityManager.selfArmies[0].troop.archer

    m_city.cityManager.selfArmies[0].troop.lightCavalry

    m_city.cityManager.selfArmies[0].troop.heavyCavalry

    m_city.cityManager.selfArmies[0].troop.carriage

    m_city.cityManager.selfArmies[0].troop.ballista

    m_city.cityManager.selfArmies[0].troop.batteringRam

    m_city.cityManager.selfArmies[0].troop.catapult

    m_city.cityManager.selfArmies[0].resource.gold

    m_city.cityManager.selfArmies[0].resource.food

    m_city.cityManager.selfArmies[0].resource.wood

    m_city.cityManager.selfArmies[0].resource.iron

    m_city.cityManager.selfArmies[0].resource.stone

    m_city.cityManager.castle.goOutForBattle

    m_city.cityManager.friendlyArmies[0].missionType

    m_city.cityManager.friendlyArmies[0].king

    m_city.cityManager.friendlyArmies[0].startFieldId

    m_city.cityManager.friendlyArmies[0].targetPosName

    m_city.cityManager.friendlyArmies[0].direction

    m_city.cityManager.friendlyArmies[0].restTime

    m_city.cityManager.friendlyArmies[0].startTime

    m_city.cityManager.friendlyArmies[0].startPosName

    m_city.cityManager.friendlyArmies[0].heroLevel

    m_city.cityManager.friendlyArmies[0].reachTime

    m_city.cityManager.friendlyArmies[0].hero

    m_city.cityManager.friendlyArmies[0].targetFieldId

    m_city.cityManager.friendlyArmies[0].alliance

    m_city.cityManager.friendlyArmies[0].troop.peasants

    m_city.cityManager.friendlyArmies[0].troop.militia

    m_city.cityManager.friendlyArmies[0].troop.scouter

    m_city.cityManager.friendlyArmies[0].troop.pikemen

    m_city.cityManager.friendlyArmies[0].troop.swordsmen

    m_city.cityManager.friendlyArmies[0].troop.archer

    m_city.cityManager.friendlyArmies[0].troop.lightCavalry

    m_city.cityManager.friendlyArmies[0].troop.heavyCavalry

    m_city.cityManager.friendlyArmies[0].troop.carriage

    m_city.cityManager.friendlyArmies[0].troop.ballista

    m_city.cityManager.friendlyArmies[0].troop.batteringRam

    m_city.cityManager.friendlyArmies[0].troop.catapult

    m_city.cityManager.friendlyArmies[0].resource.gold

    m_city.cityManager.friendlyArmies[0].resource.food

    m_city.cityManager.friendlyArmies[0].resource.wood

    m_city.cityManager.friendlyArmies[0].resource.iron

    m_city.cityManager.friendlyArmies[0].resource.stone
    Line 126: Line 44:
    CategoryVariables ----
    ScriptObjects

    The Army objects can reference details about the armies marching to or from your cities.

    Incoming enemy armies can be referenced as:

    • m_city.cityManager.enemyArmies[x].property or city.enemyArmies[x].property

    Incoming friendly armies can be referenced as:

    • m_city.cityManager.friendlyArmies[x].property or city.friendlyArmies[x].property

    Your own armies can be referenced as:

    • m_city.cityManager.selfArmies[x].property or city.selfArmies[x].property

    The [x] will signify which army it is - starting with 0 being the first one. If you had 5 marching farm crews for example, you would reference these with city.selfArmies[0].property through city.selfArmies[5].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 lord name of the person that the third incoming attack wave belongs to with city.enemyArmies[2].king

    Some properties can have further details, for example resource and troop. Click the links in the table below to get the extra types of properties these can have. As an example, to see how much food your first returning npc farming crew is carrying, you could use city.selfArmies[0].resource.food. Another example of troops, you can check how many scouts are in the second incoming reinforcement from your alliance mate by using city.friendlyArmies[1].troop.scouter.

    Properties

    Property

    Type

    Description

    alliance

    String

    Alliance of the player who sent the army

    armyId

    int

    army ID

    direction

    int

    hero

    String

    Hero name

    heroLevel

    king

    String

    Lord name of the player who sent the army

    missionType

    int

    Type of each wave being sent from the rally point: 1 - transport, 2 - reinforce, 3 - scout, 4 - build city, 5 - attack

    reachTime

    resource

    Object

    Object describing the army resources

    restTime

    startFieldId

    int

    FieldId of the army origination point

    startPosName

    startTime

    targetFieldId

    int

    FieldId of the army destination point

    targetPosName

    troop

    Object

    Object describing the army troops



    ScriptObjects

    Army (last edited 2014-02-10 21:14:29 by Inanna)