Lua in SpringRTS/Common identifiers
Appearance
Common identifiers
[edit | edit source]Here is a list of common identifiers(names) that are being used through out the game. These are rather conventions and should be treated as such. That means that you can replace these names with your own names but to keep things standardized it's a good idea to follow the conventions that others have previously used.
Here is a list of the identifiers commonly used:
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 |