SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Recoded Weather fix - envsim.act (https://www.subsim.com/radioroom/showthread.php?t=225353)

Stiebler 03-26-16 11:53 AM

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.

tomfon 03-26-16 12:20 PM

Hi Stiebler.

Your accomplishment is truly remarkable.:yep:

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. :up::up::up::up:

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.

sublynx 03-26-16 12:54 PM

Great to hear!

ivanov.ruslan 03-26-16 02:18 PM

Great work!:cool:

Tycho 03-26-16 03:55 PM

Super! :yeah:
Installed immediately. But I will not have time to play, to see the result. :hmmm:

Wise 03-26-16 11:19 PM

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.

redline202 03-27-16 04:26 AM

Thanks! :salute:

Fahnenbohn 03-27-16 04:38 AM

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.

Stiebler 03-27-16 07:07 AM

@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.

tomfon 03-27-16 07:57 AM

Quote:

Originally Posted by Stiebler (Post 2392883)
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 (Post 2392883)
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.

Fahnenbohn 03-27-16 10:48 AM

Quote:

Originally Posted by Stiebler (Post 2392883)

@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 !

mikey117us 03-27-16 12:57 PM

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!

makman94 03-27-16 01:01 PM

Very nice and working great Stiebler :yeah:

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

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 !

Hitman 03-27-16 01:13 PM

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.

fitzcarraldo 03-27-16 02:21 PM

Great work Stiebler! Now I'm leaving work my GWX with your fix and the weather is working as expected. I leave off fuel consumption and tried it for three months with diverse TC and all seems work fine.

Many thanks and Happy Easter!

Fitzcarraldo :salute:


All times are GMT -5. The time now is 07:57 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.