Jump to content
Sign in to follow this  
tpw

TPWC AI suppression system

Recommended Posts

Just downloaded the pbo from the OP.

And I have had some odd results:

1) I shot a bullet at a single rifleman, and he lay down like a normal AI. But the (the red dot appeared) and your script told him that he was suppressed, so he went up to kneeling position. Clearly you don't want suppressed AI to rise instead of drop.

2) If you suppress AI on the move, are they supposed to stop moving? Mine didn't.

3) AI suppressed by firing bullets past their head don't have rate of fire reduced. Does your script apply vanilla suppression effects to the AI as well?

4) There seems to be some randomness with whether suppression works or not, which on second thought is perfectly appropriate.

Lastly, I saw some bizarre behavior that I can't decisively blame on the script, but I haven't seen any of it before. I suppressed a rifleman twice, and he started sprinting away from me as fast as he could. First, I though he was just doing the usual suicidal flanking maneuver, be he ran right past me, heading for the hills. One the way, he threw two frag grenades while running, in his direction of movement. He didn't aim them at me. Secondly, when he was spraying me full auto, he ended up shooting vertically, as if he was aiming at the spots where my bullets went over his head. He would correct for recoil at all, or even aim at the correct elevation. And I think I saw bullets hitting the ground in front of him, as if they were falling from his muzzle.

Edit: Yes, something in the script is causing units to shoot straight up into the air, with the bullets spraying the ground at their feet.

This is with a Chedaki rifleman and ASR running. Could there be conflicts?

Thanks for the feedback

We have worked with Robalo to try to ensure that there aren't conflicts, but there may well be.

TPWCAS changes the following skills: aimingshake, aimingaccuracy, courage,general

TPWCAS changes posture knee/down/auto

TPWCAS changes behaviour mode to combat under suppression (development version)

And that's it. We don't set unit waypoints, modify the FSM, assign targets, modify recoil or rate of fire etc etc. It might be that TPWCAS can get in the way of systems that do these things, but I'm not sure how.

One thing to note, suppression doesn't affect units that have been assigned certain behaviours. Fleeing units aren't suppressed. Units ordered into cover aren't suppressed. Units ordered into stance aren't suppressed. Units under the control of various FSMs may not be suppressed.

I found when developing this that without ASR AI the responses to suppression are very predictable. With it running, they are not. I read this as a positive thing.

Please try the development scripts above, they are getting a lot closer to what we would end up liking to achieve.

Share this post


Link to post
Share on other sites
This is with a Chedaki rifleman and ASR running. Could there be conflicts?

The current release of ASR AI is not fully compatible with this, but I'll make sure it plays better with this system for next one.

---------- Post added at 11:40 ---------- Previous post was at 11:36 ----------

Interesting. That's a good idea. Do you have any idea why units don't always seek cover. Is there a way to "force" them toat least try to get to cover? Cause right now I would say that even in areas with dense cover many ai would still rather go prone in the open then get behind a wall or something. Maybe its just a side effect of a slow computer.

Since I'm going to add a modified danger.fsm for next ASR AI, guess I can add this to the "can fire" handler as per fabrizio_T's suggestion:

	if (_this getVariable["tpwc_suppressedstance", 0] != 3) then { // don't stop to shoot if fully suppressed
 	_this forceSpeed 0;
};

Share this post


Link to post
Share on other sites

TPW, I used your latest code to FRAPS some suppression game play.

I did change some 'object hide = true/false' to make unsuppressed green, and suppressed yellow and red. Not sure if that was you intention in the first place - else it's just for this vid.

This footage is made on locally hosted MP server - on dedicated server I have some inconsistent behavior I need to check.

E.g. suppression goes from green to yellow but hardly ever red, and suppression has much less effect

(May be caused by ASR-AI which I had running on dedicated but not on locally hosted server)

Share this post


Link to post
Share on other sites
TPW, I used your latest code to FRAPS some suppression game play.

I did change some 'object hide = true/false' to make unsuppressed green, and suppressed yellow and red. Not sure if that was you intention in the first place - else it's just for this vid.

