Recent changes RSS feed

 

SCAR-type

In SCAR there are some additional data-types compared to LUA which are somewhat important for the functions listed in the reference. Besides those 'official' SCAR-types, there are some others which are sometimes used: PlayerID, EntityID, SquadID, MarkerID are-there-any-more?

Here's a list of the 'official' SCAR-types:

Type what we're calling it in the reference
ST_NIL NIL
ST_BOOLEAN Boolean
ST_NUMBER Real
ST_STRING String
ST_TABLE
ST_FUNCTION
ST_SCARPOS Position
ST_EGROUP EGroup
ST_ENTITY Entity
ST_SGROUP SGroup
ST_SQUAD Squad
ST_PLAYER Player
ST_CONSTPLAYER
ST_MARKER Marker
ST_PBG Property Bag Group / PBG
ST_AIPLAYER
ST_AISQUAD
ST_AICAPTUREPOINT
ST_AISTATSMILITARYPOINT
ST_LOCSTRING LocString
ST_UNKNOWN

ST_NIL

ST_NIL is Void (or NIL in LUA).

ST_BOOLEAN

ST_BOOLEAN can either be true (1) or false (0).

ST_NUMBER

ST_NUMBER is a Real-value with up to 15 (?) decimals. FIXME

ST_STRING

ST_STRING is a Char* (or String in LUA). A string consists of one or more character. Valid ways of defining a string:

     a = 'alo\n123"'
     a = "alo\n123\""
     a = '\97lo\10\04923"'
     a = [[alo
     123"]]
     a = [==[
     alo
     123"]==]

ST_TABLE

ST_TABLE is equal to a Table in LUA.

ST_FUNCTION

ST_FUNCTION is a pointer onto the function.

ST_SCARPOS

ST_SCARPOS is a Table with three entries:

position.x = X_coordinate
position.y = Y_coordinate
position.z = z_coordinate

X, Y and Z are all Real values.

ST_EGROUP

ST_EGROUP is a Table with one entry:

egroup.id = ID_of_egroup

ID is an Integer.

ST_ENTITY

ST_ENTITY is a Table with one entry:

entity.id = ID_of_entity

ID is an Integer.

ST_SGROUP

ST_SGROUP is a Table with one entry:

sgroup.id = ID_of_sgroup

ID is an Integer.

ST_SQUAD

ST_SQUAD is a Table with one entry:

squad.id = ID_of_squad

ID is an Integer.

ST_PLAYER

ST_PLAYER is a Table with one entry:

player.1 = USERDATA

USERDATA is a LUA-type that can't be modified using LUA. You can only access it through the C API.

ST_CONSTPLAYER

No information yet. FIXME

ST_MARKER

No information about ST_MARKER yet, but it probably is a Table containing the coordinates of the marker, the name of the marker and the marker-type.

ST_PBG

ST_PBG is a Table with one entry:

pbg.1 = USERDATA

USERDATA is a LUA-type that can't be modified using LUA. You can only access it through the C API.

ST_AIPLAYER

No information yet.

ST_AISQUAD

No information yet.

ST_AICAPTUREPOINT

No information yet.

ST_AISTATSMILITARYPOINT

No information yet.

ST_LOCSTRING

ST_LOCSTRING is an integer. You can find all IDs in the UCS-files.

ST_UNKNOWN

ST_UNKNOWN is an unkown data-type.

 
dow2/scar-type.txt · Last modified: 2009/05/28 12:26 by copernicus