Jump to content
lordprimate

TPWCAS A3 An AI/Player Supression Mod

Recommended Posts

Hello everyone, after a long time of waiting, I bring you "TPW","-Coulum-","fabrizio_T","Ollem" 's TPWCAS for ARMA 3.

 

Description: Singleplayer, Multiplayer and Dedicated/Headless Server Compatible AI Suppression System

Authors: TPW && -Coulum- && fabrizio_T && Ollem

Latest Version: 5.5.3

First Released: 22-02-2012

Requirements: CBA 

Suggested: ASR_AI

Previous Releases and Discussion:: http://forums.bistudio.com/showthread.php?136304-TPWC-AI-suppression-system

 

Media Fire :  TPWCAS_A3

Steam :  TPWCAS_A3

 

Introduction:
--------------

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.

In ARMA 3 they have added bullet detection and suppression of AI, however, if you feel that the Vanilla effect is not enough. This mod may be of assistance. This is the Port of the ARMA 2 version and as far as I know its fully Functional.

Features:
---------
*
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 caliber pistols and SMG are ignored.
* Units react differently according to the side of the shooter.
* Friendly shooter: > 0 bullets --> kneel/crouch.
* Enemy shooter: 1 - 10 bullets --> kneel/crouch, > 10 bullets -->drop/crawl. 
* 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.
* Units Will Roll in attempt to evade fire if out in open>prone.

IMPORTANT NOTE:
TPWCAS is not an all-in-one AI behavior 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 behaviors under combat stress, and you are encouraged to use these if you require additional realism such as moving to 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.

ANOTHER VERY IMPORTANT NOTE:
To get proper functionality out of this mod you need to insall on both the server and the client. 
CLIENT:
1: The mod folder contains a >userconfig folder. This goes into your ARMA 3 root folder. Just copy and paste.
2: Inside that folder is another folder named tpwcas. Inside that is the config file where you can change the valuse to what you like.
3: When launching your client you MUST Enable File Patching.

SERVER:
1: Your server Needs to be "verifySignatures = 2;". (This goes in your Server.cfg On Your Server Root Dir)
2: You will need to enable File Patching for Headless and for Human Clients that setting is "allowedFilePatching = 2;". (This goes in your Server.cfg On Your Server Root Dir) This is NOT IDEAL and why you MUST use "verifySignatures = 2;". This will be until I get an INGAME UI put together.
3: You will need to install the userconfig folder into the Server Root Dir. (So the server.exe has access to the variables.)
4: You will need to install the KEY into the KEY folder in the Server Root Dir. (So Clients can join the server with @tpwcas_a3)
5: Make sure you have @CBA_A3;@TPWCAS_A3 in your server -mod= line.... 

 

ANOTHER VERY IMPORTANT NOTE:
To get proper functionality out of this mod you need to install on both the server and the client. 
CLIENT:
1: The mod folder contains a >userconfig folder. This goes into your ARMA 3 root folder. Just copy and paste.
2: Inside that folder is another folder named tpwcas. Inside that is the config file where you can change the valuse to what you like.
3: When launching your client you MUST Enable File Patching.

SERVER:
1: Your server Needs to be "verifySignatures = 2;". (This goes in your Server.cfg On Your Server Root Dir)
2: You will need to enable File Patching for Headless and for Human Clients that setting is "allowedFilePatching = 2;". (This goes in your Server.cfg On Your Server Root Dir) This is NOT IDEAL and why you MUST use "verifySignatures = 2;". This will be until I get an INGAME UI put together.
3: You will need to install the userconfig folder into the Server Root Dir. (So the server.exe has access to the variables.)
4: You will need to install the KEY into the KEY folder in the Server Root Dir. (So Clients can join the server with @tpwcas_a3)
5: Make sure you have @CBA_A3;@TPWCAS_A3 in your server -mod= line.... 

Debug Legend:
Red Flag - Cover Position Actual.
Yellow Smoke - Cover Pos found, Moving.
Red Smoke - Moving Wrong Way. Abort. Get down.
Green Smoke - Close to cover. / Move back to group.
Blue Smoke - Reached Cover. 
Cyan / Light Blue Smoke - Already In Cover, Abort Move.

 

Please be sure to tip your hat to the developers: "TPW","-Coulum-","fabrizio_T","Ollem"

Please read the included readme for full details of TPWCAS, including features, installation, configuration, caveats, credits and the full changelog

 

