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

Reply
 
Thread Tools Display Modes
Old 11-27-09, 04:11 AM   #1
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default More realistic torpedo failures via SH3 Commander

Hi all,

compared to reality, torpedo failures in SH3 are much too rare. By setting the running depth of the torpedo to 0 meters, using the contact/impact pistol, and restricting yourself to shots close to 90 degrees AOB, it is possible to avoid torpedo failures almost completely. This is very unrealistic. As discussed extensively in the NYGM manual, in reality the torpedoes had several flaws resulting in a much higher failure rate.

Inspired by some remarks in the NYGM manual , I have added the following entries to my SH Commander randomization file (SH3 Commander\Cfg\Randomised events.cfg) in order to achieve a more realistic torpedo failure rate.

First, I have added the idea from the NYGM mod to restrict the minimal running depth of the torpedo. This is done to reduce surface runners which in reality in most cases would be duds. See the discussion in the NYGM manual. I have added to Randomised events.cfg (copy and paste version in second post):

;----------Permanent min. depth of 2m (NYGM uses 3m) begin
[0:data\Menu\cfg\Dials.cfg]
;For the whole war
ApplyToPeriod=19390101|19450508
;No randomization
ChooseFrom=1
RndMidPat=1

0_Dial0|DialVal=54,270 ; for other perm. depths: 12*n+30,270 if n meters min. depth
0_Dial0|RealVal=2,20 ; n,20
;----------Permanent min. depth of 2m end

This also limits the max. depth to 20m instead of 25m for reasons discussed below.

After this I have added a random offset between the dial value and the real value so that one does not know exactly the torpedo running depth. This is done until middle of 1942 when the problem was solved. With a probability of 9% the torpedo is running 1m or more below the depth chosen on the dial. With 16% probability it is running less than 1m below the chosen value and with 75% probability it runs at the right depth. These are just my personal values, maybe they will need some fine tuning.

;----------Random torpedo running depth begin
[1:data\Menu\cfg\Dials.cfg]
;Randomize the running depth of the torpedo below the shown dial value
;
;For instance, general entry for a min. running depth of n=2m and error of k=2.5m
;0_Dial0|RealVal=4.5,22.5 ; n+k,20+k if n meters min. depth and k meters deeper
;
;Only in historical period
;Chance for k meters deeper:
; k>=1m: 9%
; m>k>0m: 16%
;Allow randomization during patrol
ApplyToPeriod=19390101|19420531
ChooseFrom=44
RndMidPat=1

; Entries for min. running depth of n=2m
0_Dial0|RealVal=4.5,22.5

1_Dial0|RealVal=4.0,22.0

2_Dial0|RealVal=3.5,21.5

3_Dial0|RealVal=3.0,21.0

4_Dial0|RealVal=2.5,20.5

5_Dial0|RealVal=2.5,20.5

6_Dial0|RealVal=2.5,20.5

7_Dial0|RealVal=2.25,20.25

8_Dial0|RealVal=2.25,20.25

9_Dial0|RealVal=2.25,20.25

10_Dial0|RealVal=2.25,20.25
;----------Random torpedo running depth end


If one wants to use only this feature with GWX and without the min. running depth the values are:

;Entries for min. running depth of n=0m (GWX)
0_Dial0|RealVal=2.5,22.5

1_Dial0|RealVal=2.0,22.0

2_Dial0|RealVal=1.5,21.5

3_Dial0|RealVal=1.0,21.0

4_Dial0|RealVal=0.5,20.5

5_Dial0|RealVal=0.5,20.5

6_Dial0|RealVal=0.5,20.5

7_Dial0|RealVal=0.25,20.25

8_Dial0|RealVal=0.25,20.25

9_Dial0|RealVal=0.25,20.25

10_Dial0|RealVal=0.25,20.25

For NYGM with a min. running depth of 3m one has to use
; Entries for min. running depth of n=3m (NYGM)
0_Dial0|RealVal=5.5,22.5

1_Dial0|RealVal=5.0,22.0

2_Dial0|RealVal=4.5,21.5

