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 08-10-22, 02:19 PM   #136
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Mostly I'm playing with the Sub AI.

I'd like to get a Type 14 to raise up out of the depths and stop engines for a ReSupply.

And before you say there is no Type 14?
Yes there is!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-10-22, 02:31 PM   #137
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

As promised, my old attempt at making surface ships fire torpedoes:

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

It was some time ago so I don't remember exactly what was changed, but I can see I added wpn_SubTorpedoSys to both ship and to torpedo launcher, and added torpedo strategy to the scripts. This didn't work anyway so...
kapuhy is offline   Reply With Quote
Old 08-10-22, 02:35 PM   #138
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Thanks Mate.

I'll look at your work and see if We can get it working.


If you have mission files for your Aircraft and this? that would save me some time also.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-10-22, 03:28 PM   #139
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
If you have mission files for your Aircraft and this? that would save me some time also.
Here, along with airplane and sub deck gun script (mind, the last one was just to prove the concept works, so I only modified one of existing attack patterns - it doesn't make sense as actual tactic):

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

Edit: Surface torpedo script appears to be bugged (if its mission is run, the destroyer not only doesn't use any tubes but doesn't show up as using normal ship scripts...)
kapuhy is offline   Reply With Quote
Old 08-10-22, 03:53 PM   #140
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

OK. I got the files. Thanks!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 02-26-23, 09:07 AM   #141
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by gap View Post
Else, Plane:Strafe is another of those commands that accept a numeric parameter, but all the instances I found of it go from -20 to 100. Could that be an angle relative to current aircraft heading?
A little late but I finally deciphered what the argument of Strafe function means today. It's altitude. Plane will attempt a strafing run keeping close to specified altitude.

At low or negative values this parameter doesn't seem to make any difference, probably because it is overridden by need to avoid impact with water.

Edit: Another complication I see in my testing is that if a plane has fixed machine guns, it will attempt to aim at target leading it to not keep ordered altitude. This might be connected with fighter planes crashing into sea way more often than heavier bombers.

Last edited by kapuhy; 02-26-23 at 04:14 PM.
kapuhy is offline   Reply With Quote
Old 02-26-23, 10:08 AM   #142
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 find - I wonder what "height" the planes begin to get "jittery" and attempt to avoid collision with the water? In SH4, I attempted to have a grouping of torpedo bombers come down to wave top for their anticipated attack runs, and instead they continued to fly at least 200m up. In the game though, with a Betty TB that had spawned from one of the AirBases, while my sub was on the surface travelling (a different experiment), I observed the Betty TB approaching in the distance, most likely at its default 500m height, then "spiral" down, and instead of coming in from my 270 relative, where it had been approaching from, came in from my 235 and was no more than 50m off the water for its attack run, though it did drop too soon, and the torpedo was easily avoided... but if the game can have a plane do that, why can we not call for that behavior?? lol
__________________

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

Quote:
Originally Posted by propbeanie View Post
Most interesting find - I wonder what "height" the planes begin to get "jittery" and attempt to avoid collision with the water?
I'll be testing this, but I suspect it will turn out to be their respective minimum height as set in sim file. It would make sense, why else have minimum height set for a plane if you're not using it as a trigger for AvoidImpact action? If so, the jittery behaviour might be result of basically telling the plane "Strafe at around 15 to 20 meters but no lower than 50".
kapuhy is offline   Reply With Quote
Old 03-10-23, 11:42 AM   #144
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by kapuhy View Post
A little late but I finally deciphered what the argument of Strafe function means today. It's altitude. Plane will attempt a strafing run keeping close to specified altitude.

At low or negative values this parameter doesn't seem to make any difference, probably because it is overridden by need to avoid impact with water.
Cool, thank you for letting us know

Quote:
Originally Posted by kapuhy View Post
Edit: Another complication I see in my testing is that if a plane has fixed machine guns, it will attempt to aim at target leading it to not keep ordered altitude. This might be connected with fighter planes crashing into sea way more often than heavier bombers.
Good point. Fixed aircraft guns have a small elevation/training angle, in the order of few degrees (otherwise they would never fire). Maybe increasing their elevation angle and/or tweaking their firing arcs might alleviate the problem

Quote:
Originally Posted by propbeanie View Post
Most interesting find - I wonder what "height" the planes begin to get "jittery" and attempt to avoid collision with the water? In SH4, I attempted to have a grouping of torpedo bombers come down to wave top for their anticipated attack runs, and instead they continued to fly at least 200m up. In the game though, with a Betty TB that had spawned from one of the AirBases, while my sub was on the surface travelling (a different experiment), I observed the Betty TB approaching in the distance, most likely at its default 500m height, then "spiral" down, and instead of coming in from my 270 relative, where it had been approaching from, came in from my 235 and was no more than 50m off the water for its attack run, though it did drop too soon, and the torpedo was easily avoided... but if the game can have a plane do that, why can we not call for that behavior?? lol
Quote:
Originally Posted by kapuhy View Post
I'll be testing this, but I suspect it will turn out to be their respective minimum height as set in sim file. It would make sense, why else have minimum height set for a plane if you're not using it as a trigger for AvoidImpact action? If so, the jittery behaviour might be result of basically telling the plane "Strafe at around 15 to 20 meters but no lower than 50".
I agree with kapuhy, minimum height might be the main "culprit", but other unrelated AI routines might also interfere. Their existence can be easily tested by setting min. height to very low values
__________________
_____________________
|May the Force be with you!|
...\/
gap 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 03:45 PM.


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.