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-25-14, 04:36 PM   #1
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 didn't get before: what is this 'nighttime multiplier addition' that you are talking about?
This is a variable in the patch file where the user can define an amount to add to the nighttime multiplier. I have this set to 1.0 for units other than player's unit. Player's unit has a value of 2.5.
TheDarkWraith is offline   Reply With Quote
Old 03-25-14, 06:05 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
This is a variable in the patch file where the user can define an amount to add to the nighttime multiplier. I have this set to 1.0 for units other than player's unit. Player's unit has a value of 2.5.
I see, good idea!

Is the same constant (night time multiplier addition) applied at night (i.e. when the daytime test fails)? It should

Quote:
Originally Posted by TheDarkWraith View Post
- subtract sunlight value - used to determine if nighttime (0.238) from start of nighttime value (0.5 - gets range) - result is 0.262
...
- subtract sunlight value - used to determine if nighttime (0.238) from current available sunlight (0.35) - result is 0.112
wasn't game's nighttime value equal to 0.283? Was that a mistyping by you, or you have added ways to customize that parameter too?

P.S: well done with your new function
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-25-14, 06:28 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Is the same constant (night time multiplier addition) applied at night (i.e. when the daytime test fails)? It should

wasn't game's nighttime value equal to 0.283? Was that a mistyping by you, or you have added ways to customize that parameter too?
That's what I forgot That first test at the start of the function to see if it's already nighttime was supposed to be taking care of this. I'll fix it

Yes the game's nighttime value was 0.283. Typo on my part.
I could make this value changeable


Good news! I figured out how to increase the spawn distance from the player's unit The game has a default radius of 40000m (sometimes 35000m) from the player's unit for when other units are rendered. I added some new code and a new variable in the patch file that will allow you to define an additional radius amount I added an additional 40000m to the existing 40000m (80000m total) and sure enough it worked. Any units within a 80000m radius of my unit were being rendered
TheDarkWraith is offline   Reply With Quote
Old 03-25-14, 06:55 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
That's what I forgot That first test at the start of the function to see if it's already nighttime was supposed to be taking care of this. I'll fix it


Quote:
Originally Posted by TheDarkWraith View Post
Yes the game's nighttime value was 0.283. Typo on my part.
I could make this value changeable
That would be another useful feature

Quote:
Originally Posted by TheDarkWraith View Post
Good news! I figured out how to increase the spawn distance from the player's unit The game has a default radius of 40000m (sometimes 35000m) from the player's unit for when other units are rendered. I added some new code and a new variable in the patch file that will allow you to define an additional radius amount I added an additional 40000m to the existing 40000m (80000m total) and sure enough it worked. Any units within a 80000m radius of my unit were being rendered
That actually rocks!



Could far away ships be heard through the hydrophone (both for players and for the sonarman)?
Have you noticed any decrease in performance on you high spec system?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-25-14, 07:20 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
That would be another useful feature

Could far away ships be heard through the hydrophone (both for players and for the sonarman)?

Have you noticed any decrease in performance on you high spec system?
I might add the ability to change the game's nighttime value in the future

Haven't tested the hydrophone on far away units yet. I'll let you all do this I'm just finishing up the new version of my Generic Patcher currently and testing everything for CTDs.

No decrease in performance on my high-end system. You have to remember that I have an AMD 8 core processor overclocked to 5+GHz on an Asus Crosshair Formula-Z motherboard with 16GB of RAM with the rendering being taken care of by a GTX690. There isn't much that can bring my system to it's knees
TheDarkWraith is offline   Reply With Quote
Old 03-25-14, 08:06 PM   #6
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I might add the ability to change the game's nighttime value in the future
Good to hear. I wonder if the value chosen by devs is just an arbitrary number, or rather based on some speculation by them. I mean: why 0.283 and not just 0.25 or 0.3?

Quote:
Originally Posted by TheDarkWraith View Post
Haven't tested the hydrophone on far away units yet. I'll let you all do this I'm just finishing up the new version of my Generic Patcher currently and testing everything for CTDs.
Fair enough
Don't forget the 'ship (other than carriers) spawning planes patch', when you get time for it. IIRC you liked the idea, and it should already be in you todo list

