Jump to content
Sign in to follow this  
Second

Suppressionscript-pack

Recommended Posts

Apparently we can overwrite classes nowadays so ill see if i can make a mini PBO with just the scripts and a config that overwrites the man class.

EDIT: Oh, seems like malick already did it. tounge2.gif

EDIT2: Tried it myself and its much better then rePBOing the character.pbo all the time, highly advised. smile_o.gif

would be very useful to share for non technical types like myself. wink_o.gif

this script is great but integrating it with some other addons/missions is v tricky at times. a stand-alone addon would simplify it.

Share this post


Link to post
Share on other sites
this script is great but integrating it with some other addons/missions is v tricky at times. a stand-alone addon would simplify it.

Although you would lose MP compatibility then. (Unless you add them by hand into the mission)

Dunno if i could just release this PBO, after all second made it.

Share this post


Link to post
Share on other sites
this script is great but integrating it with some other addons/missions is v tricky at times. a stand-alone addon would simplify it.

Although you would lose MP compatibility then. (Unless you add them by hand into the mission)

Dunno if i could just release this PBO, after all second made it.

If you Ofpforum see this, then go ahead. thumbs-up.gif

Don't have time to put it for download right now.

Share this post


Link to post
Share on other sites
Don't have time to put it for download right now.

Only quickly tested, had to redo everything as my own pbo used an older version, but it seems to work fine now with the latest version. tounge2.gif

Link

Share this post


Link to post
Share on other sites
Guest

Just curious, what exactly is this now?

An official update of seconds work or is this some additional functionallity you have added?

Maybe a stupid question but I am a bit confused.

Maybe you could add some more info about what exactly this features now?

Thanks in advance wink_o.gif

Share this post


Link to post
Share on other sites

Its seconds latest version and it automatically enables the script on all infantry.

Just note that when making a MP mission you should remove the PBO and do it manually, using the PBO in MP will probably give some conflicts with people who dont have it, and if you add the scripts the old way (by execing them in the mission editor) it stays MP compitable. (I think, never tried a MP mission which used these.)

Share this post


Link to post
Share on other sites
Guest

Ok, thanks for clearifying that thumbs-up.gif

Share this post


Link to post
Share on other sites
Don't have time to put it for download right now.

Only quickly tested, had to redo everything as my own pbo used an older version, but it seems to work fine now with the latest version. tounge2.gif

Link

thank you. this is appreciated and of course thanks to second big time.

Share this post


Link to post
Share on other sites

