Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.

SelectSubUnits

From AGEWiki

Revision as of 16:43, 12 March 2013 by Pocus (Talk | contribs)
Jump to: navigation, search

SelectSubUnits

Syntax  

SelectSubUnits = Region <RgnUID>;Area <AreaUID>;Families <Fam1> <Fam2> ...;
                 Models <Mdl1> <Mdl2> ... ;FactionTags <Tag1> <Tag2> ... ;
                 Domains <_domLand> <_domNav> <_domAir>;<Attributes>;
                 Generations <ModelGen1> <ModelGen2> ...;
                 <OnlyBesieged>; <OnlyBesieging>

Description

This command selects a unit or set of units as defined by one or more of the parameters in the above semi-colon delimited list. The exact filtering is determined by which of the parameters are included and the values listed for the specific parameters.

Note: Though the list above has been spread over several lines for better display, the full list needs to be on the same line when applied in the gamaefiles.

Alert: If you use a SelectSubUnits command that is selecting SU from another faction, then
       the faction selector will change. This means that you should add the for next line an explicit
       Selectfaction <your original faction> or weird things might ensue.
Note: To select the entire Map, simply do not use either Region or Area parameters.

Example  

SelectSubUnits = SelectSubUnits = Area $OMB_WestIndies;Models $mdl_CSA_Mer;OnlyNotFixed

will trigger if an unfixed unit containing the model $mdl_CSA_Mer exists in the $OMB_WestIndies Area


See Spreadsheet Examples

Example of Generations in VGN:

1. Declare some model generations obsolete, using ObsoleteModelGen,
example:
ObsoleteModelGen = *RIFLE1* *RIFLE2* *GUN2* 

This registers these generations as obsolete for the faction. Reminder: the generation
is a field in the model database, by convention it is better to add asterisks, this
will remove some potential problems (I can explain the details for people interested).

2. Select some models on the map, with SelectSubUnits, doing a selection by generation
with Generations <Gen1> <Gen2>
example:
SelectSubUnits = Generations *RIFLE1*
As nothing else is specified, the whole map is considered.

3. Apply an effect to the selection, here this will be Convert TechUpg (literally),
so the command looks like:
AlterCuSubUnit = ApplyToList|Convert TechUpg

Meaning for all the list, force a techupg of each model. The model to be upgraded
with is specified in the models DB, for each model, in their TechUpg field. Note
by the way that we can even TechUpg non obsolete models here, but as our initial
selection was on generations we declared obsolete, we are consistent.


 

Parameters

Region <RgnUID>

The region

Area <AreaUID>

The area (a predefined collection of regions)

Families <Fam1> <Fam2> ...

A list of families (model types)

Models <Mdl1> <Mdl2> ...

A list of Models you wish to select

FactionTags <Tag1> <Tag2> ...

The faction or factions to which you wish to limit the selection

Domains <_domLand> <_domNav> <_domAir> ...

The domain (broad class of models, units or groups)

Attributes

Any or all of the attributes will filter the selection list: OnlyFixed, OnlyNotFixed, Enemy, FriendOnly, FriendAndSelf, UniqueName <Name>, OnlyPermFixed, OnlyNPermFixed

Generations <ModelGen1> <ModelGen2> ...

Technology Generations (Advanced R&D only)

<OnlyGHQCommand>/<OnlyHQCommand>;

Select only elements which are leaders in command of an army/corps (ACW) (GHQ/HQ command internally)

 Note: Available only in Game Engines dates 130313 or later.
<OnlyBesieging>/<OnlyBesieged>

Select only elements that are Besieging/Besieged a structure

 Note: Available only in Game Engines dates 121120 or later.
Forums