Jump to content

Use of formations


Recommended Posts

Hello, I'm working a bit on reviewing formation code in hope to make them at least useable. Before trying to implement changes I'd like to know how formations should work.

From my point of view formations are linked to stances and can be divided in two groups: pre-battle formations and in-battle formations.

Pre-battle formations are used to set up a battle. Like moving melee on front line, support on back-line and cavalery on flanks, everyone arriving at the same time before going to the real mess. When close if aggressive, attacking or defensive units will leave formation to run in battle, if hold ground, they will wait in line for incoming ennemies. These are most of the formations, including travel-column formation.

In-battle formation are advanced military manuvres to keep formation while fighting, like phalanx. Attackers will always keep formation and fight from it. The tight formation allows multiple melee rows to fight at once. and advance like a bulldozer (or crushing wall to be more antic-friendly).

Civil tasks ignore formation. No point to lose time to rearrange to go cutting some trees, building, repairing and so. Women can't go in formation, workers would have the same behaviour.

There is also some code to handle picking targets in formations (that is attacking a formation instead of a precise unit). That is attack order should distribute target more or less randomly for more efficiency (pick the guy in front of you for example), less running to target while being assaulted from everywhere.

An other thing making formations usefull requires reviewing units speed and range to require some time to prepare your assault/defense for a line not to be flanked in 2 seconds. We set a few units, maybe 200 units for big battle, where there were line of thousands of men.

So in short:

- Ignore formations for civil tasks

- Most formations are used to place units more effectively before running a battle, take advantage upon unprepared units (macro-strategy)

- Some formations are kept while fighting, maximizing effect

Watch this for pre-battle and in-battle fromations :) (warning, very violent video)


  • Like 3
Link to comment
Share on other sites

I think this game should simplify the formations or player will never use them. I don't think the game will allow the player time to form up in nice battle formations like in Rome: Total War because there is current no benefit to the player for doing it, only downside (player that attacks first and harder gets the upper hand). But... there are ways to simplify the process and team should look to Battle for Middle Earth II for an easy way to do it. In that game when you have battalions selected and player want to task them together to go somewhere, left+right button drag-click quickly draws out a battle line preview for those battalions at the tasked point. Those battalions then march to that point and form up into the previwed line. The lineup is alwayys the same (melee infantry in the main line/front, range infantry in the back, cavalry on the sides).

Edited by wowgetoffyourcellphone
  • Like 2
Link to comment
Share on other sites

I think no matter how it's implemented, formations to place units will make the game too slow.

Perhaps it's better to include a "move" formation for all units (even females). When tasked to a point (rather than a target), units will go in that move formation (probably a 16:9 rectangle, as that's a very natural-looking ratio). When they are tasked to a target, that target can be economical (buidling, gathering, ...) and then they don't use a formation (or perhaps check the distance to see if a formation would be useful).

And when tasked to attack, I'd keep special formations as an option for certain civilisations / unit types. Then loose units should fight a formation like they fight a building, deal damage to the formation, and the formation should distribute it logically over its members.

So perhaps we first need to focus on the "move" formation, make sure that long walks are fluent, and the distinction between targets., before we focus on battle dynamics of a formation.

  • Like 3
Link to comment
Share on other sites

I mostly agree with both of you.

For formations to be used, they must be usefull. That is if you can prepare your troops for an attack and be unspotted, you must have a big advantage upon the disorganized one. In current state I feel it more like microing ranged units.

For exemple with reduced speed and line of sight at the time you see the lines coming you don't have time to get reinforcements from other gather points, by the time you get into towers it's almost too late. Cavalery could slash unprotected ranged units with ease and infantry would just crush the rest with more power per target. I've read than the Macedonian army traveled so fast that sometime their ennemies surrendered before the battle, as they waited them for a few days later.

As for movement I think the travel formation is good for the "move" order. If you want to move to a long distance, units could get into the column formation then move all together to the point (if units are too far away from each other multiple formations could be made). If they were in an other formation (I mean battle one), they reconstruct their initial one there. The column may have a slight speed bonus as it means they are prepared for the travel (and to cover the time they gather in formation).