3_Dial0|RealVal=4.0,21.0

4_Dial0|RealVal=3.5,20.5

5_Dial0|RealVal=3.5,20.5

6_Dial0|RealVal=3.5,20.5

7_Dial0|RealVal=3.25,20.25

8_Dial0|RealVal=3.25,20.25

9_Dial0|RealVal=3.25,20.25

10_Dial0|RealVal=3.25,20.25


Finally, I have added another feature from the NYGM torpedo mod. I lock the torpedo pistol to magnetic to increase the dud rate (magnetic includes contact/impact pistol).

;----------Lock switch to magnetic pistol begin
[2:data\Menu\cfg\Dials.cfg]
;Lock the pistol switch in magnetic position for all the time
ApplyToPeriod=19390101|19450508
ChooseFrom=1
RndMidPat=1

0_Dial2|DialVal=45,45 ; only magnetic
;----------Lock switch to magnetic pistol end


If someone is interested in allowing only the contact/impact pistol from after the Norway campaign until the middle of 1942 (BDU order not to use the magnetic pistol) one has to add:

;----------Lock switch to contact pistol begin
[3:data\Menu\cfg\Dials.cfg]
;Lock the pistol switch in contact position for time period
;After Norway campaign until non-prototype TIII
ApplyToPeriod=19400501|19420531
ChooseFrom=1
RndMidPat=1

0_Dial2|DialVal=-45,-45 ; only contact
;----------Lock switch to contact pistol end


These are the only changes required to Randomised events.cfg. However, there is a small problem. After the game is loaded, the torpedo depth is set to the value given in \data\Library\Torpedo.sim (4m in GWX). If the torpedo running depth has been changed (e.g., 1m deeper) one can now see the offset between the real value (4m for GWX) and the shown value on the dial (one sees a value of 3m, not 5m). Thus, the whole scheme is spoiled . A similar situation arises at a depth of 25m (this is why it was limited to 20m above).

To fix this, I open the file \data\Library\Torpedo.sim with S3D and set all the depth values to the minimal depth chosen above, e.g., in the present case 2m (In principle, this is only required for the torpedoes available before the middle of 1942, i.e., TI, TII, and TIII). With this trick it is no longer possible to find out the offset after loading the game.

