Jump to content
Sign in to follow this  
tpw

TPWC AI suppression system

Recommended Posts

TPW,

on a Linux server, all files and folders' name must be in lowercase so I'm wondering if there could be an issue with your script searching for an hpp file named "TPWC_AI_SUP.hpp" in a folder named "TPWC_AI_SUP" while they actually are both in lowercase?

Share this post


Link to post
Share on other sites
Guys please check posts 89 and 90 here

https://dev-heaven.net/issues/60304

and tell us if this could be caused by TPWAC or TPWAC_LOS

Test is simple: disable TPWCAS and TPWLOS and if performance issues are gone you've found your answer.. :p

Anyway, in TPWLOS both "terrainintersectasl" and "lineintersects" are used, but only if unit is within 100 m range.

TPWCAS doesn't use these commands.

---------- Post added at 22:01 ---------- Previous post was at 22:00 ----------

TPW,

on a Linux server, all files and folders' name must be in lowercase so I'm wondering if there could be an issue with your script searching for an hpp file named "TPWC_AI_SUP.hpp" in a folder named "TPWC_AI_SUP" while they actually are both in lowercase?

Good point: i'll change all lowercase for next release

---------- Post added at 22:39 ---------- Previous post was at 22:01 ----------

Hey..sorry if i haven't got it right but..

In this so called "test mission" i can assume there is a version i.e TPWCAS_DSC 0.5?

:confused:

Yes, it is an updated version.

I expect to release new TPWCAS_DSC Mod version this weekend (decided to mark it version 1.1)

Share this post


Link to post
Share on other sites

A little performance tip, Ollem.

Don't run both commands always in your iteration.

Change it for example to this (TPW_AI_LOS):

if (_ang > 120 && {_ang < 240} && {!terrainintersectasl [_eyepa, _eyepb]} && {!lineintersects [_eyepa, _eyepb]}) then

It uses lazy evaluation. If _ang <= 120 it does not even check for _ang < 240, let alone terrainintersectasl and lineintersects.

If terrainintersectasl is true it does not execute lineintersects.

(Lazy eval is done with braces around conditions in sqf).

Xeno

Share this post


Link to post
Share on other sites
Test is simple: disable TPWCAS and TPWLOS and if performance issues are gone you've found your answer.. :p

Anyway, in TPWLOS both "terrainintersectasl" and "lineintersects" are used, but only if unit is within 100 m range.

TPWCAS doesn't use these commands.

---------- Post added at 22:01 ---------- Previous post was at 22:00 ----------

Good point: i'll change all lowercase for next release

---------- Post added at 22:39 ---------- Previous post was at 22:01 ----------

Yes, it is an updated version.

I expect to release new TPWCAS_DSC Mod version this weekend (decided to mark it version 1.1)

Is it possible that the script checks for more than 100 meters if there are many scripts running?

Share this post


Link to post
Share on other sites
A little performance tip, Ollem.

Don't run both commands always in your iteration.

Change it for example to this (TPW_AI_LOS):

if (_ang > 120 && {_ang < 240} && {!terrainintersectasl [_eyepa, _eyepb]} && {!lineintersects [_eyepa, _eyepb]}) then

It uses lazy evaluation. If _ang <= 120 it does not even check for _ang < 240, let alone terrainintersectasl and lineintersects.

If terrainintersectasl is true it does not execute lineintersects.

(Lazy eval is done with braces around conditions in sqf).

Xeno

Does this mean lazy evaluation is implemented now? That would be great!

Thanks!

I will go through the code and adjust.

--- update ---

It is :yay:https://dev-heaven.net/issues/5080

Edited by Ollem

Share this post


Link to post
Share on other sites

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

Updated Release of TPWCAS_DSC mod:

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

Download: tpwcas_dsc_v1.1.zip

The TPWCAS_DSC mod will only run on dedicated server

(Please use regular TPWCAS for Single Player games)

