Jump to content
Sign in to follow this  
mr_centipede

Small AI Script Addon - Cent_Stick2gether

Recommended Posts

After some more testing I am starting to come to the conclusion that the disengage command doesn't work in Arma 2. My test: order a unit in my squad to target an enemy and then order engage at will. The unit moved off to attack the enemy unit. when I ordered the unit to disengage he kept after the target and wouldn't return to formation until the enemy unit had been destroyed.

Hmm if you are right now we have:

- a broken "suppress" command

- a broken "find cover" command

- a broken "hold fire" command

and last, but not least

- a broken "disengage" command

That's not great news.

The more i dig in this game, the more i find OLD working features that now don't work ... ;(

I think the newly implemented COMBAT behaviour mechanics screwed many things.

---------- Post added at 06:47 PM ---------- Previous post was at 06:40 PM ----------

It also seems the AI leader seems less suicidal now... might made fabrizio_T happy. Will test more might just be a fluke...

Can't check, i haven't the game here.

I suspect the "suicidal leader" problem is something hardcoded or fsm-coded, so it should eventually override any script-level tweak ... i may be wrong though!

Share this post


Link to post
Share on other sites

@fabrizio_T

I also tested the disengage order in A1 and OFP. It doesn't work in the earlier games either. I had always assumed disengage was supposed to tell a unit who had been given an engage order to stop attacking and return to formation. Clearly I must have been mistaken. I ordered a unit to engage a target. Unit moves towards selected target to attack. I select "disengage", unit keeps moving towards target. unit destroys target and then starts target other nearby enemy units.

According to the Arma manual

"'Disengage' - the subordinate is told to no longer engage its target and move back to the formation."

As far as I can tell disengage does next to nothing. It certainly doesn't make a unit return to formation.

Share this post


Link to post
Share on other sites
@fabrizio_T

I also tested the disengage order in A1 and OFP. It doesn't work in the earlier games either. I had always assumed disengage was supposed to tell a unit who had been given an engage order to stop attacking and return to formation. Clearly I must have been mistaken. I ordered a unit to engage a target. Unit moves towards selected target to attack. I select "disengage", unit keeps moving towards target. unit destroys target and then starts target other nearby enemy units.

According to the Arma manual

"'Disengage' - the subordinate is told to no longer engage its target and move back to the formation."

As far as I can tell disengage does next to nothing. It certainly doesn't make a unit return to formation.

I can't shed any light on that ...

If it does not make any units disengage then what's the point ?

Doh.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
Quick question: does the addon work for ArmA 1?

I think it should work, it originally came from ARMA1, and I dont think I used new command from ARMA2. You can try it zGuba, it still needed XEH

Share this post


Link to post
Share on other sites
I think it should work, it originally came from ARMA1, and I dont think I used new command from ARMA2. You can try it zGuba, it still needed XEH

Thanks. I find it very useful!

Share this post


Link to post
Share on other sites
about suicidal leader...

i think default combatmode is allways "red"(if we' get bayonets it will be very useful))

i think something like

while {(behavoir leader _group in ["combat"]) and !(leader _group == player)} do

{

_group setbehavoir "combat";

_group setcombatmode "yellow";

leader _group disableai "autotarget";

sleep 2.0;

};

can help??

sorry ma sintax))

==== another one q

can someone know about formation's_config_entry??? where it'??

or implement more formation in 1-8- list????

Edited by nikita320106

Share this post


Link to post
Share on other sites
i think default combatmode is allways "red"

AFAIK it was "YELLOW", at least for ArmA ...

Share this post


Link to post
Share on other sites

I have done some more testing with v1.1. I'm not convinced that it is working as hoped. I have witnessed subordinate commanders ordering their units to engage when they know that they are outnumbered by at least 2 to 1.

My test was 1 fire team v an enemy squad. I had the enemy squad run behind cover with a hold fire order. The subordinate commander saw the enemy units before they made it to cover and yet still ordered his units to engage.

Have you had any luck with your new version mr centipede?

I was thinking, what about adding a commandfollow command to your script so that it automatically orders units back into formation either when they are outnumbered or when they get too far away from their leader (say 200 metres)?

Edited by stun

Share this post


Link to post
Share on other sites

I did try use doFollow command, but never worked. I think I'm burn out for now. Got some real project coming... dont you just hate work? so got to put this as is until got more time...

feel free to edit/repair to suit your needs

Share this post


Link to post
Share on other sites

Is the latest version that you have been playing around with very different form version 1.1?

Share this post


Link to post
Share on other sites

Mr_Centipede allowed me to publish improved version of His addon.

I've converted and optimised the code a bit, so it won't hog on CPU as much as it did before.

Here it comes, direct mirror: cent_stick2gether.pbo

