Jump to content
Sign in to follow this  
Rommel

AI Suppressive Fire Reactive

Recommended Posts

<span style='color:red'><span style='font-size:19pt;line-height:100%'>Suppressive Fire Reactive</span></span>

Version 1.01 by Rommel

Aim: To Create a more immersive,and less aggressive AI, whom will react to sporadic fire and suppression. Optimised for Multiplayer (COOP), working with DAC v2.0, ECS and various other mods.

Description: Upon firing a few rounds past the Ai, they will hit the deck, and move into a more adoptive battle behavior, upon continuous fire the Ai's morale will continue to decrease in which they will become less skilled and more prone to fleeing. The Ai's survival rates are much higher in a firefight, and firefights last twice to three times as long.

The Ai do suppress back, however if you wish the Ai have a better return of suppression fire, use in conjunction with MadDogX's suppressive fire script.

NO GLOBAL VARIABLES + SQF Optimized.

update (1.01):

Example:[Group this,[14,4,1]] execVM "suppr.sqf";

Increased Suppressive Effects: [10,4,1]

Default Suppressive Effects: [10,5,3]

Decreased Suppressive Effects: [15,7,3]

ROMMELS PREFFERED: [14,4,1] tounge2.gif (haha, just gotta be up myself sometimes... anyway, its easily the best, increased Taking Cover, whilst less Fleeing.)

update (1.01b):

Quick Fix to syntax error introduced in 1.01.

Preview Mission Included, feel free to edit, keep base credits if possible please. smile_o.gif

clip.gifROMM_suppressive_fire101b.Intro.rar //Updated v1.01

Share this post


Link to post
Share on other sites

WOW)

that that is necessary!

thanx alot))

i'm dont have scripting skill-2q

-then what about standalone addone version?

-

Quote[/b] ]use in conjunction with MadDogX's
how to make it?

-how add check for assigned vehicle-then run something like this LECH_dimount-then prevent for mounting under fire?

once again - thanx for hard work)

Share this post


Link to post
Share on other sites

I was trying and experimenting to implement suppresive fire since OFP but never really find a way to make it properly. I'm really curious to see how it is done here. Downloading now.

Share this post


Link to post
Share on other sites

Nice one smile_o.gif I love addons/scripts like these smile_o.gif

And kudos for making it DAC compatible smile_o.gif (I should release my own DAC smokeshell script really wink_o.gif)

Looks to me like you could easily make this a standalone addon, applied to each unit on init rather than the group leader.

I wish I could do stuff like this, my skills are limited to the visual smile_o.gif

Share this post


Link to post
Share on other sites

Any chance of a self initialising PBO version like with seconds suppression script? smile_o.gif

Share this post


Link to post
Share on other sites

DAC Config Events Code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

" _Events_Unit_S = [

["[_group,[14,5,1]] execVM ""suppr.sqf"""],

[],

[],

[],

[],

[]

];

Originally had no intention on releasing an addon for this, however I give any who is willing and has the capability to do so, permission.

I have had a request to update this with units being effected by heavier weapons such as rockets etc, so we'll see how that goes for now. smile_o.gif

EDIT: In answer to the vehicle dismount, I'm going to leave that well enough alone as their are too many variables to worry about, say a unit was being heroic and gunning them down in a MG tounge2.gif or in a Tank, that would limit this scripts addon compatibilities and annoy many, it should not be too hard to implement however, just try mucking around with suppr_x.sqf, as it includes all the reactions under fire.

EDIT2:

Updated with 1.01, changeable levels of effects of suppression.

Share this post


Link to post
Share on other sites

Sounds great, does it have to be coded into a mission or is it "load-and-play?"

Share this post


Link to post
Share on other sites

Nice one Rommel!

I guess with a working setskill array command you could have done even more, lets hope BIS manage to include that one in the upcoming patch...

/KC

Share this post


Link to post
Share on other sites

Hey, Very nice.

I would like to suggest to preCompile the suppr_x.sqf, either in local variables (before the loop) or rather once as a global variable. (no more limits on global vars since v1.09+)

The reason is simple; Optimization.

The script is executed and stopped on multiple groups throughout the game. To my opinion, there is no need to compile the script every single time you run it.

I guess on it's own this might not make too much of a difference, however, when the mission / mod is loaded with scripts, I believe it certainly will help.

Share this post


Link to post
Share on other sites

Excellent suggestion mate, I should thought of it myself and its quite obviously a excellent choice to help optimise this even further, whilst nothing to complicated. wink_o.gif

Quote[/b] ]I guess with a working setskill array command you could have done even more, lets hope BIS manage to include that one in the upcoming patch...

yeh bis screwed up on that, tried and didn't effect anything....

Thanks all for the compliments.

smile_o.gif

Share this post


Link to post
Share on other sites

Good stuff Dan, now kindly make me a standalone PBO version, eh! Nice to see you're not letting that excellent scripting talent going to waste, per sé.

PS. A much better application than spamming cars during a race... though probably not as fun as Tank Dodging® or BMP2s a la Star Wars ®!

Share this post


Link to post
Share on other sites
Quote[/b] ]