Make sure no other TWPCAS/TPWLOS is active on any of the connected clients (player pc's)!

what's new:

- Improved and optimized AI suppression code

- Suppressed AI will look for close by cover and move to cover - disabled by default - can be enabled by userconfig file

(Note: For high player/AI count it is highly recommended to disable this feature for performance reasons in case low server FPS is experienced)

(Note: sometimes basic AI behavior overrules the effect)

Visual debug features - disabled by default - can be enabled by userconfig file:

- 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) and default AI behavior will continue

- Updated embedded TPWLOS - disabled by default - can be enabled by userconfig file:

TPWLOS is now server FPS aware: below (configurable) FPS threshold TPWLOS process will skip automatically until server FPS is okay again

(Note: For high player/AI count it is highly recommended to disable this feature for performance reasons in case low server FPS is experienced)

- Civilian suppress effect: bullets close to civilians will make them run in random direction away from the shooting

Visual debug features - disabled by default - can be enabled by userconfig file:

- yellow smoke + flag pole: selected cover position

- blue smoke: unit reached selected destination and should go prone

- green smoke: unit has stayed random time (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

- Lowercase mod name and userconfig file name for Linux compatibility

- New userconfig file (tpwcas_dsc_v2.hpp)

NOTE:

please make sure no other tpwcas or tpwlos is active while otherwise things will most likely go foobar bigtime... (both server and client side)

This version will

- only run on a dedicated server (no client side script/pbo needed)

- only trigger AI suppression by player shot bullets

- only trigger LOS for AI being able to see players.

- not show color changes for debug balls - height of the ball will indicate level and kind of suppression/tpwlos will activate seperate ball so 2 balls may be visible at same time

This version is available as script version or unsigned PBO (while it's server side only anyway):

For script version:

Embed tpwcas_dsc directory in your mission file and start using:

null = [] execvm "tpwcas_dsc\tpwcas_dsc.sqf";

For PBO version:

Add mod to server startup config

copy/move userconfig\tpwcas_dsc\tpwcas_dsc_v2.hpp to <arma dir>\userconfig\tpwcas_dsc\ and adjust parameters when applicable

Feedback is highly appreciated

Edited by Ollem

Share this post


Link to post
Share on other sites

Ok, time for some noobish questions, I prefer to be safe than sorry here.

We currently have TPWC_AI_SUPPRESS_304 installed both on server and clients. So the thing to do now is to get rid of it everywhere and use tpwcas_dsc_v1.1 on server only, right?

But then, will player commanded AI be affected? and what does DSC stands for?

Share this post


Link to post
Share on other sites
Ok, time for some noobish questions, I prefer to be safe than sorry here.

We currently have TPWC_AI_SUPPRESS_304 installed both on server and clients. So the thing to do now is to get rid of it everywhere and use tpwcas_dsc_v1.1 on server only, right?

But then, will player commanded AI be affected? and what does DSC stands for?

DSC = Dedicated Server CooP only.

So if you want player commanded AI to be affected please stick to your current setup for now

(TPWC_AI_SUPPRESS_304 on dedicated server + TPWC_AI_SUPPRESS_304 on clients)

Added the following to updated release post :

NOTE:

please make sure no other tpwcas or tpwlos is active while otherwise things will most likely go foobar bigtime... (both server and client side)

This version will

- only run on a dedicated server (no client side script/pbo needed)

- only trigger AI suppression by player shot bullets

- only trigger LOS for AI being able to see players.

- not show color changes for debug balls - height of the ball will indicate level and kind of suppression/tpwlos will activate seperate ball so 2 balls may be visible at same time

This version is available as script version or unsigned PBO (while it's server side only anyway):

For script version:

Embed tpwcas_dsc directory in your mission file and start using:

null = [] execvm "tpwcas_dsc\tpwcas_dsc.sqf";

For PBO version:

Add mod to server startup config

copy/move userconfig\tpwcas_dsc\tpwcas_dsc_v2.hpp to <arma dir>\userconfig\tpwcas_dsc\ and adjust parameters when applicable

Feedback is highly appreciated

Edited by Ollem

Share this post


Link to post
Share on other sites

Got it, thank you Ollem, the changelist list appealing by the way, good work.

Share this post


Link to post
Share on other sites
Got it, thank you Ollem, the changelist list appealing by the way, good work.

I'll try to merge both tpwcas and tpwcas_dcs into one release over the next weeks, so required server and client setup can be choosen based on config file rather then mod version

Share this post


Link to post
Share on other sites

I think that we gonna try this version and see if we really are missing our AI being affected that much. ;)

Share this post


Link to post
Share on other sites

Great change log. Many thanks for the effort.

What happens when the DSC version is used in simple single player?

Share this post


Link to post
Share on other sites

What happens when the DSC version is used in simple single player?

Nothing will happen.. the mod will notice it's not running on a Dedicated server and just quit..

Share this post


Link to post
Share on other sites

There's an issue with TPW AI LOS where you as a player see red markers over enemies as if somebody has ordered you to engage them.

Is there any way to disable them?

As I understand this is simply because TPW AI LOS runs on all units while it should be disabled for the player unit

EDIT: ok the fix was easy

Need to add && (!isPlayer _x) into condition at line 101 of tpw_ai_los.sqf

Can you release this as signed pbo tpw or whoever is in charge now?

Edited by metalcraze

Share this post


Link to post
Share on other sites

Hmm..i believe you r using the "script" version?

Last night i played lot of hours the new DSC (addon-version) and haven't encountered any sign of 'red markers '

Share this post


Link to post
Share on other sites

I'm talking about TPW AI LOS not Suppression

With AI LOS you will get red target markers whenever your character has a direct line of sight to an enemy within 100m without the above fix.

And yeah I'm using addon version.

Share this post


Link to post
Share on other sites
I'm talking about TPW AI LOS not Suppression

TPW_DSC has embedded AI_LoS enabled by default.Maybe you tried to run both?

Share this post


Link to post
Share on other sites

Maybe in DSC it works differently / was already fixed in that regard?

I'm using original separate TPW's version 1.04

Share this post


Link to post
Share on other sites
TPW_DSC has embedded AI_LoS enabled by default.Maybe you tried to run both?

In version TPWCAS_DSC v1.1 mod version the embedded tpwlos is disabled by default!

If you want to enable, use config file!

---------- Post added at 21:51 ---------- Previous post was at 21:08 ----------

There's an issue with TPW AI LOS where you as a player see red markers over enemies as if somebody has ordered you to engage them.

EDIT: ok the fix was easy

Need to add && (!isPlayer _x) into condition at line 101 of tpw_ai_los.sqf

Can you release this as signed pbo tpw or whoever is in charge now?

Thanks for the feedback. TPW had already noticed though and will make sure it will be taken into account in updated version.

(http://forums.bistudio.com/showthread.php?136304-TPWC-AI-suppression-system&p=2241460&viewfull=1#post2241460)

(Can't promise anything about when this will happen though..)

Edited by Ollem

Share this post


Link to post
Share on other sites
In version TPWCAS_DSC v1.1 mod version the embedded tpwlos is disabled by default!

If you want to enable, use config file!

Do i m missing something here??

This image is from a "fresh opened" userconfig -clearly shows LoS enabled

DSC.jpg

Share this post


Link to post
Share on other sites
Do i m missing something here??

This image is from a "fresh opened" userconfig -clearly shows LoS enabled

Okay, now I do understand the confusion:

In the mod version itself TPWLOS is disabled by default:

//EMBEDDED TPWLOS: DISABLE = 0, ENABLE = 1

if(isNil "tpwlos_enable") then { tpwlos_enable = 0; //disabled by default };

So if you run the mod without the userconfig file, default values will be used and default for tpwlos is disabled.

To enable embedded tpwlos, the config file is needed, and in the config file tpwlos is already enabled.

Share this post


Link to post
Share on other sites

Yesterday during CiA coop night TPWCAS_DCS v1.1 was used. Player count - 12. During the first mission debug mode was on, which was later deactivated for the rest of the night. Seems like everything is working like a charm! :yay:

Share this post


Link to post
Share on other sites

So if you run the mod without the userconfig file, default values will be used and default for tpwlos is disabled.

To enable embedded tpwlos, the config file is needed, and in the config file tpwlos is already enabled.

hmm..ok

I thought userconfig's are essential -if included-for a mod to work properly-so i never forget to install them.

:)

Share this post


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

×