Jump to content

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.

 

  • Like 1
  • 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

I also changed the max  attack range for melee units, that makes formation fighting also nicer and more effective

  • Thanks 1

Share this post


Link to post
Share on other sites

I would need some player vs player test before moving forward. Some volunteers?

Share this post


Link to post
Share on other sites
16 minutes ago, Angen said:

I would need some player vs player test before moving forward. Some volunteers?

Sure :)

Share this post


Link to post
Share on other sites

@(-_-) thanks, I let you know when ready :)

@ffffffff yes, he did great job, but anyway they do not hold the formation while fighting

Edited by Angen

Share this post


Link to post
Share on other sites
33 minutes ago, Angen said:

they do not hold the formation while fighting

not intented? they should not hold guess

Share this post


Link to post
Share on other sites

I do not think they should not :) I do not see the point of formations and different shapes and bonuses when they are only grouped in non shape cluster during fight. There is cool looking syntagma, phalanx or tetsudo formation but all magic is gone after engage.

Share this post


Link to post
Share on other sites

Our combat system in general is not friendly to the sort of formations that we're trying to make. It just won't work. If we wanted total war style formations we'd need a unit production/unit control system that is more similar to total war. The current aoe-style combat system really can only support simpler aoe-style formations that don't need to stay together when attacking, which makes any sort of formation-based bonuses totally impractical. The devs keep trying to have it both ways with everything and the gameplay is already garbage because of it.

  • Like 1

Share this post


Link to post
Share on other sites

IMO, being able to lock units in a formation to a group would be enough. In other words, battalions that you control as one unit. There is a lot of discussions on the forums regarding that.

  • Like 1

Share this post


Link to post
Share on other sites

@aeonios: i would say the implementation of formation is quite good. And firstly I  thought too, that the productionsystem needs to be adopted, but then I realiezed that an automatic Hotkey-Icon assignment, when forming a new formation would do the job even better, and keeps it easy and let everyone the choice how they want to play the game. And not everything would need a overhaul.  For sure, formation  don't keep a perfect geomatrical formation, when fighting, but for the most part in history, it wasn't much different. War is a mess and battles are messy. And the advandage of fighting in line, wasn't to fight in a perfect line, but cover each others @#$%, and other facts like moral and communication advandages. So the bonuses on fighting in formation aren't arbitrary, and in game they compensate also some disadvandages that come in hand with using formations.

@Angen: i think if u want more perfect and beautyful formation-fighting u need to think of changing the aura system, like giving aura only when in formation and idle. If u dont, the formation would be impractical and easy to outmaneuver. 

Share this post


Link to post
Share on other sites
10 minutes ago, gaius said:

i think if u want more perfect and beautyful formation-fighting u need to think of changing the aura system, like giving aura only when in formation and idle. If u dont, the formation would be impractical and easy to outmaneuver. 

If giving formations bonuses such as extra hp/armor etc, I don't think auras is the way to go. It would be better to implement ways to do that just like how speedmultiplier is done. Thats just an opinion.

Share this post


Link to post
Share on other sites

I think to give a small 5 meter aura range when in formation and idle would make sense, for gameplay, implementation and cause it seems to be realistic. 

Share this post


Link to post
Share on other sites
34 minutes ago, gaius said:

@aeonios: i would say the implementation of formation is quite good.

In what universe? 0ad's formations are extremely rigid. They don't turn or reverse direction properly, there's no middle ground between completely breaking down and maintaining the formation rigidly when attacking, and they can't handle obstacles at all. There's also no practical use for them besides keeping troops together.

In total war formations do turn and reverse smoothly, they handle obstacles just fine, and you can do all kinds of cool and centrally important things with them like directional bracing, shield castle, and charging. Total war also has epic cavalry charges that are awesome for mowing units down. It also demonstrates why units need to be managed in batallions, because each batallion takes on the given formation individually, allowing you to place formations strategically on the battlefield, to flank and surround the enemy. Total war also has a vision penalty for trees, allowing you to hide units in forests to ambush the enemy. The realism and depth to total war's combat system is very impressive, and 0ad has none of that.

0ad also has none of the straightforwardness or simplicity that aoe2's combat system does, and at least aoe2's formations could maneuver properly and handle obstacles. It's literally the worst of both, with territory and citizen-soldiers thrown in just to trash up the gameplay even more and remove all kinds of interesting strategic options that were standard in aoe2. That's why people are playing aoe2 rather than 0ad. Two decades after aoe2 was released and they've still got people playing professional tournaments and we only have 2 high level players total even with all the improvements we have over it.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, (-_-) said:

If giving formations bonuses such as extra hp/armor etc, I don't think auras is the way to go. It would be better to implement ways to do that just like how speedmultiplier is done. Thats just an opinion.

I think aura for that is just enough and fine. Not range aura, but personal. 

Quote

IMO, being able to lock units in a formation to a group would be enough. In other words, battalions that you control as one unit. There is a lot of discussions on the forums regarding that.

Actually I am working with concept, where every created formation is one click selectable. And it totally breaks if members are under required count of  members (what is actually patch in progress derivation)

Edited by Angen

Share this post


Link to post
Share on other sites
2 hours ago, aeonios said:

They don't turn or reverse direction properly. 

In total war formations do turn and reverse smoothly. 

Well, we are calculating position and rotation and then looking for the closest unit to take it. What is not always the closest unit. If this works, I think it would solve this problem.

Share this post


Link to post
Share on other sites

Did a little experiment today regarding how formations should be handled. I changed unit selection to force units in a formation to be selected as a whole(all at once). Essentially locking a formation into a group. This is only a change in the GUI, so one could theoretically bypass this restriction. But I doubt anyone would go to such lengths just to select and move a unit. The restriction would be lifted when the formation is disbanded ofcourse.

I do not actually recommend anyone to use it since it is IMO done in a very hacky way and is incomplete (Completely forgot about mouse drag -.- ).

But its on github for anyone who may want to use it ^, or as some sort of inspiration for anyone willing to implement it properly.

https://github.com/smiley3/0ad_formations_mod

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @(-_-). will definetly look at your code. Not even thought about that cool idea. But i tried it and i didn't discover any other behavior. Maybe only a22 combatible?

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

×