Jump to content
Sign in to follow this  
tpw

TPW EBS: engine based suppression

Recommended Posts

20130915: THIS MOD IS NOW PART OF TPW MODS AND IS NO LONGER SEPARATELY MAINTAINED. PLEASE USE THE TPW MODS THREAD TO REPORT BUGS AND REQUEST FEATURES.

TL;DR - Simple and lightweight player and AI suppression for Arma 3 SP using the game engine's built in bullet collision routines.

Download (always contains latest versions of all my mods): https://dl.dropboxusercontent.com/u/481663/TPW_MODS.zip

Readme:

TPW EBS - Engine based suppression for Arma3 SP

Version: 1.09

Authors: tpw, mrflay

Date: 20130913

Requires: Community Base Addons for Arma 3

Description

-----------

By default Arma3 (and all Arma games) have no true suppression mechanism: a unit under fire will ignore passing bullets unless they hit the ground nearby. This makes suppressive fire, a fundamental military tactic, essentially useless in Arma 3.

TPW EBS attempts to overcome this limitation by implementing a pseudo suppression eventhandler: an invisible massless 2-5 m radius "shell" object around each footbound unit which reacts to bullet hits whilst allowing those bullets to pass unhindered through it. Bullets passing through this shell are then used to determine the suppression status of the attached unit.

TPW EBS makes use of the extremely efficient and optimised low level bullet collision routines at the heart of the Arma 3 game engine to detect suppression, and is thus simple and lightweight. It causes minimal performance hit even with large numbers of AI shooting at each other, and remains responsive even if the framerate dips under high CPU load.

This is an SP only proof-of-concept release intended to demonstrate an alternative "engine based" suppression system, and is (and will probably remain) significantly less fully featured than its A2/A3 SP/MP/Dedi "script based" sibling TPWCAS maintained by master coder Ollem. However even with a reduced feature set, it dramatically changes the dynamics of an engagement.

TPW EBS is possible entirely because of the generous contribution of the invisible "firegeometry" object concept by mrflay. All flaws in implementation are due to me!

Features

--------

- Will work for all footbound units (civilian and combatant) within a specified radius of the player (default 500m).

- Subsonic projectiles (eg pistol and silenced rifle) are ignored.

- Units have 4 levels of suppression:

0 = totally unsuppressed.

1 = friendly fire.

2 = light enemy fire, less than (default) 5 bullets each 5 sec.

3 = heavy enemy fire, more than 5 bullets each 5 sec.

- Suppression lasts from 5-10 sec.

- Units under light fire will crouch, those under heavy fire will go prone.

- Units have their skills reduced by 25% under light enemy fire, 50% under heavy enemy fire, returning to pre-suppression level when non-suppressed.

- Suppressed units will seek cover behind any nearby objects greater than 1m high.

- Player may optionally exhibit suppression symptoms under enemy fire: increased breathing rate, increased weapon sway, slight vision blur.

- Visual debugging can be enabled, which changes the colour of the "shell" and allows you to determine if the suppressed unit is behaving appropriately:

0 = blue

1 = green

2 = yellow

3 = red

A red ball will appear over the nearest cover object when a unit is suppressed.

- Plays well with TPW LOS, TPW FALL, WW AICOVER and ASR AI.

Installation and configuration

------------------------------

Extract the @TPW_EBS modfolder to your preferred mod location, and call it via command line or mod launcher. You'll need Community Base Addons A3 (CBA A3) for the addon to launch properly.

Copy @TPW_EBS\userconfig\TPW_EBS\TPW_EBS.hpp to your userconfig\TPW_EBS\TPW_EBS.hpp. You may edit this file to taste:

tpw_ebs_thresh = 5; // unit is suppressed if this many bullets pass by in 5 secs

tpw_ebs_hint = 1; // start hint. 0 = no hint

tpw_ebs_sleep = 1; // how long til suppression functions start

tpw_ebs_debug = 0; // debugging will colour the suppression shell (green = own side, yellow = enemy <5 bullets, red = enemy >5 bullets). 1 = debugging

tpw_ebs_radius = 500; // units must be closer to player than this (m) for suppression to work

tpw_ebs_playersup = 1; // suppression effects applied to player. 0 = no player suppression

tpw_ebs_aisup = 1; // suppression effects applied to AI. 0 = no AI suppression

tpw_ebs_findcover = 1; // AI will seek cover when suppressed. 0 = will not seek cover

The last 3 settings allow you to decide to what degree the player and AI are affected by suppression. If you set all three settings to 0, then TPW EBS will not affect AI/player at all, but will merely assign variables to each unit that you can use to write your own suppression effects. Unit's suppression state will be monitored and reset every 5-10 seconds.

_unit getvariable "tpw_ebs_skill"; // skill prior to suppression