Known Issues: (I don't know of many any repeatable offenses will be listed here)

1: Rolling Animation - AI avatar will roll however, will not actually move... (This is a OLD ARMA 3 issue check the issue tracker and vote up. Ill track it down and post a link here some time)

2: Possible ACE issue with Unconscious state. Currently looking into.

3: Having to use File Patching I know I know... currently working on that as well.

  • Like 8
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello,

 

I'm loving it so far. I agree the vanilla suppression is not enough. I did run into an error with a test mission though.

 

19:03:28 Error in expression < - [%6] seconds", _unit, _cover, _dist, _tooFar, _tooLong, _elapsedTime];
};

[[>
19:03:28   Error position: <_tooFar, _tooLong, _elapsedTime];
};

[[>
19:03:28   Error Undefined variable in expression: _toofar
19:03:28 File tpwcas\tpwcas_runforit.sqf, line 114

Unsure what unit it was. The mission is just 3 blufor groups, 3 opfor groups, and move waypoints to each other on Malden.

 

I'll try to look into this more as I would like to consider using this mod for my community's modpack but, of course, errors are concerning when considering new modpack additions. I'll let ya know what I can find!

 

EDIT:

At some point, the suppression mod considered the unit bis_o22 (an OPFOR FIA) as a civilian:

"Civilian Unit [bis_o22] reached cover [2.22493]: [194] m - [any] seconds"

which then resulted in the error above. 

Share this post


Link to post
Share on other sites

hmm i have never seen that error ever. can you post the mission so i can see

 you mention a mod pack what mods were you running when you made the mission and tested it? Just cba asrai and tpwcas? some unit mod perhaps?

i ask because opfor does not have FIA units... its OPFOR and OPFOR(Pacific).

 

i cannot honestly ever remember seeing this error so i would like to have the mission to test.

Share this post


Link to post
Share on other sites

this is epic and created by such 5 star names in arma3 modding. Thanks!

Share this post


Link to post
Share on other sites
1 hour ago, lordprimate said:

hmm i have never seen that error ever. can you post the mission so i can see

 you mention a mod pack what mods were you running when you made the mission and tested it? Just cba asrai and tpwcas? some unit mod perhaps?

i ask because opfor does not have FIA units... its OPFOR and OPFOR(Pacific).

 

i cannot honestly ever remember seeing this error so i would like to have the mission to test.

 

No unit mods. OPFOR FIA is vanilla.

(sanity checked by launching pure vanilla: https://i.imgur.com/6WZ15SJ.png )

 

The modpack I referred to was not running during my test of the suppression mod. Rather, I threw together a core pack for testing purposes consisting of cba, ace, ASR AI, tpwcas. 

 

Just deleted half my post because I figured it out while reproducing lol. It's ace incompatibility. Unconscious units are considered civilians regardless of actual side and thus tpwcas treats them as civilians. (and then causing the error)

 

At least for this error, a check for !isNil and true on "ACE_isUnconscious" when checking the side of a unit would probably fix this up.

Share this post


Link to post
Share on other sites

hmm with over 6k hours you think i would have noticed that there is opfor fia.... :(... my bad. 

 

hmm well i did a test with just cba and tpwcas for about 50 minutes with over 10 squads on each side attacking each other. No errors. I live streamed this.

 

And I use Ace all the time with tpwcas and again have never received that error. I was , before posting this very post, making an ALiVE ACE mission with Sanchez Headgore... No Errors in my last test of over 30 minutes. i did not live stream this. ill test again. with just ace, tpwcas

 

 ok for my sanity sake i just launched up ARMA 3 I dont see opfor fia.... no need for pictures i know there is no opfor fia in the vanilla game..

 

edit: and to add i will and currently am looking to this ace issue as i stated i have never seen it but im not discounting it. again i would need to know the EXACT mod set and have the EXACT mission in hand. so you dont think im brushing you off... 

  • Like 1

Share this post


Link to post
Share on other sites

Hello, AIs are automatically switched to combatMode "YELLOW" (fire at will), even if set to other modes.

 

I had a look in the .hpp file, but I can't find anything about this, is it a known issue/bug?

Thank you.

Share this post


Link to post
Share on other sites

hello lorenz94, are you just using tpwcas are you sure it is tpwcas. I run this on my client and also have it running on my server. I change their combat mode often with out problem. I will add however, that i do also use asrai, ace, and alive. can you provide me the mission this is happening in and the EXACT mod list? and i will look into it asap.

Share this post


Link to post
Share on other sites

Hi lord,

thank you for your reply! Unfortunately, I can't share my mission file.

 

I troubleshooted the problem for two days before posting, so I'm pretty sure about it! Anyway, mine is a kind request!

 

Mod list:

Spoiler

ace	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=463939057
ACE Compat - RHS Armed Forces of the Russian Federation	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=773131200
ACE Compat - RHS United States Armed Forces	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=773125288
Ares Mod - Achilles Expansion	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=723217262
CBA_A3	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=450814997
RHSAFRF	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=843425103
RHSUSAF	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=843577117
Specialist Military Arms (SMA) Version 2.7.1	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=699630614
task_force_radio	Steam	http://steamcommunity.com/sharedfiles/filedetails/?id=620019431


//Server Side
asr ai

 

 

On the server, a script selects a random task and spawns it (with "normal" command such as createGroup, setGroupBehaviour, setCombatMode, setFormation ecc).

All waypoints are spawned correclty (with or without asrai or tpwcas).

 

If I click on a waypoint or on a group, W/O your mod the combatMode is set correctly (as I choose it in the script), but if I use tpwcas, combatMode is automatically set on yellow.

 

I also tried with a blank mission, creating other units (different from those on the server) and the problem persists.

 

 

Thank you!

 

Share this post


Link to post
Share on other sites

ok, i'll look into it. however, considering the lack of a control IE, your mission. im going to have to, "create a mission, that spawns in ai creates their waypoints ect." and that is honestly not something i intend to spend my time doing. 

 

I'll do what i can. look at the code where the combat mode is changed and see if there is a reason why it would not  revert or be overridden. Thank you for the bug testing and the feedback. I will look into this at my earliest convenience. I do understand how frustrating and laborious it can be to troubleshoot these types of issues and by no means intent to dimish this fact.

 

however, this is new to me in the arma community. This desire to keep your missions secret. It is like these arma 3 groups are so scared of loosing members, if someone else has the same mission, is going to somehow spoil the group.. it was not like this when arma 2 was the deal of the day. A good mission does not a group make... nuff said.

 

Ill look into it but again. just like sending bug reports to BIS they want a control mission that can repeat the problem predictably. otherwise it gets No attention. just saying

Share this post


Link to post
Share on other sites

Hello @lordprimate

According to the date above I'm sure this is it, but is this the latest version of TPWCAS?

There are a number of different Armaholic pages for the script that I just wanted to make sure. v5.5.3.1?

 

I'll assume it is latest version until told otherwise. I've asked this before, but Zeus spawned units will not suppress. I've tested during debug and while editor placed units demonstrate being suppressed, Zeus do not. Could having this script operate as a function fix something like this?

Share this post


Link to post
Share on other sites
Guest

Hey LP,  great mod. I've been using it for a while now and it makes the ai so much more realistic.

However, after being stuck on 5.5.2 version for a long time I finally switched to 5.5.3 version and I've noticed one issue,  the mod always resets the group behaviour (from stealth or combat) back to aware within a matter of seconds. I tried toying with the user config but so far no good. I suppose this is just a bug and not an intended behaviour, right?
Thanks.
 

 

 

Share this post


Link to post
Share on other sites
On 6/23/2018 at 6:26 AM, Lothear said:

the mod always resets the group behaviour (from stealth or combat) back to aware within a matter of seconds

 

@Lothear From the perspective of me learning, can you please elaborate on how you got to this conclusion? For instance does this occur with just Zeus spawned, or editor created AI?

Share this post


Link to post
Share on other sites
Guest
1 hour ago, anfo said:

 

@Lothear From the perspective of me learning, can you please elaborate on how you got to this conclusion? For instance does this occur with just Zeus spawned, or editor created AI?

Sure.
Well I can only say that so far it happened only in single player and only to the units spawned in editor as I didn't test it any further. I first noticed it in a mission I was creating for myself. I did some testing later on - I placed a group and gave it a simple move waypoint about 200 or 300 meters away, set the behaviour to combat or stealth and instead of sticking to it they happily switched to aware. Then multiple groups, within a quarter of a minute or so all were back to aware. That occured in the versions 5.5.1 and 5.5.3, not in 5.5.2 though, but in 5.5.2 ai get stuck instead and you have tu manually move them via Zeus.
L

Share this post


Link to post
Share on other sites

Do you use any other AI behaviour mods?

Share this post


Link to post
Share on other sites
Guest

I usually used it in conjuction with ASR, but for testing purposes it was solely tpwcas with vanilla units.

Share this post


Link to post
Share on other sites
22 minutes ago, Lothear said:

set the behaviour to combat or stealth and instead of sticking to it they happily switched to aware.

 

Right, so they start off walking in combat mode (editor placed?), guns up then start running as aware do soon after?

Share this post


Link to post
Share on other sites
Guest
42 minutes ago, anfo said:

 

Right, so they start off walking in combat mode (editor placed?), guns up then start running as aware do soon after?

Pretty much, yes. And it didn't even matter whether it was combat, stealth or safe mode.
There was also a bug in 5.5.1, where AI completely ignore forced hold fire. I guess it went away with me turning on LOS or changing something else in the config. Knowing that 5.5.1 behaves pretty similar to 5.5.3 (ai switching to aware) and 5.5.2 being the "odd one" that works well, it makes me wonder if it also happens in 5.5.3, but I cannot confirm as I haven't inspected it.

Share this post


Link to post
Share on other sites
On 6/22/2018 at 6:26 PM, Lothear said:

Hey LP,  great mod. I've been using it for a while now and it makes the ai so much more realistic.

However, after being stuck on 5.5.2 version for a long time I finally switched to 5.5.3 version and I've noticed one issue,  the mod always resets the group behaviour (from stealth or combat) back to aware within a matter of seconds. I tried toying with the user config but so far no good. I suppose this is just a bug and not an intended behaviour, right?
Thanks.
Can confirm. I'm having the same issues, regardless of what mods I am using in conjunction with tpwcas. It happens every now and again with the TPW duck from TPW Mods, but its really apparent with just tpwcas

 

 

 

Share this post


Link to post
Share on other sites

sorry for the delay , if i understand you correctly your concerned that your group is coming OUT of combat mode. 

 

for example: your group is in combat and they are fighting... and they keep going from combat mode to aware. then back to combat mode? then back to aware.. over and over every second??

 

or is it that they are in combat mode and they go into aware  and never go back into combat mode?

 

i ask because i just did a test I put a squad of opfor and a squad of blufor on stratis, in Agia Marina. I put my playable unit on a hill. I placed the tpwcas debug module and other "enable" modules to make sure everything is running.  

 

when i started the mission I crested the hill in my player unit, and shot at the OPFOR group. The started to make their way to engage me. they stayed in combat mode for a while. up until they met up with the blufor group near by. once they saw each other the fight ensued. everything seemd normal i didnt see anyone constantly leaving combat mode and going back to their Original position.

 

 

Share this post


Link to post
Share on other sites

Is there a chance that you add to userconfig enable-disable    kneel/crouch/drop/crawl  ?

I now it is realistic but I hate when  AI gp prone

Share this post


Link to post
Share on other sites
Guest
6 hours ago, lordprimate said:

sorry for the delay , if i understand you correctly your concerned that your group is coming OUT of combat mode. 

 

for example: your group is in combat and they are fighting... and they keep going from combat mode to aware. then back to combat mode? then back to aware.. over and over every second??

 

or is it that they are in combat mode and they go into aware  and never go back into combat mode?

 

i ask because i just did a test I put a squad of opfor and a squad of blufor on stratis, in Agia Marina. I put my playable unit on a hill. I placed the tpwcas debug module and other "enable" modules to make sure everything is running.  

 

when i started the mission I crested the hill in my player unit, and shot at the OPFOR group. The started to make their way to engage me. they stayed in combat mode for a while. up until they met up with the blufor group near by. once they saw each other the fight ensued. everything seemd normal i didnt see anyone constantly leaving combat mode and going back to their Original position.

 

 


LP,
try this test - spawn 3 groups of bluefor in the editor, give each a simple move waypoint, set one to aware,  another to combat and the last to safe behaviour. The one being in aware will have no problem, the other two will change to being aware after a few seconds. In other words - this is not related to any sort of engagement, but if you want to eg. make your group creep up on the enemy, you set them to stealth, and they happily ignore it and immediately switch to being aware.

I have tested different versions of TPWCAS and found out, that this happens in 5.5.1 (they also ignore hold fire behaviour), doesn't happen in 5.5.2 (but AI sometimes get stuck and don't do anything) and happens in 5.5.3 (they don't get stuck, they don't ignore hold fire). Also same effect either with or without ASR AI.

If there is any sort of confusion, PM me please, I'll either try to explain myself a bit better or outright provide you with a test mission.
Thanks

L

Share this post


Link to post
Share on other sites

Hey, would it be possible to upload this mod to Github, alternatively Gitlab?

I'd like to contribute a bit to the mod, and Git is an excellent way to do it and later review changes as you probably know.

  • Like 1

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

×