One of the things sorely missing from Arma2 is reaction to passing bullets. An AI unit will often stand quite happily whilst bullets whiz by. This makes effective suppression of AI enemies difficult - you basically always have to aim to kill them since you can't make them keep their heads down by shooting nearby.
This addon aims to address this problem by making AI units react to passing projectiles. If a bullet snaps by within around 10m of an AI unit, it will crouch/kneel (depending on movement), and if more than around 10 bullets pass by a unit in 5 seconds, the unit will drop/crawl. After 10 seconds without bullets, the unit will return to its previous stance.
Additionally, suppressive fire can alter the aiming shake, accuracy and courage of the suppressed unit. The more fire directed near a unit, the lower its skills will become. Nearby casualties will further decrease a unit's courage. After 5 or so seconds without bullets, the skills will gradually return to normal. Player units will optionally experience some visual effects if suppressed (camera shake, vision blur and darkening).
Currently there is no "suppressed" eventhandler in the game engine, so TPWCAS aims to mimic one by constantly monitoring whether any active bullet/shell projectile objects have units within a 10m radius. This allows TPWCAS to work for any opfor, blufor or independent on the map, whether editor-placed or spawned.
TPWCAS significantly changes gameplay, allowing for longer engagements and more thought required to survive them.
TPWCAS is not an all-in-one AI behaviour modification mode. Its primary purpose at this time is to cause units to duck/drop and lose some shooting competence under suppressive fire. It's designed to play well with mods which DO alter AI behaviours under combat stress, and you are encouraged to use these if you require additional realism such as moving to cover.
Version 4.0 includes an optional feature to tigger a basic move to cover by AI in case of close by cover.
VERY IMPORTANT NOTE:
TPWCAS started life as an SP only mod, but a large amount of effort has gone into modifying the bullet detection, suppression and visual debugging framework to work for MP and dedicated server. While every effort has gone into testing in SP, MP and dedi, we simply cannot vouch for perfect operation under all circumstances.
TPWCAS enables stance and skill modification under fire:
Units react to bullets passing within 10m.
Units on foot or operating vehicle or static guns are affected.
Units driving are unaffected.
Only uninjured units are affected.
Bullets fired from less than 25m away are ignored.
Bullets from small calibre pistols and SMG are ignored.
Units react differently according to the side of the shooter.
Units regain previous stance after 10 or so seconds without nearby bullets.
Friendly shooter: no skill reduction.
Enemy shooter: skills reduced according to number of bullets.
Units gradually regain skills after 5 or so seconds without bullets.
Shooter may be "revealed" to the suppressed unit.
Units are more easily suppressed if there are nearby friendly casualties.
Player experiences visual effects if suppressed.
Coloured debug balls can be enabled to assist to visualize TPWCAS suppression functionality:
No ball - unsuppressed.
Green ball - close friendly fire detected - going crouched
Yellow ball - sporadic enemy fire detected - going crouched
Red ball - threshold value of enemy fire detected - going prone
Black ball - unit is fleeing (fleeing does not mean the unit is running away, but will not be able to be suppressed).
* Purple ball - indicates LOS (Line Of sight) was triggered
Smoke and flagpoles are related to take cover and civilian runaway trigger:
* Yellow smoke + flag pole - selected cover position
* Blue smoke - unit reached cover
* Green smoke - unit stayed a few random seconds in/close to cover position and default AI behavior will take over again
* Red smoke - unit went (too far) to wrong direction or took too long to reach cover and default AI behavior will take over again
* Cyan smoke - unit is already in cover (or at least no Line of Sight to shooter)
* Yellow smoke + flag pole - runaway destination position
* Blue smoke - unit reached selected destination and should go prone
* Green smoke - unit stayed a few random (20 to 40 seconds) at position and default AI behavior will take over again
* Red smoke - unit went (too far) to wrong direction or took too long to reach cover and default AI behavior will take over again
Installation / Usage:
Please read the online readme for full details of TPWCAS, including features, installation, configuration, caveats, credits and the full changelog!
TPWCAS comes as a script version and an addon version (both in the same download).
CBA (community base addons) is required for both versions.
Save all the files in scripts into your mission directory (or wherever you'd like really).
Call it with: null =  execvm "tpwcas\tpwcas.sqf", in your init.sqf or in the init of any object on the map. You only need to call it the once.
As we always recommend use modfolders to seperate the custom content from the official game content to prevent problems. For different ways to set up your modfolders and use them please visit our FAQ.
When you are using the Steam version you can find a Steam mod installation and activation FAQ here.
Included .pbo files:
* The system uses setunitpos to change unit stance. The stance changes are subordinate to those issued by a player to a squad. A squad given "stand" orders will not duck when bullets start flying. Nor will a fleeing unit. Nor will a unit ordered into cover. Nor may units taken over by various FSMs.
* TPWCAS is not bulletproof (pun intended), and may not operate perfectly under conditions of very heavy fire by multiple units or, if the framerate is too low.
* TPWCAS ignores rounds fired from pistols and low calibre SMGs, and subsonic ammunition. You won't be able to suppress the enemy by waving your pistol around.
* TPWCAS implements changes to accuracy, courage etc under fire. The system should play nicely with ACE, ASR_AI, COSLX and other AI behaviour mods, but please report any clashes.
* As far as the authors can tell, TPWCAS causes minimal drops to framerate even on low spec machines, with 50 or so AI taking pot shots at each other. Your mileage may vary depending on computer specs and number of AI. We take no responsibility if your computer explodes.
* Debug balls are registered by the game engine as civilians (!), and may cause some unwarranted effects. Use text debugging if this occurs.
* TPWCAS is in its infancy and probably won't work the way everyone wants it to. We welcome any feedback and suggestions.
Credits & Thanks:
* Variable, Jedra and 2nd Ranger for initial ideas and suggestions.
* Orcinus, Kremator and CameronMcDonald for valuable input, suggestions and encouragement.
* Froggluv and Pellejones for performance testing.
* Robalo for helping to make his incredible ASR_AI skills addon and TPWCAS work nicely together, and for additional code ideas and help.
* Falcon_565 for demonstrating the power of cba_fnc_addPerFrameHandler.
* Foxhound for ongoing support of mod makers.
* BIS for an amazing piece of software which even allows scope for mods like this.
- skill accuracy fix
- fixed some other issues
- should work with latest A2 patch
- update: fixed error messages which appeared after latest A2 beta patch
- New: fully automatic detection and support of HeadLess client
- New: 'find cover' function has been made FPS aware too: below configurable server FPS threshold (default 17 FPS) find cover function will be skipped to save some CPU for more important tasks
new usercondig file entry: // 19 AI SEARCH COVER REQUIRED MINIMAL SERVER FPS, ELSE PROCESS IS SKIPPED
tpwcas_getcover_minfps = 17;
- Update: updated bullet detection framework based on Fabrizio_T's latest bDetect v0.76 framework.
- Update: tpwcas_mode = 5 (forced disable of tpwcas) will become 'tpwcas_mode = 0' ('tpwcas_mode = 5' will be deprecated*)
- Update: embedded 'tpwlos' will be disabled by default and can be switched on by changing setting in userconfig file
- Fixed: all hint commands will be optional and by request have been replaced by hintsilent
- Fixed: other really minor changes
- New: Merger of TPWC_AI_SUPPRESS and TPWCAS_DSC version
- New: Same mod can be used for SinglePlayer, Dedicated Server, and Client-Server setup (config parameter "tpwcas_mode")
- Auto detection of SinglePlayer setup (tpwcas_mode = 1)
- Auto detection of MultiPlayer Dedicated Server setup (tpwcas_mode = 3)
- Auto disable of client if Server started in Dedicated Server mode (server tpwcas_mode = 3/client tpwcas_mode = 5)
- Manual config option to configure client/server setup (tpwcas_mode = 2)
- Manual config option to disable TPWCAS (tpwcas_mode = 5)
- Experimental config mode specifically for 'Headless Clients' (tpwcas_mode = 4)
- Update: Performance improvements and code optimizations
- Update: Bullet detection frequency (==server load) will always automatically reduce if server or SP FPS drops
- Fixed: all files names to lowercase for Linux Server compliance
- Fixed: tpwcas will work after respawn
- Fixed: Vehicle EventHandlers for vehicles will not be duplicated in case of locality change
- New: basic take cover functionality: can be disabled/enabled in config file
- New: config parameter to set radius to search for cover (recommended to keep low number)
- New: Embedded TPW LOS (Line Of Sight - slightly modified version): can be disabled/enabled in config file
- New: Embedded TPW LOS will automatically pause when (server) FPS is below (configurable) threshold value
- New: Civilians will run in random directions when bullets are close to them
- New: Handgrenades and AT/RPG will cause suppression too
- New: TPWCAS Logic Modules (F7 in editor) to allow Missionmakers to overrule (server) config file parameter settings to:
- Disable TPWCAS (if enabled in userconfig file)
- Enable TPWCAS (if disabled in userconfig file)
- Disable TPWCAS embedded TPW LOS (if enabled in userconfig file)
- Enable TPWCAS embedded TPW LOS (if disabled in userconfig file)
- Disable TPWCAS embedded Find Cover (if enabled in userconfig file)
- Enable TPWCAS embedded Find Cover (if disabled in userconfig file)
- Fixed player shake under sporadic enemy fire
- Added some randomisation so that units aren't suppressed by exactly the number of bullets specified in the shot threshold
- bDetect vehicle fixes
- bDetect 0.74
- Correct bDetect call in script version
- Correct wait for bDetect initialisation
- Cleanup of config variables in addon version
- Changes to stance modification code to make it CBA independent
- bDetect 0.73
MP and dedicated server debug ball colour handling improved.
Units with stances set to crouch/prone by other AI mods will not be forced to "auto"" position when unsuppressed.
Fixed already prone units crouching under suppression, when using ACE (thanks Robalo).
Reveal shooter is disabled if using ASR_AI.
Highly skilled units will suffer lower courage reduction under fire.
bDetect logging off by default, may be toggled on.
v3.00 beta 2
Bullet detect, supression and debugging framework now works in SP, MP and Dedicated (Ollem and Fabrizio).
Significant code overhaul (!) and cleanup.
Text debugging scales with distance.
bDetect 0.72 (SP/MP/Dedi).
- Added floating text based debugging.
- bDetect start hint now correctly not displayed if TPWCAS hint is not displayed.
- Courage is only decreased if theere are nearby friendly casualties.
- bDetect 0.67.
- Added ability to configure whether units will flee when morale/courage drops too low.
- Improved visual debugging code
- Code has been modularised, each function is compiled from its own sqf.
- Courage does not drop so rapidly under fire (should lead to less premature fleeing).
- bDetect 0.67
- Code cleanup and optimisation.
- Private variable declarations for each function.
- Simplified skills modification, will not head to 0 as quickly.
- Units are more easily suppressed if there are friendly casualties within 20m.
- Simplified ASR AI skill recognition.
- bDetect startup hint will not be shown if TPWCAS startup hint is not shown.
- bDetect 0.67 (modified to allow units to suppress when shooting uphill).
- Fixed config errors.
- Reveal function properly configurable.
- ASR AI skills properly recognised again.
- Removed some superfluous checks now handled by bDetect.
- bDetect 0.66.
- bDetect 0.65, essentially feature complete bullet detection framework
- Fixed the broken unit filtering. This caused debugging to spawn phantom civilians leading to performance degradation over time
- Total rewrite of the bullet detection code by fabrizio_T. This system (bdetect) is bullet centred rather than unit centred, for extremely significant increases in performance and accuracy. Added filtering so that suppression calculations are only performed for uninjured combatants less than 1000m from the player. Removed stance-only suppression mode.
- Further optimisation of bullet detection. Removed "combat mode" under suppression, since the engine and any AI mods will handle this more effectively. Significantly improved debug mode, debug balls disappear when injured/dead. Suppression not applied to injured units. Unsuppressed prone units will not crouch if fired at.
- Total rewrite and optimisation. Improved performance with more units. Fine tuning of skill and stance parameters under suppression. Player suppression effects (optional). Some MP optimisation (but still WIP). Units can be suppressed by vehicle fire.
- better integration with ASR_AI,
- "combat" behaviour under suppression
- per frame performance optimisation
- miscellaneous code cleanups
You are using our website as a guest. Guest have the lowest downloadspeeds and will download from our public file servers. If you would like to know how you can download with higher speeds and have to wait less while downloading check out the Armaholic subscription system. When you have already subscribed and your account is not upgraded within 24 hours it means you probably forgot to include your username. If that is the case please contact us as soon as possible!
Copyright (c) 2006 - 2020 Armaholic.com All Rights Reserved.
Armed Assault, ArmA: Combat Operations, ArmA: Queen's Gambit, Arma 2, Arma 2: Operation Arrowhead, Arma 2: Combined Operations, Arma 2: British Armed Forces, Arma 2: Private Military Company, Arma 2: Army of the Czech Republic, Arma 2: Reinforcements, Arma 2: Firing Range and Arma 3 are trademarks or registered trademarks of Bohemia Interactive a.s.