_unit getvariable "tpw_ebs_stance"; // stance prior to suppression

_unit getvariable "tpw_ebs_fatigue"; // fatigue prior to suppression

_unit getvariable "tpw_ebs_allbullets"; // all bullets

_unit getvariable "tpw_ebs_enemybullets"; // enemy bullets

_unit getvariable "tpw_ebs_supstate"; // suppression state (0 - 3)

_unit getvariable "tpw_ebs_uptime"; // how long til unit is unsuppressed

_unit getvariable "tpw_ebs_downtime"; // how long until unit reacts to bullet

_unit getvariable "tpw_ebs_weptype"; // weapon type unit is holding

The script version is in @TPW_EBS\scripts. Instructions for running it are in the header of the script. Please note that if you already have the addon version running, the script version will detect it and quit.

Known issues

------------

TPW EBS is in very early development. It won't blow your computer up, but it may not function perfectly either. If you want the full SP/MP/Dedi suppression experience, use TPWCAS. If you are interested in trying an alternative simple lightweight SP suppression system, give TPW EBS a try.

- TPW EBS is by necessity an addon, requiring as it does a new "shell" object. You can run the script version, but you'll still need the ff*.pbos containing the shell objects

- TPW EBS makes use of a number of Arma 3 specific commands and won't work in A2.

- TPW EBS makes use of the "hitpart" eventhandler which may not actually function correctly in MP. I don't play MP and cannot vouch for its behaviour.

- No long term changes are made to unit skill/stance/stamina, these values are always restored to the value they were prior to suppression.

- No other behavioural changes are made, I prefer to let the engine make these decisions.

- Find cover implemented but not 100% complete.

- TPW EBS uses setunitpos to change unit stance, with an additional playmove animation of the changed stance to ensure that the stance actually changes. Both of these systems may be ignored by AI stance changes under certain combat situations however.

- Player suppression effects are implemented entirely using setfatigue. This gives a reasonable approximation of the suppressed physical state via heavier breathing, aiming shake and slight visual blur. I've never been shot at so can't confirm how realistic this is.

- The suppression "shell" can interfere with helicopter blades (known Arma 3 quirk), and is thus inactivated when a unit is within 20m of any heilicopter. Units won't be suppressable near helicopters.

- The suppression "shell" prevents explosive damage to its unit. I have implemented a workaround based on calculating hypothetical damage to the unit from the explosive, while I search for a completely explosion transparent shell.

- TPW EBS will disable gun lights. If you want units to use gun lights, they will need to be activated after TPW EBS.

- The suppression "shell" resizes according to how suppressed a unit is. Unsuppressed = 5m radius shell. Lightly suppressed = 3m radius shell. Heavily suppressed = 2m redius shell. You will have to work harder or fire more accurately to keep a suppressed unit suppressed.

Feedback

--------

Q - Why bother writing TPW EBS if there is another perfectly good suppression system in TPWCAS?!?

A - Because I enjoy the coding challenge. I enjoyed being a part of TPWCAS and am in complete awe of the coding abilities of Fabrizio_T and Ollem in writing a script based bullet detection framework that works as beautifully as it does. But I have always felt there was merit in trying to exploit the optimised bullet collision routines of the game engine as an alternative way of registering suppression.

AThere's been some, ahem, "strident" debate about the merits of player and AI suppression recently, which I refuse to engage in. If you want to voice your opinion of it to me then I suggest you:

1 - read this: https://yourlogicalfallacyis.com/.

2 - realise that shouting your opinion over and over won't magically make it a fact.

3 - accept that this is an OPTIONAL addon made by a volunteer. I am not a BIS coder forcing my vision of suppression upon you.

As always I welcome feedback. My mods only improve due to your input. However, input which consists of asking me why there is no dedicated server version, without offering help in this department, improves nothing, especially my temper.

For the record: I only play SP, have little interest in playing MP, little skill in coding MP, and no ability to test it. If you desperately want a fully functioning MP version of this or any of my other mods, and can't wait for me to make it happen, then you are welcome grab the code and knock yourself out.

For the sake of my sanity, when you're reporting bugs and issues can you please tell me:

- Arma3 version

- Version of my mod

- Script or addon version

- Running on SP, MP or dedi

Thanks

------

I am deeply indebted to the following talented gentlemen for their generosity and coding skills:

-Coulum-: original AI suppression concept which became TPWCAS. He's the "C" in TPWCAS!

Fabrizio_T: wrote the incredible bdetect bullet detection framework at the heart of TPWCAS.

Ollem: polished TPWCAS to a high gloss, made it MP and dedi compatible, and continues on as maintainer.

Mrflay: invisible firegeometry object concept which I have adapted to the suppression "shell".

Changelog