I allways wanted to see supressing fire in OFP/ARMA so I tried your script as soon as you released the first version it. But when I tried it I was a bit dissapointed. The script (I've tested only the first one or two verisons) adds the effects of supression but not the suppressing fire itself. So what would be nice is to make the AI really use supressing fire. And your way of adding the effects of the suppressing fire seems to be very open for concepts of adding the suppressing fire itself. I came up with several ideas of how to add it. The most resonable of them wink_o.gif :

- At the model level. I'm not sure if it's possible - I'm not an addon maker - if there are in a model different lods for the area which is targeted by the AI and for the area that units do take hits something like that could be made. Every soldier model could be put in a spherical lod which is targeted by the AI. At the same time the 'taking hits' lod would be only the size of the soldier model itself. This way AI would target such models even when it didn't see the model itself. And as your scripts detect all the bullets that are near a soldier shooting at the sphereical lod apply the effects of the suppressing (indirect - targeted at the sphere) to the soldier. Cons of such a solution are: 1. I'm not sure if it's possible icon_rolleyes.gif 2. If possible it would require adjustment of all models.

- Using Invisible targets. Ataching one or more invisible targets to a group (for every group member or one target being setposed in the middle of the group or something similar) so the enemy will shoot in the group's direction even when he can't see particular soldiers (the priority of targeting the invisible target should be lower than targeting members of the group so the invisible target should only be shot at when the enemy can't target any member of the group). The invisible targets should be undestroyable by the bullets and should be deleted when the group is destroyed.

Pros: Only small addon plus some scripting required.

I don't want to hijack a topic but I'm curious what do you think about it.

Share this post


Link to post
Share on other sites

The second option probably provides a better short term solution, that would much more quickly implemented then redoing every soldier model that gets made.

One problem I foresee is that if an invisible object does not get destroyed, you could possiblly have the AI shoot at the thing until its destroyed if it can't target an actual soldier. The AI would use up all its ammo in this process. A problem of exploitation / logistics. I was thinking that maybe it would be better if the invisible object COULD be killed after maybe 50, 100, 200? rounds, then have a script that revivies it - so its not constant firing until the AI is out of ammo. Perhaps after a minute or so the invisible object get's setdammaged to 0 or deleted and another one creatvehicled.

Another issue - where would the object go?

Are we talking about one object per soldier? That probably makes the most sense. How big?

If you put the object above the soldier, that would be the best for suppression because the soldier could lay down, say behind sand bags and the object would still be visible for the enemy AI to shoot at. That would make believable suppressive fire.

The problem with that is if you are coming up a hill or crawling behind sandbags to approach an enemy and they see the invisible object popping up above the sand bag, then they would see you coming when they really shouldn't.

I'm not sure where else you could put it. Anyone else with any thoughts. I think we might be on to something.

Share this post


Link to post
Share on other sites

Your points make sense. Here are some ideas I came up with, but never implemented:

<ul>[*]Only spawn the invisible target near a real target when someone on its opposing side knowsAbout it above a set level (say 1.0 or higher).

[*]If the real target is known about, use nearTargets to find out where the AI thinks it is. Spawn invisible target (or, say, 2 targets if knowsAbout is is greater than 2, 3 if greater than 3) in a random place near this perceived position. Prefer to place it above or to the sides of the target rather than below it (which would make the bullets very likely to hit the ground). Ideally, you'd not place the invisible target directly in front of the real target, but since a real target may be being engaged from multiple directions, this would be impossible to avoid.

[*]Destroy and recreate the invisible target every few seconds so that the enemies do not continuously fire. Each time the invisible target is spawned, place it in a different place near the real target.

[*]Monitor the enemy ammo levels and remove the invisible targets if all nearby enemies were low on ammo.

Share this post


Link to post
Share on other sites
The second option probably provides a better short term solution, that would much more quickly implemented then redoing every soldier model that gets made.

Yes, I think the second solution is easier to implement but I understand that the first one would be more performance friendly - it doesn't require additional scripting... the whole thing is managed by the engine (btw I've checked in BIKI - the lods I've been thinking about are fire geometry and hitpoints lod, but I'm not sure if they work appropriate for the stated purposes).

One problem I foresee is that if an invisible object does not get destroyed, you could possiblly have the AI shoot at the thing until its destroyed if it can't target an actual soldier. The AI would use up all its ammo in this process. A problem of exploitation / logistics. I was thinking that maybe it would be better if the invisible object COULD be killed after maybe 50, 100, 200? rounds, then have a script that revivies it - so its not constant firing until the AI is out of ammo. Perhaps after a minute or so the invisible object get's setdammaged to 0 or deleted and another one creatvehicled.

I've done some testing in OFP some time ago (I don't have acces to OFP or ARMA now - I have only a crapy laptop at disposal) and the thing you wrote about can happen - AI can got stucked at fireing at invisible targets only and not fireing at acctual soldiers. But I didn't try to change invisible target's priority in being targeted.

Another issue - where would the object go?

Are we talking about one object per soldier? That probably makes the most sense. How big?

If you put the object above the soldier, that would be the best for suppression because the soldier could lay down, say behind sand bags and the object would still be visible for the enemy AI to shoot at. That would make believable suppressive fire.

