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 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-22-09, 10:27 AM   #1
DarkFish
Sea Lord
 
Join Date: Aug 2008
Location: Stinking drunk in Eindhoven, the Netherlands
Posts: 1,844
Downloads: 28
Uploads: 0
Default [REL] AI launched torpedoes

UPDATED VERSION - NOW ABLE TO HIT MOVING TARGETS

Thought I'd better make it a new thread.
As the title suggests I've solved the problem of getting AI ships to fire torpedoes. The files available for DL are only the files needed to manually install them on ships, ships won't have them without some manual tweaking.

I've made a small vid showing an AI elco PT boat attacking a stationary Japanese merchant with 3 torpedoes:




Known bugs/issues:
- Torpedoes are relatively ineffective, about 4% hit rate @4000m distance.
- the torpedoes occasionally dive (much) too deep/too shallow, sometimes recovering after a certain distance.

and before anyone's gonna ask, no, the merchant is not to the north of the elco. WaterInteraction is great, but not so great for torpedoes

DL Link: http://www.gamefront.com/files/21085853/AI_torps_rar

Installation:
- install manually or using JSGME, no files will be overwritten.
- Now for all ships you want to have torpedoes add a main armament node in its .dat file (in the .dat file - Data\Sea\Shipname\Shipname.dat, open using S3D - you'll find nodes called cfg#M01_NPT_Boat_A, cfg#M02_NPT_Boat_A etc. If the last one is for example called cfg#M04_NPT_Boat_A you must add a new one called cfg#M05_NPT_Boat_A)
- Make sure this node is placed well clear of the ship. Launching torpedoes from a node too close to the hull will lead to torpedoes scattering all over the place. Also rotate it into the direction you want torpedoes fired in as the torpedo launcher will only fire within 45 degrees to either side of this direction. I recommend an X-coordinate offset of at the very least 0,5 game units. If you see torpedoes heading for space it means the node is too close to the ship.
- now finally in the ships .eqp file add:
Quote:
[Equipment 6] ;one more than the previous
NodeName=M01 ;name of the node, if in the .dat file the node is called cfg#M05_NPT_Boat_A this should be 'M05'
LinkName=torpspawngun
StartDate=19380101
EndDate=19451231
__________________


Last edited by Webster; 12-14-11 at 06:08 PM. Reason: working link added
DarkFish is offline   Reply With Quote
Old 07-22-09, 11:21 AM   #2
Carotio
Mr. Bad Wolf
 
Carotio's Avatar
 
Join Date: Aug 2005
Location: Aabenraa, Denmark
Posts: 1,488
Downloads: 47
Uploads: 0


Default

Thanks for your effort and will to share.
__________________

Download my mods from SHMF
Follow my photography here
taler dansk, speak English, spreche Deutsch, parle fraais, forstår svenska/norsk, comprendo castellano
Carotio is offline   Reply With Quote
Old 07-22-09, 12:50 PM   #3
denis_469
Seasoned Skipper
 
Join Date: Sep 2006
Location: Russia
Posts: 699
Downloads: 135
Uploads: 0
Default

Thank you!
denis_469 is offline   Reply With Quote
Old 07-22-09, 01:12 PM   #4
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,099
Downloads: 109
Uploads: 2


Default

WOW ... and I mean WOW

Did you really do it? Amazing!

Can you further explain how it works? I know what Racerboy and Sergbuto did to make the Ai torpedoes, but how does your mod work? Does the game really know it is launching torpedoes, or is it tricked to believe it is shooting shells or other things?
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 07-22-09, 02:05 PM   #5
DarkFish
Sea Lord
 
Join Date: Aug 2008
Location: Stinking drunk in Eindhoven, the Netherlands
Posts: 1,844
Downloads: 28
Uploads: 0
Default

Quote:
Originally Posted by Hitman View Post
Can you further explain how it works? I know what Racerboy and Sergbuto did to make the Ai torpedoes, but how does your mod work? Does the game really know it is launching torpedoes, or is it tricked to believe it is shooting shells or other things?
It's a modified cannon shooting a dummy shell.
The trick is that I used the gunpowder cloud effect (the nice fire/smoke you see coming out of the barrel right after you shoot) to spawn a torpedo. This torpedo then heads into the direction the barrel pointed at. Unfortunately also the barrels elevation angle is copied by the torpedo. This is what causes the occasional deep/shallow running. Luckily within certain boundaries the torpedo can correct this, so I've set the max elevation angle of the gun to only 1 degree.

This mod certainly isn't perfect but it's a lot better than nothing.
__________________

DarkFish is offline   Reply With Quote
Old 07-22-09, 02:34 PM   #6
keltos01
Silent Hunter
 
Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
Default

WAOW !

Awesome, and I don't use that word often

[edit] with appropriate credits given, do you allow us to use it in the Japanese Campaign mod ?

keltos
__________________
"Honorable Builder of Sinking Ships"


Last edited by keltos01; 07-22-09 at 04:30 PM.
keltos01 is offline   Reply With Quote
Old 07-23-09, 06:04 AM   #7
DarkFish
Sea Lord
 
Join Date: Aug 2008
Location: Stinking drunk in Eindhoven, the Netherlands
Posts: 1,844
Downloads: 28
Uploads: 0
Default

Quote:
Originally Posted by keltos01 View Post
with appropriate credits given, do you allow us to use it in the Japanese Campaign mod ?

keltos
yes sure, feel free to use this
__________________

DarkFish is offline   Reply With Quote
Old 07-23-09, 09:29 AM   #8
The Fishlord
Planesman
 
Join Date: Jan 2008
Location: Maryland, USA
Posts: 185
Downloads: 119
Uploads: 0
Default

Neat! I've always wanted this, midget subs in particular seemed useless without this. Now maybe approaching Japanese home waters on the surface near a port will be a little more dangerous...I hope this gets integrated into TMO 1.8 somehow.

Any chance of you releasing a pack of torpedo-armed ships?
The Fishlord is offline   Reply With Quote
Old 07-23-09, 09:59 AM   #9
keltos01
Silent Hunter
 
Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
Default

Quote:
Originally Posted by DarkFish View Post
yes sure, feel free to use this
thanks a bunch !

keltos
__________________
"Honorable Builder of Sinking Ships"

keltos01 is offline   Reply With Quote
Old 07-24-09, 06:46 PM   #10
ivank
The Old Man
 
Join Date: Apr 2008
Location: Huntington, Long Island, New York
Posts: 1,426
Downloads: 284
Uploads: 0
Default

No you didn't! Yes you did!! Great one!
__________________
Head of The Surface Warfare Super-Mod Team

Leutnant z. S. David U. Ziegler
U-105 IXB On Patrol 1

ivank is offline   Reply With Quote
Old 07-25-09, 01:10 PM   #11
DarkFish
Sea Lord
 
Join Date: Aug 2008
Location: Stinking drunk in Eindhoven, the Netherlands
Posts: 1,844
Downloads: 28
Uploads: 0
Default

Quote:
Originally Posted by The Fishlord View Post
Any chance of you releasing a pack of torpedo-armed ships?
not ATM. I'm too busy modding other things now. But I'm sure TSWSM will include some.
If someone else wants to add torpedoes to ships/subs, please go ahead, feel free to release them.
__________________

DarkFish is offline   Reply With Quote
Old 07-25-09, 07:17 PM   #12
Nameless Bob
Watch
 
Join Date: Jul 2008
Posts: 22
Downloads: 34
Uploads: 0
Default stoopid question

I have very little knowledge about how things are modded so I'm definately a noobie but I can't help but wonder, would this method be able to spawn something else like an AI aircraft?If so it would sure be a quick and dirty way to get playable carriers to launch airplanes.

Sheer genius on the torpedo spawn method.

Last edited by Nameless Bob; 07-25-09 at 07:32 PM.
Nameless Bob is offline   Reply With Quote
Old 07-26-09, 02:27 PM   #13
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,587
Downloads: 297
Uploads: 0


Default

Great job! Can we adjust the torpedo speed, so that maybe the torpedoes will be useful against faster targets? I don't mind if they're ahistorically fast if it helps improve accuracy a little.
iambecomelife is offline   Reply With Quote
Old 08-03-09, 05:58 PM   #14
keltos01
Silent Hunter
 
Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
Default

any more work done in the past 10 days ?

keltos
__________________
"Honorable Builder of Sinking Ships"

keltos01 is offline   Reply With Quote
Old 08-03-09, 09:05 PM   #15
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by DarkFish View Post
Thought I'd better make it a new thread.
As the title suggests I've solved the problem of getting AI ships to fire torpedoes.

Known bugs/issues:
- All torpedoes are launched straight to the target and thus are only effective against stationary/slow moving targets.
Fantastic idea. Very clever.

Just a suggestion on the issue of stationary/slow moving targets. You have the Particle generator/object linked to the MK14. What about making one of the torpedos acoustic. (I know the cutie is already, but it is slow and underpowered for this use.) Wouldn't that solve the problem of accurate aiming for faster ships? You would still have to be "in the ballpark" or the acoustic wouldn't pick up the target. And then you could create missions with surface AI ships assisting an attack. Of couse I would put a rather small limit on the available ammo or it would keep shooting until everything is sunk.

Thanks for the great work.

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Reply


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 08:29 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.