Feedback is always welcome.

Edited by zGuba

Share this post


Link to post
Share on other sites

Thanks for your work zGuba.

I have just tested your update zGuba with a mission I created to test this addon when it first came out. My mission has a 3 man group under the command of the high commander versus an entire squad of opfor who have a never fire order on their move waypoint. In my test the leader of the 3 man group almost always ordered his 2 soldiers to engage within about 30 seconds of noticing the enemy. This is despite the fact that they were out numbered by at least 4 to 1 and were aware of the enemies numbers. From what I understand this addon should prevent groups from engaging unless they have a significant numerical advantage.

Share this post


Link to post
Share on other sites
Thanks for your work zGuba.

I have just tested your update zGuba with a mission I created to test this addon when it first came out. My mission has a 3 man group under the command of the high commander versus an entire squad of opfor who have a never fire order on their move waypoint. In my test the leader of the 3 man group almost always ordered his 2 soldiers to engage within about 30 seconds of noticing the enemy. This is despite the fact that they were out numbered by at least 4 to 1 and were aware of the enemies numbers. From what I understand this addon should prevent groups from engaging unless they have a significant numerical advantage.

I have pushed up version with bug. Next release should be much more effective.

I'm gonna work on the script so it will be actually caring of groups only, check units morale and if enemies are detected.

---------- Post added at 07:43 PM ---------- Previous post was at 06:36 PM ----------

Cent_Stick2gether 28.08.2009

Code and performance improvements, shall work at least better than previous release.

New features:

- counts APCs and tanks 3 times as important as people

- counts only units known by given group

- ignores aircrafts and boats (I'm gonna improve handling them in the future)

- uses nearestObjects array instead of triggers

- handles groups instead of single characters

Edited by zGuba

Share this post


Link to post
Share on other sites

zGuba, thanks for your effort. Though if you want to change the cent_* tag to your z tag, I wont mind really. :)

Share this post


Link to post
Share on other sites

Keep up the great work zGuba.

I have done some more testing on this latest version. I have to admit I am finding it very difficult to reliably test this addon.

In most cases the behaviour doesn't seem to be very different from the behaviour exhibited by the AI using vanilla 1.03 A2. I have witnessed AI leaders ordering their men to engage when outnumbered on numerous occasions. The exception is when there is an opfor tank is present and the subordinates stay put.

I have a suspicion that the reason that subordinate AI commanders are still ordering their units to engage when they are outnumbered is because the commander isn't aware of the true enemy numbers. By this I mean if the opposing group contains 12 men, then perhaps the AI leader only knows personally of 2 of them (they seem to be a bit blind) and therefore orders his men to attack. It is strange as the high commander I seem to be far more aware of enemy numbers than the individual subordinate commanders.

Would it be worth testing a version of this addon where units in a certain radius of the high commander, say 500 metres, are able to share knowledge of enemy numbers and deployment with the high commander and each other? I am curious to see if this would get the addon working more reliably - enabling individual AI leaders to make better decisions.

On a different note, is it possible to write a script to get the AI leader to engage an enemy with the rest of his fire team? Or to get a whole fire team to attack each target instead of the leader splitting his team up to attack multiple targets? These are issues that have always annoyed me with ofp and A1 - it seems unrealistic that the leader would just stay in one position and order his men to attack various targets, as it effectively reduces the attacking strength of the fire team to 3 or less men.

Another thought - If the script determines that the friendly AI forces outnumber the enemy sufficiently to attack i.e. by 70% or more, the AI leader is still only likely to send a couple of units to engage at a time instead of attacking en mass and in doing so negate any advantage. Is there any scripting work around for this?

Edited by stun

Share this post


Link to post
Share on other sites

You're absolutely right stun, I've just noticed that I've pushed wrong version on my FTP and from my observation it did refused to work. :confused:

I'm polishing the script and readding debug messages, so it will have to do what it was supposed to be doing :)

Thank You Mr Centipede! :yay:

Meanwhile, I'm publishing the alpha 2.0 version of Stick2gether under my tag so my work will get distinguished from original, but the spirit of this addon (enableAttack) will probably remain the same.

ZGB_Stick2gether.pbo

Please check if it's working properly, I'm gonna do some tests on it right now.

Share this post


Link to post
Share on other sites

Final version tested and working good enough to be signed and published.

Gotta be released soon.

(sorry for double post)

Edited by zGuba
double post. sorry!

Share this post


Link to post
Share on other sites

Hi zGuba,

nice work with this script, pretty similar to the one i've done for myself (but mine's actually way buggy :)).

Just a question:

in "loop.sqf" Shouldn't be "disableSerialisation" really "disableSerialization" ?

http://community.bistudio.com/wiki/disableSerialization

Cheers.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×