Lua in SpringRTS/Common identifiers

      Common identifiers

      Here is a list of common identifiers(names) that are used through out the game development. These are conventional names. That means that you can replace them with your own names but to keep things standardized it's a good idea to follow the conventions.


      Here is a list of the common identifiers highly used in the game developing:

      Name Type Description
      enemyUnitID integer The unitID of an enemy unit.
      allyTeamID The teamID of an ally. All allies have the same allyTeamID
      attackerID integer Is just the unitID of a unit that is attacking some other unit.
      unitDefID integer Each type of unit has the same DefID. For example all Krogoths from the same team have the same unitDefID but different unitID.
      unitID integer Each unit in the game has a unique ID. No unit in the game can have the same unitID with an other unit.
      teamID integer Each team in the game has a unique ID. Players with the same team ID share their units.
      groupID integer
      featureID integer Each feauture in the game has a unique ID
      weaponID integer Each weapon in the game has a unique ID. No weapon in the game can have the same weaponID with an other weapon.
      defName string
      resourceName string Identifier for the resource: metal or energy
      resourceAmount integer Holds the amount of metal or energy
      damageAmount integer Holds the amount of damage
      los number Line of sight
      x integer Map coordinates on the x-axis
      y integer Map coordinates on the y-axis
      button Mousebutton
      key Keymap (Keystroke)
      sx integer Relative value on the x-axis of the minimap. "s" stands for "scaled"
      sy integer Relative value on the y-axis of the minimap. "s" stands for "scaled"
      vsx integer Screen coordinates
      vsy integer Screen coordinates
      impulse_x
      impulse_y
      pingSize number
      height A value for y. Usually used when retrieving or changing an y value.
      funcID ID of a function
      funcName string Name of a function
      tooltip string
      Last modified on 20 March 2011, at 10:32