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

AddGarrison

From AGEWiki

(Difference between revisions)
Jump to: navigation, search
(corrected param AreaUID for -1 all map)
m (formatting for clarity)
 
Line 19: Line 19:
  to half the maximum level possible for the game (Simple Mode only).
  to half the maximum level possible for the game (Simple Mode only).
-
In advanced mode, a structure qualifies if the ChancePerCheck roll is passed.
+
In advanced mode, a structure qualifies if the '''ChancePerCheck''' roll is passed.
See the article on [[The Auto-garrison feature|AutoGarrison]] for further details.
See the article on [[The Auto-garrison feature|AutoGarrison]] for further details.
Line 35: Line 35:
  '''Procedure to add the Garrison'''
  '''Procedure to add the Garrison'''
  If the garrison can appear, a % roll is made by multiplying the number of replacements in the
  If the garrison can appear, a % roll is made by multiplying the number of replacements in the
-
  pool (of the [[element family|family]] of the first [[element]] of the garrison [[unit]]) times ChancePerRPL.
+
  pool (of the [[element family|family]] of the first [[element]] of the garrison [[unit]]) times
-
  If the roll is ok, a new unit appears in the structure and one [[replacement]] is deducted from the
+
  ChancePerRPL. If the roll is ok, a new unit appears in the structure and one [[replacement]] is
-
pool. Note that garrisons units with several elements will be created with only one element, but
+
deducted from the pool. Note that garrisons units with several elements will be created with
-
will get others by the standard replacement rule, so in effect you can 'grow'  
+
only one element, but will get others by the standard replacement rule, so in effect you can
-
multi-elements units on several turns.  
+
'grow' multi-elements units on several turns.  
  '''Implementation ideas:'''
  '''Implementation ideas:'''
  a) at the most basic level, you will use one definition per nation: The area would be the map,
  a) at the most basic level, you will use one definition per nation: The area would be the map,
-
  strucKind at -1 and every structure to be garrisoned would get the same kind of garrison (a militia eg.)  
+
  strucKind at -1 and every structure to be garrisoned would get the same kind of garrison
 +
(a militia eg.)  
  b) more advanced, you specify several areas. For NCP Wurtemberg garrisons in WUR for example,
  b) more advanced, you specify several areas. For NCP Wurtemberg garrisons in WUR for example,
  or Kentucky Militia in KY, etc.
  or Kentucky Militia in KY, etc.
-
  c) The 'deluxe' scripting would be to change the garrison for the 3 structures. For example a conscript
+
  c) The 'deluxe' scripting would be to change the garrison for the 3 structures. For example a
-
  unit for cities, a single militia for depot and for forts, a unit made of 2 reserve line regiments and
+
  conscript unit for cities, a single militia for depot and for forts, a unit made of 2 reserve
-
one fort battery. That would be perfect!
+
line regiments and one fort battery. That would be perfect!
| param1 = AreaUID
| param1 = AreaUID
| param1desc = [[Area]] Alias or -1 for entire map.
| param1desc = [[Area]] Alias or -1 for entire map.
| param2 = StrucTypeUID
| param2 = StrucTypeUID
-
| param2desc = Simple Mode: Type/Kind of the structure: All = -1,  $Fort = 1 , $Depot = 2, $City = 3, etc. See [[Structure Type]]. In Advanced mode, this is the family, see [[Structure Family]].
+
| param2desc = ''Simple Mode:''
 +
:[[Structure Type]]:
 +
::All = -1,   
 +
::$Fort = 1 ,  
 +
::$Depot = 2,  
 +
::$City = 3, etc.
 +
''Advanced mode:''
 +
:this is the [[Structure Family]].
| param3 = UnitDefUID
| param3 = UnitDefUID
| param3desc = [[Aliases|Alias]] of unit to be the garrison
| param3desc = [[Aliases|Alias]] of unit to be the garrison
| param4 = ChancePerCheck
| param4 = ChancePerCheck
-
| param4desc = Simple Mode: Integer (1-100) Probability of appearing per replacement available in the pool of the defined garrison unit. Avanced Mode: Integer (1-100) Probability of appearing per level of the structure checked.
+
| param4desc = ''Simple Mode:''
 +
:Integer (1-100) Probability of appearing per replacement available in the pool of the defined garrison unit.  
 +
''Advanced Mode:''
 +
:Integer (1-100) Probability of appearing per level of the structure checked.
| param5 = Placeholder(n)
| param5 = Placeholder(n)
| param5desc = Required. ''For future expansion''
| param5desc = Required. ''For future expansion''
}}
}}

Latest revision as of 11:37, 21 September 2010

AddGarrison

Syntax  

AddGarrison = AreaUID ; StrucTypeUID ; UnitDefUID ; ChancePerCheck ;
               Placeholder1 ; Placeholder2 ; Placeholder3 ; Placeholder4 ;

Description

Automatically adds a garrison for the selected faction, using the unit definition for a given area and structure type.

See also ClearGarrisons

See Spreadsheet of examples

This commands work in two modes: Simple and Advanced.

Example  

AddGarrison = $New_England ; -1 ; $uni_GBR_Gar1; 50; 25; x; x; x; x

In Theater New England, use uni_GBR_Gar1 for autogarrison in all structures that qualify. Each turn that qualifying requirements are met there is a 50% chance per available replacement that a garrison will appear (Simple Mode). If in Advanced Mode, a test must instead be passed using the structure level (ChancePerCheck time level).

Qualifying Structures 
To qualify as an important site: a Fort, a Depot, a City of level at least equals
to half the maximum level possible for the game (Simple Mode only).

In advanced mode, a structure qualifies if the ChancePerCheck roll is passed.

See the article on AutoGarrison for further details.

Requirement to gain Garrison (Simple Mode only) 
The Garrison can appear if a Qualifying Structure exists, and: 
a) Has no others units of the garrison type.
b) Has a garrison type defined by this script command
c) Has at least 75% military control
d) Is not besieged
e) Has at least one regular infantry (to prevent cavalry raids to establish garrisons) 
f) Has at least 100 supply points (if under the rule rulAdvancedSupply, 
   BOA and WIA don't use this criteria)
Procedure to add the Garrison
If the garrison can appear, a % roll is made by multiplying the number of replacements in the
pool (of the family of the first element of the garrison unit) times
ChancePerRPL. If the roll is ok, a new unit appears in the structure and one replacement is
deducted from the pool. Note that garrisons units with several elements will be created with
only one element, but will get others by the standard replacement rule, so in effect you can
'grow' multi-elements units on several turns. 
Implementation ideas:
a) at the most basic level, you will use one definition per nation: The area would be the map,
strucKind at -1 and every structure to be garrisoned would get the same kind of garrison
(a militia eg.) 
b) more advanced, you specify several areas. For NCP Wurtemberg garrisons in WUR for example,
or Kentucky Militia in KY, etc.
c) The 'deluxe' scripting would be to change the garrison for the 3 structures. For example a
conscript unit for cities, a single militia for depot and for forts, a unit made of 2 reserve
line regiments and one fort battery. That would be perfect!


 

Parameters

AreaUID

Area Alias or -1 for entire map.

StrucTypeUID

Simple Mode:

Structure Type:
All = -1,
$Fort = 1 ,
$Depot = 2,
$City = 3, etc.

Advanced mode:

this is the Structure Family.
UnitDefUID

Alias of unit to be the garrison

ChancePerCheck

Simple Mode:

Integer (1-100) Probability of appearing per replacement available in the pool of the defined garrison unit.

Advanced Mode:

Integer (1-100) Probability of appearing per level of the structure checked.
Placeholder(n)

Required. For future expansion

Forums