Quote:
Originally Posted by TheDarkWraith View Post
No decrease in performance on my high-end system. You have to remember that I have an AMD 8 core processor overclocked to 5+GHz on an Asus Crosshair Formula-Z motherboard with 16GB of RAM with the rendering being taken care of by a GTX690. There isn't much that can bring my system to it's knees
Sometimes I forget how cool and super-performant is whatever concerns your life
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-25-14, 09:24 PM   #7
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by gap View Post
Good to hear. I wonder if the value chosen by devs is just an arbitrary number, or rather based on some speculation by them. I mean: why 0.283 and not just 0.25 or 0.3?



Fair enough
Don't forget the 'ship (other than carriers) spawning planes patch', when you get time for it. IIRC you liked the idea, and it should already be in you todo list



Sometimes I forget how cool and super-performant is whatever concerns your life
If you have been any where near the Eastern British coast in the latest Open Horizons mod during the Coastal campaign , then you would know that it is the last mod you would want .
THE_MASK is offline   Reply With Quote
Old 03-26-14, 12:21 AM   #8
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I wonder if the value chosen by devs is just an arbitrary number, or rather based on some speculation by them. I mean: why 0.283 and not just 0.25 or 0.3?
The answer to this is we'll never know unless the programmer who coded this section tells us. What I can infer is this: it's located in SHSim's .rdata section. This tells me it was declared as a constant or global constant in the original C++ code. This is good news because I can modify it - define a variable in the patch file that can add an adjustment amount to it (+ or -) thus letting the end-user decide when nighttime is I'll write this code tomorrow.

Going to have to do a little trickery because of this:
Dump - SHSim_act:06AC0000..06AC0FFF
Address Hex dump Decoded data Comments
06AC023C \. 40000040 DD 40000040 ; Characteristics = INITIALIZED_DATA|READ

SHSim's .rdata section only has read access which is typical of rdata sections (they are usually read-only constants or read-only global constants)

Here's where years and years of hacking comes into play! If you ever want to modify data in a section that is read-only or doesn't have write access just modify the flags in the PE header to give you the access you need/want. Easy as pie!!
TheDarkWraith is offline   Reply With Quote
Old 03-25-14, 06:58 PM   #9
Viktor_Prien
Planesman
 
Join Date: Jan 2010
Location: Italy
Posts: 195
Downloads: 333
Uploads: 0
Default

Quote:
Any units within a 80000m radius of my unit were being rendered
I don't want to be the crow of turn but 80 Km from your unit it's not a little bit too much?
I'm thinking to users that already now suffer pc slowdown...Immagine 3 large convoys sailing in that range during night with some searchlights on and maybe firing to a group of planes and all rendered...most pc with low specs pc will almost freeze I presume...In addition think also to multiplayer session...already with SH3 when there's a single huge convoy and the ships of it of starts to fire to a plane(for example) most players suffer slowdowns.
I hope to not offend you with this consideration but I think that it's a thing you have to take in mind.

With respect Viktor
Viktor_Prien is offline   Reply With Quote
Old 03-25-14, 07:16 PM   #10
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Viktor_Prien View Post
I don't want to be the crow of turn but 80 Km from your unit it's not a little bit too much?
I'm thinking to users that already now suffer pc slowdown...Immagine 3 large convoys sailing in that range during night with some searchlights on and maybe firing to a group of planes and all rendered...most pc with low specs pc will almost freeze I presume...In addition think also to multiplayer session...already with SH3 when there's a single huge convoy and the ships of it of starts to fire to a plane(for example) most players suffer slowdowns.
I hope to not offend you with this consideration but I think that it's a thing you have to take in mind.

With respect Viktor
It's a variable in my patch file thus you can tailor to taste It will come with default value of 0.0 thus no additional distance will be added to stock game's 40000.0m. If you want to increase the render distance then you can adjust this variable to whatever you want
TheDarkWraith 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 03:47 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.