< Lua in SpringRTS

Common identifiers

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:

NameTypeDescription
enemyUnitIDintegerThe unitID of an enemy unit.
allyTeamIDThe teamID of an ally. All allies have the same allyTeamID
attackerIDintegerIs just the unitID of a unit that is attacking some other unit.
unitDefIDintegerEach type of unit has the same DefID. For example all Krogoths from the same team have the same unitDefID but different unitID.
unitIDintegerEach unit in the game has a unique ID. No unit in the game can have the same unitID with an other unit.
teamIDintegerEach team in the game has a unique ID. Players with the same team ID share their units.
groupIDinteger
featureIDintegerEach feauture in the game has a unique ID
weaponIDintegerEach weapon in the game has a unique ID. No weapon in the game can have the same weaponID with an other weapon.
defNamestring
resourceNamestringIdentifier for the resource: metal or energy
resourceAmountintegerHolds the amount of metal or energy
damageAmountintegerHolds the amount of damage
losnumberLine of sight
xintegerMap coordinates on the x-axis
yintegerMap coordinates on the y-axis
buttonMousebutton
keyKeymap (Keystroke)
sxintegerRelative value on the x-axis of the minimap. "s" stands for "scaled"
syintegerRelative value on the y-axis of the minimap. "s" stands for "scaled"
vsxintegerScreen coordinates
vsyintegerScreen coordinates
impulse_x
impulse_y
pingSizenumber
heightA value for y. Usually used when retrieving or changing an y value.
funcIDID of a function
funcNamestringName of a function
tooltipstring
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.