This footage is made on locally hosted MP server - on dedicated server I have some inconsistent behavior I need to check.

E.g. suppression goes from green to yellow but hardly ever red, and suppression has much less effect

(May be caused by ASR-AI which I had running on dedicated but not on locally hosted server)

Thanks mate, magic footage - mind if we front page it?

Yeah I actually specifically changed the suppression debugging so you could differentiate between unaffected (no coloured balls), firendly fire (green), sporadic enemy fire (yellow) and heavy enemy fire.

But hey, the script is there for you to change to your heart's content. It's really just a framework for people to bolt shit onto.

EDIT: BTW, great to see your code got the vehicle gunner suppression working

Edited by tpw

Share this post


Link to post
Share on other sites

No problem to front page the footage (though it could use some proper editing)

I've missed the 'friendly fire' bit in your latest code - your debug color coding makes sense too.

Share this post


Link to post
Share on other sites

Don't mind me I'm just drooling all over the place....

Share this post


Link to post
Share on other sites
Don't mind me I'm just drooling all over the place....

+1

Except I'm weeping onto the keyboard, as I don't have any time to play :(

Share this post


Link to post
Share on other sites
1) I shot a bullet at a single rifleman, and he lay down like a normal AI. But the (the red dot appeared) and your script told him that he was suppressed, so he went up to kneeling position. Clearly you don't want suppressed AI to rise instead of drop.

Thats is normal. One round will only cause an ai to go crouched. It takes multiple to get to go down. Like you said, the ai probably reacted how it normally would by going prone, and then reacted to our suppression by going crouched.

2) If you suppress AI on the move, are they supposed to stop moving? Mine didn't.

no, but suppression does cause there courage to drop. If it drops enough they will be very hesitant to advance.

3) AI suppressed by firing bullets past their head don't have rate of fire reduced. Does your script apply vanilla suppression effects to the AI as well?

No it doesn't although I thought reducing accuracy generally reduced rate of fire, but I am probably way wrong. I'll try to find a way to reduce rate of fire.
4) There seems to be some randomness with whether suppression works or not, which on second thought is perfectly appropriate.

Like tpw said, with asr the ai seem far less predictable. And it is possible, especially at low framerates, that the bullet moves too fast for our script to catch. But If you put a burst down range I find it doesn't kill the ai, it will certainly suppress him.

Lastly, I saw some bizarre behavior that I can't decisively blame on the script, but I haven't seen any of it before. I suppressed a rifleman twice, and he started sprinting away from me as fast as he could. First, I though he was just doing the usual suicidal flanking maneuver, be he ran right past me, heading for the hills. One the way, he threw two frag grenades while running, in his direction of movement. He didn't aim them at me. Secondly, when he was spraying me full auto, he ended up shooting vertically, as if he was aiming at the spots where my bullets went over his head. He would correct for recoil at all, or even aim at the correct elevation. And I think I saw bullets hitting the ground in front of him, as if they were falling from his muzzle.
That is weird. Have you been able to reproduce it or is it just random. Thanks for your feedback maturin.

Share this post


Link to post
Share on other sites

Little, but useful. Thanks for this! AI enhancements are more than welcome.

On the other hand, it'd be awesome to give AI an ability to fool player by "playing" death animation in certain circumstances. For example, a squad of 10 soldiers has been ambushed by hostiles, 8 members were killed in combat and the lucky two has no way to survive, except evading being killed by imitating getting killed. There's a lot of death animations to choose from, so any of them can be chosen randomly. Later on, when several or at least one of the attackers gets closer to the 'death actor', he suddenly stand up and tries to eliminate as many enemies as possible. I hope you get what I'm trying to tell.

It's probably complicated to implement such a trick into the core of AI, but I think it's definitely worth a try. It'd be entertaining to see AI fool the player.

Share this post


Link to post
Share on other sites

1 thing i noticed from the video posted, player suppressing AI that is currently in prone stance, they will all automatically go to crouch stance. Was it intended? video shown at ~5:35

