SUBSIM Radio Room Forums


SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-26-2016, 12:53 PM   #1
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,231
Downloads: 29
Uploads: 4


Default Recoded Weather fix - envsim.act

Stiebler EnvSim.act version 10.

This is the latest fix to provide more realistic weather for SH3. Since H.sie's hard-code fix also uses his own envsim.act to reduce visibility at night, it is necessary to provide two files.

Download here:
http://www.subsim.com/mods1/nygm/EnvSimAct_10.7z

Method of use:
Unzip the EnvsimAct10.7z into your MODS folder for SH3.
Observe that there two files:
1. EnvSim.act
2. Envsim_HsieFix.acx

1. If you are NOT using H.sie's famous hardware fix for SH3.
You can the mod at once. Just activate the package with J Scones' JSGME mod-installer. Alternatively, after unzipping, just copy the EnvSim.act file (only) enclosed within the mod to your folder \Ubisoft\SilentHunterIII\, where it will replace the original version. (Do NOT place the file within the \DATA folder - it won't be recognised.) This can be used to replace ANY other envsim.act file that is out there.

2. If you ARE using H.sie's hardware fix.
You will need to activate the correct EnvSim file as follows:
a) Use the Options Selector provided with the H.sie V16B1 package to switch OFF H.sie's Bad Weather Fix in your SH3.exe file. Place your newly created SH3.exe file in this folder (EnvSimAct_10), where you can see the two envsim files mentioned above.
b) Rename EnvSim.act to EnvSim.acx (this means it will not be recognised by Silent Hunter III.).
c) Rename EnvSim_HsieFix.acx to EnvSim.act
d) Activate the package with JSGME as mentioned in (1). Alternatively, copy across both the new EnvSim.act file and your new SH3.exe into your folder \Ubisoft\SilentHunterIII\, where it will replace the original version.

The mod that copies last is the one that is used.
This EnvSim_10 mod folder should always be the LAST mod installed with JSGME.
For example if you have Stiebler_4C_Revised hard-code package installed on top of the H.sie patch (it must always be installed after the H.sie patch), then the EnvSim_10 mod MUST follow after the Stiebler_4C_Revised mod.

From the README (enclosed with download):

Principle:
The devs for Silent Hunter 3 acknowledged publicly that there was a coding error in the weather control coded in file envsim.act. The visible effect was that 'foggy-storms' - thick fog or precipitations combined with winds at 15 m/s - could continue for weeks at a time.

There have been various attempts to improve the weather by manipulation of files included with SH3. None has been very successful; only a code fix will resolve a coding error.

In the past there have been two coding attempts. I made a coded adjustment to file envsim.act itself, included with versions of NYGM, and also with the Stiebler4C_Addon_for_V16B1. H.sie included his own version of envsim.act with his V16B1 hard-code addon-on too.

Both solutions work, but neither is particularly satisfactory. My envsim.act gave weather that was usually too calm. H.sie's weather fix was coded in SH3.exe itself, with data being passed from his own variant of envsim.act included with his V16B1 package. H.sie wrote his code in SH3.exe on the basis that 'he who writes last writes best', and his patch killed foggy-storms by reintroducing random new weather. This resulted in normal SH3 weather until halted abruptly by H.sie's code fix, so that weather generally was too stormy (winds too high).

