Changes between Initial Version and Version 1 of XML.Entity.Traits.Garrison


Ignore:
Timestamp:
Feb 23, 2008, 4:18:58 AM (11 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XML.Entity.Traits.Garrison

    v1 v1  
     1If an entity has this trait, specified units are able to garrison (be contained) within it.
     2
     3"Garrisoned" is a generic term for any entity that is being contained within another entity. This could include units garrisoned in a building, troops being transported by a ship, a Relic being carried by a Healer, or even inventory items in RPG-style mods.
     4
     5Note: A garrison flag will normally appear over an entity when entities are garrisoned inside it.
     6
     7Note: We don't specify a Garrison Action in this case, although the usual circumstances for Actions do apply for Garrisoning (a unit has a Garrison cursor, a Garrision GUI button, etc). Instead we assume that any entity could potentially be garrisoned ... it's a matter of whether the entity it's trying to garrison in will let it. That's what these attributes specify.
     8
     9'''Example:'''
     10
     11{{{
     12        <Traits>
     13                <Garrison>
     14                        <Max>4</Max>
     15                       
     16                        <List>Infantry, Support</List>
     17                        <EjectHealth>0.1</EjectHealth>
     18                        <BuffHeal>2</BuffHeal>
     19                       
     20                        <PropPoints>PropBattlement1, PropBattlement2</PropPoints>
     21                        <PropList>Infantry Javelinist, Infantry Slinger, Infantry Archer</PropList>
     22                       
     23                        <AutoGarrison>Infantry, Female Citizen</AutoGarrison>
     24                </Garrison>
     25        </Traits>
     26}}}
     27
     28'''Example Description:'''
     29
     30 * The structure can garrison 4 infantry (foot Citizen Soldiers) and support (Female Citizens, Traders, etc) units, assuming that each costs 1 Population.
     31 * If it gets damaged to 10% health, they're automatically ungarrisoned.
     32 * Garrisoned units heal +2 HP/sec faster than normal.
     33 * Only ranged infantry will appear at this entity's prop points.
     34 * If the player rings the Town Bell, entities will garrison in this structure if free.
     35
     36----
     37
     38= Max =
     39''BRIEF DESCRIPTION ::'' The number of "garrison slots" in the entity.
     40
     41'''Not yet implemented.'''  The property is implemented in XML, but not used as yet.
     42
     43This attribute determines the maximum number of entities that can be garrisoned in this entity. Note that it isn't based on just the number of entities, but the '''Traits.Population.Sub''' attribute of each entity.
     44
     45So if an entity costs 2 Population, it also occupies 2 garrison slots when garrisoned.
     46
     47An additional property, '''Traits.Garrison.Curr''' is initialised when an entity is created (almost always starting with an initial value of zero). It stores the current number of this entity's "garrison slots" which are currently occupied.
     48
     49= List =
     50''BRIEF DESCRIPTION ::'' A list of the entities or categories of entities that can be garrisoned in this entity.
     51
     52'''Not yet implemented.'''
     53
     54If an entity isn't covered by this list, it can't be garrisoned in this entity.
     55
     56See the '''Traits.Id''' traits for lists of valid names for this list.
     57
     58= !EjectHealth =
     59''BRIEF DESCRIPTION ::'' Percentage of hitpoints that triggers ejection of garrisoned entities.
     60
     61'''Not yet implemented.'''
     62
     63If an entity has this attribute, if it suffers too much damage, all garrisoned entities will be automatically ungarrisoned. It cannot be regarrisoned until the damage is repaired past this % tolerance level (range 0..1).
     64
     65= !BuffHeal =
     66''BRIEF DESCRIPTION ::'' Increases health regeneration of garrisoned units.
     67
     68'''Not yet implemented.'''
     69
     70If an entity has this attribute, the '''Traits.Health.Regen''' of the garrisoned entities is modified by the specified amount.
     71
     72= !PropPoints =
     73''BRIEF DESCRIPTION ::'' List of prop points (sockets) on the actor which will be used as prop points for garrisoned entities.
     74
     75'''Not yet implemented.'''
     76
     77If the name of a prop point (eg !PropHead) from the entity's ''Actor'' attributes is listed here, then if an entity is listed in the '''Traits.Garrison.!PropList''' and is garrisoned, it will appear attached to the entity at this node location.
     78
     79Other than being able to move, the propped entity will retain its normal abilities (it will fire ranged attacks at opponents, take damage from attacks, and so on).
     80
     81''Note: As with '''Traits.Garrison.Max''', an entity will occupy a number of prop points equivalent to its '''Traits.Population.Sub'''. For example, siege weapons are much larger, therefore need more room, therefore need a higher'' '''Traits.Population.Sub.'''
     82
     83= !PropList =
     84''BRIEF DESCRIPTION ::'' List of garrisoned entities that will appear at the entity's socket (prop point) positions.
     85
     86'''Not yet implemented.'''
     87
     88If an entity is in this list, it will appear at a '''Traits.Garrison.!PropPoint''' (if one is available) when garrisoned, instead of being hidden inside the parent entity.
     89
     90If it can attack from this distance, it will attack opponents in range.
     91
     92= !AutoGarrison =
     93''BRIEF DESCRIPTION ::'' List of the unit types (see '''Traits.Id''') that will automatically garrison inside this entity when its Town Bell is rung.
     94
     95'''Not yet implemented.'''
     96
     97An entity doesn't have a Town Bell unless this attribute has a value.
     98
     99= Notes: Visible Garrisoning =
     100
     101Implementation: Graphics 10-20 hours. AI 1 or 2 days (substantially less without walking on walls).
     102
     103'''Not yet implemented.'''
     104
     105== Prop Points ==
     106
     107[[Image(http://wildfiregames.com/misc/overview.jpg)]]
     108
     109'''Overview of the power of propping.'''
     110
     1110 A.D. is already speced to feature an attachment system, where props can be attached to other objects (weapons in the hands of units, helmets on their heads, eyecandy on structures).
     112
     113This same principle can be used to attach units to the decks of ships and buildings. We can use this to make units stand on battlements, position animals in corrals, etc.
     114
     115A "prop point" is one of these predefined positions on the parent object, where a unit of a certain type will appear if garrisoned. They are also called "sockets" or "nodes".
     116
     117== Rules of Propping ==
     118
     119[[Image(http://wildfiregames.com/misc/buildings.jpg)]]
     120
     121'''Units on buildings.'''
     122
     123[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/scr_koh_0008-sml.jpg)]]
     124[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/scr_koh_0053-sml.jpg)]]
     125
     126'''Units on buildings in Knights of Honour.'''
     127
     128Most entities that can be garrisoned also have a number of preplaced slots for propping garrisoned units (typically about a fifth of its garrison capacity).
     129
     130 * A garrisoned unit is attached to a prop point and made visible if:
     131  * There is an available slot.
     132  * The unit is of a compatible type for this building/ship.
     133  * It is the strongest compatible unit out of those that are garrisoned. Ranged units have a higher priority than melee units.
     134
     135 * Any garrisoned units not at prop points are concealed inside (assumed to be inside the building or below deck). A garrison flag indicates that the building is garrisoned.
     136
     137 * Propped units cannot be selected. Selecting just selects the building/ship as a whole.
     138
     139 * Giving a command to the building/ship commands any propped units that can follow that command (for example, specifying a target for them to attack, if close enough). Specifying the building/ship's stance will instruct all propped units to also use that AI stance.
     140
     141 * When propped, the AI controls the unit's behaviour. A propped unit on a Field gathers Food, for example. If a unit is capable of attacking opponents at range, it will do so. If it has nothing to do, it will idle.
     142
     143 * Units that are garrisoned but not propped can't actually do anything. So for a unit to harvest a Field, or for a Merchantman to carry a Trader on a naval trade route, the necessary unit must occupy a prop point.
     144
     145''* No building has intrinsic attack capabilities. They are dependent upon the ability of propped units to attack opponents.''
     146
     147 * Propped units will swap slots to maximise their range, but otherwise cannot move from their slot.
     148
     149 * If a unit is damaged to a significant degree, then if an eligible unit with much higher hitpoints is waiting for a vacant prop point in the building, they will swap positions so that the weakened unit returns to the safety of the building.
     150
     151 * Propped units tend to have certain bonuses when propped (such as improved armour or an elevation bonus). This is dependent upon the building's/ship's attributes.
     152
     153 * Propped units still retain their passive abilities; they are effectively just displaced in 3D space and taken out of player control. Their LOS will push back Fog of War, their Auras will affect units in range, and so forth.
     154
     155 * Opponents pick their targets (the propped units, or the building/ship itself) based on their own AI awareness of their strengths. They will first launch attacks against whichever target they are most effective, and can reach.
     156
     157 * Opponents must be able to reach a target in order to attack it. Since propped units are typically elevated off the ground, melee units are typically only able to attack the parent building/ship.
     158
     159 * If one gets killed, the next strongest compatible unit (if any) from below will replace him, and so on. A prop point is only empty when there are no compatible units left inside.
     160
     161 * When all units at prop points are killed, with no other targets left the opponent will focus all his attention on attacking the building. Note that units non-compatible for occupying prop points could still be garrisoned in the building at this time. They are not damaged when the building is attacked.
     162
     163 * Buildings will typically auto-ungarrison any garrisoned units when damaged to a certain level. They cannot be regarrisoned until repaired.
     164
     165 * Buildings are vulnerable to capture if they do not contain garrisoned units.
     166
     167== Propping of Ships ==
     168
     169[[Image(http://wildfiregames.com/misc/ships.jpg)]]
     170
     171'''Units on ships.'''
     172
     173[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/MDHafer-shipscale-various001-sml.jpg)]]
     174'''AoM Mockup of approximate scale of ships, siege and units for 0 A.D., by Michael Hafer.'''
     175
     176[[Image(http://0ad.wildfiregames.com/~art/mythos/reference/MDHafer-shipscale-fullsize001.jpg)]]
     177'''AoM Mockup of approximate scale for a 0 A.D. Trireme, by Michael Hafer.'''
     178
     179[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/aaa-sml.jpg)]]
     180'''AoM Alpha Ships 1.'''
     181[[Image(http://files.heavengames.com/aom/albums/es2001/aab.jpg)]]
     182[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/aab-sml.jpg)]]
     183'''AoM Alpha Ships 2.'''
     184[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/aac-sml.jpg)]]
     185'''AoM Alpha Ships 3.'''
     186[[Image(http://files.heavengames.com/aom/albums/es2001/aai.jpg)]]
     187[[Image(http://wildfiregames.com/~gamedesign/Level1Images/garrison/aai-sml.jpg)]]
     188'''Another large ship -- note raised sail; we could do this when the ship stops moving.'''
     189
     190Ships are basically buildings that the player can move around on bodies of water. All the standard rules for garrisoning apply. There are, however, a couple of important differences for ships:
     191
     192 * A ship that is ungarrisoned reverts to gaia control (neutral, not controlled by anyone, sitting duck). Garrisoning units in a ship transfers control of it to that player. A player could therefore capture an enemy ship by killing its crew, getting close enough to ungarrison, and transferring one or more of his own crew into the ship. (When garrisoning the first unit, the ship gets a marginal boost to health to restore it to above auto-ungarrison health, otherwise it would just kick out the new units.)
     193
     194 * Units cannot ungarrison onto water, so they can only be ungarrisoned onto land or another player ship. The ship can also be given a target location to ungarrison (such as a shore), and will move to that position and ungarrison.
     195
     196 * When a ship auto-ungarrisons due to critical damage, the crew have nowhere to go, so are effectively destroyed. Without a crew, the ship reverts to gaia. The opponent can now choose to either keep attacking the ship and sink it, or transfer some of his crew to take control of it.
     197
     198 * Unlike buildings, some ships do have a personal means of attack ... the sea ram. If a ship is given the order to attack, and has any units aboard with ranged attacks, it will close to the range of the shortest-ranged unit aboard. If it has no ranged units, it can only attack with the ram. Since the ram cannot reach propped units, it can only attack the ship's hull. Ram attacks can also be forced by double-right-clicking the target.
     199
     200== Things that Won't Happen ==
     201
     202The following have been declared technically infeasible by the Programming Department:
     203
     204 * dynamic Melee Battles (units boarding a ship and visibly attacking units aboard another ship in melee),
     205 * units walking freely on decks,
     206 * controlling individual units on the deck,
     207 * units visibly walking between ships (planks, ladders, etc).
     208
     209== Backburner: Units on Walls ==
     210
     211[[Image(http://wildfiregames.com/misc/wall.jpg)]]
     212
     213An extension to be added in the Expansion Pack, once Visible Garrisoning is comfortably implemented and we know the engine inside out.
     214
     215In this more advanced suggestion, Ranged Infantry units can be garrisoned to Walls as with most buildings (one unit per wall segment: one Garrison slot and one Ranged Infantry Prop Point), and the above rules for garrisoning any building apply. However, with walls we are able to do one thing differently ...
     216
     217Once garrisoned, the unit will appear on top of the wall and patrol along its length along a pre-defined track. Once it encounters an obstacle (Wall Tower, Gate, end of the Wall) or has travelled a certain distance, it will turn back and continue the circuit.
     218
     219They'll basically act like paper targets on a firing range, moving back and forth along a track (except that they will be realistically animated and pointed in the right direction).
     220
     221There will be two 'lanes' in the wall, one for left-to-right traffic, the other for right-to-left traffic. Possibly also a 'parking lane' for units that are standing still.
     222
     223The walls will be quite thick, but units will still be to scale while on walls.
     224
     225As with ships and buildings, units can't be selected while garrisoned on walls. If they encounter enemies on the ground while on the walls, they will stop patrolling and open fire on them.
     226
     227To ungarrison units on walls, ungarrison the Wall through the GUI in the normal way and the unit will appear back on the ground adjacent to the wall.
     228
     229Because Walls will soon look too damaged to be feasibly walkable, once this level of damage is reached, any garrisoned units will automatically ungarrison from the Wall.