Share this post


Link to post
Share on other sites

Haven't been keeping up with the thread. I'll re-test without ASR.

Share this post


Link to post
Share on other sites
Thats is normal. One round will only cause an ai to go crouched. It takes multiple to get to go down. Like you said, the ai probably reacted how it normally would by going prone, and then reacted to our suppression by going crouched.

Here's how I handle it in my current stance modifier:

_unitss = _unit call CBA_fnc_getUnitAnim;
_curstance = _unitss select 0;
_curspeed = _unitss select 1;
TRACE_3("",_unit,_curstance,_curspeed);

// if the unit is prone, or doing some evasive action, leave it be
if (_curstance == "prone" || _curspeed == "fast") exitWith {};

You may or may not want to take the speed check out.

Share this post


Link to post
Share on other sites

Wow, I can really see this mod in action when I attack a full squad with a scoped M240. By hosing down the entire enemy formation, I can get them to act quite docile. The volume of fire lessens (I once even got them to stop shooting entirely), and they remain in place. As soon as the red dots disappear, they start standing up and bounding and sprinting to cover. Once they're in cover, suppressing them will cause them to move haltingly and crawl around rather than sprint.

It's hard to see what the system does to help you in terms of single enemies, but now I can see well-placed machinegunners having a huge impact of larger firefights.

It does appear, however, that running this with ASR causes bizarre, debilitating issues in the AI, described earlier.

Share this post


Link to post
Share on other sites
It's hard to see what the system does to help you in terms of single enemies, but now I can see well-placed machinegunners having a huge impact of larger firefights.

It does appear, however, that running this with ASR causes bizarre, debilitating issues in the AI, described earlier.

From an experience in a quick test at the weekend, it can be useful against single opponents. A sniper attacked my squad from thick bush - I guessed from the smoke roughly where he was & sprayed the clump of bushes while my squad got to cover. He didn't get more than one (missed) shot. An MG would have been better than my Mk17 RCO, ofc.

I didn't see any oddities with asr_ai (TPWC v1.00) albeit with quite limited testing - what other mods are you running, if any?

@Inlesco - a 'play dead' option is already a feature in (IIRC) GL4, so it's certainly do-able. However, IMHO it isn't a core fit with TPWC, which needs to be as lean & light as possible if FPS isn't to drop to the floor in big firefights.

Edited by Orcinus

Share this post


Link to post
Share on other sites

Did some more MP testing with Dedicated Server: unfortunately the debug markers stay red all the time, and suppressing doesn't seem to be equal to SP. But that needs some more verification.

Colorcoding => "hideObject": Multiplayer: Command has local effect, needs to be run on each client -> so would need CBA function to work properly in MP

In the mean time some more footage with 'right' color coding ;-)

(Shooter (me) is in AI invisible cheat mode - hence no reaction to shoot me..)

Edited by Ollem

Share this post


Link to post
Share on other sites
@Inlesco - a 'play dead' option is already a feature in (IIRC) GL4, so it's certainly do-able. However, IMHO it isn't a core fit with TPWC, which needs to be as lean & light as possible if FPS isn't to drop to the floor in big firefights.

Yes it is GL4 that has this and it works for AI and players.. but I agree that should not be integrated with TWPC. I tried a DAC mission yesterday (adding the TWPC script) with AI vs AI (about 40 groups...so probably 200ish units) with humans on Blufor side and noticed some slowdowns when lots of action was going on.. very minor but it's there... so keeping it slim and trim is important IMHO

Share this post


Link to post
Share on other sites
Nice. All good suggestions. I am sure tpw will use them.

Interesting. That's a good idea. Do you have any idea why units don't always seek cover. Is there a way to "force" them toat least try to get to cover? Cause right now I would say that even in areas with dense cover many ai would still rather go prone in the open then get behind a wall or something. Maybe its just a side effect of a slow computer.

