SUBSIM Radio Room Forums


SUBSIM: The Web's #1 BBS for all submarine and 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 05-26-2020, 02:57 PM   #1
XenonSurf
Sea Lord
 
Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,702
Downloads: 107
Uploads: 4
Default AFT Torpedos for playable surface ships in SH4

Is it at all possible to mod SH4 to add AFT torpedo functionality to playable surface ships which already exist and are downloadable? My first experiments all fail and crash the game although I'm sure all changes in ...\Data\Submarine\[sub model].sim and ...\Data\Submarine\[sub model].upc were appropriate.
Adding Forward Torpedo tubes and reserves was successful instead (I was able to add 4 torpedo tubes for the Clemson destroyer + 10 reserve torpedos in the forward tubes; they worked fine in single missions and in the campaign.

Here are extracts of the changes in NDD_Fletcher.upc which I've tried to make for 2 forward torpedo tubes + 1 AFT torpedo tube, I have edited in S3D the NDD_Fletcher.sim file under 'Tubes' setting a number 3, and under 'Doors' a number 10 for reserve torpedos (I keep the 0-I torpedo default model).

NDD_Fletcher.upc modifications:

;------------------------------------------------------------
; FWD COMPARTMENTS (active compartment with torpedo crew)
;------------------------------------------------------------

(...)

[UserPlayerUnit 1.Compartment 5.WeaponSlot 1]
ID= TorpMountB1
NameDisplayable= Torpedo Tube 1
Type=NULL
AcceptedTypes= TorpedoTube
UserCustomizable=No
IDLinkBunker=BowTorpedoRoom, BowTorpedoReserves << (not tested without BowTorpedoReserves becasue working fine with FWD torpedos alone)
IDLinkWeaponIntervalDefault1= NULL, 1944-09-31, TorpedoTube21inUS, Mk14Torpedo
IDLinkWeaponIntervalDefault2= 1944-10-01, NULL, TorpedoTube21inUS, Mk23Torpedo
ExternalNodeName3D= NULL
ExternalObjectName3D= NSS_Gato_Door02_FRU_anim01 << There are different anim files where these 3 letters change, but I don't think using different ones will crash the game
ExternalDamageZoneTypeID3D= 58

[UserPlayerUnit 1.Compartment 5.WeaponSlot 2]
ID= TorpMountB2
NameDisplayable= Torpedo Tube 2
Type=NULL
AcceptedTypes= TorpedoTube
UserCustomizable=No
IDLinkBunker=BowTorpedoRoom, BowTorpedoReserves
IDLinkWeaponIntervalDefault1= NULL, NULL, TorpedoTube21inUS, Mk14Torpedo
ExternalNodeName3D= NULL
ExternalObjectName3D= NSS_Gato_Door02_FLD_anim01
ExternalDamageZoneTypeID3D= 131

[UserPlayerUnit 1.Compartment 5.Bunker 1] ; Forward Torpedo Room
ID=BowTorpedoRoom
Capacity=12 << This may be the error, it works for forward torpedos alone, the number should reflect what's in the reserve forward tubes; should match the *.sim file for 'Doors'.
IDLinkAmmunitionIntervalDefault1= NULL, 1943-12-31, Mk14Torpedo, 10
IDLinkAmmunitionIntervalDefault2= 1944-01-01, 1944-06-31, Mk14Torpedo, 3, Mk18Torpedo, 4, Mk23Torpedo, 3
IDLinkAmmunitionIntervalDefault3= 1944-07-01, 1944-12-31, Mk14Torpedo, 5, Mk18Torpedo, 4, Mk23Torpedo, 1
IDLinkAmmunitionIntervalDefault4= 1945-01-01, NULL, Mk14Torpedo, 4, Mk18Torpedo, 6

;------------------------------------------------------------
; AFT COMPARTMENTS (active compartment with torpedo specialists as a crew)
;------------------------------------------------------------

(...)

[UserPlayerUnit 1.Compartment 1.WeaponSlot 1]
ID= TorpMountS1
NameDisplayable= Torpedo Tube 3
Type=NULL
AcceptedTypes= TorpedoTube
UserCustomizable=No
IDLinkBunker=BowTorpedoRoom, BowTorpedoReserves << I have also tested it by removing BowTorpedoReserves, will CTD anyway
IDLinkWeaponIntervalDefault1= NULL, 1944-09-31, TorpedoTube21inUS, Mk14Torpedo
IDLinkWeaponIntervalDefault2= 1944-10-01, NULL, TorpedoTube21inUS, Mk23Torpedo
ExternalNodeName3D= NULL
ExternalObjectName3D= NSS_Gato_Door02_FRU_anim01
ExternalDamageZoneTypeID3D= 58

[UserPlayerUnit 1.Compartment 1.Bunker 1] ; Aft Torpedo Room
ID=SternTorpedoRoom << I found this syntax but is it appropriate ?
Capacity=2 << Should match the *.sim file for 'Doors' but I don't know what's the hard-coded limit for AFT torpedos, so I set a low number here.
IDLinkAmmunitionIntervalDefault1= NULL, 1943-12-31, Mk14Torpedo, 10
IDLinkAmmunitionIntervalDefault2= 1944-01-01, 1944-06-31, Mk14Torpedo, 3, Mk18Torpedo, 4, Mk23Torpedo, 3
IDLinkAmmunitionIntervalDefault3= 1944-07-01, 1944-12-31, Mk14Torpedo, 5, Mk18Torpedo, 4, Mk23Torpedo, 1
IDLinkAmmunitionIntervalDefault4= 1945-01-01, NULL, Mk14Torpedo, 4, Mk18Torpedo, 6

(...)

;************************************************* ***********
;
; FunctionalSubsystem
;
;************************************************* ***********
;
(...)

[UserPlayerUnit 1.FunctionalSubsystem 19]
ID= TorpedoTube1
NameDisplayable= Torpedo Tube 1
FunctionalType= WeaponTorpedo
IDLinkFunctionalSubsystemSlots= CommRoomTDC, 0, TorpMountB1, 1

[UserPlayerUnit 1.FunctionalSubsystem 20]
ID= TorpedoTube2
NameDisplayable= Torpedo Tube 2
FunctionalType= WeaponTorpedo
IDLinkFunctionalSubsystemSlots= CommRoomTDC, 0, TorpMountB2, 1

[UserPlayerUnit 1.FunctionalSubsystem 21]
ID= TorpedoTube3
NameDisplayable= Torpedo Tube 3
FunctionalType= WeaponTorpedo
IDLinkFunctionalSubsystemSlots= CommRoomTDC, 0, TorpMountS1, 1

(...)




With these changes I cannot find anything wrong, but maybe you can?
Thanks very much to take some time for it!
Greetings,
XS
XenonSurf is online   Reply With Quote
Old 05-26-2020, 05:20 PM   #2
XenonSurf
Sea Lord
 
Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,702
Downloads: 107
Uploads: 4
Default

I now see that it goes far beyond the simple edition of the upc file. The sim and dat files must also exactly corrispond. Especially the dat file with all nodes for the torpedo door animations.
I will take the Gato Class sub and transfer the nodes to my surface ships, this has already been done for the forward tubes in 1 mod that works.


Still, thanks for any help to tell me if the above syntax in red is correct or wrong.



XS
XenonSurf is online   Reply With Quote
Old 05-27-2020, 02:53 AM   #3
ETR3(SS)
Ocean Warrior
 
Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 2,928
Downloads: 173
Uploads: 16


Default

Quote:
ExternalObjectName3D= NSS_Gato_Door02_FRU_anim01 << There are different anim files where these 3 letters change, but I don't think using different ones will crash the game
Using a different 3 letter combo won't crash the game, but will need to match in the dat, sim, and upc files. Actually you could name it what ever you want as long as changed everywhere it needs to be. Of note though is the Door02 part, that is the muzzle door node and is what the game actually considers the torpedo tube for animation purposes. I think you have that figured out though.


Quote:
IDLinkBunker=BowTorpedoRoom, BowTorpedoReserves << I have also tested it by removing BowTorpedoReserves, will CTD anyway
Change this to SternTorpedoRoom for your stern torpedoes.
__________________


USS Kentucky SSBN 737 (G)
Comms Div 2003-2006
Qualified 19 November 03

Yes I was really on a submarine.
ETR3(SS) is online   Reply With Quote
Old 05-27-2020, 05:23 AM   #4
XenonSurf
Sea Lord
 
Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,702
Downloads: 107
Uploads: 4
Default

Hi ETR3,
thanks to go through this long list, very appreciated. I have figured-out this SternTorpedoRoom thing and with the right changes in the dat I was finally able after hours to launch the game and all shows-up fine. I have now changed 4 tubes both FWD and AFT plus 10 reserves each amounting for 28 torpedos, I think I could even increase the reserves.

Very fine for all that, but now - as in modding usually goes - another (and probably final) problem comes up: My torpedos won't run straight to their target because The UZO's (TBT) degrees and Binocular degrees don't match in the 3D world, the ship is not correctly aligned for the optics, the UZO is wrong by approx 20° !!
I have made a separate topic in this mod section, my work goes on, but I can't find the reason for now. Fortunately it doesn't happen with all ships.


I plan to fit torpedos on these ships:


- USS Clemson (finished, 2x FWD tube, 12 fwd torpedos, aft torpedos not added because not realistic, it had 1 launcher only.)
- USS Fletcher (almost finished, 4x FWD tubes, 4x AFT tubes, 28 torpedos, but see problem above: torpedos fire but miss totally because of TDC problems)
- US DD Tribal (planed)
- USS New Mexico (planed)
- US BB Missouri (planed)
- GB HMS Kent (planed)


- Dedicated campaign planed





XS

Last edited by XenonSurf; 05-27-2020 at 05:38 AM.
XenonSurf is online   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 08:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 1995- 2020 Subsim