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

EvalRgnStruc

From AGEWiki

Jump to: navigation, search

EvalRgnStruc

Syntax  

EvalRgnStruc = RegionUID_or_-1; <FactionValue>; StructureSearchType  <Value> [;NOT]

Description

Searches in a region for the presence of a structure (or absence if [NOT] parameter is applied)

Example  

EvalRgnStruc = $Oriskany; FACALL; STRUCTDEF $Fort; NOT

Return "TRUE" if there is no Fort owned by any Faction Region Oriskany

See Spreadsheet example for syntax used in the Database
See also ChangeStrucType and RemoveStructure


Note: In a single region, there can only be one Structure of each Kind (see param3).
      Additionally, all IsExclusive structures [as defined by parameter in
          Structures DB] must be of same faction.


 

Parameters

RegionUID

A valid Region Alias except if -1: current region selected will be used instead.

<FactionValue>

Must be FACALL or a FactionTag

StructureSearchType <Value>

Must be either STRUCANY, STRUCDEF, STRUCKIND, STRUCSUB, STRUCFAM, STRUCATR.

STRUCANY: Any structure.
STRUCDEF: You search for a particular structure type, Value is the UID of this type. See the Structures directory for the Alias or UID of each structure.
STRUCSUB: Structure subkind corresponds.
STRUCFAM: Structure family corresponds.
STRUCATR: Structure attribute corresponds. (EvalRgnStruc = $Paris;FACALL;STRUCATR $attIsSewer)
STRUCKIND: You search for a particular structure kind, Value is the alias of the kind. Valid aliases are:
$stuAny =-1
$stuHarbor = 0
$stuFort = 1
$stuCity = 2
$stuDepot = 3
$stuProdSite = 4
$stuVarious = 5
[NOT]

Optional parameter. Searches for the absence of the defined structure type

Forums