Jump to content
Sign in to follow this  
SnowSky

SubFormation System

Recommended Posts

Hey guys,

I wrote a little addon/script that gives you the possibility to keep teams in an advance/flank/stay back capability with their own formation.

Dependency: CBA

Download : https://dl.dropboxusercontent.com/u/40940714/%40ASS_FormationSystem.zip

Usage: Select squadmembers and order them to move somewhere with the middle mouse button. Keep the button pressed for more then 0.4 seconds.

You will get a Hint if the unit remains in formation or holds at the expected position.

Let me explain more detailed what I want to achieve:

Situation:

You have many AI members (for example 20) and are a teamleader.

You want some members (for example 2, 8, 15) flank right.

How it is in vanilla:

You order them through the advanced movement menu.

what happens?

They will get an offset from you, but they will keep the formation. The more units you have and the more distance they have between each other, the more the effect is visible.

The AI that still follows you, won't stick together.

For me it was especially distracting when I made the AI capable to treat each other medically with AGM.

They had the capability to help each other when they were closer then 5meters, without me interventing. More then 5m distance and I had to give them the order to move there to help.

When I used the flank and advance options, and they got under fire, they weren't able to help eachother, even when I wanted to see them as one subtroop.

How it is with this addon:

You order them to moveTo where you want them to be, and keep the middleMouseButton pressed for more then 0.4sec.

what happens?

Normally they would hold that position. If you kept the middleMouseButton pressed for more then 0.4sec. they will move if you move.

The selected team will stick together (Attention, I noticed also that higher squadnumbers will still have larger distances to each other, but not as large as without this script).

The soldiers that follow you, will stick together, closing the gaps.

Problems I had:

Sometimes, if you give the orders, they won't move or only the formation leader moves to the expectedPosition until you move a little bit. This seems to be a timing problem I don't fully understand yet.

Like Igitur, also in this example the units will have the waiting status. The units need this state, otherwhise they won't react to the doMove commands and the whole system won't work :(.

Problems that will come:

Other systems that order AIs to do something, might be affected.

If ACE adds AI Treatments, there will be some priority problems with the doMove/doStop orders which the system will use (that's how it was done in AGM and I won't know any other possibility).

If nobody works on it, I will try to do it and in that case, I would try to make also some kind of priority management for future mods.

Edit: I have seen ACE won't use scripts for AI in order not to cause problems with AI mods.

It's similar to Igiturs Custom Formation script. But it doesn't change AI Behavior regarding safemode!

Other differences are, that you can order multiple units at the same time and the AI will stay also in relation to the formationDirection.

Also I used more appends/deleteAt and no eval, which should harm less performance (at least on my old machine I didn't notice anything even with Igiturs script)

I'd like to thank Igitur for his script, I found his work when I had trouble with my system at the first steps and saved me a lot of time! ( http://forums.bistudio.com/showthread.php?176872-Custom-formations-system&highlight=Custom+Formation )

Also if someone is capable to work with FSMs, I'd have some questions:

Would it be possible to achieve what I did, with an FSM?

I guess yes, but would it be possible to inherit from the base FSM?

Or would I have to rebuild all the functionality of the AI and then add my conditions and commands in order to have something useful?

Please let me know how you like the idea, realisation and what other features regarding AI you'd like.

I'd really appreciate your feedback and support!

I am no way experienced and always enjoy to see how others would solve the problems.

Will I resolve reported problems?

Maybe, but because of lack of talent/intelligence/experience I might not be able to do it.

Also because of my old systems I can't do any multiplayer tests but there should be no locality problems as the script is only used on your group and only if you are the teamleader (in which case they are local to you - exclusive ai which sits in vehicles with drivers of external localities, but then they even won't be needed).

Edited by SnowSky
  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×