Jump to content
Sign in to follow this  
tpw

TPWC AI suppression system

Recommended Posts

Can someone running this with ASR_AI please confirm it's working? I've been trying every update and none of them work - green bulbs stay green and the units are unresponsive.

I use the v1.15.1_test5 version of ASR_AI with TPWC AIS (PBO or script version, depending) & it works fine apart from the intermittent "courage" script error. Earlier versions of ASR_AI had some incompatibilities, Robalo fixed them.

@all: FYI, the 1.61 RC patch is available, see the beta forum.

Share this post


Link to post
Share on other sites

I'm running the latest version of TPWC on my dedi (with the latest bdetect.sqf) and it seems to be running very well. The only thing I have found strange is a female civvy that gets a green ball then never loses it! There have been a few instances where the script does not seem to run on new created AI soldiers :(

Also I always have to remove the addCamshake command or it doesn't run.

Further info ... this is running on latest 1.61RC beta.

Share this post


Link to post
Share on other sites
I'm running the latest version of TPWC on my dedi (with the latest bdetect.sqf) and it seems to be running very well. The only thing I have found strange is a female civvy that gets a green ball then never loses it! There have been a few instances where the script does not seem to run on new created AI soldiers :(

Also I always have to remove the addCamshake command or it doesn't run.

Further info ... this is running on latest 1.61RC beta.

Thanks for the feedback.

Are you running Linux or Windows dedicated server?

And could you please check the latest code below too? (TPWCAS settings have been adjusted for MP)

TPWCAS_MP_BETAv0713

Share this post


Link to post
Share on other sites

Cheers Ollem. It's a windows box.

I'm running the code with 300-400 AI.

Will sort the new run later on.

Share this post


Link to post
Share on other sites

Hi everyone. It's been a bit quiet on this thread in the last few days, but that's because there's been a lot of work to iron out all the bugs and optimise an SP/ MP / Dedi compatible version of TPWCAS. I think we are 99% there, so here is the latest version in addon and script form for you to try out:

TPWCAS 3.00beta: http://filesonly.com/download.php?file=833TPWC_AI_SUPPRESS_300.zip

The enormous amount of work by Ollem and Fabrizio to introduce fundamental changes to the way the bullet detection framework operates under MP definitely warrants a full integer change to version 3. While obviously we've tested out its operation under SP/ MP and dedi, we cannot vouch for flawless operation under all circumstances. So this release should definitely be considered beta. Visual debugging and logging are on by default. We are relying on your feedback and bug reports to help polish this.

Share this post


Link to post
Share on other sites
a lot of work to iron out all the bugs and optimise an SP/ MP / Dedi compatible version of TPWCAS. I think we are 99% there, so here is the latest version in addon and script form for you to try out:

loving_your_work_sticker-p217711027015457718b7drl_210.jpg

Share this post


Link to post
Share on other sites

Running a mix of GL4 & SLX and the usual ace/cba, nothing else as I was testing it against this mod. Got lots of ‘0’s on screen (sorted now see edit & replys), ran with and without debug and it’s the same either way.

Not sure if anyone else is having this problem. The '0's seem to be the balloons above the heads, or where the balloons would appear..

Edit: sorry should have mentioned its 2.07.

Edit again: just to confirm, tried it without GL4 & SLX and its still there..

Edit: '0' issue sorted, link pic removed..

Edited by ChrisB
Problem solved

Share this post


Link to post
Share on other sites

I think you're referrng to the alternative suppression debugging text and appear below each unit. They should change to other values/colours as the units suffer suppression. They have to be disabled with this line of code:

//TEXT BASED DEBUG RATE (Hz). 0 = NO TEXT DEBUGGING. 5 = 5 UPDATES PER SECOND.

tpwcas_textdebug = 0;

towards the bottom of the HPP file.

Share this post


Link to post
Share on other sites

@chris b: it isn't a problem, you have text debugging on. There are 2 debug modes, as tpw posted. Check the .cpp, the text debugging line is the last entry. Set the value to 0 (zero) to inactivate.

Share this post


Link to post
Share on other sites
Running a mix of GL4 & SLX and the usual ace/cba, nothing else as I was testing it against this mod. Got lots of ‘0’s on screen, ran with and without debug and it’s the same either way.

Not sure if anyone else is having this problem. The '0's seem to be the balloons above the heads, or where the balloons would appear..