And for battle, almost everything is about picking targets :) Currently I'm thinking about something like "pick the best target similar to the one clicked". If it's a formation we could make use of target class preferences, for individual units it may pick an other one of the same type more easily reachable. The drawback is you almost cannot micro at all.

Link to comment
Share on other sites

Formations and stances have been unsatisfactory since several years now.

So whatever behavior turns out to be best in the end I strongly suggest that the default behavior is changed to no formation (every unit acts individually) and a stance behavior that suffices most of the time:

- In general stay at the point if the last given command or return to it later (to avoid the units spreading across the map)

- If attacked (or a unit in "view range" is) attack back

- If enemies retreat (to roughly twice the maximum attack range of all unit in the game) return to the point of the last order

- Prefer attacking over chasing/moving

- Prefer attacking units that can attack over units that can't

- Prefer attacking mobile targets over stationary ones

- Prefer attacking units that are vulnerable to this units attacks over heavily resistant ones

- If a unit has to move to attack (mainly for melee units) prefer a slower and closer targets

...in that order (This is not perfect for sure but it should suffice most situations).

That enables us to compare the use of formations and stances to a behavior much less prone to cause bugs/glitches/unexpected or unwanted behavior.

This goes for "move formations" as well, since while one of the original idea of formations seamed to be that all units in a formation reach the target destination/enemy units in a short time frame the actual move formation lead to the opposite in many situations. Units distance to target vary more than if they just would try to go there separately (when of the same type or the distance is relatively small) and it takes longer for them to actually attack since they first go from the move formation into the battle formation before even considering to attack while the enemy happily hits them.

So before we dive into this again we should really clarify what's the aim of using formations and stances we'd like to achieve and how it's justified to give certain bonuses to them.

