Jump to content
Sign in to follow this  
tpw

TPWC AI suppression system

Recommended Posts

Updated the .pbo in link above - usage: download tpwcas4.0 Beta and replace the .pbo.

If not sure what you are doing: please wait for next release - expected this weekend..

I concurr. The debug is no longer visible and ringing no longer spamming audio on grenade detonation.

Great job!

Share this post


Link to post
Share on other sites

I've made some good progress to merge tpwcas and tpwcas_dsc into one single version.

I've fixed bugs which were present in the 4.0beta version, and releasing now as release candidate:

tpwcas_v4.0_RC2.zip

At this stage still only the unsigned mod (.pbo) version - will provide singed version suitable for MP games asap.

Check the updated userconfig file for config options (don't forget to copy to <arma game dir>/userconfig/tpwcas dir)

Full Release notes: https://dl.dropbox.com/u/96469595/%40tpwcas/readme_tpwcasv4.txt

TPWCAS v4.0 Script version:

copy tpwcas subdir in your mission folder

start tpwcas:

Usage: [<tpwcas_mode>] execVM tpwcas/tpwcas_script_init.sqf

E.g.: [2] execVM tpwcas/tpwcas_script_init.sqf

New is tpwcas_mode:

  • tpwcas_mode 1: Both player and all available AI will be subject to suppression as well as TPW LOS, and be able to trigger suppression
    - Single Player mode - automatically set
  • tpwcas_mode 2: Multiplayer mode - All available AI and players will be subject to suppression as well as TPW LOS, and be able to trigger suppression.
    - Multiplayer mode - requires setting parameter in userconfig file
    - Requires tpwcas on both server and all players system (may include HC as well).
    - Bullet detection framework active on both server and client pc's, to allow suppression of player and AI local to each system.
    - Embedded TPW LOS will check Line of Sight for all AI and players
  • tpwcas_mode 3: Supposed to be used for AI suppression by player shot bullets only. TPW LOS is only active for players who are in Line Of Sight to enemy AI.
    - Multiplayer mode - default MP setting, does not require setting parameter in userconfig file
    - Recommended setting for MP coop versus enemy AI.
    - No client needed (if available at client tpwcas will be automatically deactivated on that client).
    - There will be no player suppression (i.E. no camshake and no visual blur)
    - Any friendly AI local to player (= member of players group) will not be subject to suppression, nor will trigger AI suppression
    - Friendly AI local to server (= not member of players group) will be subject to suppression, and will trigger AI suppression
    - Embedded TPW LOS will check only if enemy AI has Line of Sight to any player (so not for AI versus AI)
  • tpwcas_mode 4: Headless Client mode, and only to be used in conjunction with tpwcas_mode 3 Dedicated Server: this manual mode will activate suppression for any AI local to HC
    - Should be manually set via userconfig on HC client
    - Experimental - not fully tested yet
  • tpwcas_mode 5: Disable tpwcas mod
    - if TPWCAS is set to 5 (disabled) in userconfig, mission makers can overrule by placing a 'TPWCAS module' on the map to enable TPWCAS mode 2 or 3 for specific mission
    - if TPWCAS is set to enabled in userconfig, mission makers can overrule by placing a 'TPWCAS module' on the map to disable TPWCAS mode (set to 5) for specific mission

Changes version 4:

- New: Merger of TPWC_AI_SUPPRESS and TPWCAS_DSC version

- New: Same mod can be used for SinglePlayer, Dedicated Server, and Client-Server setup

- Auto detection of SinglePlayer setup (tpwcas = 1)

- Auto detection of MultiPlayer Dedicated Server setup (tpwcas = 3)

- Auto disable of client if Server started in Dedicated Server mode (server tpwcas = 3/client tpwcas = 5)

- Manual config option to configure client/server setup (tpwcas = 2)

- Manual config option to disable TPWCAS (tpwcas = 5)

- Experimental config mode specifically for 'Headless Clients' (tpwcas = 4)

- Update: Performance improvements and code optimisations

- 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)

Debug info:

The red + yellow + green balls are related to suppression:

- green: close friendly fire detected - going crouched

- yellow: view close enemy fire detected - going crouched

- red: threshold value of enemy fire detected - going prone

The purple ball indicates LOS (Line Of sight) triggered

Smoke and flagpoles are related to take cover and civilian runaway trigger:

Enemy AI:

- 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)

Civilians:

- 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

Feedback highly appreciated

Edited by Ollem

Share this post


Link to post
Share on other sites

Superb release. Thanks.

Is there a plan to release the script version soon ?

Share this post


Link to post
Share on other sites
Superb release. Thanks.

Is there a plan to release the script version soon ?

The scripts are already present in the .zip file.

Please try to run script version by donwloading this file: http://dl.dropbox.com/u/96469595/tpwcas_dsc/tpwcas_script_init.sqf

