![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|||||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
05-05-12, 05:47 PM
|
#1 |
|
Black Magic
![]() |
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. |
|
|
05-05-12, 06:06 PM
|
#2 | |
|
Ace of the deep .
|
Quote:
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 |
|
|
|
05-05-12, 07:22 PM
|
#3 | |
|
Black Magic
![]() |
Quote:
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. |
|
|
|
05-06-12, 02:30 PM
|
#4 |
|
Stowaway
Posts: n/a
Downloads:
Uploads:
|
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. |
|
05-07-12, 03:14 PM
|
#5 | |
|
Black Magic
![]() |
Quote:
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
|
|
|
|
05-07-12, 03:36 PM
|
#6 |
|
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Now that makes alot more sense.
![]() Nice work! |
|
05-12-12, 08:17 AM
|
#7 |
|
Grey Wolf
![]() Join Date: Jan 2009
Location: Finland
Posts: 857
Downloads: 174
Uploads: 0
|
Hi!
I have serious issues getting the new fixes to work... I downloaded the 4 meters magnetic detonation .sim-file, but still the torpedoes explode only when basicly touching the ship's bottom (I aimed at the center of the ship). And the dud fix makes my computer freeze when there is a dud. Can't figure out why this doesn't work, could it be somekind of language incombatability, I have the european (scandinavian) copy of the game. Any other results? Do the duds work for others? Must... get... this working... |
|
|
05-06-12, 08:32 PM
|
#8 |
|
Loader
![]() Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
|
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 |
|
|
05-07-12, 11:11 AM
|
#9 |
|
Black Magic
![]() |
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
|
|
|
05-07-12, 01:56 PM
|
#10 |
|
Rear Admiral
![]() Join Date: Apr 2006
Location: Swindon, England
Posts: 10,147
Downloads: 38
Uploads: 0
|
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
|
|
|
05-07-12, 03:08 PM
|
#11 |
|
Black Magic
![]() |
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.
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
