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 05-04-12, 10:52 AM   #361
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
The SH Worlds are 1/10 scale.

.1 meters = roughly 1 meter when you check 3D models

So you'd need to scale the speed settings since they are usually close to real life speeds.
This figure you found would scale and convert real knots to scaled (1/10th ) meters per second.

That's my thought.
It makes sense to me
gap is offline   Reply With Quote
Old 05-04-12, 12:10 PM   #362
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
The SH Worlds are 1/10 scale.

.1 meters = roughly 1 meter when you check 3D models

So you'd need to scale the speed settings since they are usually close to real life speeds.
This figure you found would scale and convert real knots to scaled (1/10th ) meters per second.

That's my thought.
Ok I'll buy that The GR2 files specify UnitsPerMeter as 0.1 so it makes sense now. Thanks all
TheDarkWraith is offline   Reply With Quote
Old 05-04-12, 12:18 PM   #363
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Just found an annoying 'bug' with OllyDebug. If you have no breakpoints set and you exit the app it will write new .udd files that are blank Another annoying 'feature' is when the file being debugged has changed (via modifications, additions, deletions, etc.) it will not load the udd file for it (it won't load the breakpoints and all). Had to waste a day writing my own app that will take Olly's udd files and read them and write my own udd files (this way I can merge several udd files of the same name into a master udd file). The joys of working with other peoples apps...
TheDarkWraith is offline   Reply With Quote
Old 05-04-12, 01:29 PM   #364
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

0.05149993 also equals some other interesting measurements.

0.05149993 = Earth's equatorial radius, and polar radius of 0.000000008

As does .05144444444

Since the SH World is flat, could those also be special numbers to skew things like latitude and longitude when in the Northern areas??


If you take the difference between the two, the Earth radius at both points are different.
So if I'm a little North, does the Game engine use this difference to affect things to make it appear as if we are traveling the correct distance at the correct speed?

Last edited by Madox58; 05-04-12 at 01:50 PM.
  Reply With Quote
Old 05-04-12, 05:39 PM   #365
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Interesting points I'll be on the look out for things like the above as I dig deeper into the .exe and .act files

I'll be sure to post any other constants I run into that just don't make any sense to me
TheDarkWraith is offline   Reply With Quote
Old 05-05-12, 05:47 PM   #366
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Another constant that I'm not sure how or why it's value is what it is:

1016.047

This value is multiplied by the torpedoes impulse (which is usually a value of 2000). What are they converting the torpedoes impulse into?

Some little tidbits of info: game restricts min torpedo depth to 1m. Max torpedo depth allowed is 50m (everytime you adjust torpedo depth on the torpedo box a function is called to ensure the value is clamped to these values)

Another constant: 0.1056457

This constant gets multiplied by some huge number (looks to be related to distance from game origin but not exactly sure still)

Last edited by TheDarkWraith; 05-05-12 at 06:05 PM.
TheDarkWraith is offline   Reply With Quote
Old 05-05-12, 06:06 PM   #367
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
Another constant that I'm not sure how or why it's value is what it is:

1016.047

This value is multiplied by the torpedoes impulse (which is usually a value of 2000). What are they converting the torpedoes impulse into?

Some little tidbits of info: game restricts min torpedo depth to 1m. Max torpedo depth allowed is 50m (everytime you adjust torpedo depth on the torpedo box a function is called to ensure the value is clamped to these values)
I just googled it 1016.047 .
Long Ton to Kilograms
Maybe something to do with realistic measurements checked in the game options .
http://www.google.com.au/url?sa=t&rc...07FsGP9LohTVsA
THE_MASK is offline   Reply With Quote
Old 05-05-12, 07:22 PM   #368
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
I just googled it 1016.047 .
Long Ton to Kilograms
Maybe something to do with realistic measurements checked in the game options .
http://www.google.com.au/url?sa=t&rc...07FsGP9LohTVsA
Interesting So this impulse value (converted to Kgs) seems to be used to determine if the object it hits 'moves' or not probably...I'll flag that for follow up.

Just found where when the torpedo is initialized it's initial speed is multiplied by some factor (probably the torpedo speed ability). My question is just how reliable was the torpedo speed? For instance, if they set the torpedo speed to 30knots did the torpedo actually run at 30knots or was there some known deviation that could take place? This would be the perfect place for me to inject some code to model this deviation (if any happened in real life)

Found another intersting constant: 9.5
IIRC 9.5 is the acceleration rate in m/s2 right?

The game takes the torpedo speed and divides it by this number (9.5) and stores the result in memory

Last edited by TheDarkWraith; 05-05-12 at 08:08 PM.
TheDarkWraith is offline   Reply With Quote
Old 05-06-12, 02:30 PM   #369
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

9.8 is the accepted rate of free fall depending on several factors.
Do an extreme HALO and that rate is higher until you start getting into thicker air.
Somewhere around 9.72 (but you need to be above 90,000 feet to hit that mark!)
Newton couldn't go high enuff to see that part of the calculations.


I don't see why one would use that measurement for a Torpedo which is not in free fall, but on a horizontal travel path.
Even useing that for a sink rate would be wrong considering it's in salt water which has a different sink rate.

Last edited by Madox58; 05-06-12 at 02:50 PM.
  Reply With Quote
Old 05-06-12, 08:32 PM   #370
CaliEs
Loader
 
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
My question is just how reliable was the torpedo speed? For instance, if they set the torpedo speed to 30knots did the torpedo actually run at 30knots or was there some known deviation that could take place?
Torpedo speed runs during the entire route of 13km constantly with 30ktn accept at the acceleration phase, which is short and negligible.
__________________
Dietrich von Carlewitz, 2nd Lt.
U-29
CaliEs is offline   Reply With Quote
Old 05-07-12, 11:11 AM   #371
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

The one mystery that has always eluded me since SH3 has finally been solved While deep into the debugger I finally nailed down the function that clones the torpedo when it's launched (akin to Torpedo newtorpedo = new Torpedo() in C# language). This function loads all the default values (same as contructor initializing variables) for the new torpedo. The default heading for new torpedo is 0, the default depth is 2, etc. Now I know why torpedo always spawns heading north (ordered heading is 0). More importantly I have the memory address of where this default value is located Now one could change this memory address before firing a torpedo to ensure torpedo is heading in the right direction say for torpedo PT boats or the likes...
TheDarkWraith is offline   Reply With Quote
Old 05-07-12, 01:56 PM   #372
bigboywooly
Rear Admiral
 
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
Default

be ideal if the heading could be changed.
Destroyers,PT boats and AI uboats could benefit as well as aircraft.
Maybe make the heading the same as the unit carrying them
__________________


My mediafire page http://www.mediafire.com/?11eoq19bq9r41
bigboywooly is offline   Reply With Quote
Old 05-07-12, 03:08 PM   #373
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by bigboywooly View Post
be ideal if the heading could be changed.
Destroyers,PT boats and AI uboats could benefit as well as aircraft.
Maybe make the heading the same as the unit carrying them
That's exactly my thinking...I've bookmarked that memory address for further follow up. Right now I'm still deep into torpedo code trying to figure out how the game models the magnetic detonator.
TheDarkWraith is offline   Reply With Quote
Old 05-07-12, 03:14 PM   #374
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
9.8 is the accepted rate of free fall depending on several factors.
Do an extreme HALO and that rate is higher until you start getting into thicker air.
Somewhere around 9.72 (but you need to be above 90,000 feet to hit that mark!)
Newton couldn't go high enuff to see that part of the calculations.


I don't see why one would use that measurement for a Torpedo which is not in free fall, but on a horizontal travel path.
Even useing that for a sink rate would be wrong considering it's in salt water which has a different sink rate.
Some clarification:

There is a constant that is loaded, 95, which is then converted into game units (95 X 0.1 = 9.5)
The current torpedo ordered speed (2.265997 - TI fastest speed in game units) is divided by the constant above (9.5) to yield a result (0.2385260) that is stored away. This result looks like how far torpedo moves in game units every second
TheDarkWraith is offline   Reply With Quote
Old 05-07-12, 03:36 PM   #375
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Now that makes alot more sense.


Nice work!
  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 02:09 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.