Thanks for the advice. Right now aiming accuracy is multiplied by the units courage and general skill so the same sort of effect is created, as low skill units typically also have low general skill and courage (using asr) and high skill units generally have high general and courage, creating a large divide between the two when underfire. And I found that if I used the the actual skill of the unit at the time, units skills dropped to "x10-5" levels because of a single burst of machinegun fire. Infact even now I've witnessed ai shooting the ground right in front of them because of poor accuracy, and aiming accuracy doesn't drop much lower than 5.

My 2 cents, based on experience:

Usually units don't move into cover because danger.fsm stops then when an enemy is in LOS (CAN FIRE event). This is bad and was made this way because AI units need to be stopped to fire on target.

You can't simply comment the block of fsm code stopping units, as doing this AI units will prefer running around from cover to cover without caring much to fire on targets. I can think of ways around, but no straightforward solution for this.

About forcing units to move in cover: it's not scriptable in my opinion, as hardcoded low-level "combat" mechanics usually override scripted behaviour. I posted a ticket on CIT about this a while ago.

Be very careful with very low "aimingAccuracy" values: "x10-5" is granted to cause frequent friendly fire accidents and / or having units shoot on their own foot (!).

Anything under 0.05-0.1 is a no-go in my experience, so i would suggest to cap minimal accuracy to some higher values. Also don't use much low "aimingShake" values: very low values cause unit refuse to shoot. This happens sooner for units with wounded arms.

Finally, be careful with "courage": usually courage above 0.8 hinders combat efficiency: units move too much on their own and groups lose cohesion. Usually i cap courage to 0.8.

EDIT:

Edit: Yes, something in the script is causing units to shoot straight up into the air, with the bullets spraying the ground at their feet.

Exact symptoms for values too low in aiming accuracy. Mind to cap.

Keep the great work.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
Did some more MP testing with Dedicated Server: unfortunately the debug markers stay red all the time, and suppressing doesn't seem to be equal to SP. But that needs some more verification.

Colorcoding => "hideObject": Multiplayer: Command has local effect, needs to be run on each client -> so would need CBA function to work properly in MP

In the mean time some more footage with 'right' color coding ;-)

(Shooter (me) is in AI invisible cheat mode - hence no reaction to shoot me..)

Nice vid. What exactly don't the ai do when in MP vs SP? and at 23 sec, those guys who are supposedly suppressed but remain standing: That is due to the fact that units that are in one those "sticky cover points" (marked with an L when you are commanding) are unable to change stances. Each of those "sticky points" seem to have a predefined stance attached to it, that cannot be changed through scripting or commanding unfortunately. Thanks for the vid by the way. Keep em coming.

Wow, I can really see this mod in action when I attack a full squad with a scoped M240. By hosing down the entire enemy formation, I can get them to act quite docile. The volume of fire lessens (I once even got them to stop shooting entirely), and they remain in place. As soon as the red dots disappear, they start standing up and bounding and sprinting to cover. Once they're in cover, suppressing them will cause them to move haltingly and crawl around rather than sprint.

Yes, but even in a small firefight the suppression can make some pretty massive differences. I've had squad on squad engagements last just under 20 minutes with it - And we didn't even kill all of the opfor. Of course the terrain the firefight takes place in has a huge impact as well. Aliabad and Caprai are perfect. Also what I notice, and maybe its just my imagination, is that there fire superiority plays a much bigger role. Ie. I had an ai machinegunner in an optimal position providing suppressive fire. While he was doing so me and my ai mates were advancing, and while doing so we were taking little to no accurate fire. Then my machinegunner went for a reload and immediatly rounds started impacting much closer to my men and me. machineguuner openend up again and we could once again advance in relative safety.

It does appear, however, that running this with ASR causes bizarre, debilitating issues in the AI, described earlier.

I have seen this. It only seems to happen when the unit is fleeing or the unit's group has taken excessive casualties. The unit will ignore the stance assigned to it by tpwc (usually leaving him standing) and sometimes (but not always) his rounds will land at his feet. Very wierd behaviour that I am finding very hard to reproduce. And this doesn't happen without ASR maturin? Do you know how to reproduce it?

