This patch allows subunits to be specified in the template. Subunits can be ordinary entities with UnitAI (so can be individually ordered), which occupy a turret point on the parent.
If the parent has UnitAI and an order (to attack) is given to it, the order is automatically delegated once in range. This means the subunit will attack anything in range until it gets in range of the intended target, after which it will start attacking that target.
There is also a ejectable-option in the template, to disallow leaving the turret point by the subunit (and allow entities which are normally not allowed to visibly garrison, which might be useful for scripted maps (e.g. spearmen holding guard on a wall)).
Something for the future perhaps:
- Good UI for ordering subunits.
- Turret button: D2405.
Possible extensions:
- Increased spread (when moving)?
- Riding stances.
GUI
There might be a problem with how turrets are changed here and how the current GUI should handle them. I, for one, have the opinion that we need buttons for turret positions, to be able to easily work with them and prepare for extending scenarios. However, I'm obiously biased towards my own idea and may not see things clearly. In conversation with @elexis, we decided that it good to do some analysis about what we want and what that asks from a GUI.
Hence I will list some use cases here where I think we want to deal with and, when possible, add some extra information.
Anyone willing to correct/expand the list is welcome to do so, or just post stuff and I will change it.
The main objective is to allow units to attack whilst moving.
Turrets/Subunits use cases:
- Units as subunits on cavalry:
- No need of seperate selection of turret and turret holder (only one unit per horse).
- Ungarrison == dismount.
- Dead? Mount a new one. (Either a new rider if that died or a new steed if that passed away.)
- Current GUI would fit perfectly fine, IMHO.
- E.g. Total War series
- We would differ by that the turret holder (i.e. the horse) could still be alive and remountable even if the turret (i.e. the rider) dies.
- Units as subunits on chariots:
- Perhaps be able to select seperately (possibility for multiple units per chariot).
- E.g. a healer and an archer on a chariot: you want the healer to heal your hero, but the archer to keep attacking a specific target.
- Ungarrison == dismount
- Should be possible on a per-unit basis
- E.g. you want a badly damaged archer to dismount behind your lines and add a newly recruited one.
- Should be possible on a per-unit basis
- Dead? Mount a new one.
- This can be achieved with the current GUI (unit action button).
- E.g. Total War series
- We would differ by that the turret holder (i.e. the chariot) could still be alive and remountable even if the turret(s) (i.e. the rider(s)) die.
- Perhaps be able to select seperately (possibility for multiple units per chariot).
- Units as turrets on structures:
- Able to select seperately.
- Turn in on a per unit basis.
- This can be achieved with the current GUI.
- Turn out on a per turret position basis.
- This can not be achieved with the current GUI, units that can go on turret positions will go on turret positions.
- E.g. imagine a fortress with four turret positions, but plenty of space inside. The four positions are occupied with archers and there is a bunch of other archers inside. The enemy arrives :O they shoot your archers from the citadel (poor fellows). And now? Ungarrison your archers and regarrison them to occupy the positions again? Not really nice. Let them occupy the positions automatically? Not really nice also: you didn't notice that you were shot by long-range archers who pick your entire garrison one-by-one since they keep taking the turret positions automatically. We could click a unit icon of the units that are already garrisoned to move them to a free turret position. (Which one? Random probably.) Cf. #3488.
- E.g. ? (Usually games don't have an inside and an outside?)
- Turrets on a machine
- Not allowed to select seperately.
- Ungarrison not possible.
- Dead? Construct a new one from the turret holder. Or use a villie to construct a new one?
- This could be handled with the current GUI I think with the turret positions as upgrades. (Although it would clutter that part a tad.)
- E.g. C&C Generals (Overlord tanks).
- We would differ by that the turret can be destroyed seperately.