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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-08-22, 03:59 PM   #25
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Happy to report some progress

I figured out the culprit behind constant crashing into water. Planes have the "Avoid Impact" strategy which should prevent them from crashing, but other strategies did not have a condition preventing them from being applied when plane is "avoiding impact", which caused planes to try to follow two different strategies at once.

Adding and !Plane:StrafingTooClose() to bombing/strafing strategy solves the crashing problem - I ran my 6-plane test mission 10 times and only had two instances of plane crashing into water, when before I had on average 2 crashes per single test:

 
strategy BombCourseStrafe(Plane)
{
precond
{
Plane:HasCannons() and Plane:CanFireCannons() and Plane:GetContactRelDistOnWater() <= 3500 and Ship:GetContactSpeed() > 5 and !Plane:StrafingTooClose()
}
action
{
Plane:Strafe(1.0);
Ship:SetThrottleRatio(1.0);
}
}

strategy BombCourseSlow(Plane)
{
precond
{
Plane:GetContactRelDistOnWater() <= 3500 and Ship:GetContactSpeed() <= 5 and !Plane:StrafingTooClose()
}
action
{
Plane:SetCourseBombs();
#Ship:SetThrottle(1.0);
}
}


Downside (there's always one) is that planes occasionally break off the attack without dropping bombs like in original IRAI script. This seems to be dependent on plane characteristics now, though: for example Swordfish never finishes the run, but Catalina almost always does drop bombs. So the next thing to do is figuring out how to tweak "reluctant" planes to be more agressive.

Overall, for 10 attacks:
- 2 out of 60 planes crashed
- 7 out of 10 Uboats destroyed (most effective planes: Catalina, Sunderland, Martlet. B17 mostly misses, Swordfish and Liberator break off the attack)
- 3 Uboats survived, 1 with heavy damage but able to limp back to base

Last edited by kapuhy; 08-08-22 at 04:10 PM.
kapuhy is offline   Reply With Quote
 


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 12:57 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.