There are three definite problems with the devs' code.
1. Winds are allowed to rise up to 29.9 m/s, before being simply cut back to 15 m/s for display on screen. Thus, once high winds arise, they can continue for a very long time before falling finally below 15 m/s. It seems to be the advent of high winds that causes the 'precipitations' (fog).
2. The weather code cycles frequently until an internal game timer allows the weather actually to be changed. It seems that there is a bug here, because the time of access can slow down (but not always) when there is a foggy-storm. Thus fixes to the weather will often not be accessed for long periods of game-play. (This problem seriously affected my earlier versions of modded envsim.act - the code worked fine, but wasn't always accessed.)
3. Even when the weather is forced to be different in envsim.act, sometimes the original bad weather is rewritten before the code exits from the weather control in envsim.act. I'm not sure if this is a fault, or was a deliberate action by the devs.

I have finally produced version 10 of my old envsim.act hard-code fix. All my versions of envsim.act have solved problem (1) - the problem that winds can rise up to 29.9 m/s while the game acts as though 15 m/s is the maximum. Version 10 also solves the problem, but by a different mechanism.

I have solved problem (2) above - fault with internal timer - by adding my own timer to measure intervals of game play. At the same time, a new internal game counter keeps forcing the weather code to reset a foggy-storm back to normal weather even if the original code tries to write back the original bad weather (problem (3)).

In long testing, involving round trips with a IXD2 U-boat, from Bordeaux or Bergen to Penang via the Indian Ocean and the Antarctic Ocean, weather seemed to be well controlled. Foggy storms occur, but never (so far) for more than 5 days. Nearly all foggy-storms end within 2 days. That, I think, is realistic behaviour.

Stiebler.

Last edited by Stiebler; 04-01-2016 at 11:44 AM. Reason: Updated mod 1 April 2016
Stiebler is offline   Reply With Quote
Old 03-26-2016, 01:20 PM   #2
tomfon
Grey Wolf
 
Join Date: Jan 2008
Location: CK7662
Posts: 919
Downloads: 148
Uploads: 4


Default

Hi Stiebler.

Your accomplishment is truly remarkable.

After so many years, SH3 has finally proper/realistic weather. I believe it is very pleasing for everyone that this major bug has been successfully addressed. Thank you.

Now, two questions:

1. If i understood correctly, the new fix - among other things - won't allow the game's engine to repeat a term of bad (foggy) weather, soon after (1 or 2 days) a term of the same kind of weather has already been terminated. I guess this is what you mean in point (3). Am i correct?

2. Is it possible to introduce a slight possibility that the foggy weather may last for a period of say, 12 days? I'm asking this out of sheer curiosity.

Regards.
__________________
"I would rather have questions that can't be answered than answers which can't be questioned." - Richard P. Feynman [1918/1988]

"I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed." - Michael Jordan

Mods for SH3
tomfon is offline   Reply With Quote
Old 03-26-2016, 01:54 PM   #3
sublynx
Sea Lord
 
Join Date: Mar 2011
Location: In the conning tower of my VIIC scanning the sea through the periscope
Posts: 1,666
Downloads: 172
Uploads: 7
Default

Great to hear!
__________________
[SIGPIC][/SIGPIC]
NYGM+H.sie v16+Stiebler 4C+MaGui WS
sublynx is offline   Reply With Quote
Old 03-26-2016, 03:18 PM   #4
ivanov.ruslan
Ace of the Deep
 
Join Date: Oct 2012
Location: Pleven,BG
Posts: 1,056
Downloads: 847
Uploads: 0
Default

Great work!
ivanov.ruslan is offline   Reply With Quote
Old 03-26-2016, 04:55 PM   #5
Tycho
Weps
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 374
Downloads: 264
Uploads: 1


Default

Super!
Installed immediately. But I will not have time to play, to see the result.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 03-26-2016, 06:56 PM   #6
BL!TZKR!EG
Ocean Warrior
 
Join Date: Mar 2013
Posts: 2,927
Downloads: 40
Uploads: 76


Icon14

Congratulations on just another well-thought-through STIEBLER-release!

Remember when we were discussing this? The best summarization ( post #18 ) was yours!

WELL DONE!

Is is now maybe time for an NYGM-update, too?

BL!TZKR!EG is offline   Reply With Quote
Old 03-27-2016, 12:19 AM   #7
Wise
Engineer
 
Join Date: Jun 2012
Location: St.-Petersburg
Posts: 211
Downloads: 5
Uploads: 0
Default

My respect, Stiebler! Many thanks for your invaluable work. Allow to ask you a question. This question disturbs me 7 or 8 years and it has a direct bearing on weather in game. I asked at a forum this question long ago, but at that time nobody has answered. Maybe, today you?
I am sure, you know that in game moderate wind (0-5 m/s) happens only during a sunny weather. Why only during a sunny weather? The minimum wind in cloudy weather - 6 m/s and only near ports. Why, for example, there is no fog(or overcast) and 0(2, 3..5)m/s? It is possible to correct it?
Thanks.
Wise is offline   Reply With Quote
Old 03-27-2016, 05:26 AM   #8
redline202
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Thanks!
  Reply With Quote
Old 03-27-2016, 05:38 AM   #9
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Glad to see someone is still working on the weather code. I would like to ask you something, Stiebler : do you think that my idea is possible ? See here : http://www.subsim.com/radioroom/show...39&postcount=4

Thank you.
Fahnenbohn is offline   Reply With Quote
Old 03-27-2016, 08:07 AM   #10
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,231
Downloads: 29
Uploads: 4


Default

@Tomfon:
Quote:
1. If i understood correctly, the new fix - among other things - won't allow the game's engine to repeat a term of bad (foggy) weather, soon after (1 or 2 days) a term of the same kind of weather has already been terminated. I guess this is what you mean in point (3). Am i correct?
Point (3) means that there can be a repeat of the same bad weather overwriting corrected (fixed) weather. The original code is complex, and it is not clear why the bad weather becomes rewritten. But in any case, this event incurs infrequently. My new code means that the new, calm weather will be rewritten up to four times before it gives up the attempt. In practise, this is sufficient - sooner or later (and this creates a random element) the original code abandons the attempt to overwrite the new, fixed weather.
Quote:
2. Is it possible to introduce a slight possibility that the foggy weather may last for a period of say, 12 days? I'm asking this out of sheer curiosity.
The short answer is yes, I can change the four attempts to rewrite bad weather to two attempts. Or even one attempt, whatever is needed.
But why would anyone want foggy-storms for 12 days? I have never heard of such an event outside the Indian Ocean during the Monsoon season. There is nothing unusual about storms in the Atlantic, especially in winter and spring, but storms with zero visibility for 12 days? Never heard of it.

I do happen to know that, during refuelling operations at a U-tanker (milk-cow) in 1943, several U-boats were stranded for up to a week owing to heavy seas preventing refuelling. But this was so rare that the event was remarked upon by all those who were involved.

Equally, fogs around Newfoundland are commonplace at certain times of year. But fogs AND high winds? Nope.

@Wise:
Quote:
I am sure, you know that in game moderate wind (0-5 m/s) happens only during a sunny weather. Why only during a sunny weather? The minimum wind in cloudy weather - 6 m/s and only near ports. Why, for example, there is no fog(or overcast) and 0(2, 3..5)m/s? It is possible to correct it?
My new patch does allow low winds in all weathers. However existing code soon raises the winds during poor visibility. The devs seem to have had the idea that strong winds bring lots of spray, and that this reduces visibility. So we see in SH3 first winds rising, then deterioration in visibillity. Or perhaps they thoght that strong winds bring storms from afar.

@Fahnenbohn:
Quote:
I would like to ask you something, Stiebler : do you think that my idea is possible ? See here : http://www.subsim.com/radioroom/show...39&postcount=4
This idea is not possible without removing ALL the devs' existing weather code, with unknown consequences.
Their code is very complex, and takes into account proximity to the north and south poles, proximity to the equator, and a slow surge from weak winds to strong winds, to foggy-storms, and back again over a period of days. The rate of change for the weather increases, the closer you are to the equator.

@Blitzkrieg:
Thanks for the reminder of my old post, I had forgotten it.

No new release of NYGM at this time, since there are still too few new mods to incorporate.

Stiebler.
Stiebler is offline   Reply With Quote
Old 03-27-2016, 08:57 AM   #11
tomfon
Grey Wolf
 
Join Date: Jan 2008
Location: CK7662
Posts: 919
Downloads: 148
Uploads: 4


Default

Quote:
Originally Posted by Stiebler View Post
Point (3) means that there can be a repeat of the same bad weather overwriting corrected (fixed) weather. The original code is complex, and it is not clear why the bad weather becomes rewritten. But in any case, this event incurs infrequently. My new code means that the new, calm weather will be rewritten up to four times before it gives up the attempt. In practise, this is sufficient - sooner or later (and this creates a random element) the original code abandons the attempt to overwrite the new, fixed weather.
Thank you for clarifying this for me, Stiebler. Your explanation is straightforward.

Quote:
Originally Posted by Stiebler View Post
The short answer is yes, I can change the four attempts to rewrite bad weather to two attempts. Or even one attempt, whatever is needed.
But why would anyone want foggy-storms for 12 days? I have never heard of such an event outside the Indian Ocean during the Monsoon season. There is nothing unusual about storms in the Atlantic, especially in winter and spring, but storms with zero visibility for 12 days? Never heard of it.

I do happen to know that, during refuelling operations at a U-tanker (milk-cow) in 1943, several U-boats were stranded for up to a week owing to heavy seas preventing refuelling. But this was so rare that the event was remarked upon by all those who were involved.

Equally, fogs around Newfoundland are commonplace at certain times of year. But fogs AND high winds? Nope.
I do agree with you that a period of 12 days with zero visibility is abnormal. I also do believe that fogs & high winds occurring simultaneously is quite wrong for obvious reasons. Therefore, what i have written above was not a suggestion ; i did not express myself correctly.
__________________
"I would rather have questions that can't be answered than answers which can't be questioned." - Richard P. Feynman [1918/1988]

"I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed." - Michael Jordan

Mods for SH3
tomfon is offline   Reply With Quote
Old 03-27-2016, 11:48 AM   #12
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Quote:
Originally Posted by Stiebler View Post

@Fahnenbohn : This idea is not possible without removing ALL the devs' existing weather code, with unknown consequences.
Yes, I know ! Isn't it a great challenge ?! But is it possible ? (i mean is it possible to write such a program with random values and tests > < = ... ?)

My main goal is to add a predictable weather (barometer), a more realistic behaviour, and also adjustable according to the seasons and the oceans !
Fahnenbohn is offline   Reply With Quote
Old 03-27-2016, 01:57 PM   #13
mikey117us
Planesman
 
Join Date: Mar 2012
Posts: 187
Downloads: 158
Uploads: 0
Default

During a Patrol I save every other Grid Square. On my outbound journey March from Lorient in a Type IXC of 2 Flotilla ( New Type IX U-Boats by Wise ) December 1941 to Grid Square BF36 I experienced a Storm. I had saved prior to this but was not aware if EnvSim 10 quite yet. Storm began at Clear vis 7 m/s, then 10 m/s jumping to 12 m/s overcast moderate vis. And dreaded 15m/s poor vis. No rain. It droned on for days. I never save during storms reload can cause a CTD for me. I paused my game out of storm boredom and went online to the mod forum last night and found this Thread. New Results after a quick save and placing the mod in Game Mid-Patrol ( I also use SH Commander and Real Weather ) Storm began in the same grid with winds 7-10 m/s increasing to 12 m/s clouds were moderate visibility medium. After two Sea Days it blew out and was calm and beautiful in time for a Gibralter ir Freetown Convoy! Works even in Mid-Patrol! Thank You!
mikey117us is offline   Reply With Quote
Old 03-27-2016, 02:01 PM   #14
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,337
Downloads: 180
Uploads: 7


Default

Very nice and working great Stiebler

i tested it for about one month and everything works as you said

i noticed ,but not sure yet, a slight tense for calm days , i mean that in this month i had more than 15 days calm weather (0 wind) but not continuesly. maybe it was just a random result will see how it goes next months

What Wise mentioned is just wonderfull if could be done. calm and foggy days really missing from game. try it if you have some time or will

thank you for this Stiebler, your previous fix was allready very enjoyable but your new one even more !
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 03-27-2016, 02:13 PM   #15
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,215
Downloads: 108
Uploads: 2


Default

Quote:
This idea is not possible without removing ALL the devs' existing weather code, with unknown consequences.
Their code is very complex, and takes into account proximity to the north and south poles, proximity to the equator, and a slow surge from weak winds to strong winds, to foggy-storms, and back again over a period of days. The rate of change for the weather increases, the closer you are to the equator.
I suppose the answer is yes, but given how you describe your fix to work I expect that base behaviour to remain, correct? I mean that what your fix basically does is help the game getting unstuck from the bad weather routine but will not affect the underlaying weather model.
__________________
One day I will return to sea ...
Hitman 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 04:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © 1995- 2019 Subsim