---------

201309013: v1.09 (what the @#$% happened to 1.08?)

- Improved explosive detection and handling. Units will respond appropriately to mortars, missles, bombs etc.

- All units periodically reset their suppression status to prevent being "stuck".

- Introduced "all in one" startup hint for all TPW mods, you'll get the one hint showing all active mods.

- Script versions will detect an already running addon and quit.

20130901: v1.07

- Improved shell disabling code for helicopters

- Improved code modularity and efficiency

20130826: v1.06

- Suppression shell disabled near helicopters for all units.

20130823: v1.05

- Suppression shell is now disabled when units are near mines and charges.

- Misc code improvements.

20130823: v1.04

- Suppression shell shrinks as suppression state increases.

- Suppressed AI will not seek cover if WW AICOVER has already assigned them to do so.

20130822: v1.03

- Changed class of suppression shell so that "firegeom" objects no longer appear as potential targets.

- Fixed some config errors, and added additional config settings to toggle AI suppression and AI finding cover.

- Only player's suppression shell is disabled near helicopters, AI shell does not interfere.

- Misc code improvements.

20130815: v1.02

- Simple find cover implemented for suppressed units.

- Miscellaneous code improvements.

20130813: v1.01

- Suppression shell no longer prevents explosive damage.

20130812: v1.00

- First public release.

Disclaimer

----------

I totally refuse to accept responsibility for anything that might happen to your game/computer/life as a result of using my mod. If you accept this, then feel free to use and modify this code, on the proviso that you post back changes and improvements so that everyone can benefit from them, and acknowledge the original author (tpw) in any derivative works.

My A3 mods:

TPW CIVS: Ambient civs and traffic

TPW FALL: Realistic infantry falling from height and bullet hits

TPW LOS: AI Line of sight system for enhanced CQB

TPW EBS: Engine based AI/player suppression

TPW HOUSELIGHTS: Automatic house lighting for Altis/Stratis

TPW BLEEDOUT: Realistic bleeding system

TPW FOG: Foggy breath for Altis/Stratis

Edited by tpw
  • Like 1

Share this post


Link to post
Share on other sites

Thanks TPW - look forward to checking this shortly

Share this post


Link to post
Share on other sites

Thankyou tpw for sharing your mod, I have been testing it in conjunction with your TPW LOS - AI line of sight mod and the Random House Patrol v1.1 script on F.S.F Makhno's new Koplic map and the results have been amazing.

Share this post


Link to post
Share on other sites

concerning suppression, I always wanted to know, do passing bullets affect a persons vision or hearing in any way in real life? I was under the impression the only effect of suppressing the enemy was making him keep hi head down and not get his head blown off, i.e. test his common sense. and in games people add all kinds of crap like blur, deafness etc. to indicate that the player "is being suppressed". how close to reality is that? any combat veterans here?

Share this post


Link to post
Share on other sites

Thanks TPW,

a silly question regarding this: 'Units under light fire will crouch'

Do those units have the option to go prone if needed?

Share this post


Link to post
Share on other sites
a silly question regarding this: 'Units under light fire will crouch'

Do those units have the option to go prone if needed?

In my testing units would only go prone when under light fire if they had previously gone prone under heavy fire, for example I could force a enemy unit to go prone behind a small wall under heavy suppressive fire, then when the suppression effect wore off and the enemy raised his head above the wall in a crouched position I only needed to fire a single round near him and he would immediately go prone again behind the wall. Also something I have never seen happen in arma before is that sometimes they will pop up from behind cover, fire at me, and then go prone again before I even get a chance to return fire.

Share this post


Link to post
Share on other sites

Great! You could made ultimate mod with all of your enhancements as one addon one day :)

Thanks

Share this post


Link to post
Share on other sites

Hi tpw

Enjoying this with the infantry but is it possible that it screws up grenades? I was curious to see if you could suppress with grenades and it seems I can't inflict damage with the mod enabled? Can anyone else test please and see if it's just me?

thanks again

Share this post


Link to post
Share on other sites

@tpw: wow super awesome! thanks a lot

grenades don't do any damage anymore, I can confirm that (@petek)

@brad7: to remove the debug "pyramids" please take a look at TPW_EBS.hpp in your userconfig folder and set "tpw_ebs_debug = 0"

thanks again for the suppression effect! once the suppression mod for arma2 came out, I never played without it and was missing it in arma3 since now!

Share this post


Link to post
Share on other sites
concerning suppression, I always wanted to know, do passing bullets affect a persons vision or hearing in any way in real life? I was under the impression the only effect of suppressing the enemy was making him keep hi head down and not get his head blown off, i.e. test his common sense. and in games people add all kinds of crap like blur, deafness etc. to indicate that the player "is being suppressed". how close to reality is that? any combat veterans here?