Edit: sorry should have mentioned its 2.07.

Edit again: just to confirm, tried it without GL4 & SLX and its still there..

I think you're referring to the alternative suppression debugging text and appear below each unit. They should change to other values/colours as the units suffer suppression. They have to be disabled with this line of code:

//TEXT BASED DEBUG RATE (Hz). 0 = NO TEXT DEBUGGING. 5 = 5 UPDATES PER SECOND.

tpwcas_textdebug = 0;

towards the bottom of the HPP file.

My apologies: Double posted when I tried to edit

Edited by tadanobu
double post

Share this post


Link to post
Share on other sites
I think you're referrng to the alternative suppression debugging text and appear below each unit. They should change to other values/colours as the units suffer suppression. They have to be disabled with this line of code:

//TEXT BASED DEBUG RATE (Hz). 0 = NO TEXT DEBUGGING. 5 = 5 UPDATES PER SECOND.

tpwcas_textdebug = 0;

towards the bottom of the HPP file.

Just tested with =0 where advised and its o.k.

Thank you @tadanobu..

---------- Post added at 11:13 ---------- Previous post was at 11:09 ----------

@chris b: it isn't a problem, you have text debugging on. There are 2 debug modes, as tpw posted. Check the .cpp, the text debugging line is the last entry. Set the value to 0 (zero) to inactivate.

Yes, thanks.

It downloaded like that, will check the next time an update..:)

Share this post


Link to post
Share on other sites

Hey guys one thing I should mention is that the format of tpwc_ai_sup.hpp introduced with v3.00 is different than v1 and v2. Please replace your previous tpwc_ai_sup.hpp if you are upgrading to v3.00b.

Both text and coloured ball debugging are on by default for this beta, as is bdetect logging. Text debugging should be disabled automatically on dedi servers. Default enabling of this stuff is a deliberate decision so that you/we can generate better data for fine tuning.

Edited by tpw

Share this post


Link to post
Share on other sites

Hi tpw

Many thanks for the update.