--edit--

Oh Fabrizio updated his post while I was typing. Thanks Fabrizio, I'll make the min values for aiming accuracy/shake as you suggest, release and see if anyone has problems. Courage is never modified to go above .8 but is there any negatives for going down to low values. Should I make a min for that as well? Thanks for your advice.

Share this post


Link to post
Share on other sites
Did some more MP testing with Dedicated Server: unfortunately the debug markers stay red all the time, and suppressing doesn't seem to be equal to SP. But that needs some more verification.

Colorcoding => "hideObject": Multiplayer: Command has local effect, needs to be run on each client -> so would need CBA function to work properly in MP

In the mean time some more footage with 'right' color coding ;-)

(Shooter (me) is in AI invisible cheat mode - hence no reaction to shoot me..)

Sorry but this has no reflection on the TPWC mod as its good but....

I know this is a test but really does anyone still play with ai as bad as that.. That type of ai behaviour is lost in the past especially Arma 2.

OK I know its just a test but the ai are not going for cover, there are walls, buildings and rooftops nearby why don’t they go for those?

Its astonishing that anyone puts up with ai that bad. I will set a simple test and try upload it to youtube (I’m terrible at stuff like that), but really you have to see what arma 2 ai is really like, when using gl4 & slx mixed. I don’t know, but by judging what I have just seen there, you'll think arma2 has been re-invented.

And this stuff (GL4 & SLX) has been available for years.. Why not use it…..

Share this post


Link to post
Share on other sites
Sorry but this has no reflection on the TPWC mod as its good but....

I know this is a test but really does anyone still play with ai as bad as that.. That type of ai behaviour is lost in the past especially Arma 2.

OK I know its just a test but the ai are not going for cover, there are walls, buildings and rooftops nearby why don’t they go for those?

Its astonishing that anyone puts up with ai that bad. I will set a simple test and try upload it to youtube (I’m terrible at stuff like that), but really you have to see what arma 2 ai is really like, when using gl4 & slx mixed. I don’t know, but by judging what I have just seen there, you'll think arma2 has been re-invented.

And this stuff (GL4 & SLX) has been available for years.. Why not use it…..

Remember there was no shooter for the ai to take cover from (he was invisible). So really they just saw a bunch of bullets coming from no where. I don't think the behaviour would be much different in the same situation with mods... but I could be wrong and actually would love to be proven so.

Share this post


Link to post
Share on other sites

Hah! That AI firing at/near his foot I thought was an intentional panic fire. In a mission Im playing (Grand Theft Info) -Whenever I ambush the first 2 guards they tend to fire immediately seemingly nowhere but in a panic because they didn't know where I was. I actually kinda liked this as it surprised me to see AI firing without lethal intent but purely outta (seemingly)fear/panic :)

Share this post


Link to post
Share on other sites
And this stuff (GL4 & SLX) has been available for years.. Why not use it…..

Well, for just one point - GL4 breaks pretty much every official & user mission & campaign because it messes with the waypoints. It's a great mod but has to be correctly incorporated right from the start of mission design. It is also at least a year since it had any support; SNKMAN has moved on and Tri-Force never got released. Changes to the engine may make it increasingly irrelevant, possibly break features too.

SLX is a favourite of mine, even before Gunter Severloh got rid of most of the bugs. But it is still (unless some modules are removed or edited) problematic with heavily-scripted missions.

TPWC - especially in combination with the LOS addon & the latest asr_ai - changes combat in ways that (CO)SLX and GL4 neverachieved. Try it, FFS! - & watch AI taking up appropriate stances before firing their weapons; crouching or hitting the deck when under fire; and yes indeed, going into buildings, climbing to rooftops to snipe, firing from windows, etc. And that all works just fine as addons with existing missions. And some of the COSLX modules work seamlessly with this combination, too.

You don't like it? So don't use it.

Edited by Orcinus
Wrong credit for GL4 (sorry!)

Share this post


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

×