and place it in tpwcas subdir in your mission, and start with

 [] spawn tpwcas/tpwcas_script_init.sqf

set right tpwcas_mode in top of this script.

(not tested!)

Share this post


Link to post
Share on other sites

What are the various debug balls/smoke/flags mean? I only know the orange and red balls as being suppressed and heavily suppressed respectively. But what about the blue/yellow/red smoke means? and the flags?

Share this post


Link to post
Share on other sites
What are the various debug balls/smoke/flags mean? I only know the orange and red balls as being suppressed and heavily suppressed respectively. But what about the blue/yellow/red smoke means? and the flags?

The red + yellow + green balls are related to suppression:

- green: close friendly fire detected - going crouched

- yellow: view close enemy fire detected - going crouched

- red: threshold value of enemy fire detected - going prone

The purple ball indicates LOS (Line Of sight) triggered

Smoke and flagpoles are related to take cover and civilian runaway trigger:

Enemy AI:

- 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)

Civilians:

- 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

Share this post


Link to post
Share on other sites

Nice work Ollem!

Thanks for adding the find cover option because that was the missing ingredient for this mod imo, I played it with the HIP mod on Kohima where it's near perfect in places for AI to use cover, and they did that really well, in fact I never really saw them until I got my hands on a sniper rifle.

Is there any difference between using the modules or config? Like activating find cover in the config or placing a find cover module?

If I had one tiny niggle then maybe the swaying when suppressed felt strange? Like I was drunk or hypnotized or something :)

Edited by Katipo66

Share this post


Link to post
Share on other sites

Is there any difference between using the modules or config? Like activating find cover in the config or placing a find cover module?

If I had one tiny niggle then maybe the swaying when suppressed felt strange? Like I was drunk or hypnotized or something :)

1 - no difference. The modules are for dedicated servers to allow admins to e.g. disable tpwcas by default, and enable for specific missions, or the other way around. Other potential usage: missions with a lot of AI on maps like Fallujah usually cause low FPS on the server. for those mission you could use a module to disable TPWLOS in advance

2 - If you don't like the player suppression swaying (and/or blur), check/modify the following in the userconfig - this allows you to disable/enable each of those features:

// 18 PLAYER SUPPRESSION SHAKE. 0 = NO SUPPRESSION, 1 = SUPPRESSION.    
tpwcas_playershake = 1; //FORCED OFF IF RUNNING ON DEDICATED SERVER in tpwcas mode 3

// 19 PLAYER SUPPRESSION VISUALS. 0 = NO SUPPRESSION, 1 = SUPPRESSION.     
tpwcas_playervis = 1; //FORCED OFF IF RUNNING ON DEDICATED SERVER in tpwcas mode 3