Good stuff Dan, now kindly make me a standalone PBO version, eh! Nice to see you're not letting that excellent scripting talent going to waste, per sé.

Haha, so true that, standalone PBO version aye... I'll look into it, seems its on the agenda.

Quote[/b] ]

PS. A much better application than spamming cars during a race... though probably not as fun as Tank Dodging® or BMP2s a la Star Wars ®!

Those BMPs were great. smile_o.gif I should release those missions and combine them with the community ones to make a huge mega-fun pack... would be great for having for those times we all have in MP of pure stuff around

Share this post


Link to post
Share on other sites

can i add my 2 cent?

i'm not clear understood scripting but....i read wiki too))

then// for finding cover for AI - "findcover" is not enough//

it is necessary to us to find ""getHideFrom" -"Returns the hiding Position. If enemy is null it is some position in front of the object or enemy position""

//and after that send AI to cover by ""setHideBehind"-"It sets the data for hiding. objectWhereHide can be taken using findCover. hidePosition can be taken using getHideFrom.""

=======can i add another 2c??))

and what about ""combatMode "YELLOW" instead of "RED" ??

when the soldier runs under fire it looks too silly even for AI//

He is going to enemy to frighten him or to shoot down?))

imho "RED" mode is suitable only for check enemy position after firefight ending))

====================================

do not try to persuade you to correct something - i'm simply seems this theme interesting and perspective in enough - will force AI's to think and to move by more_team_spirit))

then we can realize importance of machinegunners on and snipers on a battlefield//

=====================================

wow))alot letters)) sorry my engliz ))

Share this post


Link to post
Share on other sites

Seen your first two points, however the last I am unsure (more_team_spirit).

I was unaware FindCover didn't work, worked perfect in the testing, Ai when under fire would run for cover then dive 4 or so seconds after it... say theres a bush next to them, they'd dive towards it, and atleast have a bit more cover, however I will investigate "getHideFrom and SetHidebehind", these look like they could be implemented with little trouble.

The soldiers when under fire won't run... pretty much at all, and the fact it is red is so they still engage targets, means they're not completely still, but this I agree should change with the heavier suppression...

I'll be updating this script a lot with 1.03, keep the idea's coming, they're quite good and easy to implement. smile_o.gif

Share this post


Link to post
Share on other sites

I just now noticed that findCover returns object not position. Thanks nikita. It's great news for me. I'm dumb that I didn't notice it earlier. I made a script in which all the work that apparently can be done by findCover was done by nearObjects and getting rid of objects unsuitable for cover. Getting object with find cover may allow for checking how a unit should effectively use cover (using boundingBox command) - eg prone behind a fallen tree to be invisible for the enemy and pop out from behind it to shoot. It would be great if the suppression fire script could be combined with my takeCover script (or the idea which that script ilustrates, because my script is now messy), so if a unit is suppressed he will take cover and he will more stay behind it than he will pop out from behind it).

Share this post


Link to post
Share on other sites

Unfortunately as much as its a good idea, your script is in SQS format, and the purpose of this is to be highly optmized for MP, however feel free to edit the reactions script to call your script if its wanted.

Share this post


Link to post
Share on other sites

Thanks. Unforutunately your script is in sqf format, and my script is in sqs format because I didn't learn to write in sqf so far wink_o.gif. So I'm not sure if I am able to call my sqs script from yours sqf (I've already tried to do so and didn't make it wink_o.gif ). I'll look into it when I have more time.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

{[_x, getPos _x, getDir _x] exec "LEH_takeCoverIt.sqs"} ForEach units _Grp; in either case 2, 3, 4 or 0.

wink_o.gif

Share this post


Link to post
Share on other sites

Very cool, any update on that pbo version? I take it would work as a server side only addon? (for non-player-led squads anyway).

Share this post


Link to post
Share on other sites

Sorry for the delay, I've been busy editing/testing the newest version (will be out soon, hopefully by end of this Saturday). Been using it extensively in MP, its absolutely awesome... combined with DAC it just makes the Ai so much harder, yet combat so much simpler regarding fire + movement, because of the ability to use cover fire.

smile_o.gif

Expect it within a day or two, however I'll need someone else to do the PBO version, as this is setup for groups, not individuals. confused_o.gif

Share this post


Link to post
Share on other sites

great    notworthy.gif    

there is a new or pbo version in future?

Share this post


Link to post
Share on other sites

Just came across this... Sounds very interesting.  A quick question for you Rommel:

One of the things that has always bothered me about ArmA/OFP is the lack of self preservation the soldiers seem to have.  The biggest part of my frustration here is related to how a group of soldiers (most without any AT weapons) will just stay put and get wiped out when, for instance, an enemy tank rolls up.

Now it's not like they don't see the tank coming.  Due to the way ArmA is set up, in almost all cases the infantry will detect the tank well before the tank detects them.  One would like to see the infantry clear the street and seek cover immediately, scared to death of that steel beast rolling up.  Instead they just stand there and get wiped out. huh.gif

From what I'm reading so far, it appears your script would, in this case, cause the infantry to scramble for cover, but only once the tank started firing at them.

Have you considered adding the ability to take cover before the shooting has started?  Maybe your script is just the place for something like this?!? smile_o.gif

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  

×