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 07-08-13, 09:59 AM   #2281
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
can you report it here?
For electric engines this is how the game calculates theoretical maximum speed for given bell:

XMM registers can be thought of floating point registers for this discussion
My sub was a VIIC. I asked for a forward bell (ahead slow - 1). I was submerged thus using electric engines. Engine ratios patch disabled.

XMM0 set to 0.0
load 1.0 into XMM2
load value into XMM1 dealing with current engine type in use (for electrics this is 3.913995)
multiply XMM1 by ordered bell (engine ratio asked for)
load XMM1 into XMM0
add XMM2 to XMM0
divide XMM0 by engine type in use value (for electrics this is 559500.0)
multiply XMM0 by engine type in use value (for electrics this is 7432.328)
multiply XMM0 by XMM1
multiply XMM0 by XMM1
raise XMM0 to the power of 0.3333333 (XMM0^0.333333)
multiply XMM0 by engine type in use value (for electrics this was 30.99133)

XMM0 contains theoretical maximum speed for ordered bell (for this it was 7.56) for that engine (done for each engine)

Actual speed attained ~ 1.5 knots

I'll post a reverse bell on electrics in next post

Last edited by TheDarkWraith; 07-08-13 at 10:19 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:17 AM   #2282
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Reverse bell on electrics. Dead back slow - 1:

XMM0 set to 0.0
load 1.0 into XMM2
load value into XMM1 dealing with current engine type in use (for electrics this is 3.913995)
multiply XMM1 by ordered bell (engine ratio asked for)
load -1.0 into XMM3
load XMM1 into XMM0
change sign of XMM0
add XMM2 to XMM0
divide XMM0 by engine type in use value (for electrics this is 559500.0)
multiply XMM0 by engine type in use value (for electrics this is 7432.328)
multiply XMM0 by XMM1
multiply XMM0 by XMM1
raise XMM0 to the power of 0.3333333 (XMM0^0.333333)
multiply XMM0 by engine type in use value (for electrics this was 30.99133)
multiply XMM0 by -1.0
XMM0 contains theoretical maximum speed for ordered bell (for this it was 7.56) for that engine (done for each engine)

Actual speed attained ~ 1.5 knots
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:24 AM   #2283
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
For electric engines this is how the game calculates theoretical maximum speed for given bell
Quote:
Originally Posted by TheDarkWraith View Post
Reverse bell on electrics. Dead back slow - 1:
Thank you TDW, I am converting your routines into formulas, and putting them on a graph
gap is offline   Reply With Quote
Old 07-08-13, 10:43 AM   #2284
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Thank you TDW, I am converting your routines into formulas, and putting them on a graph
I'll have diesel values here in a bit. Just found an error in the engine ratios patch that affects AI subs battery capacity. Loading new version currently.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:46 AM   #2285
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.126.0 released. See post #1

Starting with v1.0.126.0 Revised the Engine ratios patch to fix bug of AI sub's battery capacity being incorrectly reported to the game
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:49 AM   #2286
Sjizzle
Count Dracula
 
Sjizzle's Avatar
 
Join Date: Aug 2012
Location: 46°13′N, 24°47′E
Posts: 1,816
Downloads: 405
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.0.126.0 released.
Thanks TDW
Sjizzle is offline   Reply With Quote
Old 07-08-13, 10:53 AM   #2287
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

For diesel engines this is how the game calculates theoretical maximum speed for given bell:

XMM registers can be thought of floating point registers for this discussion
My sub was a VIIC. I asked for a forward bell (ahead slow - 1). I was surfaced thus using diesel engines. Engine ratios patch disabled.

XMM0 set to 0.0
load 1.0 into XMM2
load value into XMM1 dealing with current engine type in use (for diesels this is 8.857989)
multiply XMM1 by ordered bell (engine ratio asked for)
load XMM1 into XMM0
add XMM2 to XMM0
divide XMM0 by engine type in use value (for diesels this is 2387200.0)
multiply XMM0 by engine type in use value (for diesels this is 3086.243)
multiply XMM0 by XMM1
multiply XMM0 by XMM1
raise XMM0 to the power of 0.3333333 (XMM0^0.333333)
multiply XMM0 by engine type in use value (for diesels this was 30.99133)

XMM0 contains theoretical maximum speed for ordered bell (for this it was 11.26) for that engine (done for each engine)

Actual speed attained ~ 3.25 knots

Maybe the value in XMM0 is not theoretical maximum speed but rather RPM

EDIT: can't be RPM because I went to external cam and the props are turning way faster than 11 RPM...

Last edited by TheDarkWraith; 07-08-13 at 11:05 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 12:14 PM   #2288
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

So here's the graph of the functions you have just described:



As you can see, their curves are pretty similar, and they resemble a "flattened" sigmoid. I have some doubts about the last diesel constant you have stated though:

Quote:
(for diesels this was 30.99133)
as it would be identical to the corresponding electric constant, and for a bell ratio of 0.20 (AheadSlow), it gives an XMM0 value of 6.94 instead of 11.26; on the contrary, the electric XMM0 value returned by your constant is 7.56, as espected.

Something to note about the other constants:

(3,913995+1)*7432,328*(3,913995)^2/559500≈(8,857989+1)*3086,243*(8,857989)^2/2387200≈1

Constants apart, what is weird about those routines is the absence of max_speed sim file setting as a parameter, and the big difference between the XMM0 values returned by them and actual speeds attained
gap is offline   Reply With Quote
Old 07-08-13, 01:41 PM   #2289
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
as it would be identical to the corresponding electric constant, and for a bell ratio of 0.20 (AheadSlow), it gives an XMM0 value of 6.94 instead of 11.26; on the contrary, the electric XMM0 value returned by your constant is 7.56, as espected.
I double checked that last constant for electric and diesels and it's the same.

