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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-24-14, 04:51 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
yep, I know it, and I have copied your formulas in my proposed algorythm.
The few extra calculations I have added (in bold in my previous post), ensure that the value that minimum signal strength gets multiplied by, is alway within the range 1-3. Without them, detection during "twilight-almost-night" can be weaker than during night time (i.e. multiplier bigger than 3), which wrong imo.
Your formula doesn't work. Try it with current light value of 0.5 and 0.283.
Mine has an error also that I just found out when current light = 0.5

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
TheDarkWraith is offline   Reply With Quote
 

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 03:31 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.