I thought about two solutions - attaching an IT (invisible target) to every soldier in a group, creating an IT in the geometrical 'middle' of the group (can be useless when a group becomes scattered or splited). And setting the ITs above the ground (or above the soldiers seems resonable. Of course, the exact solutions should be adopted by testing and comparing the effects.

The problem with that is if you are coming up a hill or crawling behind sandbags to approach an enemy and they see the invisible object popping up above the sand bag, then they would see you coming when they really shouldn't.

True. Quite difficult problem confused_o.gif. I can come up with one conceptual solution. ITs should be created once a unit was detected (but from what I remeber from discussions on OFPEC it's hard to tell when a unit is detected - it's possible only by checking the knowsabout value, right?). Maybe create ITs when a unit from a group was shoot at? (Would the event handler IncomingMissile work for that? it says that it's for unguided missiles too). And maybe setting IT's difficulty of being spotted values to lower that the units would be enough? This is to be tested.

Share this post


Link to post
Share on other sites

I've given the usage of invisible targets for suppressing fire some thought, and did some crude tests awhile back.

There are many issues to think about.

1. You only want to add the targets to units when the enemy "knowsabout" the units.  This prevents the issue you mentioned of a unit's target being spotted before they know about the unit.

2. Target placement is tricky.  When you place the target above targeted unit, many units will pour fire on the target in the air, and it look unnatural.  It is better to place the target in front of the unit.  But how far in front?  Target needs to be on the shooter's side of any cover objects the targeted unit is behind.   So one idea I've been toying with is putting triggers near obvious cover objects (cars, houses with windows, sandbags, etc.) that sense when a unit to be targeted is present.  It then calculates where to place the target (towards the enemy, on the other side of the cover object).  This can be done by knowing enemies positions and "boundingBox" of cover object.

This can work well for static defences, where the mission editor knows at design time what are likely cover objects in the key areas.

This would be much work to work dynamically anywhere on the map.

3. Who should shoot at which invisible target?  If unrestricted, you will get an AI unit that is perpendicular to a target unit, who fire on the invisible target at a 90 degree angle.  You want units to fire at an angle toward the targeted unit, but AI fires on the target (thin air) at a 90 degree angle, if that happens to be where the shooter is.

When the invisible target is between the shooter and the targeted unit, then you get the effect you want.

Therefore its best to control which shooters target which invisible targets.  This requires logic driving their angle to target.  This can also drive placement of the invisible target.

4. Another way to insure only one AI shooter shoots one particular invisible target is to make that invisible target civilian.  The AI will not shoot at the civilian target by default.  But an AI that is commanded via doFire or commandFire, will fire on a particular civilian target.   Your scripts can then determine which shooter AI units are at a proper angle to shoot at a particular target.

5. Life of Target.  Bullets pass thru invisible targets, and do not effect them.  Area damage (explosions) do damage invisible targets.  AI will burn all their ammo very quickly hosing down invisible targets.  I use loops to setpos the target to [0,0,0], for a few seconds (so AI stops firing on it), then setpos it back, so AI starts firing again.

6. System or AI recognition of CreateVehicled invisible targets is delayed.  If you dynamically createVehicle an invisible target, and setpos it to where you want it, AI won't recognize the invisible target for what seems a long time (30 seconds or more).  But if you place a pool of invisible targets via the editor, and hide them away (setpos [0,0,0]), and then setpos them to where they are need during action, AI will recognize and fire on these editor placed targets immediately.  

Invisible targets can really get the players heart rate going when defending from inside a building.  The enemy AI can be totally hosing down the windows and doorways, scaring the crap out of the player.

Integrating smart invisible target placement with these suppression behaviour scripts is a great idea.

Share this post


Link to post
Share on other sites

Even harder: To make it look natural you only want them to suppress the enemy when they cant directly hit them, if they can shoot them they should just shoot them (why miss on purpose?), but its more or less impossible to detect if this is the case.

Share this post


Link to post
Share on other sites

Very good discussion, guys. Seems we've all hit on some of the hurdles to overcome.

Quote[/b] ]6. System or AI recognition of CreateVehicled invisible targets is delayed. If you dynamically createVehicle an invisible target, and setpos it to where you want it, AI won't recognize the invisible target for what seems a long time (30 seconds or more). But if you place a pool of invisible targets via the editor, and hide them away (setpos [0,0,0]), and then setpos them to where they are need during action, AI will recognize and fire on these editor placed targets immediately.

This one is somewhat troubling becuase that means the objects can't really be dynamically created on the fly.

This is sort of a stupid idea... but what if you created the InvObj at mission start and had them Set Pos'd to each soldier in 10-15 second increments. Bear with me because I havent' messed with the invobj's and don't really know how big they are and if they can occupy the same space as the soldier.

By having the delay, when someone ducked down, the object would stay put for another few seconds until it was setposed down to where soldier is. The delay where the AI shot the invisible targets could be just enough to give the impression of suppressing fire.

Ok I know that idea kind of sucks but I was just thinking out loud, and am not going to erase my ramblings! I really like the idea of continuing this conversation because I think this topic is critical to the future success of taking Arma to another level. The AI is lacking and IMHO most significantly in the following areas.

1) Self preservation - they just need to react to fire and at least attempt to find some cover. This suppression script, while not perfect at least gives a little bit of that to the AI. I really doubt the inability of the AI to seek appropriate cover and quickly, will ever be overcome - some of that is due to the animation system. For now, I think this script is a great first step.

2) Exploitation of the enemy's desire for self preservation (ie - suppressive fire and then maneuvering to exploit a surpressed enemy). If we can create a reliable method to have AI generate supressive fire, then we will have made a considerable jump in addressing issue 2. The maneuvering portion that BIS implemented isn't perfect, but the AI do seem to at least try to flank.

I think I'll have to download the invisible objects addon tonight and play around.

Share this post


Link to post
Share on other sites

1) Self preservation - they just need to react to fire and at least attempt to find some cover. This suppression script, while not perfect at least gives a little bit of that to the AI. I really doubt the inability of the AI to seek appropriate cover and quickly, will ever be overcome - some of that is due to the animation system. For now, I think this script is a great first step.