You have to remember that I gave the function that does this calculation it's name. I have no clue whether the name I gave it corresponds to it's true meaning or is just a wild guess. I do know that it works with the engine ratio selected and the final value is used in the engines to determine speed of the sub. I haven't traced down where the actual max speed of the unit (as defined in .dat file) is used yet. When I do it will probably unlock the remaining mysteries about how speed is calculated.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 05:50 PM   #2290
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I double checked that last constant for electric and diesels and it's the same.
Okay, I will check the formula for errors on my part

Quote:
Originally Posted by TheDarkWraith View Post
I haven't traced down where the actual max speed of the unit (as defined in .dat file) is used yet. When I do it will probably unlock the remaining mysteries about how speed is calculated.
I see. Let us know if you stumble upon any juicy piece of information re. this subject
gap is offline   Reply With Quote
Old 07-08-13, 07:25 PM   #2291
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.0.125.0 released. See post #1

Starting with v1.0.125.0 Revised the Carriers spawning aircraft patch. The revision lets airbases spawn aircraft. Units that detect a contact and within the reach of an airbase will radio to the airbase asking for air assistance. If the airbase agrees it will dispatch units to investigate/attack the unit's contact


Next I'm working on any unit that receives damage from a shell or torpedo and is within reach of an airbase will radio to the airbase asking for air assistance. If the airbase agrees it will spawn aircraft to give assistance to the unit who radioed in.

Will land-based aircraft be affected by random delay, as the ones spawned by carriers? Being potentially able to sink our target before she can call in for reinforcements would be nice.

On a side note, I have noticed that among the special damage zone types, there are "Radio" and "Command Deck" categories. I wonder if at least one of them can be connected with destructible radio equipments (i.e. when they are destroyed, their parent unit isn't able to comm with other units or airfield), though I suspect that they are only meant for use with playable units.

Quote:
Originally Posted by TheDarkWraith View Post
Things in the pipeline:

...

Any other ideas
You have opened a Pandora's box here...

In short: what about reviving the old idea of U-boat equipments suffering random damage from misuse / prolonged use?
gap is offline   Reply With Quote
Old 07-08-13, 07:51 PM   #2292
Savoyz
Swabbie
 
Join Date: Apr 2005
Posts: 7
Downloads: 189
Uploads: 0
Default

Thank you, TDW sir
Savoyz is offline   Reply With Quote
Old 07-08-13, 08:05 PM   #2293
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Will land-based aircraft be affected by random delay, as the ones spawned by carriers? Being potentially able to sink our target before she can call in for reinforcements would be nice.

On a side note, I have noticed that among the special damage zone types, there are "Radio" and "Command Deck" categories. I wonder if at least one of them can be connected with destructible radio equipments (i.e. when they are destroyed, their parent unit isn't able to comm with other units or airfield), though I suspect that they are only meant for use with playable units.

You have opened a Pandora's box here...

In short: what about reviving the old idea of U-boat equipments suffering random damage from misuse / prolonged use?
Land based aircraft are subject to the random delay (max of 91.0 seconds). Plus there is a % chance airbase can't dispatch units (70% chance they can). I can't really widen this 91.0 seconds because when ANY unit detects a contact the ignore logic steps bit is set which forces the game to check for airstrikes when the current 91.0 seconds interval is up.

I've thought about checking for zones related to Radio and Command Deck and seeing if they are damaged or destroyed in regards to being able to radio for help. If they were damaged or destroyed then obviously unit can't radio for help

Random damage from misuse/prolonged use is on my list. Haven't located the damages yet...

I just realized while playing a campaign that my radio operator radioed for assistance when I spotted a ship. A friendly airbase was nearby so they dispatched aircraft. The aircraft destroyed my target before I had a chance to attack it. Not sure if I like my radio operator radioing for assistance without being asked Thoughts?
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 08:24 PM   #2294
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Land based aircraft are subject to the random delay (max of 91.0 seconds). Plus there is a % chance airbase can't dispatch units (70% chance they can). I can't really widen this 91.0 seconds because when ANY unit detects a contact the ignore logic steps bit is set which forces the game to check for airstrikes when the current 91.0 seconds interval is up.
Can't you instead update the logic steps counter: i.e. when an unit detects a contact, you set a new random variable that must be equal or lesser than the current logic step and equal or lesser than a preset value (for making sure that delay isn't too long), the you load the new variable as current logic step

Quote:
Originally Posted by TheDarkWraith View Post
I've thought about checking for zones related to Radio and Command Deck and seeing if they are damaged or destroyed in regards to being able to radio for help. If they were damaged or destroyed then obviously unit can't radio for help
So it worked?

Quote:
Originally Posted by TheDarkWraith View Post
Random damage from misuse/prolonged use is on my list. Haven't located the damages yet...


Quote:
Originally Posted by TheDarkWraith View Post
I just realized while playing a campaign that my radio operator radioed for assistance when I spotted a ship. A friendly airbase was nearby so they dispatched aircraft. The aircraft destroyed my target before I had a chance to attack it. Not sure if I like my radio operator radioing for assistance without being asked Thoughts?
I agree. Two solutions come to my mind: either make the automatic eneny reporting optional (if possible, through a command button of your UI mod), or get rid of the zealous radio officer at all
gap is offline   Reply With Quote
Old 07-08-13, 08:45 PM   #2295
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I don't have the ability to radio for assistance tied to zones at all. I just might have to add it This would make strategic placement of deck gun shells paramount
TheDarkWraith 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 01:42 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.