A formation is a collection of specific units that receive special bonuses.[[BR]][[BR]]Note that formations differ from groups (multiple units selected at the same time which can be commanded as one). A formation is a special state applied to a group of compatible units. [[BR]][[BR]]Formations are used for strategic military engagements, have distinct limits on the number and type of units that can enter them, and distinct advantages to doing so. This encourages use of small, tactical formations for specific purposes, more effective than a larger, unruly mob.[[BR]][[BR]] ||'''Bonus'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The attribute that is bonused.[[BR]][[BR]]This defines what attribues may be bonused.[[BR]][[BR]]Typically the following attributes could be affected:[[BR]][[BR]]Move.Speed[[BR]]Health.Hitpoints[[BR]]Health.Regen[[BR]]Armour.Value[[BR]]Vision.LOS[[BR]]Attack.Accuracy[[BR]]Attack.Damage[[BR]]Attack.Speed[[BR]]Attack.Range[[BR]][[BR]] ||'''!BonusType'''|| [[BR]]'''''BRIEF DESCRIPTION::'' '''The entity type that is bonused.[[BR]][[BR]]This defines what entities in the formation will receive the bonus. These are defined by the entity's Id properties: '''Id.Type''' or '''Id.Generic'''.[[BR]][[BR]] ||'''!BonusValue'''|| [[BR]]'''''BRIEF DESCRIPTION::'' '''The value of the bonus[[BR]][[BR]]This is the percentage of the bonus. If it is a value of .2 that gives a 20% bonus.[[BR]][[BR]] ||'''Penalty'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The attribute that is penalised.[[BR]][[BR]]This defines what attributes may be penalised.[[BR]][[BR]]Typically the following attributes could be affected:[[BR]][[BR]]Move.Speed[[BR]]Health.Hitpoints[[BR]]Health.Regen[[BR]]Armour.Value[[BR]]Vision.LOS[[BR]]Attack.Accuracy[[BR]]Attack.Damage[[BR]]Attack.Speed[[BR]]Attack.Range[[BR]][[BR]] ||'''!PenaltyType'''|| [[BR]]'''''BRIEF DESCRIPTION::'' '''The entity type that is penalised.[[BR]][[BR]]This defines what entities in the formation will receive the penalty. These are defined by the entities Id properties: '''Id.Type''' or '''Id.Generic'''.[[BR]][[BR]] ||'''!PenaltyValue'''|| [[BR]]'''''BRIEF DESCRIPTION::'' '''The value of the penalty.[[BR]][[BR]]This is the percentage of the bonus. If it is a value of .1 that gives a 10% penalty.[[BR]][[BR]]The penalty should always have less effect than the bonus. It's a give and a take situation that must give more than it takes, otherwise nobody will use the formation. We take in order to preserve balance and historical accuracy in military tactics.[[BR]][[BR]] ||'''Width'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The width of the formation.[[BR]][[BR]]Theoretically, we would not need this for attributes of formations, but we will need it for groups that do not use the '''Formation.Order''' attribute.[[BR]][[BR]] ||'''Required'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The number of units required to make this formation.[[BR]][[BR]]This specifies the minimun number of required units before it drops to the previous formation. See '''Prior''' for more details. [[BR]][[BR]] ||'''Next'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''Points to the tag of the next formation after the formation cap is reached.[[BR]][[BR]]In order to perserve the shape of the formations and their filling order, it is necessary to have a progression of formation 'shapes'. This attribute points to the next formation XML file that should be used if the number of entities exceeds the number of entity slots in the current formation.[[BR]][[BR]] ||'''Prior'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''Points to the tag of the previous formation if the number of entities in the formation is not met.[[BR]][[BR]]As the number of entities decreases, the formation must change to compensate for the 'gaps'. This points to the previous formation which has the proper configuration for the smaller quantity of entities. If this attribute does not exist, then it it means the formation is disbanded if the requirements are not met.[[BR]][[BR]] ||'''Movement'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The group form it takes when they are moving to a waypoint.[[BR]][[BR]]When a formation is ordered to a waypoint, this attribute specifies what formation/group pattern they form when going to that destination. When they arrive at the waypoint, they revert back to their original formation.[[BR]][[BR]]Note: this only affects movement to a waypoint; the formation does not change when ordered to attack. It retains its formation while it advances to attack.[[BR]][[BR]]If this attribute is not specified, it retains its formation even in movement (such as testudo or phalanx).[[BR]][[BR]] ||'''Category'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''The entity allowed at position.[[BR]][[BR]]This corresponds to [http://forums.wildfiregames.com/0ad/index.php?showtopic=1236 Entity.Formation.Category]. This specifies what entity may go in what position. [[BR]][[BR]]Some positions may be filled by multiple entity categories. The precedence of what goes in what position is: lead=>melee=>ranged=>support. [[BR]][[BR]]So if a ranged unit is in a slot that a melee unit can fit in, then it bumps it to another ranged position. If there is no position available the ranged unit gets bumped out of the formation or the formation goes to the '''Next''' formation where an open slot would be available.[[BR]][[BR]] ||'''Order'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''Entity position fill order.[[BR]][[BR]]Order defines the fill order of the entities. The engine needs to check if the entity is allowed to partake in the formation, then it checks to see what '''Formation.Category''' it is, then it checks the positions to see if there is an available slot in this following order. If there is, it's added, if there isn't, it's not allowed to be added.[[BR]][[BR]] ||'''fl'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''File, a row of entities.[[BR]][[BR]]fl stands for file. This specifies a row of entities.[[BR]][[BR]] ||'''rk'''|| [[BR]]'''''BRIEF DESCRIPTION ::'''''Rank, a position (cell) in a file (row).[[BR]][[BR]]rk stands for rank. This specifies a slot in a row of entities.[[BR]][[BR]]Example:[[BR]][[BR]]CODE[[BR]][[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]   [[BR]]   [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]   [[BR]]   [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]   [[BR]]   [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]   [[BR]]   [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]     [[BR]]   [[BR]]>