(PS: I slightly increased the swaying a bit in this version, but if majority out here believes it's too much I will consider reducing the effect again..)

Edited by Ollem

Share this post


Link to post
Share on other sites

For some reason Civilians are being treated as Independents in this version. I noticed as Opfor started mass killing them in a mission in which they previously never had. When I changed game parameters to Independent friendly to everyone, they ceased.

Share this post


Link to post
Share on other sites
For some reason Civilians are being treated as Independents in this version. I noticed as Opfor started mass killing them in a mission in which they previously never had. When I changed game parameters to Independent friendly to everyone, they ceased.

That's really weird behavior I cannot explain. I will try to reproduce this, but as far as I can see there is nothing in the code that could modify side behavior.. ???

Did you restart the mission and were able to see same killing behavior? And with tpwcas disabled te effect is gone again?

Share this post


Link to post
Share on other sites
That's really weird behavior I cannot explain. I will try to reproduce this, but as far as I can see there is nothing in the code that could modify side behavior.. ???

Did you restart the mission and were able to see same killing behavior? And with tpwcas disabled te effect is gone again?

Hi and yes. I disabled all other mods save Beta/CBA and TPWCAS. I simply plant an Opfor group in the editor and then a group of civilians in front of them and they start firing if Independent side is set to Blufor. I even ran with Troopmon 2 but it wont show who and why they are firing. If I make myself an Opfor subordinate I am given no order to fire either - very strange. With TPWCAS disabled this does not occur.

Share this post


Link to post
Share on other sites
For some reason Civilians are being treated as Independents in this version. I noticed as Opfor started mass killing them in a mission in which they previously never had. When I changed game parameters to Independent friendly to everyone, they ceased.

Yes, tested and happens for me also.

Share this post


Link to post
Share on other sites

Hmmmm, the issue is I cannot reproduce the described effect :mad: : my OPFOR do not shoot at CIVI's with Independent set friendly to BLUFOR..

This is on local hosted MP mission, Takistan map.

Could you try if the effect still occurs with TPWLOS disabled?

TPWLOS only triggers for enemy units, and has some logic which triggers AI to shoot at the unit in Line of Sight, but I added some debug code to double check and (in my case) civi's are not considered enemies..?

Edited by Ollem

Share this post


Link to post
Share on other sites

I have been using latest's betas, I forgot to check without... Maybe that could be the issue?

Share this post


Link to post
Share on other sites

I've only test this on SP, and you're right ollem, the culprit is the LOS. I disable the LOS in userconfig and the blufor/opfor dont shoot civs anymore

Share this post


Link to post
Share on other sites
I've only test this on SP, and you're right ollem, the culprit is the LOS. I disable the LOS in userconfig and the blufor/opfor dont shoot civs anymore

Thanks for testing.

Could you please test with this version?

Remove/rename /@tpwcas/addons/tpwcas.pbo and replace by adding this (hopefully) fixed version:

http://dl.dropbox.com/u/96469595/tpwcas_dsc/tpwcas_civitest.pbo

Note: it contains additional debug log output which may flood you log file... so please only use this version to verify civilian behavior.

If it's confirmed this will fix the issue I will release a new full version.

(Additional log message drops the measured enemy/friend value status: .............tpwcas_los_fnc_mainloop' - unit [........] - enemy: [.......] - Friend Value: [......]"

Friend value below 0.6 is supposed to be enemy.

In my case the log shows (as expected) value 1 for civilians.)

Edited by Ollem

Share this post


Link to post
Share on other sites
nope, unfortunately still killed by blufor.

This is my test mission:

http://rapidshare.com/files/3737879784/_USMC__MOUT.utes.7z

Thanks - I tested your mission - (added ups.sqf to mission dir) - but neither me nor the policemen get's killed ?????

Tried with independent friendly set to OPFOR, nobody, BLUFOR..

Did you run you test with debug enabled?

If so could you share your logfile?

Note: I've tested with Beta 99515

Share this post


Link to post
Share on other sites

I tested it with beta 99806. Always get killed when the tpwcas hint comes up. Didnt play it with debug on. Will try later. Sorry about the UPS.sqf, forgot to add it in.. silly me :p

Share this post


Link to post
Share on other sites
I tested it with beta 99806. Always get killed when the tpwcas hint comes up. Didnt play it with debug on. Will try later. Sorry about the UPS.sqf, forgot to add it in.. silly me :p

I've just been able to reproduce the issue.... :yay:

Sofar I always tested with ASR_AI, full ACE, MCC, and some Islands

Then the problem doesn't appear.

But when I start without Beta and no mods besides CBA, it also occured for me.

Logs now show "L10: 'tpwcas_los_fnc_mainloop' - unit [C 1-1-A:1 (Test3)] - enemy: [b HAMMER:13] - Friend Value: [0]"

Friend Value should be [1] though... :-/

Share this post


Link to post
Share on other sites

Just played it with debug=2, got the same as you:

"7.961 [bDetect v4.0] Frame:6139 L10: 'tpwcas_los_fnc_mainloop' unit [C 1-1-A:1 (Nazran)] spotted by enemy ai: [b HAMMER:5] - Distance: [14.6844] - Value: [200]"

"7.961 [bDetect v4.0] Frame:6139 L10: 'tpwcas_los_fnc_mainloop' - unit [C 1-1-A:1 (Nazran)] - enemy: [b HAMMER:11] - Values: vm=[4] sun=[10] esp=[0.2] usp=[7.30735] dist=[35.5048] camo=[2] cover=[3] los=[174.816]"

Share this post


Link to post
Share on other sites

Hi, I'm sorry but I think it's still not fixed. Here's some parameter you might consider, in userconfig, the tpwcas_los_minfps by default is set to 35, but my PC cant really go that high, so I set it at 20, and the problem presents itself. But with 35, the problem dont appear, probably because the LOS function didnt even start since my fps will never reach 30+

Share this post


Link to post
Share on other sites
Hi, I'm sorry but I think it's still not fixed. Here's some parameter you might consider, in userconfig, the tpwcas_los_minfps by default is set to 35, but my PC cant really go that high, so I set it at 20, and the problem presents itself. But with 35, the problem dont appear, probably because the LOS function didnt even start since my fps will never reach 30+

I've made some minor changes and I'm quite sure this should be okay now.

Please download and try this (test) pbo version: http://dl.dropbox.com/u/96469595/tpwcas_dsc/tpwcas.pbo

or full mod+script package: tpwcas_v4.0_RC2.zip

At lower level difficulty the edge of the screen will show red indicators for enemy, and green for friendlies.

As you can see on this picture, BlueFor is indicated as red, but they do no longer open fire at me.

(setting independent friendly to nobody)

Civilians.jpg

Edited by Ollem

Share this post


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

×