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, 06:28 PM   #1
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   #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
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   #3
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   #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
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   #5
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-25-14, 09:49 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.0.160.0 released. See post #1

Starting with v1.0.160.0:
- added a new patch to the SH5.exe: Increase render distance of units. This new patch will, as it says, increase the render distance of units from the player's unit. Default render distance is 40000.0m. This patch will let you define an additional value to add to this 40000.0m thus increasing the render distance from the player's unit. Default value is an additional 40000.0m. See the Notes= of the new patch to learn how to change the default value.
- revised the Player's unit visual sensor affected by available light and Units visual sensor affected by available light (does not affect player's unit) patches so that if it's nighttime it will use the additional nighttime multiplier specified in the patches.
- Added notes (Notes=) to the Player's unit visual sensor affected by available light, Units visual sensor affected by available light (does not affect player's unit), and searchlights active at dusk when they have a contact patches so that the end-user knows how to adjust the variables for those patches

My high-end system was able to increase the render distance of units an additional 100000.0m (total render distance was then 140000.0m) without a performance hit
TheDarkWraith is offline   Reply With Quote
Old 03-25-14, 10:16 PM   #7
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

I enabled the v1.0.160.0 . Left it on the Default value is an additional 40000.0m . Started a new career and left Memel . My computer seems to run better LOL 112 fps . Asus EAH 5870 V2 LOL . Early days . Got close to a port and ships started turning up . 18 fps . Good that its there for when I upgrade my computer .

Last edited by THE_MASK; 03-25-14 at 11:51 PM.
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-26-14, 01:58 AM   #9
Sjizzle
Count Dracula
 
Sjizzle's Avatar
 
Join Date: Aug 2012
Location: 46°13′N, 24°47′E
Posts: 1,807
Downloads: 405
Uploads: 0


Default

all of u have this error with patch 1.0.160.0 ?




EDIT:


Problem solved used the backups and patched again and all is ok now thx

Last edited by Sjizzle; 03-26-14 at 04:07 AM.
Sjizzle is offline   Reply With Quote
Old 03-26-14, 02:44 AM   #10
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 Sjizzle View Post
all of u have this error with patch 1.0.160.0 ?

No .
THE_MASK is offline   Reply With Quote
Old 03-25-14, 06:58 PM   #11
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   #12
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 02:27 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.