diff --git a/ScriptingManual.htm b/ScriptingManual.htm index 8bceab2c8..92159c108 100644 --- a/ScriptingManual.htm +++ b/ScriptingManual.htm @@ -160,8 +160,11 @@ Author: Pumpkin Studios. 1999
Author: $Author$Last -update: $Date$, $Revision: 1392 -$, WRP
+update: $Date: 2007-07-15 17:53:41 +0200 +(So, 15 Jul 2007) $, $Revision$, WRP@@ -482,8 +485,8 @@ inside an event.
{
--console("Hello world!");
+console("Hello +world!");
}
@@ -589,8 +592,8 @@ myEvent;{
--setEventTrigger(myEvent, inactive); //deactivate myEvent
+setEventTrigger(myEvent, +inactive); //deactivate myEvent
}
@@ -920,9 +923,8 @@ compare numeric expressions to give a boolean-
< -> Less than / Greater than
+< > +Less than / Greater than
<= >= :
{
--<code>
+<code>
}
@@ -1358,8 +1359,7 @@ macros (current max depth is 10).-
#define CURRENT_PLAYER_NAME -getPlayerName(CURRENT_PLAYER)
+#define CURRENT_PLAYER_NAME getPlayerName(CURRENT_PLAYER)
@@ -1439,7 +1439,8 @@ droid.weapon - the WEAPON of the droid DROIDID - (simple) literally just an ID of a droid
droid.selected -– holds TRUE if droid is currently selected
+– holds TRUE if droid is currently selectedFEATURE - (complex) defined by the ID got from the world editor. It is a
@@ -1519,6 +1520,13 @@ group.y - average y coord
group.members - number of units in the group
group.health - average %age health of the units
group.type – type of the group, one of: +GT_NORMAL, GT_COMMAND or GT_TRANSPORTER (refer to Script Function Constants)
+ +group.commander – commander of the group, if +type = GT_COMMAND or NULLOBJECT
+
NOTE: transporters and commanders can't be @@ -1589,15 +1597,15 @@ have an indeterminate effect.
WARNING setting the fog colour to BLACK(0, 0, 0) does not turn fog off and should be avoided.
-Arizona: NEW 204, 149, 70 Nick approved -24/09/98 (Old 176, -143, 95 B08F5F)
+Arizona: NEW 204, 149, +70 Nick approved 24/09/98 +(Old 176, 143, 95 B08F5F)
Urban: 201, 146, 15 C9920F
-Rockies: 182, 225, -236 B6E1EC
+Rockies: +182, 225, 236 B6E1EC
@@ -1709,8 +1717,7 @@ world coords
This functions checks for when a player has seen a given object - either by unit or structure
-OBJECT is any type of DROID, FEATURE, -STRUCTURE
+OBJECT is any type of DROID, FEATURE, STRUCTURE
PLAYER is the id of the player to check for having seen
@@ -1903,8 +1910,7 @@ be used in e.g. destroyFeature.This function centres the view on the object supplied
-OBJECT is any type of DROID, FEATURE, -STRUCTURE
+OBJECT is any type of DROID, FEATURE, STRUCTURE
@@ -1914,8 +1920,7 @@ X, Y )
Builds a structure belonging to PLAYER centred at (X, Y).
-The structure must be previously enabled via -enableStructure().
+The structure must be previously enabled via enableStructure().
The structure identifier is returned - this can be used in e.g. destroyStructure.
@@ -2332,7 +2337,8 @@ for a player (1-100)Starts a mission for the currently selected player - NB Transporters must be filled if
-you want units to appear on the Mission map
+you want units to appear on the Mission map
MISSION_TYPE is a predefined type - see Script Function Constants
@@ -2379,8 +2385,8 @@ for 'player' in multiplayer games.-
STRUCTURE -structureBuiltInRange(STRUCTURESTAT, X, Y, RANGE, PLAYER)
+STRUCTURE structureBuiltInRange(STRUCTURESTAT, +X, Y, RANGE, PLAYER)
Checks to see if a Structure has been built within a specified range of x, y. The first structure
@@ -2945,7 +2951,8 @@ coordinates of the midpoint of the nearest gateway.void setWaterTile(int tileNum)
Sets the tile to use for underwater. Count -from the top of the tileset pcx - presently 17 for arizona.
+from the top of the tileset pcx - presently 17 for arizona.@@ -2968,6 +2975,14 @@ droid)
adds the unit droid to the command group of the command unit commander
++ +
cmdDroidMaxGroup(DROID +commander)
+ +Returns max number of droids ‘commander’ can +have in his group.
+
bool testStructureModule(int @@ -2982,8 +2997,8 @@ true if the structure has _any_ number of modules attached.
If the structure pointer that's sent in is NULL (ie - no structure is specified), then it'll return
-TRUE is _any_ of the player's structures -possess _any_ module. In all other cases, it'll return FALSE.
+TRUE is _any_ of the player's structures possess +_any_ module. In all other cases, it'll return FALSE.
@@ -3022,16 +3037,15 @@ variables. Can be used to find if the reticule is up or the
-
e.g. -getGameStatus(STATUS_ReticuleIsOpen); will return TRUE if the reticule is open -(on screen) or FALSE if the reticule is not (disabled)
+e.g. getGameStatus(STATUS_ReticuleIsOpen); +will return TRUE if the reticule is open (on screen) or FALSE if the reticule +is not (disabled)
or
- -getGameStatus(STATUS_BattleMapViewEnabled); will return -TRUE if we are in the battle map mode
+ getGameStatus(STATUS_BattleMapViewEnabled); +will return TRUE if we are in the battle map modeor
@@ -3104,8 +3118,8 @@ take over-
STRUCTURE -takeOverSingleStructure(STRUCTURE structToTakeOver, int playerToGain)
+STRUCTURE takeOverSingleStructure(STRUCTURE +structToTakeOver, int playerToGain)
this replaces the existing structure (structToTakeOver) by a new one for the playerToGain.
@@ -3227,8 +3241,8 @@ object targetvoid fireWeaponAtLoc(WEAPON weap, int x, int y)
-fire a single shot of the weapon weap at the -location x,y
+fire a single shot of the weapon weap at the location +x,y
@@ -3257,8 +3271,8 @@ for the specified player
setDroidKills(DROID droid, int kills)
-sets the number of kills for a unit. -currently the level boudaries are:
+sets the number of kills for a unit. currently +the level boudaries are:
4, 8, 16, 32, 64, 128, 256, 128
@@ -3364,8 +3378,7 @@ skGetFactoryCapacity( STRUCTURE str)void skDifficultyModifier( int pl)
-Apply the frontend slider settings to player -pl.
+Apply the frontend slider settings to player pl.
@@ -3375,8 +3388,9 @@ int x , ref int y , STRUCTURESTAT defenceStat,
STRUCTURESTAT wallstat, DROID unit, int player)
-Given a starting x and y, make unit ‘unit’ belonging -to ‘player’ build either a ‘defenceStat’ or a row of ‘wallStat’s. returns
+Given a starting x and y, make unit ‘unit’ +belonging to ‘player’ build either a ‘defenceStat’ or a row of ‘wallStat’s. returns +
Modified x and y’s.
@@ -3402,8 +3416,8 @@ forPlayer, int, fromPlayer,int x, int y, int z)
-Put a flashing beacon on the map for player
-‘forPlayer’ on position x/y. Unless removed manually the beacon is removed automatically
+ Put a flashing beacon on the map for player ‘forPlayer’
+on position x/y. Unless removed manually the beacon is removed automatically
from the map after a timeout.
-
bool fogTileInRange(ref int tileX, ref -int tileY, int x, int y,
+bool fogTileInRange(ref int tileX, ref int +tileY, int x, int y,
int rangeX, int rangeY, int searchRange, int player, int threatRange)
@@ -3454,8 +3468,8 @@ search conditions were found, returns FALSE otherwise. int range, int player)Returns TRUE if there are no unrevealed tiles -left in locations for player ‘player’ with center x/y and radius ‘range’. All -coordinates are in world units.
+left in locations for player ‘player’ with center x/y and radius ‘range’. All coordinates +are in world units.@@ -3513,9 +3527,8 @@ numEnemyWeapDroidsInRange(int lookingPlayer, int x, int y,
int range, bool includeVTOLs)
-int -numEnemyWeapStructsInRange(int lookingPlayer, int x, int y, int - range)
+int numEnemyWeapStructsInRange(int +lookingPlayer, int x, int y, int range)
int numEnemyWeapObjInRange(int lookingPlayer, int x, int y,
@@ -3535,8 +3548,8 @@ are ignored.int numFriendlyWeapDroidsInRange(int lookingPlayer, int x, int y,
-int -range, bool includeVTOLs)
+int range, +bool includeVTOLs)
int numFriendlyWeapStructsInRange(int lookingPlayer, int x, int y, int range)
@@ -3574,9 +3587,9 @@ targetPlayer, int lookingPlayer,int x, int y, int range, bool includeVTOLs)
-Returns total number of targetPlayer’s military -objects (either structures, droids or both) at location x/y and within ‘range’ -that are visible visible by ‘lookingPlayer’.
+Returns total number of targetPlayer’s +military objects (either structures, droids or both) at location x/y and within +‘range’ that are visible visible by ‘lookingPlayer’.
If ‘includeVTOLs’ is set to FALSE, then VTOLs are ignored.
@@ -3590,8 +3603,8 @@ lookingPlayer, int, x, int y, int range, bool includeVTOLs) (structures and units) at location x/y within range ‘range’ that are visible to ‘lookingPlayer’. -If ‘includeVTOLs’ is set to FALSE, then VTOLs -are ignored.
+If ‘includeVTOLs’ is set to FALSE, then VTOLs are +ignored.
@@ -3727,8 +3740,8 @@ debug output for player string assertMessage, int player)
If ‘assertExpression’ evaluates to FALSE, then -‘assertMessage’ is output to the game console. Must turn on debug output for -’player‘ with dbgMsgOn() first.
+‘assertMessage’ is output to the game console. Must turn on debug output for ’player‘ +with dbgMsgOn() first.NOTE: in debug game builds failed assertation will cause game assertation.
@@ -3760,8 +3773,8 @@ that are constant throughout the game.
-NULLOBJECT - used -to check that a BASEOBJECT/FEATURE/STRUCTURE has +NULLOBJECT - used to +check that a BASEOBJECT/FEATURE/STRUCTURE has been assigned by a function
@@ -3815,8 +3828,8 @@ INTELMAP-
- When flashing an icon - with -scrFlashOn() scrFlashOff()
+- When flashing an icon - with scrFlashOn() +scrFlashOff()
you can additional use
@@ -3852,8 +3865,8 @@ IDDES_TEMPLSTARTIDDES_SYSTEMBUTTON
-IDDES_BODYBUTTON -
++IDDES_BODYBUTTON
IDDES_PROPBUTTON
@@ -3873,8 +3886,7 @@ CAMP_MSGMISS_MSG
--PROX_MSG
+PROX_MSG
@@ -3926,8 +3938,8 @@ to load up an off world map, but having no access to home base
-LZ_COMPROMISED_TIME - value to set the reinforcement -time with to display '--:--'
+LZ_COMPROMISED_TIME - value to set the +reinforcement time with to display '--:--'
@@ -4145,53 +4157,55 @@ lang=EN-GB> &nb
DROID_WEAPON
- - Weapon unit
DROID_SENSOR - - Sensor unit
+ - Sensor unitDROID_ECM - - ECM unit
+ - ECM unitDROID_CONSTRUCT - - Constructor unit
+ - +Constructor unitDROID_PERSON - - person
+ - personDROID_CYBORG - - cyborg/super cyborg
+ - cyborg/super cyborgDROID_TRANSPORTER - guess what this is!
+lang=EN-GB> - +guess what this is!DROID_COMMAND - -Command unit
+lang=EN-GB> + - Command unitDROID_REPAIR - - Repair Unit
+ - Repair UnitDROID_CYBORG_CONSTRUCT - Cyborg engineer
+lang=EN-GB> - Cyborg engineerDROID_CYBORG_REPAIR - Cyborg mechanic
+lang=EN-GB> - Cyborg mechanic@@ -4442,10 +4456,10 @@ MT_REPAIRDAM
MT_ENEMYSTR
-MT_TRANDROID
--MT_OWNDROID
+MT_TRANDROID + +MT_OWNDROID
MT_OWNDROIDDAM
@@ -4536,7 +4550,7 @@ lang=EN-GB>DT_WEAP_ALL &nb-
body types:
+Body types:
DT_LIGHT
@@ -4568,6 +4582,14 @@ lang=EN-GB>DT_SUPER_HEAVY &+
Group types:
+ +GT_NORMAL
+ +GT_COMMAND
+ +GT_TRANSPORTER
+
Script @@ -4576,8 +4598,8 @@ Function Externals
These represent variables that are defined in -the game which can be accessed in the scripts. It will only be possible to set -the value that is held for some of the variables.
+the game which can be accessed in the scripts. It will only be possible to set the +value that is held for some of the variables.@@ -4689,9 +4711,9 @@ Function Callbacks
These are used in the place of a trigger and -are for events that are to be called at specific times in the game. They will cause -the event they are associated with to be called every time unless the trigger -for the event is set to inactive.
+are for events that are to be called at specific times in the game. They will +cause the event they are associated with to be called every time unless the +trigger for the event is set to inactive.@@ -4729,8 +4751,8 @@ lang=EN-GB> - this is triggered when CTRL + 'B' is pressed so that the script can end a mission
CALL_VIDEO_QUIT - this is triggered when the CURRENT video sequence is over - either -end of anim or when 'ESC' has been pressed
+lang=EN-GB> - this is triggered when the CURRENT video sequence is over - +either end of anim or when 'ESC' has been pressedCALL_LAUNCH_TRANSPORTER - this is triggered when the 'Launch' button is pressed on the @@ -4805,8 +4827,8 @@ NULLOBJECT)
CALL_TRANSPORTER_OFFMAP, player
-triggered when a transporter for player exits the -map.
+triggered when a transporter for player exits +the map.
@@ -4860,8 +4882,8 @@ buttonID is pressed
-
CALL_OBJ_DESTROYED, int player, ref BASEOBJ -object
+CALL_OBJ_DESTROYED, int player, ref +BASEOBJ object
triggered when either a unit or a structure for player is destroyed
@@ -4883,8 +4905,7 @@ destroyed-
CALL_FEATURE_DESTROYED, ref FEATURE -feature
+CALL_FEATURE_DESTROYED, ref FEATURE feature
triggered when either a unit or a structure for player is destroyed
diff --git a/src/scriptai.c b/src/scriptai.c index 68c884e90..7dc2edfe9 100644 --- a/src/scriptai.c +++ b/src/scriptai.c @@ -716,6 +716,28 @@ BOOL scrCmdDroidAddDroid(void) return TRUE; } +// returns max number of droids in a commander group +BOOL scrCmdDroidMaxGroup(void) +{ + DROID *psCommander; + + if (!stackPopParams(1, ST_DROID, &psCommander)) + { + return FALSE; + } + + ASSERT(psCommander != NULL, + "scrCmdDroidMaxGroup: NULL pointer passed"); + + scrFunctionResult.v.ival = cmdDroidMaxGroup(psCommander); + if (!stackPushResult(VAL_INT, &scrFunctionResult)) + { + return FALSE; + } + + return TRUE; +} + // store the prefered and ignore targets for the target functions UDWORD scrStructPref, scrStructIgnore; UDWORD scrDroidPref, scrDroidIgnore; @@ -1429,12 +1451,32 @@ BOOL scrSkCanBuildTemplate(void) goto failTempl; } break; - + case DROID_CYBORG_REPAIR: + if( apCompLists[player][COMP_REPAIRUNIT][psTempl->asParts[COMP_REPAIRUNIT]] != AVAILABLE ) + { + goto failTempl; + } + break; case DROID_COMMAND: - case DROID_CONSTRUCT: // Constructor droid + if( apCompLists[player][COMP_BRAIN][psTempl->asParts[COMP_BRAIN]] != AVAILABLE ) + { + goto failTempl; + } + break; + case DROID_CONSTRUCT: + if( apCompLists[player][COMP_CONSTRUCT][psTempl->asParts[COMP_CONSTRUCT]] != AVAILABLE ) + { + goto failTempl; + } + break; + case DROID_CYBORG_CONSTRUCT: + if( apCompLists[player][COMP_CONSTRUCT][psTempl->asParts[COMP_CONSTRUCT]] != AVAILABLE ) + { + goto failTempl; + } + break; + case DROID_PERSON: // person - case DROID_CYBORG_CONSTRUCT: // cyborg-construct thang - case DROID_CYBORG_REPAIR: // cyborg-repair thang case DROID_TRANSPORTER: // guess what this is! case DROID_DEFAULT: // Default droid case DROID_ANY: diff --git a/src/scriptai.h b/src/scriptai.h index 8a078b896..82f3fd90c 100644 --- a/src/scriptai.h +++ b/src/scriptai.h @@ -89,6 +89,9 @@ extern BOOL scrIterateCluster(void); // add a droid to a commander extern BOOL scrCmdDroidAddDroid(void); +// returns max number of droids in a commander group +extern BOOL scrCmdDroidMaxGroup(void); + // types for structure targets typedef enum _scr_struct_tar diff --git a/src/scriptfuncs.c b/src/scriptfuncs.c index 2de872d78..4894763bc 100644 --- a/src/scriptfuncs.c +++ b/src/scriptfuncs.c @@ -7104,6 +7104,12 @@ BOOL scrNumDroidsByComponent(void) break; } break; + case ST_BRAIN: + if (psDroid->asBits[ST_BRAIN].nStat == comp) + { + numFound++; + } + break; default: debug(LOG_ERROR, "scrNumDroidsByComponent(): unknown component type"); ASSERT( FALSE, "scrNumDroidsByComponent: unknown component type" ); @@ -8269,28 +8275,28 @@ BOOL scrNumStructsByStatInRange(void) if (player >= MAX_PLAYERS) { - ASSERT( FALSE, "scrStructureBuiltInRange:player number is too high" ); + ASSERT( FALSE, "scrNumStructsByStatInRange:player number is too high" ); return FALSE; } if (x < (SDWORD)0 || (x >> TILE_SHIFT) > (SDWORD)mapWidth) { - ASSERT( FALSE, "scrStructureBuiltInRange : invalid X coord" ); + ASSERT( FALSE, "scrNumStructsByStatInRange : invalid X coord" ); return FALSE; } if (y < (SDWORD)0 || (y >> TILE_SHIFT) > (SDWORD)mapHeight) { - ASSERT( FALSE,"scrStructureBuiltInRange : invalid Y coord" ); + ASSERT( FALSE,"scrNumStructsByStatInRange : invalid Y coord" ); return FALSE; } if (index < (SDWORD)0 || index > (SDWORD)numStructureStats) { - ASSERT( FALSE, "scrStructureBuiltInRange : Invalid structure stat" ); + ASSERT( FALSE, "scrNumStructsByStatInRange : Invalid structure stat" ); return FALSE; } if (range < (SDWORD)0) { - ASSERT( FALSE, "scrStructureBuiltInRange : Rnage is less than zero" ); + ASSERT( FALSE, "scrNumStructsByStatInRange : Rnage is less than zero" ); return FALSE; } @@ -11180,7 +11186,7 @@ BOOL scrCalcDroidPower(void) "scrDebugModeEnabled: can't calculate cost of a null-droid"); scrFunctionResult.v.ival = (SDWORD)calcDroidPower(psDroid); - if (!stackPushResult(VAL_BOOL, &scrFunctionResult)) + if (!stackPushResult(VAL_INT, &scrFunctionResult)) { debug(LOG_ERROR, "scrDebugModeEnabled(): failed to push result"); return FALSE; diff --git a/src/scriptobj.c b/src/scriptobj.c index eef280584..b86e5e504 100644 --- a/src/scriptobj.c +++ b/src/scriptobj.c @@ -303,7 +303,16 @@ BOOL scrBaseObjGet(UDWORD index) } break; + case OBJID_GROUP: + if (psObj->type != OBJ_DROID) + { + debug(LOG_ERROR, "scrBaseObjGet: group only valid for a droid"); + return FALSE; + } + type = (INTERP_TYPE)ST_GROUP; + scrFunctionResult.v.oval = ((DROID *)psObj)->psGroup; + break; default: debug(LOG_ERROR, "scrBaseObjGet: unknown variable index"); return FALSE; @@ -502,6 +511,14 @@ BOOL scrGroupObjGet(UDWORD index) type = VAL_INT; scrFunctionResult.v.ival = lgHealth; break; + case GROUPID_TYPE: + type = VAL_INT; + scrFunctionResult.v.ival = psGroup->type; + break; + case GROUPID_CMD: + type = ST_DROID; + scrFunctionResult.v.oval = psGroup->psCommander; + break; default: ASSERT( FALSE, "scrGroupObjGet: unknown variable index" ); return FALSE; diff --git a/src/scriptobj.h b/src/scriptobj.h index 0222ce1bd..b5810ce06 100644 --- a/src/scriptobj.h +++ b/src/scriptobj.h @@ -48,8 +48,9 @@ enum _objids OBJID_ORDERX, // order coords.106 OBJID_ORDERY, OBJID_ACTION, - OBJID_SELECTED, //if droid is selected (humans only) - OBJID_TARGET, //added object->psTarget + OBJID_SELECTED, // if droid is selected (humans only) + OBJID_TARGET, // added object->psTarget + OBJID_GROUP, // group a droid belongs to }; // id's for group variables @@ -59,6 +60,8 @@ enum _groupids GROUPID_POSY, // average y of a group GROUPID_MEMBERS, // number of units in a group GROUPID_HEALTH, // average health of a group + GROUPID_TYPE, // group type, one of: GT_NORMAL, GT_COMMAND or GT_TRANSPORTER + GROUPID_CMD, // commander of the group if group type == GT_COMMAND }; // Get values from a base object diff --git a/src/scripttabs.c b/src/scripttabs.c index df23d1ab0..deb656a36 100644 --- a/src/scripttabs.c +++ b/src/scripttabs.c @@ -357,6 +357,10 @@ FUNC_SYMBOL asFuncTable[] = 2, { (INTERP_TYPE)ST_STRUCTURESTAT, VAL_INT }, 0, 0, NULL, 0, 0, NULL, NULL }, + { "getStructureVis", scrGetStructureVis, (INTERP_TYPE)ST_STRUCTURE, + 3, { (INTERP_TYPE)ST_STRUCTURESTAT, VAL_INT, VAL_INT }, + 0, 0, NULL, 0, 0, NULL, NULL }, + { "getTemplate", scrGetTemplate, (INTERP_TYPE)ST_TEMPLATE, 2, { (INTERP_TYPE)ST_COMPONENT, VAL_INT }, 0, 0, NULL, 0, 0, NULL, NULL }, @@ -690,13 +694,20 @@ FUNC_SYMBOL asFuncTable[] = { "initIterateCluster", scrInitIterateCluster, VAL_VOID, 1, { VAL_INT }, 0, 0, NULL, 0, 0, NULL, NULL }, + { "iterateCluster", scrIterateCluster, (INTERP_TYPE)ST_BASEOBJECT, 0, { VAL_VOID }, 0, 0, NULL, 0, 0, NULL, NULL }, + + //Commander functions { "cmdDroidAddDroid", scrCmdDroidAddDroid, VAL_VOID, 2, { (INTERP_TYPE)ST_DROID, (INTERP_TYPE)ST_DROID }, 0, 0, NULL, 0, 0, NULL, NULL }, + { "cmdDroidMaxGroup", scrCmdDroidMaxGroup, VAL_INT, + 1, { (INTERP_TYPE)ST_DROID}, + 0, 0, NULL, 0, 0, NULL, NULL }, + // a couple of example functions { "numMessageBox", scrNumMB, VAL_VOID, 1, { VAL_INT }, @@ -1164,10 +1175,6 @@ FUNC_SYMBOL asFuncTable[] = 5, { VAL_INT , VAL_INT, VAL_INT, VAL_INT, VAL_INT }, 0, 0, NULL, 0, 0, NULL, NULL }, - { "getStructureVis", scrGetStructureVis, (INTERP_TYPE)ST_STRUCTURE, - 3, { (INTERP_TYPE)ST_STRUCTURESTAT, VAL_INT, VAL_INT }, - 0, 0, NULL, 0, 0, NULL, NULL }, - { "chooseValidLoc", scrChooseValidLoc, VAL_BOOL, 6, { VAL_REF|VAL_INT, VAL_REF|VAL_INT, VAL_INT, VAL_INT, VAL_INT, VAL_INT }, 0, 0, NULL, 0, 0, NULL, NULL }, @@ -1502,6 +1509,8 @@ VAR_SYMBOL asObjTable[] = (INTERP_TYPE)ST_DROID, OBJID_ORDERX, scrBaseObjGet, NULL, 0, {0}, NULL }, { "ordery", VAL_INT, ST_OBJECT, (INTERP_TYPE)ST_DROID, OBJID_ORDERY, scrBaseObjGet, NULL, 0, {0}, NULL }, + { "group", (INTERP_TYPE)ST_GROUP, ST_OBJECT, + (INTERP_TYPE)ST_DROID, OBJID_GROUP, scrBaseObjGet, NULL, 0, {0}, NULL }, // structure variables //{ "stat", (INTERP_TYPE)ST_STRUCTURESTAT, ST_OBJECT, (INTERP_TYPE)ST_STRUCTURE, OBJID_STRUCTSTAT, @@ -1517,6 +1526,10 @@ VAR_SYMBOL asObjTable[] = (INTERP_TYPE)ST_GROUP, GROUPID_MEMBERS,scrGroupObjGet, NULL, 0, {0}, NULL }, { "health", VAL_INT, ST_OBJECT, (INTERP_TYPE)ST_GROUP, GROUPID_HEALTH, scrGroupObjGet, NULL, 0, {0}, NULL }, + { "type", VAL_INT, ST_OBJECT, + (INTERP_TYPE)ST_GROUP, GROUPID_TYPE, scrGroupObjGet, NULL, 0, {0}, NULL }, + { "commander", (INTERP_TYPE)ST_DROID, ST_OBJECT, + (INTERP_TYPE)ST_GROUP, GROUPID_CMD, scrGroupObjGet, NULL, 0, {0}, NULL }, /* new member variables */ //similiar to .order @@ -1684,6 +1697,7 @@ CONST_SYMBOL asConstantTable[] = { "DORDER_DISEMBARK", VAL_INT, FALSE, DORDER_DISEMBARK, NULL, NULL, 0.0f }, { "DORDER_SCOUT", VAL_INT, FALSE, DORDER_SCOUT, NULL, NULL, 0.0f }, { "DORDER_DROIDREPAIR", VAL_INT, FALSE, DORDER_DROIDREPAIR, NULL, NULL, 0.0f }, + { "DORDER_GUARD", VAL_INT, FALSE, DORDER_GUARD, NULL, NULL, 0.0f }, //new member varialbe - constants for .action @@ -1893,6 +1907,11 @@ CONST_SYMBOL asConstantTable[] = { "ALLIANCES", VAL_INT, FALSE, ALLIANCES, NULL, NULL, 0.0f }, { "ALLIANCES_TEAMS",VAL_INT, FALSE, ALLIANCES_TEAMS, NULL, NULL, 0.0f }, + //Group types + { "GT_NORMAL", VAL_INT, FALSE, GT_NORMAL, NULL, NULL, 0.0f }, + { "GT_COMMAND", VAL_INT, FALSE, GT_COMMAND, NULL, NULL, 0.0f }, + { "GT_TRANSPORTER", VAL_INT, FALSE, GT_TRANSPORTER, NULL, NULL, 0.0f }, + /* some key constants */ { "KEY_LCTRL", VAL_INT, FALSE, KEY_LCTRL, NULL, NULL, 0.0f }, { "KEY_RCTRL", VAL_INT, FALSE, KEY_RCTRL, NULL, NULL, 0.0f }, @@ -2110,6 +2129,7 @@ TYPE_EQUIV asEquivTable[] = { (INTERP_TYPE)ST_STRUCTURE, 1, { (INTERP_TYPE)ST_POINTER_O, } }, { (INTERP_TYPE)ST_FEATURE, 1, { (INTERP_TYPE)ST_POINTER_O, } }, { (INTERP_TYPE)ST_BASEOBJECT, 1, { (INTERP_TYPE)ST_POINTER_O, } }, + { (INTERP_TYPE)ST_GROUP, 1, { (INTERP_TYPE)ST_POINTER_O, } }, { (INTERP_TYPE)ST_TEMPLATE, 1, { (INTERP_TYPE)ST_POINTER_T, } }, { (INTERP_TYPE)ST_BODY, 1, { (INTERP_TYPE)ST_POINTER_S, } }, { (INTERP_TYPE)ST_PROPULSION, 1, { (INTERP_TYPE)ST_POINTER_S, } },