lines 2-3 deep would be best, actually.
Say you have 18 men in your party, and you give the order "Line it up!"
They find the total number of AI units. If number = < 10, then it will make 2 lines. If number = < 15, it makes 3 lines. If = < 20, it makes 4 lines, etc.
Basically, the lines would be 5 across, and if you had 5 or fewer men, they would just make 1 line.
18 men would line up like this ---
X = Unit, -- = Empty Space
X X X X X
X X X X X
X X X X X
X -- X -- X
Of course, all of the above would apply to -infantry-
Cavalry would have a different set of orders. For instance, in place of a "Box Formation!" they would have "Wedge!" Which, pretty much everybody knows, means they form a big pyramid-shaped thingy.
However, how would you only order one type of unit?
Simple.
You get close enough to the unit, and look at it. It says the unit's name. You look at the unit, get it's name to show up, then press "O" to open the Orders Menu, and then you press the number that stands for the order you want to order.
If you're looking at a horseman, the orders menu would look different than if you were looking at an archer.
Example of archer formations -
Staggered Lines
X = Archer, -- = Empty Space
X--X--X--X--X--X--X
--X--X--X--X--X--X--
Since archers will not fire if a friendly is in front (above, below, level) of them, this would work best for them, if, of course, the enemy is in front of them.
Crescent
X = Archer, -- = Empty Space
-- -- -- X X X X X X -- -- --
-- -- X -- -- -- -- --- X -- --
-- X -- -- -- -- -- --- -- X --
In this formation, they could attack an enemy coming from the front, and from the flanks, however their fire would be spread thinner than a Staggered Line. Best used against slow-moving infantry units who try to surround you.
Archer Box
X = Archer, -- = Empty Space
X X X X X X X
X -- -- -- --- X
X -- -- -- --- X
X -- -- -- --- X
X X X X X X X
This would allow your archers to fire all around them, but their fire would be spread extremely thin.
Examples of Infantry Formations
Block (Box, Line, Phalanx (?))
X = Unit, -- = Empty Space
X X X X X
X X X X X
X X X X X
X X X X X
Basically, a big, filled-in version of the box. Weaker units would go towards the inside, the stronger units (determined by how much HP they have) would form the outside lines.
"Porcupine" Formation
X = Unit, -- = Empty Space
X -- X -- X -- X -- X
-- X -- X -- X -- X --
Good against cavalry, in my opinion. If, that is, Pike Grounding were implemented. The front line would ground their pikes, as would the back line. It would be impossible to charge cavalry in to the front of this formation, because the horses would be slaughtered.
Infantry Crescent
X = Unit, -- = Empty Space
-- -- -- X X X X X -- -- --
-- -- X X X X X X X --- --
-- X X -- -- -- -- -- X X --
As you can see, unlike the archer crescent, the infantry crescent is 2-deep, so that it would stand better against cavalry.
Examples of Cavalry Formations
Wedge (but of course)
X = Unit, -- = Empty Space
-- -- -- X -- -- --
-- -- X X X -- --
-- X X X X X ---
Obviously, the wedge would be used against non-pike-wielding infantry. The cavalry would charge in to the middle of the infantry, and this would split the infantry in half, making it easier for your men to kill them.
Line
X = Unit, -- = Empty Space
X X X X X X X X X X
X X X X X X X X X X
As you can see, it is wider than the infantry lines. This is because with cavalry, you want to spread your forces wide, so you can trample more people