This patch allows some basic support for battalions-like groups:
- One can create its own battalion from alike-entities. (Minimal size is 2 entities.)
- Hovering over one entity of a battalion highlights the whole battalion.
- Selecting one entity of a battalion selects the whole battalion.
- Battalions can be manually disbanded and are also disbanded when there are no entities left in them.
But why a seperate component and not in the formation.js, you ask? Well, good question! A formation may exist of multiple battalions. E.g. I have two groups of melee infantry and one group of ranged infantry. I want them to engage in a nice battle formation, but when the horses charge around my melee units, I do not want to select the archers as well when sending my melee back.
This is just to reduce micromanagement, nothing more, nothing less. But it could well be extended and used beyond that! I hope people can use this as a base if they want battalions.