All those effects are just a representation of fear. Although nearby impacts could spray particles and fragments at you.

Share this post


Link to post
Share on other sites

Thanks for the confirmation rpr

Over to the guru that is tpw;-)

Once the grenade thing is fixed think this is going to be another "must have" addon. Using this with "Fall" and in debug mode was great to see myself get knocked on my arse by a round and return panicked fire in the direction I was being shot from and seeing a nice big red shape appear to confirm the worst!

Share this post


Link to post
Share on other sites
All those effects are just a representation of fear. Although nearby impacts could spray particles and fragments at you.

figured as much, one of the reasons I don't play Project Reality is this suppression thing

Share this post


Link to post
Share on other sites

Another great addition to the game. Now we can speak about tactic :)!

Share this post


Link to post
Share on other sites

Thanks for the mod, tpw. It really adds a lot to infantry combat, especially paired with tpw fall. I also used your mods for Arma2, they're some of my favorites.

I didn't notice any loss in fps even with big infantry battles, nice. To bad it doesn't work in mp, though..

Share this post


Link to post
Share on other sites
figured as much, one of the reasons I don't play Project Reality is this suppression thing

Incase you're not aware, you can disable the player suppression thing. For me I play with it on because, I cant really tell if the bullet that just passed me was 5 meters or 1 meter away from me, so the blur thing will give me a kind of wake up call that the enemy is getting a bead on me so I better take cover and find another firing point to return fire.

There are things that IRL you cannot simulate in PC, so some ppl make a little gimmick to give a visual feedback to the user. In this case, a blurring effect. Because IRL you can actually feel the bullet pass through, not just by hearing, but feel with your skin, because the wind/vortex/turbulence the bullet make. Just like you feel the wind when a fast moving train passing through.

Share this post


Link to post
Share on other sites
In my testing units would only go prone when under light fire if they had previously gone prone under heavy fire, for example I could force a enemy unit to go prone behind a small wall under heavy suppressive fire, then when the suppression effect wore off and the enemy raised his head above the wall in a crouched position I only needed to fire a single round near him and he would immediately go prone again behind the wall.
I can't test yet but i might be concerned if units under fire would have maybe gone prone instead crouched first, does this mod take over what stance ai choose throughout a firefight, or does it only make them crouch if they are standing? I like the way the AI fight now, and mostly they seem to stay prone, it might not be the best effect if they are already prone and a close round makes them move to crouch?
Also something I have never seen happen in arma before is that sometimes they will pop up from behind cover, fire at me, and then go prone again before I even get a chance to return fire.
sounds good, I'm picturing crysis 2 minus the stupid AI Edited by Katipo66

Share this post


Link to post
Share on other sites

Sounds like my kind of thing but I need a little help here.

I installed it into my arma folder but am not sure by what you mean by- "Copy @TPW_EBS\userconfig\TPW_EBS\TPW_EBS.hpp to your userconfig\TPW_EBS\TPW_EBS.hpp"

Now I see your userconfig and understand how to tweak it,but where do I paste it to once it is copied?

Any help would be helpful,

Cheers,

Mick. :)

Share this post


Link to post
Share on other sites

Hi everyone, thanks for the comments and feedback.

Re: the grenade bug. I will work on a grenade damage pass-through as a top priority.

Re: debugging. It's on by default because this is a test early release.

Re: crouching. A unit that is already prone will not move to a crouch when lightly suppressed.

Re: player suppression fx. The setfatigue ones I have used are pretty mild and subtle, but of course can be disabled. Seriously, don't bother ranting about player suppression on this thread.

Re: MP. If someone could try it in MP and confirm that it doesn't work, I'd be grateful.

---------- Post added at 06:43 ---------- Previous post was at 06:31 ----------

Sounds like my kind of thing but I need a little help here.

I installed it into my arma folder but am not sure by what you mean by- "Copy @TPW_EBS\userconfig\TPW_EBS\TPW_EBS.hpp to your userconfig\TPW_EBS\TPW_EBS.hpp"

Now I see your userconfig and understand how to tweak it,but where do I paste it to once it is copied?

Any help would be helpful,

Cheers,

Mick. :)

Mick, if you look in your Arma3 game directory in steam (where you should have installed @TPW_EBS) then you should see a directory call userconfig. If not, create it. All you need to do is copy or move the @TPW_EBS\userconfig\twp_ebs directory into the userconfig that you just identified. You should now have userconfig\tpw_ebs\tpw_ebs.hpp in your steam arma3 game directory.

Edited by tpw

Share this post


Link to post
Share on other sites
Incase you're not aware, you can disable the player suppression thing.

good to know. all that's left is to figure out how to remove the blur around optics when aiming

Share this post


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

×