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 03-24-14, 05:26 PM   #1
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Your formula doesn't work. Try it with current light value of 0.5 and 0.283.
This is exactly what I did, and the extreme values 0.5 and 0.283 gave me the expected results (i.e. 1 and 3)

You can check yourself: I have entered my formulas in an on-line document (google spreadsheet). Just replace the 'current light value (clv)' figure with whatever you want within the range 0.283-0.5, and read the result in the last row
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-24-14, 05:46 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
This is exactly what I did, and the extreme values 0.5 and 0.283 gave me the expected results (i.e. 1 and 3)

You can check yourself: I have entered my formulas in an on-line document (google spreadsheet). Just replace the 'current light value (clv)' figure with whatever you want within the range 0.283-0.5, and read the result in the last row
That's wrong. 0.5 should give 0 - no multiplier (thus the current minimum signal strength should be used)
0.283 should give 3 - max multiplier - thus 3.0 should be multiplied by the minimum signal strength
TheDarkWraith is offline   Reply With Quote
Old 03-24-14, 06:04 PM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
That's wrong. 0.5 should give 0 - no multiplier (thus the current minimum signal strength should be used)
I don't get you here.

My formulas return 1 for a 0.5 light value. That seems correct to me, as current minimum signal strength x 1 is obvioulsy equal to current minimum signal strength (i.e. that exact value is used). If the multiplier was 0 (or close to 0), it would nullify the effect of other sensor strength modifiers (current minimum signal strength x 0 = 0).

Quote:
Originally Posted by TheDarkWraith View Post
0.283 should give 3 - max multiplier
It does
Have you checked the spreadsheet with my formulas?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-24-14, 07:49 PM   #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
Thus I came up with a new algorithm:
- if game reports back it's daytime:
-- compare game's nighttime value (0.283) to start of nighttime value (0.5) - I do this comparison because it's possible someone may screw up and assign the start of nighttime value <= 0.283 since it's a variable in the patch file
-- if greater than or equal then jump to end of function
-- if less than then subtract game's nighttime value (0.283) from start of nighttime (0.5) - result is 0.217
-- take current light value (say it's 0.385) and subtract game's nighttime value (0.283) - result is 0.102
-- divide 0.102 by 0.217 - result is 0.47
-- subtract 0.47 from 1.0 - result is 0.53
-- multiply 0.53 by game's nighttime multiplier for player's crew (3.0) - result is 1.59
-- if result above > 1.0 then subtract 1.0 from result above - result is 0.59
-- load derived minimum signal strength into XMM0 and XMM1 (let's say it's 0.1)
-- multiply XMM1 by 0.59 - XMM1 = 0.059
-- add XMM1 to XMM0 - XMM0 = 0.159 - this is the new minimum derived signal strength
I have put your new algorithm on graph (using your same constants), and it is not linear. It got a sharp bump at a light value of ca. 0.430



If you want, you can check yourself: I have entered your formulas in the second sheet of my on-line spreadsheet.

Now compare the graph above with the one of your algorithm with my adjustements (same constants as above used):

__________________
_____________________
|May the Force be with you!|
...\/
gap 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 02:25 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.