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 04-30-13, 09:59 AM   #1
Tonci87
Samurai Navy
 
Join Date: Jun 2012
Posts: 590
Downloads: 119
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Looking over the magnetic detonators again. I did make the same assumption about MSVCR90.rand returning 32bit number instead of 16bit number. I'm revising the code.

Another interesting thing has shown itself while looking over the code for magnetic detonators. Did you know that the torpedo could detonate upon firing if the magnetic detonator is active and the wave height is within the parameters of the premature chances defined in the torpedoes .sim file? I see the code for it but the devs 'dumbed it down' so it RARELY ever happens. Time to fix this This will make you think twice about switching to magnetic detonators with large wave heights



Oh ****....

Just out of interest, how deep should the torp run to prevent beeing triggered by the waves?
Tonci87 is offline   Reply With Quote
Old 04-30-13, 10:08 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Tonci87 View Post


Oh ****....

Just out of interest, how deep should the torp run to prevent beeing triggered by the waves?
Actually I just decoded the whole function for this and it doesn't detonate the torpedoe upon firing. What it does is increase the arming distance and something else (not sure what the something else is - the something else replaces a HUGE number with a very small number in a memory address of the torpedo )
TheDarkWraith is offline   Reply With Quote
Old 04-30-13, 10:09 AM   #3
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,292
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
I said it wasn't perfect yet...
I remember.. and therefore need to test it so you can make it better and better

Quote:
Originally Posted by gap View Post
Man, I will sponsor you for the "Beta Tester of the Century" Subsim Award, if ever they will introduce such a contest
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 04-30-13, 10:13 AM   #4
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Oh this gets even better Has anyone ever seen torpedo gyro problems in game? I can answer that based on the code I see - NO! The torpedoe's .sim file's gyro problems chance says it's value is a percentage (and the value is a percentage - 0.3). This is fine. What isn't fine is the code gets a random number and scales the random number to a value between 0 and 100. Hmm, let's see....a value between 0 and 100 compared to a value between 0 and 1.0...almost will never happen This is one huge freakin mess

The solution is easy but it's not. The solution is to add code to check every entry in the torpedoe's .sim file to ensure it's a percentage (0.0 to 1.0). If it's > 1.0 then scale to 0.0 to 1.0. Then change code (where needed) when random number is retrieved to scale it to a value between 0.0 and 1.0. This way failure checks will actually work.
Wouldn't be easier if we corrected the wrong torpedo failure settings manually?
gap is offline   Reply With Quote
Old 04-30-13, 10:17 AM   #5
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,292
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
Wouldn't be easier if we corrected the wrong torpedo failure settings manually?
Perhaps Rongel have already done this
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 04-30-13, 10:19 AM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Wouldn't be easier if we corrected the wrong torpedo failure settings manually?
Yes but that doesn't stop somebody from entering an incorrect value (because they don't read the notes). Adding code to anticipate end-user making errors is good programming. Ubisoft should take some notes here

Some of the code is incorrect also. Where the notes say the value is a percentage the code is checking against a value from 0 to 100. The code has to be corrected and code added to check for user mistakes.

Nothing pisses me off more than seeing 'kiddy code' There is 'kiddy code' all over the torpedo's code to reduce the % chance of failures. This has got to go
TheDarkWraith is offline   Reply With Quote
Old 04-30-13, 10:27 AM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Nothing pisses me off more than seeing 'kiddy code' There is 'kiddy code' all over the torpedo's code to reduce the % chance of failures. This has got to go
I agree. I hope that Rongel is reading our discussion
gap is offline   Reply With Quote
Old 04-30-13, 03:21 PM   #8
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,292
Downloads: 374
Uploads: 0


Default

Revised circle runner patch test-report -


Weird thing happened to me today.. looks like revised patch is not working at all.. don't know what happened in Fifi's game, why he was still able to see circle runner torpedoes..

Okay..
single tube shooting - total 100 - circle runner 0
salvo shooting - total 100 - circle runner 0

(100 - because VIIA has 10 bow torpedoes)

PS: and I have checked four times.. patch was enabled..
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 04-30-13, 05:24 PM   #9
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,254
Downloads: 510
Uploads: 0


Default

Interesting posts here, and thanks again TDW for your hard work looking into codes

To resume my torp issues (with DUD torp option checked of course):

- when all TDW patches concerning torpedos activated, i get whole load exploding before hitting (with default magnetic + impact), or many circling ones (TDW said 50% is historicaly good for early war?...)
Not to say i can stay docked, because this way only my deck gun will work and be useful!

- when all patches activated except magnetic detonator range defects, only get about 50% circling - to me it's a lot for the VII load capacity...and so maybe OHII tonnage requirements should be decreased to match historical accuracy, if we have historical torp failure! Otherwise it seems impossible to me to success mission tonnage with only half torp load efficacity.

- when magnetic detonator range defects + circle runner chance fix deactivated, get all torpedos working and destroying each time, not even one DUD... at any hitting angle

In regard of SH5 actual gameplay with OHII, in regard of type VII torp load capacity, i would say getting only 20% torp defect (either premature explosion or circling) is way enough to me
Not for cheating, but sometime historical accuracy has to be adjusted for gameplay! Just my 2 cents...

EDIT:
Just realised/remembered i don't have FX/data/library/torpedoes_g7a-e anymore...because i wanted the stock torpedo hitting splash back...maybe it's related to my observations above...
In fact my game even modded is still using the vanilla torpedoes_g7a-e!
Maybe TDW could look into his FX/torpedoes_g7a-e, to see what is taking away the stock torp splash from any distance, so i can use it again...

Last edited by Fifi; 04-30-13 at 07:39 PM.
Fifi 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 01:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.