I haven't tried the lastest versions of Second's script (and I can't do it right now) so I can't say how good it is when it comes to sending suppressed units to cover. But there is a nice script by GeneralBarron for this purpose. It was written for OFP and due some strange bug didn't leave beta stage at OFPEC forum. But I tried it in ARMA (after minor modifications) and it works. I don't have the script on my laptop and I think it's not avaible on OFPEC anymore but I could send it in a few days to anyone interested. What is more, in ARMA we have findCover command which could also be helpful.

I think I'll have to download the invisible objects addon tonight and play around.

I really advise you to do so. AFAIK there are two versions of Invisible targest available for ARMA - one in Mapfact's MAP_MISC.pbo and one in Al Simon's Entry tools addon.

Share this post


Link to post
Share on other sites
Don't have time to put it for download right now.

Only quickly tested, had to redo everything as my own pbo used an older version, but it seems to work fine now with the latest version. tounge2.gif

Link

I added that link to first post. Thank you. xmas_o.gif

To latest discussions:

Intresting converstions in here, i see. I will read this stuff more carefully... At the moment i don't understand even half of it. Been thru exhausting querilla and recon exercise and my mind and body is a mess.

@lecholas:

New version is almost same. I made it bit lighter (removed one suppression level and two example missions), corrected one bug and tweaked suppression levels. If you have played with v1.25 then it's not very different. If you have played only with earlier versions then you might not know that they have now 'take cover'-routine (ArmA's default sucks), which works in certain levels of suppression. I think (i'm not expert) that scripts take cover method is quite powerful, yet not perfect.

Share this post


Link to post
Share on other sites
Quote[/b] ]6. System or AI recognition of CreateVehicled invisible targets is delayed.  If you dynamically createVehicle an invisible target, and setpos it to where you want it, AI won't recognize the invisible target for what seems a long time (30 seconds or more).  But if you place a pool of invisible targets via the editor, and hide them away (setpos [0,0,0]), and then setpos them to where they are need during action, AI will recognize and fire on these editor placed targets immediately.  

This one is somewhat troubling becuase that means the objects can't really be dynamically created on the fly.

Cant you make the objects man class and use setcaptive true/false?

Share this post


Link to post
Share on other sites

now.. this one script i never found.. thanks to ofpforum for pointing this here....

well, i have edited the pbo so that now it is compatible with solus extended init eventhandlers

here is the link:

http://rapidshare.com/files/59870754/2nd_suppression.pbo.html

#note: you need solus extended init eventhandler for this to work

all credits goes to Second

im just bumping the thread.. this script is awesome when played with TrueRangeAI

good job everyone smile_o.gif

Share this post


Link to post
Share on other sites

That's a very good initiative, in my opinion. I had the script working as a standalone addon and it gets buggy when there are too many mods or too many spawned units. Do you think using Solus extended event handlers may solve this ?

I'll give it a try ! Thanks for sharing wink_o.gif

Malick

Share this post


Link to post
Share on other sites

I did this little video for another forum to show AI taking cover, so I might as well post it here too for people to see. Some good examples of AI hiding from me (up on the hill) yet not "knowing" about me. They're just hiding from incoming.

Share this post


Link to post
Share on other sites

Interesting, but is that with this set of scripts or native ArmA AI ?

I'd like to see the AI run for cover when shot at and use natural cover, instead of just dropping to the ground.

Malick

Share this post


Link to post
Share on other sites
Interesting, but is that with this set of scripts or native ArmA AI ?

I'd like to see the AI run for cover when shot at and use natural cover, instead of just dropping to the ground.

Malick

It's with the suppression addon. You can see how they are hiding from incoming (which is coming from the top of the hill) using closest objects, in most cases walls.

Except one man, who seems to be injured smile_o.gif

I use the suppression addon in tandem with the UPS script. They work well together.

Share this post


Link to post
Share on other sites

Hi, awesome scripts i use it all the time now in the pbo version, my only problem is i have a conflict with NWD's laser designator and a couple of other mods/addons, i get an error message saying that script second_supress_l is missing an " ; " somewhere each error is the same but i cant figure out where it is or what would cause it as if i dont use the NWD laser (still use all his other work!wink_o.gif i dont get an error message crazy_o.gif Anyway not that much of a big deal as i try to avoid using what ever causes that error. I cant remember what else gave this error i think MadDogX's supression script caused it aswell as a couple of other things, but as i said if i do get that message i look for alternatives smile_o.gif

Oh and if people are using the pbo version i found that adding

? (_grp isKindOf "SoldierEPilot") or (_grp isKindOf "SoldierECrew") or (_grp isKindOf "SoldierWPilot") or (_grp isKindOf "SoldierWCrew") or (_grp isKindOf "SoldierGPilot") or (_grp isKindOf "SoldierGCrew"): exit

into the Second_suppress_l near the top, this causes any group who are of theses classes not to init the script, however it still runs if the leader of the group isnt one of these types but has one of these type in the group. It was a quick fix for a big problem i was having (sick to death of armor and air support f@*#ing off cause of to many bullets!wink_o.gif and havent needed to alter it yet. I was thinking that there might be a way to stop it for when members of a group are mounted and re-enable it for them when they dismount, but as i said havent really needed it yet so... still a dream rofl.gif Anyway great work and having countless hours of fun with it( and a couple of other enhancements)! Thanks!

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  

×