I just ran a few quick tests (NB, I've patched to 1.61 RC), same mods as before viz. CBA1.006pre, tpw_LOS v1.00, asr_ai v1.15.3_test5, orc_slx_wounds, etc.

In Trial by Fire, the chopper twice made a run at the ZSU truck then flew around zapping everything in sight. Third run, it zapped the truck, dropped off the team then flew around zapping stuff.

All the triangles stayed black except for some of the team (& a couple showed as the normal blue discs adjacent to/overlapping a black triangle.

In my Podagorsk port of Flashpoint v1.2.1, similar things with markers except that some red & blue icons appeared amongst the black triangles.

Unloaded every mod but CBA and TPWC AIS 300, Trial by Fire proceeded normally (no awol chopper) but the marker triangles all stayed black. Same marker issues in FP Podagorsk, so it isn't a mod conflict.

In all mission trials the debug balls worked fine, haven't tried the text version yet.

Hard to pick up errors from the RPT, bDetect debugging is on which generates a lot of messages (I think this should either be off in the PBO version, or, IMO better, toggled from the cpp - if possible). I'll do some more testing with the script version to avoid large numbers of bDetect debug messages.

The "Error in expression <"aimingshake",_newshake];" error seems to have been banished :)

Also, from a very quick test, the civ count does creep up but very slowly. Will run a longer test this afternoon.

May be someone who still has 1.60 could test this version with say beta 94444, then with the 1.61 RC parallel beta 94945 to see if the patch has introduced changes that affect TPWC AIS or/and asr_ai? I should note that I re-tested in both missions with v207b and that was unchanged; it worked exactly in 1.61 RC as it did in 1.60 with relevant betas.

This is great work, kudos to you all :D

Cheers

Orcinus

Edit: I spoke too soon. Ran a series of tests, 3 missions (Trial by Fire, Pinned Down, a port of Flashpoint 1.21 to Podagorsk) with just CBA & TPWC AIS v3.00 (PBO). The "courage" bug is still there, though not so frequent as in some previous tests. Hard to pin down the cause because it is intermittent - sometimes nothing for ten minutes, then several error messages in the space of a few seconds. Occurred in all three missions at one point or another.

Occurs with all debugs on, or with one or both turned off. However.. both from the trials with debug(s) on & with none, suppression seems to be working very well in general on both AI and the player.

Supper calls, will run some tests with the script version tomorrow. In any event, I would have no problem with playing with this 'for real'.

Edited by Orcinus
Addtional information

Share this post


Link to post
Share on other sites

Thanks Orcinus. I saw it once myself when I shot at an enemy immediately after tpwcas started. I think it might have been caused by the script trying to apply skill changes before they are correctly set for the unit. But I couldn't repro it. Do you missions have spawning units? If they are spawning and getting fired upon immediately, then that might cause the issue.

I will look into it further. In the mean time, I'm glad it is actually working for you.

Share this post


Link to post
Share on other sites

I'm running this quite well now on my dedi. I too get the "courage" bug and it tends to be at the start of the mission, so I reckon it is applying the skill changes before they are set. The mission I have can involve soldiers getting fired on immediately they spawn.

Share this post


Link to post
Share on other sites
I'm running this quite well now on my dedi. I too get the "courage" bug and it tends to be at the start of the mission, so I reckon it is applying the skill changes before they are set. The mission I have can involve soldiers getting fired on immediately they spawn.

Excellent news re dedi! Ollem and Fabrizio deserve the nobel prize for getting that happening. I'll look into courage today for you

Share this post


Link to post
Share on other sites

Sorry if this is a dumb question but do I need to run bDetect for the AI suppression mod to work?

Share this post


Link to post
Share on other sites
Sorry if this is a dumb question but do I need to run bDetect for the AI suppression mod to work?

TPWCAS relies on bdetect, so it is already included in both the script version and the addon version. You will not need to run it separately.

Share this post


Link to post
Share on other sites

Guys,

My guys have done some limited testing on this addon, it really is starting to transform the way we will fight to a much more realistic level.

We feel that there should be a bottom stop on the amount of suppression, probably based on courage, thus representing combat experience.

We managed to suppress a group of 12 NVD with a single MG to a point where they ceased to move at all. Probably not that representative of what should be a group capable of working through tough suppression.

The player suppression cam shake is good when you are in sights/optics but when in 1st person it does not really look that good graphically. Is there maybe another way that you could represent this. The shake from the rush of adrenalin is good, taking a moment or two to realize whats happened then having difficulty aiming through that. I think you have the recovery on 5 secs intervals, which is spot on. Can it be adjusted with setCamShakeDefParams ? We tried but could not get the affects under about 1.5 secs in duration. Which is not all lost, but some would not like it.

Share this post


Link to post
Share on other sites
Thanks Orcinus. I saw it once myself when I shot at an enemy immediately after tpwcas started. I think it might have been caused by the script trying to apply skill changes before they are correctly set for the unit. But I couldn't repro it. Do you missions have spawning units? If they are spawning and getting fired upon immediately, then that might cause the issue.

I will look into it further. In the mean time, I'm glad it is actually working for you.

This happens quite reliably in the Flashpoint - Utes mission made by thomsonb. Right at mission start there are firefights and you get this error.

Share this post


Link to post
Share on other sites

Hi tpw

Only Flashpoint uses unit spawning AFAIK; although the error seems more frequent than in the other two missions, there are (especially integrated over time) more units running around/getting shot at/getting killed. I'll test it some more today.

UGLY58 makes a good point - highly trained &/or experienced units would not be affected to the same extent as new recruits. Would making the maximum courage reduction inversely proportional to the unit's starting level work?

And/or, if it doesn't overcomplicate/slow the code, require a significantly greater number of nearby allies killed to reduce courage of a maximally skilled unit by a given %age than for recruits. That would tend to make firefights harder/longer, which would be icing on an already tasty cake :)

I have no idea what the issue is when running asr_ai as well - i.e., why the errant/amok chopper problem resurfaced in Trial by Fire. That could be a mission breaker in a lot of scenarios. To confirm, it isn't an RC 1.61 issue, on reverting to TPWC AIS 207b the chopper lands more-or-less immediately, either just firing a minigun at the ZSU truck or occasionally taking a brief detour to zap it with rockets before landing; just as it did in 1.60. Would still be interestede to learn if someone with 1.60 finds any change in that mission with asr_ai & tpwc AIS v3.00 between stock 1.60 and the beta 94945.

Share this post


Link to post
Share on other sites

Thanks Orc

Associate Professor -Coulum- is the resident skills wrangler, but I will see if I can cook up something along the lines of what you and Ugly58 are talking about. Shouldn't be rocket surgery.

Re the chopper problem. We changed the suppression code between 2.07 and 3.00. It's meant to exclude units in vehicles (including choppers) from being suppressed, but I'll go over it with an electron microscope to make sure.

EDIT: This is the code to only apply suppression to selected units:

if (local _x && (vehicle _x == _x) && (lifestate _x == "ALIVE") && (side _x != civilian)) then {

local _x -suppression only applied to units local to the player

vehicle _x == _x - suppression only applied to units on foot

lifestate _x == "ALIVE" - suppression only applied to uninjured units

side _x != civilian - civilians aren't suppressed

Based on this, I'm not sure why the chopper plays up, but maybe Fabrizio or Ollem can pipe up.

Edited by tpw

Share this post


Link to post
Share on other sites
I have no idea what the issue is when running asr_ai as well - i.e., why the errant/amok chopper problem resurfaced in Trial by Fire. That could be a mission breaker in a lot of scenarios. To confirm, it isn't an RC 1.61 issue, on reverting to TPWC AIS 207b the chopper lands more-or-less immediately, either just firing a minigun at the ZSU truck or occasionally taking a brief detour to zap it with rockets before landing; just as it did in 1.60. Would still be interestede to learn if someone with 1.60 finds any change in that mission with asr_ai & tpwc AIS v3.00 between stock 1.60 and the beta 94945.

It's caused by ASR_AI, explained it on my thread here.

Share this post


Link to post
Share on other sites
It's caused by ASR_AI, explained it on my thread here.

Thanks Robalo, less work for me!

---------- Post added at 19:49 ---------- Previous post was at 19:23 ----------

Orcinus and Ugly58, if you are up for it, here's the modified skills reduction function, which will decrease courage less for more courageous highly skilled units

Save this file as tpwcas_decskill.sqf to overwrite the current tpwcas_decskill.sqf in your mission directory.

If it works OK for you, then I'll incorporate it into the next addon version.

/*
DECREASE UNIT SKILLS
- called from main loop
- aiming shake, aiming accuracy and courage decreased by 2.5% per enemy bullet, or 5% if there are nearby casualties
- these skills won't fall below the value set in twpcas_minskill
- courage decreases less rapidly for more initially highly courageous units
*/

tpwcas_fnc_decskill =
{
private [ "_x","_unit","_originalaccuracy","_originalshake","_originalcourage","_shots","_newaccuracy","_newshake","_newcourage","_nearunits","_cas","_dec"];

_unit = _this select 0;

//ANY FRIENDLY CASUALTIES WITHIN 20m OF UNIT
_nearunits = nearestobjects [_unit,["Man"],20];
_cas = 0;
	{
	if ((side _x == side _unit) && (lifestate _x != "ALIVE")) then 
		{
		_cas = _cas + 1;
		};
	} foreach _nearunits;

if (_cas == 0) then 
	{
	_dec = 0.025; //2.5% decrease
	}
	else
	{
	_dec = 0.05; //5% decrease
	};

_originalaccuracy = _unit getvariable "tpwcas_originalaccuracy";        
_originalshake = _unit getvariable "tpwcas_originalshake";      
_originalcourage = _unit getvariable "tpwcas_originalcourage";       
_shots = _unit getvariable "tpwcas_enemybulletcount";     

_newaccuracy = (_originalaccuracy - (( _originalaccuracy * _dec) * _shots )) max tpwcas_minskill; 
_newshake = (_originalshake - ((_originalshake * _dec) * _shots )) max tpwcas_minskill;
_newcourage = _originalcourage;
if (cas != 0) then 
	{
	_newcourage = (_originalcourage - ((_originalcourage * (_dec / 2) * (1 - _originalcourage)) * _shots )) max tpwcas_minskill;
    };	
_unit setskill ["aimingaccuracy",_newaccuracy];         
_unit setskill ["aimingshake",_newshake];        
_unit setskill ["courage",_newcourage];  
};  

Share this post


Link to post
Share on other sites

_local _x is used while bDetect is always only monitoring AI and players on the system that unit is local. I.e. Most AI is local to server, but AI part of a player group is local to the player's system. In case of SP of course all units are local.

Share this post


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

×