"Looking nice", "formations where widely used" or "The long range pathfinder only needs to calculate one path" are all valid arguments but do on their own not justify the extensive/default use of formations/stances over a "do what I want".approach that of cause will never be perfect but causes much less hassle for programming, lag (besides the long range pathfinder) and mainly for the player (For me only the attack move order enables me to give at least one command I'd like to give to my units while move orders barely achieve what I have in mind) IMO.

  • Like 1
Link to comment
Share on other sites


So perhaps we first need to focus on the "move" formation, make sure that long walks are fluent, and the distinction between targets., before we focus on battle dynamics of a formation.

I am in full agreement Sander. Let's get that much working smoothly first. That would be a huge step forward.

Link to comment
Share on other sites

one of the original idea of formations seamed to be that all units in a formation reach the target destination/enemy units in a short time frame

I like these kind of global consideration about what it is meant to do. Even if I think the aim of formation is to reach the target more efficiently (and not always faster). There's a proverb that says "if you want to go fast, go alone. If you want to go far, go together".


Because formations is bound to behaviours and this is related to stances here is what I think about it/what it does

  • Violent stance: attack on sight, follow until death even if faster (and unreachable)
  • Aggressive: attack on sight, but abandon if it goes beyond line of sight if still viewed by someone else (this is the default one)
  • Defensive: attack on sight but do not chase, return to position when finished, and maybe stay in a short radius of protected area
  • Passive: do not attack, flee when attacked
  • Stand ground: do not move, attack when a target comes in range
Defensive stance is somewhat the nearest to what FeXoR suggest as default. Maybe gatherers could automatically attack in this stance for auto (though basic) defense, but that's out of scope for now.

Violent and aggressive are formation disrupting, and from my point of view not different enough from each other. Target wise aggressive could pick the most decent target close to the one selected, with use of preferences, range and so, violent could stick to the one picked (thus "berzerk" like micro, ignoring all surroundings)

In that way, in formation defensive keeps units gathered, stand ground keeps them as walls, aggressive is more a "charge and kill'em all" stance and violent is more suited for small strategic raid on a dedicated target.

There is still to consider "pre-battle" and "in battle" formations for the aggressive and violent stances, because in-battle formation should not be disrupted and won't work in violent stance.


Back to it, formations may be slower that individual units (and it may be reallistic that way, but I don't have any proof), but allows for your units to arrive organized and ready. If the time you need to organize is too short, the benefit from it is useless as FeXoR pointed out. If you get your cavalery arrive first, then your support, then your infantry, it should be waaay less efficient that having support walled with infantry occupying front line for cavalery to flank them (for example).

And making a formation DURING a battle is to avoid at all cost. It should even be impossible to do. The current behaviour does it frequently and provides a lot of frustration.

As for two commands for a move and attack formation, why? If the target is too far, moving there in formation will be slow, ineffective in more narrow areas and tiring. When coming closer though the initial formation should be remade. It may be a "force" command for some special cases but I don't see one just now. greenknight32, could you explain how you would use both commands?

And to end with the default formation, I don't know if the none formation suits well. I agree it is useless for civil tasks and a lose of time. But once you pick some to go to battle, if you forget to assign them a formation it may be really risky (in a world where formations gives a strategic advantage). So the default may be None for civil tasks, but keep close line (or maybe open line) for battle tasks. The column can be auto if you are not in none formation, but women should then have 2 formations to have this behaviour or not.

As everyone seems to agree to smooth the current state. What I can try to do is preventing going in formation for close targets. Then I could try to use target preferences for area attack (ctrl+click).

  • Like 1
Link to comment
Share on other sites

I meant that instead of calculating the distance to determine if the units form a column, have them always form a column when ordered to move to a spot rather than sent to attack. Using the attack move command would override the default column formation, units would maintain their current formation or lack of one. This would allow the player to control it, without adding any additional commands to remember.

I'm a great believer in simplifying the code whenever you can, and this would be a simple way to provide the functionality.

Link to comment
Share on other sites

Just thought i'd Copypasta my comment from another thread, as it's more relevant here, From this thread.

Firstly: You shouldn't have to research a button just to make formations, This is silly, as many of the civilisations in the game are very formation-centric, (EG: why train phalangites, if you can't make a phalanx?!) BUT, you should be able to research different "Doctrines" - so to speak, to make your formations function different. This leads into my next point.

Formations should be much more like the ones in Rise and fall Civs at War (or RaFCaW) In that you click a button, and all the selected units Form up... Into a formation. Instead of Just Grouping a bunch of units and sending them somewhere. Formations should be more like entities,

EG: Instead of clicking on all the units in a formation, you can only click on said formation. Boxing 2 formations and giving them a move order will make you select 2 formations, instead of all the units, and moving them won't make them turn into 1 formation. Less frustrations For macedonians, i think.

Maybe we could also make it so you can suspend formations, instead of just disbanding them, And maybe even personalize formations a bit.

Link to comment
Share on other sites

Well, I didn't have time for anything about 0 A.D. lately.

greenknight I understand better. If you use the command attack (ctrl click), they will stay in battle formation to be ready for any fight opportunity. It could take ages to reach the initial target and even fail to move through narrow pathes but it's battle-ready.

Formations as entities would complement group shortcuts, not that it is a bad thing but I just wanted to notice it. There is already mixed formations when you pick for example phalangites and support units, with a single selection of both using phalanx and skirmish line for example (but multiple selection still merge compatible units).

It would be very comfortable for target picking and so. This would also introduce formation of formations, yay :clap: It could be very interesting but maybe we'll go on a over-complex path for fine management. I don't really know, but if the game pace is not too fast you could get some time to "micro" your formations. Thus moving microing single units in the stress of battle to microing pack of units before the battle. This assumes formations are NOT designed to be set on the fly.

But it still requires some tools to manage them well, like the rectangle preview of placement with rotation (like for buildings?) as mentioned above.

Link to comment
Share on other sites

  • 4 weeks later...

If you want to disable formations by default check in binaries/data/mods/public/simulation/helpers/Commands.js. Line 1398 choose the formation to use when none is selected when ordering multiple units (formation/null for none).


this is not the issue.

The problem is about when units should form or not and where. I'm currently trying to make units ignore their formation for civil tasks (gathering, building, repairing) but still have some problems with the column for long range walks (i.e when asking to build something all accross the map, they should go near in column then disband, same for gathering, considering once they are there, there will be local stuff to stay there).

After that I can check battle dynamics. The first thing to do is preventing units at range to stop fighting to gather somewhere under fire then return to the battle. Since most formations are disbanded in actual fighting it seems logic not to build and disband for the fun.

Note: I'm using Delenda Est for testing and implementing, since the gameplay is more suitable for formations.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...