Formation¶
XML Elements¶
The following elements can be used within this component:
Formation¶
RequiredMemberCount¶
Minimum number of entities the formation should contain (at least 2).
Type: integer
Path: Formation/RequiredMemberCount
DisabledTooltip¶
Tooltip shown when the formation is disabled.
Path: Formation/DisabledTooltip
SpeedMultiplier¶
The speed of the formation is determined by the minimum speed of all members, multiplied with this number.
Type: non-negative decimal
Path: Formation/SpeedMultiplier
FormationShape¶
Formation shape, currently supported are square, triangle and special, where special will be defined in the source code.
Type: text
Path: Formation/FormationShape
MaxTurningAngle¶
The turning angle in radian under which the formation attempts to turn and over which the formation positions are recomputed.
Type: non-negative decimal
Path: Formation/MaxTurningAngle
ShiftRows¶
Set the value to true to shift subsequent rows.
Type: text
Path: Formation/ShiftRows
SortingClasses¶
Classes will be added to the formation in this order. Where the classes will be added first depends on the formation.
Type: text
Path: Formation/SortingClasses
SortingOrder¶
The order of sorting. This defaults to an order where the formation is filled from the first row to the last, and each row from the center to the sides. Other possible sort orders are “fillFromTheSides”, where the most important units are on the sides of each row, and “fillToTheCenter”, where the most vulnerable units are in the center of the formation.
Type: text
Path: Formation/SortingOrder
WidthDepthRatio¶
Average width-to-depth ratio, counted in number of units.
Type: non-negative decimal
Path: Formation/WidthDepthRatio
Sloppiness¶
The maximum difference between the actual and the perfectly aligned formation position, in meters.
Type: non-negative decimal
Path: Formation/Sloppiness
MinColumns¶
When possible, this number of columns will be created. Overriding the wanted width-to-depth ratio.
Type: non-negative integer (e.g. 0 or 5)
Path: Formation/MinColumns
MaxColumns¶
When possible within the number of units, and the maximum number of rows, this will be the maximum number of columns.
Type: non-negative integer (e.g. 0 or 5)
Path: Formation/MaxColumns
MaxRows¶
The maximum number of rows in the formation.
Type: non-negative integer (e.g. 0 or 5)
Path: Formation/MaxRows
CenterGap¶
The size of the central gap, expressed in number of units wide.
Type: non-negative decimal
Path: Formation/CenterGap
UnitSeparationWidthMultiplier¶
Place the units in the formation closer or further to each other. The standard separation is the footprint size.
Type: non-negative decimal
Path: Formation/UnitSeparationWidthMultiplier
UnitSeparationDepthMultiplier¶
Place the units in the formation closer or further to each other. The standard separation is the footprint size.
Type: non-negative decimal
Path: Formation/UnitSeparationDepthMultiplier
AnimationVariants¶
Give a list of animation variants to use for the particular formation members, based on their positions.
Type: text
Path: Formation/AnimationVariants
RELAX NG Grammar¶
<define name="component.Formation">
<element name="Formation">
<interleave>
<element name="RequiredMemberCount">
<data type="integer">
<param name="minInclusive">
</param>
</data>
</element>
<element name="DisabledTooltip">
<optional>
<attribute name="context"/>
</optional>
<optional>
<attribute name="comment"/>
</optional>
<text/>
</element>
<element name="SpeedMultiplier">
<ref name="nonNegativeDecimal"/>
</element>
<element name="FormationShape"/>
<element name="MaxTurningAngle">
<ref name="nonNegativeDecimal"/>
</element>
<element name="ShiftRows"/>
<element name="SortingClasses"/>
<optional>
<element name="SortingOrder"/>
</optional>
<element name="WidthDepthRatio">
<ref name="nonNegativeDecimal"/>
</element>
<element name="Sloppiness">
<ref name="nonNegativeDecimal"/>
</element>
<optional>
<element name="MinColumns">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="MaxColumns">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="MaxRows">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="CenterGap">
<ref name="nonNegativeDecimal"/>
</element>
</optional>
<element name="UnitSeparationWidthMultiplier">
<ref name="nonNegativeDecimal"/>
</element>
<element name="UnitSeparationDepthMultiplier">
<ref name="nonNegativeDecimal"/>
</element>
<element name="AnimationVariants"/>
</interleave>
</element>
</define>