Jump to content

Formation rework

Recommended Posts

So, hands up formations are back !! :)

I am reworking Unit AI to work with formations.

So current state looks like:

  • formation members hold their formation position to death
  • formation auras are applied from D1218
  • formation stops if melee attacked and fight back
  • if not fighting or moving and range attacked goes to the attacker to reach him ( this needs rethink, you ll see why in video )

This is what I need to think how to make it:

  • look for enemies if not attacked by them and attack first based on stances ( yes, formation members can do that, but I needed to disable it for them )

I am currently testing only fighting men to men, so there is a lot of what I need to try.

And yeah a lot of tweaking and making things better currently I did.

So here is some video about current state (just ignore warnings and errors, they are for my debug): formation rework - state 1

I hope you are excited. :) Maybe you will see them fightingin A24.


  • Thanks 1

Share this post

Link to post
Share on other sites

No why :D ? I know there are changes, but D13 is in dev so long ... I am not planning to merging it with something what can be changed 10 times. I ll merge it when it will be out. :) First I need to come up with global logic :D which will work in playable state.

Share this post

Link to post
Share on other sites

Very nice @Angen, looking forward to see your work. I did make also some work, on formation fighting and fighting in general. One think i did is bring a bit chaos to fighting. Which means that a unit won't choose their max range for attacking, but sth like 85-100% of the max_range to attack. that means that units, ranged and melee, don't build perfect circles if they surround an enemy.  That makes formation-fighting more realistic and effective and they stay more together. Maybe u will see it on the next release of formation-fighting mod. Also I changed the chasing behavior esp. for formations. I use the f.e. the MoveToCenter function( for lag reduction), so they chase more  as a formation. Animationwise it isn't the best solution.

What i would find very useful, would be a possibility to select formations via the middle selection panel and not only single units. . Maybe I implement a Regiment production system with like 11 Soldier and 1 Champ, directly in barracks, which  form also automatic a formation. Both are really useful if formation fighting is used widely, I think. 

Cool would be also to use different Formation for different tasks, like phalanx as a formation which is very durable and give 20% more health for example, while other formation get 20%more atttack .

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now