One can also use the Randomised events.cfg file for this, but one has to be careful if one is using a modified Torpedo.sim file. For stock SH3, GWX, and NYGM one should add (see post #8):

;----------Adapt initial depth in data\Library\Torpedo.sim for TI,TII,TIII begin----
[0:data\Library\Torpedo.sim]
ApplyToPeriod=19390101|19420531
;Or 19390101|19450508 for whole war
;No randomization
ChooseFrom=1
RndMidPat=1

0_x0CCF=2 ; initial depth for TI
0_x0E7B=2 ; initial depth for TII
0_x0FE7=2 ; initial depth for TIII
;----------Adapt launch depth in data\Library\Torpedo.sim for TI,TII,TIII end----


WARNING 1: These changes only work if the first and third entry in the file data\Menu\cfg\Dials.cfg have not been modded. There are many mods that change the file Dials.cfg, however, I don't think any mod touches these entries. If you are aware of a mod that does it, please tell me.

WARNING 2: If there are more dials added to the game to change the torpedo settings (e.g. to the periscope) one has to add the corresponding dials to the lines above, e.g.,
0_Dial0|RealVal=5.5,22.5
0_Dialxx|RealVal=5.5,22.5
if Dialxx is also a dial for setting the torpedo depth.

WARNING 2: The ordering of the entries above is important. Don't change it!

WARNING 3: Use on your own risk! I don't take any responsibility for any damage done by this.

WARNING 4: One can still change the settings via the TDC directly (with the mouse). Disabling this possibility would require to change more files and reduce the compatibility. So, one should not use the 3d TDC to enter the data.

Finally, I would like to thank...

...the NYGM team, especially Stiebler, for their excellent work on torpedo failures and their ideas. It is highly recommended to read the section about it in the NYGM manual.

...and JScones for the great SH3 Commander that makes randomization possible!

All credits should go to them!

Cheers, LGN1

Last edited by LGN1; 12-02-09 at 11:56 AM. Reason: Changed end date for depth issues and added Torpedo.sim change.
LGN1 is offline   Reply With Quote
Old 11-27-09, 04:17 AM   #2
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Here is a copy and paste version for using all features and a min. running depth of 2 meters (copy to your SH3 Commander\Cfg\Randomised events.cfg file). It should work with stock SH3, GWX, NYGM, and all other mods that do not touch the Torpedo.sim file and the first and third entry of dials.cfg. If your mod has more dials for changing the settings, e.g., in the periscope view, you have to add the corresponding dials below.

;----------Torpedo failure feature begin------------------------
;----------Permanent min. depth of 2m (NYGM uses 3m) begin
; Max. depth 20m
[0:data\Menu\cfg\Dials.cfg]
;For the whole war
ApplyToPeriod=19390101|19450508
;No randomization
ChooseFrom=1
RndMidPat=1

0_Dial0|DialVal=54,270 ; for other perm. depths: 12*n+30,270 if n meters min. depth
0_Dial0|RealVal=2,20 ; n,20
;----------Permanent min. depth of 2m end

;----------Adapt initial depth in data\Library\Torpedo.sim for TI,TII,TIII begin----
[0:data\Library\Torpedo.sim]
ApplyToPeriod=19390101|19420531
;Or 19390101|19450508 for whole war
;No randomization
ChooseFrom=1
RndMidPat=1

0_x0CCF=2 ; initial depth for TI
0_x0E7B=2 ; initial depth for TII
0_x0FE7=2 ; initial depth for TIII
;----------Adapt launch depth in data\Library\Torpedo.sim for TI,TII,TIII end----

;----------Random torpedo running depth begin
[1:data\Menu\cfg\Dials.cfg]
;Randomize the running depth of the torpedo below the shown dial value
;
;For instance, general entry for a min. running depth of n=2m and error of k=2.5m
;0_Dial0|RealVal=4.5,22.5 ; n+k,20+k if n meters min. depth and k meters deeper
;
;Only in historical period
;Chance for k meters deeper:
; k>=1m: 9%
; m>k>0m: 16%
;Allow randomization during patrol
ApplyToPeriod=19390101|19420531
ChooseFrom=44
RndMidPat=1

; Entries for min. running depth of n=2m
0_Dial0|RealVal=4.5,22.5

1_Dial0|RealVal=4.0,22.0

2_Dial0|RealVal=3.5,21.5

3_Dial0|RealVal=3.0,21.0

4_Dial0|RealVal=2.5,20.5

5_Dial0|RealVal=2.5,20.5

6_Dial0|RealVal=2.5,20.5

7_Dial0|RealVal=2.25,20.25

8_Dial0|RealVal=2.25,20.25

9_Dial0|RealVal=2.25,20.25

10_Dial0|RealVal=2.25,20.25
;----------Random torpedo running depth end

;----------Lock switch to magnetic pistol begin
[2:data\Menu\cfg\Dials.cfg]
;Lock the pistol switch in magnetic position for all the time
ApplyToPeriod=19390101|19450508
;No randomization
ChooseFrom=1
RndMidPat=1

0_Dial2|DialVal=45,45 ; only magnetic
;----------Lock switch to magnetic pistol end

;----------Lock switch to contact pistol begin
[3:data\Menu\cfg\Dials.cfg]
;Lock the pistol switch in contact position for historic time period
;After Norway campaign until non-prototype TIII
ApplyToPeriod=19400501|19420531
;No randomization
ChooseFrom=1
RndMidPat=1

0_Dial2|DialVal=-45,-45 ; only contact
;----------Lock switch to contact pistol end
;----------Torpedo failure feature end------------------------

Don't forget to change the depth values in the torpedo.sim file to 2 meters if you use a modified Torpedo.sim file and remove the second entry concerning the Torpedo.sim file.

Last edited by LGN1; 12-01-09 at 02:26 PM. Reason: Changed end date for depth issues. Added the Torpedo.sim entry.
LGN1 is offline   Reply With Quote
Old 11-27-09, 05:26 AM   #3
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Thanks for this MOD!

I will test it, when I am back from patrol and in port !

Best regards,
Magic
__________________
Magic1111 is offline   Reply With Quote
Old 11-27-09, 05:34 AM   #4
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Nice. It's always good to see stuff like this made by the community.

I don't have S3D or Mini Tweaker installed or I'd give you the torpedo.sim hex offsets...but I'm sure someone can assist.
JScones is offline   Reply With Quote
Old 11-27-09, 06:12 AM   #5
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi,

thanks for the kind words. I have found out that in GWX and NYGM the TIII torpedo (which solved the depth problem) becomes available on the 1st of June 1942. Therefore I have changed the date entries above (new end date 19420531 instead of 19421031).

The TIII is already available earlier, but only as prototype and thus, cannot be chosen by the player (but some are given in the initial loadout). So, the torpedoes affected are the TI, TII, and, TIII. For these torpedos one should change the depth in the torpedo.sim file. I will try to figure out how this also can be done via SH3 Commander.

Cheers, LGN1

Last edited by LGN1; 12-02-09 at 11:55 AM.
LGN1 is offline   Reply With Quote
Old 11-27-09, 06:26 AM   #6
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Quote:
Originally Posted by LGN1 View Post
I will try to figure out how this also can be done via SH3 Commander.

Cheers, LGN1
Oh yes, that would be good if that were possible!


Best regards,
Magic
__________________
Magic1111 is offline   Reply With Quote
Old 11-27-09, 06:33 AM   #7
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

It's definitely possible. IIRC Mini Tweaker will give you the offset in hex. I'm not sure about S3D, but even if it gives the offset in decimal, it's simple to convert it to hex.
JScones is offline   Reply With Quote
Old 11-27-09, 07:13 AM   #8
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

I think I figured it out

In order to do the changes in the torpedo.sim file automatically, one has to add the following lines to Randomised events.cfg:


;----------Adapt initial depth in data\Library\Torpedo.sim for TI,TII,TIII begin----
[0:data\Library\Torpedo.sim]
ApplyToPeriod=19390101|19420531
;Or 19390101|19450508 for whole war
;No randomization
ChooseFrom=1
RndMidPat=1

0_x0CCF=2 ; initial depth for TI
0_x0E7B=2 ; initial depth for TII
0_x0FE7=2 ; initial depth for TIII
;----------Adapt launch depth in data\Library\Torpedo.sim for TI,TII,TIII end----


I would be very happy if someone who knows more about these values than I do could confirm them. It seems they are correct for stock SH3, GWX and NYGM (at least an older version. I don't know whether the file has been changed since then). So, if one uses a modified Torpedo.sim file then it is good to check these values again.

Cheers, LGN1

Last edited by LGN1; 11-28-09 at 04:46 AM.
LGN1 is offline   Reply With Quote
Old 11-27-09, 12:55 PM   #9
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

This is brilliant! Can't wait until I can play again, so I can try it out.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 11-27-09, 07:28 PM   #10
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Glad you figured it out.
JScones is offline   Reply With Quote
Old 11-27-09, 10:21 PM   #11
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,585
Downloads: 297
Uploads: 0


Default

Excellent work. I wanted to adapt my WWI mod to SH3 as well as SH4, but the lack of duds was one of the main reasons stopping this. Glad it's been solved.

Forgive my ignorance, but can you get torpedoes with several different depth keeping errors during one patrol? For instance, Torpedo #1 is 2m too deep, Torpedo #2 is 3m too deep, and so on? Or is a single value calculated at start-up for each instance of depth-keeping failure, and applied uniformly until you restart the game?
iambecomelife is offline   Reply With Quote
Old 11-27-09, 11:03 PM   #12
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

@LGN1: two things re the use of ApplyToPeriod:

1. the format should be just YYYYMMDD|YYYYMMDD with no trailing comments. It should still work, but it's unsupported. Best to add comments a line above.
2. you don't need to add ApplyToPeriod if the feature applies to the whole war.

Another thing, you may want to consider whether it's better to tie your mod to the existing Malfunctions option. That is, it only comes into play if the user has the Malfunctions option selected within SH3Cmdr. If you think this is better, just add the letters "Mal" before each entry (ie [Mal0:data\Library\Torpedo.sim]). Just something for you and your users (which includes me btw ) to ponder...
JScones is offline   Reply With Quote
Old 11-28-09, 01:29 AM   #13
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

Quote:
Originally Posted by iambecomelife View Post
Excellent work. I wanted to adapt my WWI mod to SH3 as well as SH4, but the lack of duds was one of the main reasons stopping this. Glad it's been solved.
Do you have good dud-rate numbers for World War 1? I've been looking for years and haven't found anything that truly convinces me. They didn't have magnetic exploders yet, and I don't even know if they could adjust depth settings.

I'd love to hear any hard data you might have.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 11-28-09, 04:28 AM   #14
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi,

thanks for the nice words. Glad that you like it.

@Iambecomelife: I think it is not possible, at least not with the present method. At the moment the value is only changed when you start the game via SH3 Commander. However, I guess during one playing session you will not find out how large the offset is. Connected to this, I am wondering now for already quite some time where the dud rate is set. Is it hardcoded? I could not find a value anywhere.

@JScones: Thanks for the comments! I figured out that comments after 'ChooseFrom=' make troubles. It took me quite some time to find out what was going on. I did not expect that a comment was the source. I changed it above and in the future I will only add comments above or below.

Concerning the malfunctions: I actually already did this for myself. However, my feeling is that many people (including myself) do not want to switch on malfunctions because of all the hex offsets and mod issues. Especially the camera.dat file is problematic because there are thousands of modified versions floating around (and hardly any modder cares about the compatibility with SH3 Cmdr. malfunction feature. In the best case it is written not to use the feature). Since the malfunction and sabotage feature is really great and a great work of love, this situation is a real shame.

My idea now is to change the stock malfunctions in Randomised events.cfg a bit. The idea is to have the malfunction feature only touch non-critical files so that anyone can use them. The sabotage option contains the critical files (with hex) that can 'sabotage' your game . In addition, I am thinking about simplifying the malfunction feature, i.e., that only some core malfunctions are there. I think this would increase the acceptance of the feature. I guess, many users are scared by the amount of possible damages and also do not want to check all the hex values,...

So, in detail I did for myself:

Malfunctions touch the engine settings via data\Submarine\NSS_Uboat*\NSS_Uboat*.CFG, the dials for the torpedoes and the torpedo.sim (maybe this is critical, but I don't know any mod that changes something in this file). The only resulting malfunctions are reduced top speed and torpedo depth problems. This is very simple and clear.

Sabotage touches camera.dat and NSS_Uboat*.sim. Failures are zoom level of attack scope, blurs and drops. In *.sim only the dive time is randomized. Thus, all one needs are a few hex offsets. In addition, the chances are also not as detailed as in the stock version, e.g., chances for dive time variations are lower in early war (well trained crew) and higher in late war. As I said, this is much less detailed than the stock settings, however, I think the main things are captured and the Randomised events.cfg is very accessible to anyone and does not require extensive changes for new mods. Since I never use the flak, I do not care much about the malfunctions for it and thus, for simplicity leave it out (in most mods I guess the user anyway has some malfunctions after using the flak).

What do you think about such a simplified version, JScones? My feeling is that as long as the file camera.dat is touched by malfunctions, people will not use the great feature.

Any thoughts are highly welcomed.

Cheers, LGN1

Last edited by LGN1; 12-02-09 at 11:56 AM.
LGN1 is offline   Reply With Quote
Old 11-28-09, 04:45 AM   #15
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Camera.dat and Sensors.dat. IIRC it's the latter that causes the most problems.
JScones 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 11:08 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.