Introducing Skyrim's First Working Hoplite Phalanx Formation
After years of requests for phalanxes, I have finally got a hoplite phalanx working in skyrim where they don't scatter as much as they used to:
The key is setting up this up entirely through magic effect fire and forget abilities and relying on condition functions rather than scripting to do the heavy lifting. The main script function to use is keepoffsetfromactor() to attach troops to a leader and then clearkeepoffsetfromactor() which is used to clear the formation to allow them to attack since keepoffsetfromactor() prevents them from rotating to face their enemies. The key is making sure that we set up the right conditions to make them break formation when needed but also get back in formation as needed. The key factors of the conditions for breaking formation requires them to be:
- Near the enemy (I used a small radius cloak dummy spell to detect the magic effect)
- Near a friendly soldier (so they don't stray too far away also used with small dummy cloak spell)
- Not attacking - this is the key factor in allowing them to maintain formation in combat i discovered today, basically once they begin their attack animation after breaking formation for a second or two, they will return to formation the moment they begin the attack animation which helps keep the unit cohesion
I've also strategically placed the actor they are maintaining formation with to the guy in the back so that when he turns the entire formation doesnt jerk around either.
a lore accurate 1:1 skyrim civil war battle (120 stormcloaks vs 120 imperials, smooth fps)
Skyrim WIP Battle Formations
Im working on a new battle formation mod for skyrim that is going to make any civil war soldiers near eachother go into formation and fight like a cohesive unit. Ideally it should be compatible with any civil war mod since it is going to just grab civil war troops on screen and organize them together.
Here is a preview of the progress so far with 45 Imperials in formation going up against 39 charging Stormcloaks: https://youtu.be/r7kPTHiwPfk
note: the formations are very effective - only about 2 soldiers died here (repeated test got up to 8 depending on how well the commander moved) - when i tested turning formations off and between 11 and up to 25 imperials died