SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-31-23, 03:49 PM   #1
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default Volunteers needed, to test experimental AI tweaks

Hi guys! In short, I'm looking for volunteer(s) who are currently playing SH5 campaign (with or without TWoS, the only thing required would be that you have JGSME mod manager set up), who would be willing to test changes I've made to TDW's version of Airplane.aix script in order to make planes in game more dangerous.


If you're interested, here's a little more detailed explanation:

Plane AI in SH5 is governed by Airplane.aix file located in data/Scripts/AI folder. Vanilla version was (like most of the game) very buggy and modders have been trying to improve it, most notably TheDarkWraith in his IRAI mod (this is the version used by TWoS megamod among others). Unfortunately TDW never finished working on it, and plane AI still has many problems leading to aircraft not attacking a U-Boat when they should or crashing into ocean. This was discussed at length and tested in a thread I've started some time ago, and based on findings from this thread I did some changes to TDW's version of Airplane.aix aiming to make planes more of a threat to the player.


Unfortunately, my free time is very limited these days and I cannot do any sort of extensive testing, especially testing in campaign (all my own tests were done in specially prepared single missions to have a controlled environment where I can make various script changes and compare results. Campaign doen't work that way - planes fly in various groups, weather conditions, approach from different directions, plus there are various tactics emploed by player to evade the attack - all this has an impact on how well AI will work). This is why I'm looking for someone who is currently playing a campaign to test changes and provide feedback.

How would this work? Here, you'll find a mod that replaces Airplane.aix with new script:

https://www.subsim.com/radioroom/dow...o=file&id=6291

Copy it to your mods folder (or TWOS_Parts folder if you use TWoS). It can be enabled or disabled through JGSME at any time during your campaign, even mid-patrol, and will work both for vanilla game and for TWoS. After enabling it, when you are attacked by an aircraft, please post here the results:

- What type of plane (if you had time to check or use external cam)
- How did you respond to the attack (dive, fight it with AA, etc)
- What was the result (did the plane drop any bombs? Did it crash into ocean or did it do some other weird maneuver?)

I hope to pinpoint planes and situation that lead to least satisfying results, and use this to improve their behaviour by further tweaking either the script or plane parameters.

Final note on credits: as noted above, I was working on version of the script created by TheDarkWraith and included in TWoS megamod, so most of the script is TDW's work, I just changed parts that led to buggy behaviour (specific info on changes made is in comments within script file).
kapuhy is offline   Reply With Quote
Old 01-31-23, 05:33 PM   #2
Muckenberg
Planesman
 
Join Date: Dec 2014
Location: Czech Republic
Posts: 193
Downloads: 527
Uploads: 0
Default

Hello, I will keep you updated. I just started Happy Times.
Muckenberg is offline   Reply With Quote
Old 01-31-23, 05:36 PM   #3
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Muckenberg View Post
Hello, I will keep you updated. I just started Happy Times.
Thanks
kapuhy is offline   Reply With Quote
Old 01-31-23, 07:47 PM   #4
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

I am quite busy right now kapuhy, but if I can finish up a few things and get back to having fun actually playing the game, I'll do some reports. But it will be at least several weeks before I can.
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 02-01-23, 03:06 AM   #5
GrenSo
Grey Wolf
 
Join Date: Apr 2019
Location: Germany
Posts: 828
Downloads: 578
Uploads: 8


Default

Maybe I will have time on this weekend. But without guarantee.
__________________
Best regards,
GrenSo


“Mankind must put an end to war, or war will put an end to mankind.” - J.F.K.
GrenSo is offline   Reply With Quote
Old 02-01-23, 04:42 AM   #6
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Thanks guys

Anyways, from my own testing in single missions so far, this current version seems to improve the following:

- planes more willing to drop bombs (still a lot of "dry runs" but there should be a bomb dropped on player within 1-5 minutes of plane getting in range though efficiency varies from plane to plane)
- way faster turning back for another attack, which also means they keep you in range of their machine guns for better suppression
- planes attempt to drop bomb on place where U-Boat has just dived, and while they almost always miss it's still better than immediately breaking off the moment your periscope hides under water

Downsides:
- weird maneuvers that sometimes lead to stalling (especially with level bombers)
- accuracy in bomb drops is poor.
kapuhy is offline   Reply With Quote
Old 02-01-23, 11:04 AM   #7
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

My guess is that there is still too much SH3/4 AI still in SH5 for the scripting to influence too much of their behavior. It will be interesting to test. Do you have the planes set to Elite (CrewRating=4)? That is almost a necessity in ASW planes, and improves their "maneuvering". Those dry runs, of not dropping occur in SH4 irritatingly all of the time, especially when the player sub dives prior to visual contact. Strange thing is, on the 2nd pass from the plane, they will drop their bombs almost precisely where the submarine dove, almost like they dropped a dye marker on their first pass - which would be cool to model in - but that "accuracy" there is uncanny and unrealistic. Surely, the radar equipped plane was able to gather course and speed data inbound, and could more accurately anticipate where the sub would be? If the airplane makes visual contact, it almost always drops bombs on the first pass, and strafes the water and/or (surely) diving boat. The plane's turning tighter and maintaining contact with the sub in SH5 is something that would be nice to have in SH4, where they often fly 12-15 nm beyond before coming back for a 2nd and 3rd pass... Cool stuff, kapuhy!
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 02-01-23, 03:14 PM   #8
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by propbeanie View Post
Do you have the planes set to Elite (CrewRating=4)? That is almost a necessity in ASW planes, and improves their "maneuvering".
Hmm, I've done my testing on Veteran which is default rating. Now, I just repeated test on Elite with weird results - default unchanged AI did drop bombs with Catalina, though it missed by a lot, while changed AI achieved a direct hit but took more time to drop a bomb. Will have to make further tests on Elite rating I guess.

Edit: Wait I take that back. I mistakenly set "Poor" crew rating instead of Elite. Which makes it weirder still: "Poor" default AI (by default I mean unchanged IRAI script in this case) does drop bombs on moving target, and in first pass to boot! It doesn't hit, sure. But actual "Elite" AI, just like "Veteran", does not drop a bomb at all making endless dry runs...

Quote:
Originally Posted by propbeanie View Post
If the airplane makes visual contact, it almost always drops bombs on the first pass, and strafes the water and/or (surely) diving boat.
Not the case in SH5. Dropping bombs on first pass is a rarity except for level bombers (who do drop bombs but miss by an entire zipcode).

Edit: case in point - look at the video embedded in this post: https://www.subsim.com/radioroom/sho...08&postcount=1

Last edited by kapuhy; 02-01-23 at 05:34 PM.
kapuhy is offline   Reply With Quote
Old 02-02-23, 07:07 AM   #9
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

Most interesting... SH4 does similar, but will almost always drop on the first pass when the boat stays on the surface, and usually on the 2nd if it doesn't on the first. In real life, the dive bombers used their machine gun tracers to help them "aim" their airplanes for the bomb drops, so if you're seeing bullet splashes across the boat, you would assume they would drop right on you... they must have crippled the AI for the scripting, or maybe WITH the script... I'll have to look at that for my curiosity... lol
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 02-02-23, 08:17 AM   #10
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by propbeanie View Post
they must have crippled the AI for the scripting, or maybe WITH the script... I'll have to look at that for my curiosity... lol
Script is simple. There are two boolean functions (syntax looks like Javascript, kind of):

Plane:HasBombs()
Plane:CanFireBombs()

These are conditions for action Plane:FireBombs();

So if both are true, plane should execute action.

Except - I have checked approaches with AI Debugger (very useful SH5 tool allowing you to check values of all functions of all scripts in any given moment of time), that there is a moment during approach when both conditions are true and the plane still doesn't execute the action.

There must be something within Plane:FireBombs() function that prevents it from doing what it is supposed to be doing, but what? I don't have access to that code itselt, just the script that uses it. So, my solution was simply to maximize time plane spends over target (by switching from normal bomb approach to "circle target and strafe it repeatedly" behaviour), increasing probability that Plane:FireBombs() will be triggered at some point.

Last edited by kapuhy; 02-02-23 at 09:15 AM.
kapuhy is offline   Reply With Quote
Old 02-02-23, 12:20 PM   #11
Muckenberg
Planesman
 
Join Date: Dec 2014
Location: Czech Republic
Posts: 193
Downloads: 527
Uploads: 0
Default

Hello, I would like to ask you if you would provide me with your missions that you created for testing. I could test different situations of the pomorka's behavior, flak fire, evasive maneuvers, submerged, etc. I would give you the test results for comparison here on Subsim.
I really don't know when I will come across a plane in the campaign, but I will try to sail as close to England as possible.
Muckenberg is offline   Reply With Quote
Old 02-02-23, 12:44 PM   #12
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Muckenberg View Post
Hello, I would like to ask you if you would provide me with your missions that you created for testing. I could test different situations of the pomorka's behavior, flak fire, evasive maneuvers, submerged, etc. I would give you the test results for comparison here on Subsim.
Sure, but it's just a simple template (with one U-Boat, one plane and neutral ship I put for reference so that I know how far I want to put plane from the boat). I am changing it in editor for every test (switching/adding planes, changing weather, direction of attack, starting depth and speed of U-Boat and so on).

Do you know how to use Mission Editor in SH5? If so, here's a mission template - install it like other mods and tweak to your liking.

https://drive.google.com/file/d/1Kzo...ew?usp=sharing

If you don't know how to edit missions, I'll write instructions for you.
kapuhy is offline   Reply With Quote
Old 02-02-23, 01:36 PM   #13
Muckenberg
Planesman
 
Join Date: Dec 2014
Location: Czech Republic
Posts: 193
Downloads: 527
Uploads: 0
Default

Unfortunately, I don't know how to work with the mission editor. if you made a guide, you would be very kind. Thank you very much.
Muckenberg is offline   Reply With Quote
Old 02-03-23, 04:47 PM   #14
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Muckenberg View Post
Unfortunately, I don't know how to work with the mission editor. if you made a guide, you would be very kind. Thank you very much.
Ok, I should have time on Sunday to make a guide and post it.
kapuhy is offline   Reply With Quote
Old 02-03-23, 07:02 PM   #15
Pascal
Captain
 
Join Date: Apr 2005
Location: Paris
Posts: 525
Downloads: 452
Uploads: 0
Default

I've just started a new campaign - it's necessary to dive back into the game from time to time...
So, June 20, 1940 midway through the North Sea - 2 planes are circling, watching, then one of them dives, drops 2 bombs!
Everyone is wounded and 55% of the hull is left
Conclusion : obviously, this is a change from previous experiences where planes were diving in the water, or passing by as tourists ...

Lesson well learned, if plane in sight, I dive !
__________________

My Mods
Pascal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.