SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
03-24-14, 03:38 AM | #3016 |
Canadian Wolf
|
[TEC] SH5.exe patches to fix bugs and add functionality
Was adjusting some of the patch stuff last night. The game has really gotten intricate, but in a good way. The above sounds incredible.
|
03-24-14, 06:03 AM | #3017 | |
Samurai Navy
|
Quote:
|
|
03-24-14, 06:40 AM | #3018 |
Captain
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
|
Amazing as always, TDW!
|
03-24-14, 07:09 AM | #3019 |
Engineer
Join Date: Apr 2005
Posts: 210
Downloads: 86
Uploads: 0
|
Just a small request Dark.. could you date stamp your changelog on the first post whenever you release a new version?
I never know when an update has released and because the number of fixes is growing quite vast I easily forget what I have and haven't got patched. |
03-24-14, 08:32 AM | #3020 |
Ocean Warrior
|
Yep.. that's very good idea .. I sometimes get confused also ..
__________________
. Where does human stupidity end? . El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
03-24-14, 09:10 AM | #3021 | |||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
-- take current light value (1) and subtract game's nighttime value (0.283) - result is 0.717 -- divide 0.717 by 0.217 (start of night time less game's night time value) - result is 3.304 -- subtract 3.304 from 1.0 - result is -2.304 -- multiply -2.304 by game's nighttime multiplier for player's crew (3.0) - result is -6.912 -- multiply -6.912 by derived minimum signal strength (0.1, from your example) - result is -0.691 - this would be the new minimum signal strength. Do negative numbers make any sense here? Maybe you should add a routine checking if current light value isn't greater than or equal to start of night time Quote:
Quote:
Last edited by gap; 03-24-14 at 09:20 AM. |
|||
03-24-14, 09:45 AM | #3022 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Let's say that current light value is 0.49 -- take current light value (0.49) and subtract game's nighttime value (0.283) - result is 0.207 -- divide 0.207 by 0.217 - result is 0.954 -- subtract 0.954 from 1.0 - result is 0.046 -- multiply 0.046 by game's nighttime multiplier for player's crew (3.0) - result is 0.138 (makes no sense, we should make sure that this number is always greater than or equal to 1) -- multiply 0.138 by derived minimum signal strength (0.1, from your example) - result is 0.014 - this would be the new minimum signal strength (which is obviously smaller than day-time derived minimum signal strength, whereas it should be bigger). |
|
03-24-14, 11:13 AM | #3023 |
Admiral
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
|
__________________
What we do in life echoes in Eternity |
03-24-14, 11:42 AM | #3024 |
Black Magic
|
During testing I noticed that I wasn't checking to see if current light amount was > start of nighttime value. I have this check now in the code and if current light amount > start of nighttime value then minimum signal strength isn't adjusted
|
03-24-14, 01:29 PM | #3025 |
Black Magic
|
I added code so that the same thing was done to units other than the player's unit. Thus units other than the player's unit will have their ability to detect contacts visually impaired as available sunlight fades away
|
03-24-14, 02:42 PM | #3026 | |
Planesman
Join Date: Jan 2010
Location: Italy
Posts: 196
Downloads: 333
Uploads: 0
|
Quote:
|
|
03-24-14, 03:15 PM | #3027 |
Black Magic
|
Just tested out the Searchlights active at dusk patch and everything working as designed Something to keep in mind: the game has a hard coded max distance from contact for the searchlights of 2000m. If the contact is outside of the 2000m then the searchlight will turn off.
|
03-24-14, 03:57 PM | #3028 | ||||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Quote:
If I got you correctly stock game applies no nighttime multiplier when current light value is greater than 0.283, and a constant multiplier (3), when current light value is equal or lesser than 0.283. What we want, is a "variable by light multiplier" to be applied when current light value is comprised between start of nighttime (0.5 in your example) and game's nighttime (0.283). The above multiplier should range in value between 1 and nighttime multiplier. If you agree with the above, the new algorythm should look like this: -- compare game's nighttime value (0.283) to start of nighttime value (0.5) -- if greater than or equal then jump to end of function (prevents unmanaged errors due to wrong start of nighttime user settings) -- check current light value -- if equal or greater than start of nighttime go to end of function (no multiplier is applied, as per stock code); -- if equal or lesser than game's nighttime value go to end of function (the full nighttime multiplier is applied, i.e. either the stock 3 value, or the new value patched by you); -- 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, as per your example) 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 -- calculate the reciprocal of nighttime multiplier (3.0) - result is 0.33 -- subtract 0.33 from 1.0 - result is 0.77 -- multiply 0.77 by 0.53 - result is 0.35 -- add 0.33 to 0.35 - result is 0.69 -- multiply 0.69 by game's nighttime multiplier for player's crew (3.0) - result is 2.06 -- multiply 2.06 by derived minimum signal strength (let's say it's 0.1) - result is 0.206 - this would be the new minimum signal strength the part in bold ensures that the variable by light signal strenght multiplier is always within the range 1 - game's nighttime multiplier. The multiplier will increase linearly between the above extremes Quote:
Quote:
|
||||
03-24-14, 04:11 PM | #3029 | |
Black Magic
|
Quote:
-- 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 -- multiply 1.59 by derived minimum signal strength (let's say it's 0.1) - result is 0.159 - this is the new minimum signal strength It first gets the range between start of nighttime and game's nighttime value. Then it gets the current light value in regards to game's nighttime value. Then it divides the current light value in regards to game's nighttime value by the range. Subtract that result from 1.0 to get % of range. Multiply % of range by nighttime multiplier. Multiply that result by minimum signal strength to get adjusted minimum signal strength based on available light |
|
03-24-14, 04:37 PM | #3030 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
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 is wrong imo. Last edited by gap; 03-24-14 at 04:48 PM. |
|
|
|