This is also a good choke point defensive maneuver. Move them away from the fight and keep bombarding. Then, use all of your forces to charge, except for the archers. Next, use all of your swordsmen to attack after the enemy hits the spearmen. However it would be better to horse charge them when they are in archer or javelin range, then keep bombarding them.
Then, with the spearmen formation, you can either wait for the enemy to hit the spearmen then charge with horses. If you have elephants or horses, put them javelins. Then, gather your forces and put all archers in the very back, all medium to close ranged missile weapons in middle, and all of your spearmen in the front with the legionnaires, swordsmen, etc. If that is unavailable, go into the forests. When you are outnumbered, have low forces, and know that you will lose, get a good stand off position by gathering all of your remaining forces, and go to a hill or the highest position if possible. Note: You must start a new campaign for the changes to take effect. You can do the same for for morale, fatigue, fog of war, etc. For infinite ammunition, change the value of the 'LIMITED_AMMO:' line from 'TRUE' to 'FALSE'. Use a text editor to edit the 'preferences.txt' file in the game folder.
Note: This procedure involves editing a game file create a backup copy of the file before proceeding.