Log in

View Full Version : [REL]Bad weather fix for SH3


h.sie
11-28-10, 05:26 PM
Bad Weather Fix V1.1 - h.sie Edition


Background

Although I've never seen it myself, some people reported about a serious bug in sh3:
the weather sometimes sticks at high windspeeds with 15m/s, fog and no visibility.
This mod tries to eliminate this bug, or at least, reduce it's impact on gameplay.

This mod comes in 2 different versions:
1) Standard version
2) Forte version: Results in shorter storm and fog periods than in Standard version.


What does this mod do?

Mainly nothing.

It does not change the sh3 weather algorithm at all
and will only be active, when strom- or fog periods are too long.

It consists of 2 independent counters:

1) a STORM_COUNTER that counts the number of weather periods with storm.
2) a FOG_COUNTER that counts the number of weather periods with fog.


If STORM_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix forces a reduction of the windspeed to a randomly chosen lower value.

If FOG_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix reduces clouds and thus fog.


Maximum values (standard version)

The maximum value for STORM_COUNTER is randomly chosen between 1 and 5 weather periods.

The maximum value for FOG_COUNTER is randomly chosen between
1 weather period (chance: 50%),
2 weather periods (chance: 33%) and
3 weather periods (chance: 17%).

I also programmed a little chance that this controlling mechanism is bypassed
in order to keep some uncertainty, so that a very little chance remains
for storm- and fog periods longer than the maximum values, but that's improbably.


EXTRA

This fix also fixes a bug, that the weather time counter is not saved in a savegame,
so that the counter always starts at 0 every time you load a mission or savegame.
That means, that the first weather change always occurs exactly after a full
weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the
weather period, so that a weather change shortly after loading a mission is possible.


Compatibility

- Should work with every sh3.exe.
- Tested with WinXP/32Bit and Win7/64Bit.
- Multiplayer: I don't think it works for Multiplayer mode.


Version History

- V1.1: Bugfix: Initialization of weather time counter with random value at mission start didn't work in all situations.

- V1 beta: First version


Credits

To all who helped, but especially to Stiebler for co-operation
and Hitman for detailed information, which made this fix possible.


h.sie


Alternative versions (also available on my mediafire page)

- Stieblers NYGM Bad weather fix (I cannot tell details about that fix)

- Yoryin Edition (does nothing more than shortening the weather change period by a factor of 3)

Rubini
11-28-10, 07:50 PM
Hi h.sie,

How are you and all you guys?
I´m absent from Sh3 from a while...but i miss it and i will return some months ahead for sure.:up:

Just about bad weather, i should like to mention a mod from mine that i yet use in campaigns and is really very handfull, even if it is not a "real solution":
Stop the rain! A definitive solution for bad weather! a mod that i released more than 2 years ago and works flawless, see here:
http://www.subsim.com/radioroom/showthread.php?t=132868

Hopes that it could add to the matter!:up:

h.sie
11-29-10, 01:52 AM
Hi Rubini, thanks mate. I never knew such a mod of yours exists. Edited 1st post. So users have 4 different approaches. I am fine, but a little bit nervous, because (theoretically) "all" could now be modded, but I only have little time.

NGT
11-29-10, 04:49 AM
Hello everybody,

The "problem" with this mod by Rubini: it change scene.dat file.

But each one have different scene.dat, example me: I have the one from MEP 3.0, the environment from Makman94.

For every environment mod is an other scene.dat closely combinated with his own Env folder.

The (future) solutions from h.Sie and Stiebler looks like more independent from scene.dat.

I say "looks like" because inside scene.dat are parameters for random change for rain, wind and fog.

[EnvSim>Wind>WindSpeedChangeSpeed,
EnvSim>Fog>FogChangeSpeed,
Rain>RandomWind>ChangeTimeMin / ChangeTimeMax / RandomWindSpeedVariationSpeed,
Rain>RainIntensityChangeSpeed]

Yoriyn-Edition looks like independent from scene.dat:
For a given scene.dat, the weather will change 3 times faster, that's all.

But I have a question, too: never mind what we have in the beginning of the 3 Campaign files?

[Mission]
Title=
MissionType=0
MissionDataType=1
Year=1939
Month=1
Day=1
Hour=12
Minute=0
Fog=1
FogRand=0
Clouds=1
CloudsRand=0
Precip=0
PrecipRand=0
WindHeading=0
WindSpeed=4.000000
WindRand=0
WeatherRndInterval=5
SeaType=0
Briefing=

Any way, is very difficult to compare feed-back from users, because of variety and personalisation of scene.dat, Env folder and campaign files (??)

Finally, if I remember well, Stiebler noticed that very high time compression gives erratic changes in weather. In my system, 2048 time compression gives me faster bad weather (game time, of course).

Thank you , hope all that can help little bit.....:-?

(sorry for basic English)

h.sie
11-29-10, 04:59 AM
@NGT: You are correct, but AFAIK GWX and NYGM have the RealWeatherFix from Stiebler et al. enabled, that means they have the same settings in the campaign files and also the same relevant weather parameters in scene.dat.

I don't want to start a new investigation on how scene.dat parameters affect weather. That has been done many times in the past.

In my work here I assume that the parameters in scene.dat and campeign files are optimum, and I always use scene.dat from GWX3 as basis. So no-one has to do canges neither to scene.dat nor to campaign files.

Yoriyn
11-29-10, 06:06 AM
Yes it's true. Whatever you have in all three campaign files is useless. I tell you more you can even delete all the weather data from this files, and that change nothing, sometimes game require only data from only one file Campaign_SCR to work. !! I try this in my own tests. It's looks like game don't use any of campaign files settings.

H.sie done great job and I'm very, very happy to have the changes what I wish few years ago.

But maybe instead of creating hundrets and hundreds fixes to weather is good idea to fix this problem? After fix everyone can set they own settings in campaign files and the choice is big:

FogRand=
CloudsRand=
PrecipRand=
WindRand=
WeatherRndInterval=

I know this is not easy and I can't do it, but this is only a proposal.:DL

h.sie
11-29-10, 07:39 AM
@Yoryin: Not me.

@Stiebler: Maybe you'd like ESI+2bc, it contains the visibility of the new generated (future) weather, coded in integer. 0=good, 3=fog. I'll use that flag in order to identify bad weather condition. It's read only, that means changing it does unfortunately not affect fog.

Rubini
11-29-10, 08:45 AM
Hello everybody,

The "problem" with this mod by Rubini: it change scene.dat file.

But each one have different scene.dat, example me: I have the one from MEP 3.0, the environment from Makman94.

For every environment mod is an other scene.dat closely combinated with his own Env folder.

The (future) solutions from h.Sie and Stiebler looks like more independent from scene.dat.
....


Yes, it only changes few parameter inside scene.dat that can be done on your own scene.dat and then use it as described on the mod readme; this way it is usefull for anyone, for any installation.

And obviously a definitive solution will be even better, so I'm also waiting for h.sie/Stiebler fixes. :up:

Anyhow, the "Stop the rain!" mod was until now the best "emergencial solution for bad weather in campaign patrols", IMHO, because it really allows that the player don't stop to play Sh3 by this annoying problem anymore.

Corsair
11-29-10, 08:53 AM
Hi h.sie,

How are you and all you guys?
I´m absent from Sh3 from a while...but i miss it and i will return some months ahead for sure.:up:

Just about bad weather, i should like to mention a mod from mine that i yet use in campaigns and is really very handfull, even if it is not a "real solution":
Stop the rain! A definitive solution for bad weather! a mod that i released more than 2 years ago and works flawless, see here:
http://www.subsim.com/radioroom/showthread.php?t=132868

Hopes that it could add to the matter!:up:

For info, files no longer exist either by rapidfile or mediafire.

h.sie
11-29-10, 08:55 AM
My algorithm in detail (Initial inspiration: Stiebler & Hitman):

There are 2 counters: one for STORM (Windspeed > 14) and one for FOG, which are initially both set to 0.

Everytime a condition (either storm or fog or both) is true, the according counter is incremented in order to count the time periods for storm and fog independently.

If one condition is false (wind < 14 or no fog), the according counter is set back to 0, because the bad weather interval has obviously ended for that individual weather component.

But if one of these counters reaches a certain, randomly generated, maximum value (between 2 and maybe 10), a tendency to a better weather is forced by manipulating some internal random values. This forcing a tendency to good weather will end, if both counters are below their individual maximum values, that means, the bad weather period has ended.

This algorithm guarrantees, that storm and fog periods independently from each other cannot be longer than a certain maximum time. This is, because I had some situations with longer fog-periods but windspeed below 10m/s.

Stiebler
11-29-10, 10:09 AM
@H.sie:

I have now amended my envsim.act code, and provided a download link in case you wish to see my code.
I have sent to you a PM with the download address.

It is absolutely certain that between us (mostly your work, of course) we can now solve the persistent 'foggy storms'. There is more than one way of achieving this, and other coded patches might be better than mine, but my code *definitely* functions to get rid of the 15 m/s foggy-storms.

What I have done:
As mentioned earlier, my solution has been to subtract 15 m/s from wind speeds whenever the windspeed exceeds 15 m/s (the devs, as you discovered, had used a limiter, chopping off all winds to a maximum of 15 m/s). My method provides the use of random wind-speeds, and not a sticking at 15 m/s. In addition, I have then re-tested the new windspeed to make sure that it does not now fall below the lower weather limit (normally 0 m/s, but 7.5 m/s in the Arctic). For the minimum windspeed, I have retained the original dev’s code. All testing was carried out at tc=2048, which is well known to induce bad weather quickly.

I have now carried out extensive trials with my repaired copy of the key file envsim.act, and protracted foggy-storms, in the north Atlantic (around the Azores), around the equator, and in the Arctic south-west of Spitzbergen. Prolonged stormy winds are no longer seen! (Although it must be emphasised that random variables are involved, so that theoretically foggy-storms remain possible. However the chances become much smaller with every passing weather change.) I spent two game-months for each patrol in each area without any coding problems.

What I discovered during testing:
There is no doubt that the wind speed precedes the heavy rain and the fog. You never see heavy-rain-and-heavy-fog with windspeeds below 9 m/s, although sometimes the fog and rain lingers after windspeed has briefly reached 15 m/s.

In the north Atlantic: these might be regarded as standard weather conditions (for SH3), and weather updates (not necessarily changes) occur every 24 hours or so. Under these conditions, foggy-storms that exceed two days are very rare.

At the equator: the devs provided much faster weather changes near the climate, perhaps to mimick ‘tropical storms’. Foggy-storms are much more common here (since rapid weather changes induce the wind to move upwards), but none now persist more than a few days. However, there was one instance where a foggy-storm persisted for seven days, even although the windspeed fell, because the windspeed fell only to 12 m/s, from which it could rise rapidly back to 15 m/s again.

At the Arctic: the big problem here is that the devs set a minimum windspeed of 7.5 m/s. This is half of the theoretical range of all available windspeeds, and my envsim.act patch will also reduce some wind speeds originally in excessive of 15 m/s to low values below 7.5 m/s. In addition, the weather changes much less frequently in the Arctic than in the north Atlantic, so that the weather tends to ‘stick’. I think that the devs' choice of a minimum windspeed of 7.5 m/s is too high [Edit: high, I had written 'low'], resulting in persistent winds of 7.5 m/s, which lack rain and fog (for which a minimum of windspeed of 9 m/s is necessary). Perhaps this minimum value should be lowered to give a better range of weathers, or an additional patch should be made to envsim.act.

I look forward to seeing your work, too.

Stiebler.

h.sie
11-29-10, 10:21 AM
Mine is better, mine is better

:DL

So in the near future we'll have different solutions. And if only one is the optimum, (regardless of "yours" or "mine") we made a big step into a very good sim. By the way: I helped you and you helped me, so I have a problem to divide into "my" solution or "your" solution. For me, it's "our" solution.

Rubini
11-29-10, 11:12 AM
@Stiebler, h.sie,

Thanks again by yours efforts, the persistent bad weather was one of the more annoying things on Sh3, sometimes really ruin even a long time patrol. Just waiting for the fixes!:up:

I should like to ask your attention to another annoying thing (default on sh3) linked to the weather matter: the foam (wind foam on the top of waves) only appears after wind>or= 9m/s; i really should like to have at least small foams, let´s say after 5 or 6m/s, what will be much more realistic and perhaps easy to fix? I tried a lot of approachs using scene.dat and others files (IIRC) since 2005 and never found a solution...:hmmm:

I really hate that just "plain" ocean even with wind more than 5m/s...:nope:

Rubini
11-29-10, 11:25 AM
For info, files no longer exist either by rapidfile or mediafire.
Thanks, I will provide a new link ASAP!:up:

Hitman
11-29-10, 02:06 PM
This is, because I had some situations with longer fog-periods but windspeed below 10m/s. It is worth noting that "true" soup dense fog does actually come with calm sea and wind in real life. The historically very dangerous english channel or northeastern coast of the US and Canada (Labrador, terranova) are a good example of this.

Then there is also the other fog, tied to the storms and that comes not as much because of the difference in temperature between water and air, but because of the strong wind and seas that tend to produce much water in suspension on the air.

In the North Atlantic is not unusual to have rough seas and more or less clouded skies, but with an excellent visibility due to no fog at all. I have readed many accounts of uboats and ships sighting enemies beyond the horizon despite the weather being "rough"

It would be therefore great if we could have the fog appear only in the maximum storms and calm weather near land.

I'm impressed by your work, this has been a nightmare for so long that I had almost lost any hope of it getting fixed :yeah:

[EDIT]

Some interesting and detailed information about the wind speed in the Arctic: http://www.colorado.edu/Research/HARC/sobs_swinds.html

And for the North Atlantic (Including wave heigth): http://webcache.googleusercontent.com/search?q=cache:C_YgdZfRkfoJ:topex.ucsd.edu/sandwell/publications/9.pdf

makman94
11-29-10, 02:38 PM
fantastic news !! congratulations to all involved !! :yeah:

ready to test here :up:

Draka
11-29-10, 03:05 PM
To amplify a bit:

I've been leary of putting my oar in and complicating matters, but Hitman is correct. Fog is a suspension of water droplets in air, and any decent amount of wind will disturb that equilibrium so as to remove the fog. As a former long-time resident and sailor in the San Francisco Bay area, it is infamous there. The same holds true of higher temperatures as well, as the air can better absorb the moisture. The sun will literally "burn" it off in the absence of any wind.

On the other end, very strong winds literally blow off the tops of the waves, causing a similar effect from a different cause - lower visibility. The resulting spray is so thick as to be similar to the fog. Anything in between is clear as far as vision goes.

But as I am not familiar at all with the code and what it is possible to code in game, I will leave it at that.

Stiebler
11-29-10, 03:12 PM
Arctic weather:
Some interesting and detailed information about the wind speed in the Arctic: http://www.colorado.edu/Research/HARC/sobs_swinds.htmlThe average wind speeds look quite surprising steady, as well as strong, don't they? Around 35 mph. (17.11 yards/sec; ca. 15-16 m/s). This would be at the limit of what SH3 finds acceptable for its wind-speeds.

Thanks for the information, Hitman.

Stiebler.

Stiebler
11-29-10, 03:17 PM
@Draka,

Yes, many people have mentioned over the years that stronger winds should remove fog, not make it thicker. I suppose the devs just wanted a variable weather pattern.

It is because the weather has not varied enough after strong winds that users of SH3 have become unhappy.

Stiebler.

h.sie
11-29-10, 04:51 PM
Now I am totally confused. One week ago the job was to shorten fog periods by a small fix. Now, as the work is almost done, the situation changes. what went wrong???

h.sie
11-29-10, 04:56 PM
Ah, now I understand.....you want me to only shorten fog periods in conjunction with storm, but not with medium wind speeds??? But Hitman wants the opposite by saying " It would be therefore great if we could have the fog appear only in the maximum storms"

Until now I thought exactly the fog in conjunction with high windspeeds are the problem which is to remove, and now we want fog with high windspeed?

???

I go to bed now.

Draka
11-29-10, 06:37 PM
The problem lies in that fog and rain are related, but different. Both are a result of water particles within the air being no longer stable, and thus dropping out. This is a function of the temperature of the air changing - in this case becoming colder, and thus unable to hold as much water vapor.

Fog is a fine mist - thus easily subject to wind conditions. Rain is denser, and can come in everything from a drizzle to a full-on hurricane as far as wind speeds go.

The phenomenon of wave tops being blown off (known as spindrift) and having an effect on visibility come into play only at high wind speeds - Beaufort scale 9 (Strong Gale) and up.

Visibility is effected by all three, of course - but I really don't know how to adjust for the graphic effects aside from the crude one of limiting visibility. Thus the wish that wind speed effects "fog" only at lower and higher ends, while the middle area is only effected by rain.

In game terms, of course, there may be no way to distinguish between them.

Just for reference:

http://www.spc.noaa.gov/faq/tornado/beaufort.html

Yoriyn
11-29-10, 07:08 PM
I think fog in the game do not represent only a real fog, but this is a general visibility condition in the game.

h.sie
11-30-10, 01:57 AM
Guys, nice to know about fog and its causes, but I am mainly interested in how this knowledge could affect my programming/algorithm.

I plan to measure independently from each other

1) length of high windspeed periods and
2) length of fog periods

If one of them is longer than a certain maximum value, I plan to force the weather to get better.

That is similar to what we have talked about when I started to look into the weather.

My question now is: Is my above described plan or idea okay?

If yes: Great.
If no: How should it look like?

Thanks,
h.sie

Stiebler
11-30-10, 03:19 AM
@H.sie,

Continue with the original plan. (Allow fog at high wind speeds, limit fog and high wind speeds when they appear too often.)

We cannot re-write the entire weather pattern. Neither is it possible to reconcile all different opinions.

The central idea is to fix the problem that ruins game play: repeated long periods (>7 days) of foggy storms when it is impossible to play the game properly.

Stiebler.

h.sie
11-30-10, 03:26 AM
@Stiebler: Thanks.

A different thought: If I remember right, after loading a saved game, the weather counter always starts at 0. That means, the first weather change occurs after about 30-40 hours.

Maybe one could try to initialize this counter to a certain value > 0 after game load, so that the first weather change comes earlier.

NGT
11-30-10, 04:28 AM
@Stiebler: Thanks.

A different thought: If I remember right, after loading a saved game, the weather counter always starts at 0. That means, the first weather change occurs after about 30-40 hours.

Maybe one could try to initialize this counter to a certain value > 0 after game load, so that the first weather change comes earlier.

Why? :06:

(I think, mostly, we not save game with 15 m/s wind..., no ? And every patrol starts with good weather. Why to loose that?)

h.sie
11-30-10, 04:35 AM
@NGT: It was only an idea - for discussion. I thought it would be better if every mission DOES NOT start with the same weather.

But more important than that is, that every time you reload a saved game, you have to wait 30-40h until the weather changes, because the current weather counter is not stored in the savegame.

Stiebler
11-30-10, 05:52 AM
The patched envsim.act file that I am using currently changes weather after 24 hours anyway.

Doesn't matter whether you start from base or after a saved game. I don't know why.

Stiebler.

h.sie
11-30-10, 06:04 AM
@Stiebler: That behaviour you described proves exactly what I wanted to explain. The counter, which is responsible for determining the time of the next weather change is NOT stored in the savegame. Instead, it starts from 0 every time you reload that savegame.

Lets assume the time has come for a weather change, and now you save the game instead of continuing. If you reload that game, the counter starts from 0, that means, the next weather change comes not immediately, but after 24 hours.

Best solution would be to also store that counter, but I'm pessimistic that I'll be able to manipulate the data stream that is written during saving.

So as a compromise, I had the idea to initialise that counter to an certain value, so that you don't have to wait the full period for the next weather change.

Stiebler
11-30-10, 06:13 AM
Now I understand.

Yes, good idea to reset the counter.

It remains the case though that with NYGM the weather can change within a day or two of leaving base. This is not, in fact, caused by the new envsim.act file - the behaviour is the same with the original file. So probably an artefact caused by the way NYGM has been modded in the past.

Stiebler.

h.sie
11-30-10, 07:10 AM
...in my opinion it's a (little) bug, that the counter is reset after loading a savegame and it would be desireable, if the counter were not reset.

Rubini
11-30-10, 07:36 AM
...in my opinion it's a (little) bug, that the counter is reset after loading a savegame and it would be desireable, if the counter were not reset.
Yes, I totally agree, but probably will be very difficult to manipulate the saved games, no?
If we found a way to manipulate the saved games then in a future fix perhaps we could find a fix for that always all "fuel/torpedo/fix broken parts" that we have after dock at a milkcow...sorry for the OT.

Magic1111
11-30-10, 07:42 AM
@Stiebler: Thanks.

A different thought: If I remember right, after loading a saved game, the weather counter always starts at 0. That means, the first weather change occurs after about 30-40 hours.

Maybe one could try to initialize this counter to a certain value > 0 after game load, so that the first weather change comes earlier.

Hello h.sie !

You're absolutely right, the counter to change the weather starts always at 0, after loading each Savegame !!! ;)

Best regards,
Magic

h.sie
11-30-10, 07:43 AM
@Rubini: Manipulating data streams without SDK is almost impossible for me.

But as a compromise I could try to set the counter that determines the next weather change to a certain value (instead of 0), every time a game is loadad, so that one has not always to wait 30-40hrs for the next weather change. Phew.

Yoriyn
11-30-10, 09:32 AM
So maybe random weather factor in game? You never know when weather change, intead of a conatant weather changing periods.

Hitman
11-30-10, 03:27 PM
But Hitman wants the opposite by saying " It would be therefore great if we could have the fog appear only in the maximum storms"

Until now I thought exactly the fog in conjunction with high windspeeds are the problem which is to remove, and now we want fog with high windspeed?


I'm sorry if I have confused you! Posting in so many threads and crossing answers and questions tends to make the conversation sometimes difficult :oops: so I will sum up it:

1) It is realistic and OK to have fog with calm water near the coast (Real fog) AND to have it with the biggest storms (Improper fog, in fact just water ripped from the sea or rain by the wind).

2) The problem is that biggest storms tend to stick for a long period - that's the weather bug in SH3, not the fact that those heavy storms come with fog (Improper fog, but realistic as already explained)

3) We should also get "rough" weather (strong winds, medium waves) with cloudied skyes, may be rain, but NO fog. That is normal for the North Atlantic from october to may.

In a nutshell:

Fog is wellcomed only on two ocasions:

A) Calm seas near the coasts, and
B) Heaviest storms.

Hope all is clearer now :salute:

Jimbuna
11-30-10, 05:03 PM
I'm sorry if I have confused you! Posting in so many threads and crossing answers and questions tends to make the conversation sometimes difficult :oops: so I will sum up it:

1) It is realistic and OK to have fog with calm water near the coast (Real fog) AND to have it with the biggest storms (Improper fog, in fact just water ripped from the sea or rain by the wind).

2) The problem is that biggest storms tend to stick for a long period - that's the weather bug in SH3, not the fact that those heavy storms come with fog (Improper fog, but realistic as already explained)

3) We should also get "rough" weather (strong winds, medium waves) with cloudied skyes, may be rain, but NO fog. That is normal for the North Atlantic from october to may.

In a nutshell:

Fog is wellcomed only on two ocasions:

A) Calm seas near the coasts, and
B) Heaviest storms.

Hope all is clearer now :salute:

As clear as.......Fog :DL

No, but seriously I agree with Hitmans post as quoted :yep:

h.sie
11-30-10, 05:43 PM
@Hitman: I didn't misunderstand you, but in my opinion the focus has changed a little bit from

1) "fixing the weather bug" into
2) "advanced weather modelling".

So allow me to suggest the following:

Let Stiebler and me first finish our weather fixes and share them with some interested people for intensive testing.

In the meantime, during these long-time weather tests, I'll focus on some other important fixes for sh3 ("repairs affect detection probability", "external torpedo reload")

If weather tests work well, we made a big step forward.

And then let's see what other aspects of the sh3 weather model are still unrealistic and try to fix them.

This stepwise procedure prevents me from making errors, since it is better to focus on one topic at the time.

Greetings,
h.sie

Reece
12-01-10, 12:26 AM
Hope you can pull this one off h. sie, the best version I have tried so far is Rubini's, haven't tried Stiebler's.!:yep:

h.sie
12-01-10, 02:45 AM
@Reece: The weather bug can definitely be fixed. It is almost done! Stiebler and me tried different approaches to do that. both will work - but in a different way. and you can chose, which you like more.

Correction: After reading some older posts I came to the conclusion that what I call in the meantime "my idea" or "my approach" to fix the weather bug isn't really my idea. The initial idea came from others (Stiebler, Hitman). I only did some additions & changes and the programming.

Reece
12-01-10, 03:05 AM
Wow this really is good news, what I do at the moment is start a new patrol and save regularly when getting close to 4 days, when the weather goes bad I exit and reload, sometimes the weather just changes to choppy seas, that is ok but otherwise I reload it to a save just before the change!:oops: and you know how long SH3 takes to load!!!:damn: If the weather went bad for only a few days that would be great but sometimes it's way over a week!:doh:
Looking forward to it!:up:

Stiebler
12-01-10, 05:24 AM
H.sie has now checked my code for the weather fix on his XP/32-bit installation. (I have tested it with Win-7/64-bit, so it should work with Vista too, 32- and 64- bit). It appears to be stable on both our installations.

Therefore, anyone who wishes to try out for themselves this first weather fix should download the link here:
http://www.subsim.com/mods1/nygm/Stiebler_EnvSim.7z

(Unzip the file first, then install with JSGME).

This should be regarded as a 'proof of concept', not the finished code.
H.sie is working on a solution which will limit (with two counters) the extent of windspeed and fog, and I believe that this solution will probably be superior. Or maybe both solutions should be combined.

H.sie has also pointed out that my solution allows higher wind-speeds (up to 15 m/s) in sheltered waters, such as at Koenigsberg, where the devs tried to force low wind-speeds only (6 m/s). But that is not important for a 'proof of concept'.

*WE WANT FEEDBACK*
Is the code stable on everyone's computer? (as well as on mine and H.sie's). We are pretty certain that it is, but it helps to check with the wider user base.
Does it perform as expected? (Has it stopped persistent foggy-storms?) In checking this item, remember that my code relies on a drop in windspeed causing a slower removal of heavy rain and heavy fog. If the windspeed drops for one weather change, then returns to 15 m/s (as may occur randomly), then you will probably continue to see persistent heavy rain and fog. But I have seen no foggy-storms persist for longer than five days, and only twice for five days.

*HOW TO TEST*
Try these areas:
a) North Atlantic, general war patrol.
b) Cruising around the equator, where weather changes occur very frequently (so much higher chances of foggy storms).
c) In the Arctic, where slow weather changes and the nature of the weather intended by the devs means that you are likely to discover that the winds stick for long periods at 7 m/s.

Higher tc (time compression) results in a trend towards worse weather. So try testing at as high a tc as practical. However, if the tests are to have any real value, we also need some testers to play as though for a normal patrol, wherever they choose to go, and for any tc that they wish.

CREDIT TO H.SIE.
I have been only the technician to create this code. It was H.sie who identified the key section of code that needed fixing, and also was the first to discover the original bug in the windspeed code by the devs. It was H.sie who introduced me to the Ollydbug2 disassembler that I used to create this code, and it was H.sie who explained patiently by PM how best to use the disassembler (its documentation is lamentably poor.)

Stiebler.

Reece
12-01-10, 05:57 AM
Maybe off topic but has anyone figured a way to start patrols always in daylight? (I like to view the port on exit!):D

Stiebler
12-02-10, 06:22 AM
New discovery when testing modified envsim.act file:

At northern latitudes, the code changing the weather (specifically, the wind speed) is accessed only very infrequently.

Thus, in a long cruise from Bergen to Canada via the south of Iceland, it became apparent that the windspeed code was accessed only every 2-3 days. As a result, I had foggy storms (15 m/s) for six consecutive days, but the modified windspeed code ended the problem on only the second attempt!

Something to bear in mind, when testing weather patterns.

Stiebler.

Hitman
12-02-10, 09:33 AM
At northern latitudes, the code changing the weather (specifically, the wind speed) is accessed only very infrequently.

This seems to confirm the notes from the Devs we had, saying that the weather changes less frequently in the artic areas. What we didn't know yet is how it was done, and now we do: The code changing the wind is accessed less frequently. This seems also to indirectly confirm that wind leads most other changes, which is again logical because most storms I have seen in real life were preceded by a sudden increase in wind strength.

h.sie
12-02-10, 09:53 AM
Instead of an overall reducing of the weather change interval I could only make very long intervals shorter.

makman94
12-02-10, 10:04 AM
H.sie has now checked my code for the weather fix on his XP/32-bit installation. (I have tested it with Win-7/64-bit, so it should work with Vista too, 32- and 64- bit). It appears to be stable on both our installations.

Therefore, anyone who wishes to try out for themselves this first weather fix should download the link here:
http://www.subsim.com/mods1/nygm/Stiebler_EnvSim.7z

(Unzip the file first, then install with JSGME).

This should be regarded as a 'proof of concept', not the finished code.
H.sie is working on a solution which will limit (with two counters) the extent of windspeed and fog, and I believe that this solution will probably be superior. Or maybe both solutions should be combined.

H.sie has also pointed out that my solution allows higher wind-speeds (up to 15 m/s) in sheltered waters, such as at Koenigsberg, where the devs tried to force low wind-speeds only (6 m/s). But that is not important for a 'proof of concept'.

*WE WANT FEEDBACK*
Is the code stable on everyone's computer? (as well as on mine and H.sie's). We are pretty certain that it is, but it helps to check with the wider user base.
Does it perform as expected? (Has it stopped persistent foggy-storms?) In checking this item, remember that my code relies on a drop in windspeed causing a slower removal of heavy rain and heavy fog. If the windspeed drops for one weather change, then returns to 15 m/s (as may occur randomly), then you will probably continue to see persistent heavy rain and fog. But I have seen no foggy-storms persist for longer than five days, and only twice for five days.

*HOW TO TEST*
Try these areas:
a) North Atlantic, general war patrol.
b) Cruising around the equator, where weather changes occur very frequently (so much higher chances of foggy storms).
c) In the Arctic, where slow weather changes and the nature of the weather intended by the devs means that you are likely to discover that the winds stick for long periods at 7 m/s.

Higher tc (time compression) results in a trend towards worse weather. So try testing at as high a tc as practical. However, if the tests are to have any real value, we also need some testers to play as though for a normal patrol, wherever they choose to go, and for any tc that they wish.

CREDIT TO H.SIE.
I have been only the technician to create this code. It was H.sie who identified the key section of code that needed fixing, and also was the first to discover the original bug in the windspeed code by the devs. It was H.sie who introduced me to the Ollydbug2 disassembler that I used to create this code, and it was H.sie who explained patiently by PM how best to use the disassembler (its documentation is lamentably poor.)

Stiebler.

Thank you very much for your efforts Stiebler (and H.Sie of course) for this envsim.act :up:
start testings ASAP
does the testings must be only in campaign mode or it is not necessery ?

Stiebler
12-02-10, 10:40 AM
@Makman:

Mission weather is supposed to be different from campaign weather (when a mission is used, the weather paramenters set by the user are supposed to override everything else). Whether this is really true is doubtful - the weather always changes in mission mode too.

However, everyone plays in campaign mode, therefore that is much preferred for testing. If you test in mission mode, no one will know what the results mean.

Stiebler.

NGT
12-02-10, 11:15 AM
.....................................

Therefore, anyone who wishes to try out for themselves this first weather fix should download the link here:
http://www.subsim.com/mods1/nygm/Stiebler_EnvSim.7z

...........................................

*WE WANT FEEDBACK*


Stiebler.

Hello Stiebler, h.sie and other friends

There is the results from my test with Stiebler's first approach.

................................Test Protocol:...............................

PC with 4 GB RAM, (3.25 effective) with Windows XP 32 bits
Processor: Intel Core 2 Duo 6850 / 3.0 MHz
Graphics by ATI Randeon HD 5850

NYGM 3.4 with MEP 3.0 16 km environment and several additional ships

(MEP 3.0 16 km is standard environment for LSH3-v.5)

Patrol with full campaign filles, no empty campaign filles. Attack and sink some ships, for better game reality.

Flottila II, start at 1.4.1942 // patrol end at 3.5.1942 >>> 32 days

All test/patrol inside area AK, north Atlantic

Time compression 2048 at 95% of game time.

Weather check every 3 hours, average value.

U-boot IXC

................................................Th e Test.............................................. .....

Starting wheather: 5 m/s wind 1/4/1942.........23:30.......fog+precipitations none from Lorient FRANCE

1st change: 3.4.42 at 23:00......1 m/s.................fog+precipitations none
2 change: 5.4.42 at 21:30......9 m/s.................fog light+precipitations none
3 change: 7.4.42 at 15:30......15 m/s.................fog light+precipitations none
4 change: 9.4.42 at 10:50......12 m/s.................fog light+precipitations none
5 change: 11.4.42 at 05:40......15 m/s.................fog light+precipitations none

................................SAVE+EXIT......... ..................(must take children from school...:yawn: )

6 change: 13.4.42 at 01:50......10 m/s.................fog light+precipitations none
7 change: 14.4.42 at 20:00......7 m/s.................fog light+precipitations none
8 change: 16.4.42 at 11:30......13 m/s.................fog light+precipitations none
9 change: 18.4.42 at 05:00......9 m/s.................fog light+precipitations none
10 change: 19.4.42 at 16:00......1 m/s.................fog light+precipitations none
11 change: 21.4.42 at 04:20......9 m/s.................fog light+precipitations none
12 change: 22.4.42 at 16:20......6 m/s.................fog light+precipitations none
13 change: 24.4.42 at 04:50......0 m/s.................fog none+precipitations none {=8 days stick at 0 m/s}
14 change: 2.5.42 at 08:30......3 m/s.................fog light+precipitations none
........................GAME PAUSE FOR 20 REAL LIFE MINUTES.........................wind change after 3 game hours only:
15 change: 2.5.42 at 11:40......10 m/s.................fog light+precipitations none
16 change: 3.5.42 at 13:40......11 m/s.................fog heavy+precipitations heavy {=next change after only 1 hour}
17 change: 3.5.42 at 14:40......15 m/s.................fog heavy+precipitations heavy

END PATROL INSIDE AREA AK

..............................Test End.......................................


As we can see, the rain is not a common phenomenon on my computer.... Same for the fog.....

And the wind seems to be more often over 7 m/s.

The 20 minutes paused game do not affect weather counter, obviously, it continue counting.

The weather stick on 0 m/s now, instead of 15 m/s (but I like that :D ).


@Stiebler: I should continue with equator area, with the same protocol, or you would like I change something?

Thank you all for yours attention
(hope you understand basic English...)

Stiebler
12-02-10, 02:01 PM
Many thanks for the feedback, NGT. (Also, there is no problem with your English.)

The results around the equator are very much as we expect, however I suggest you check the weather only every 24 hours (it is less effort for you, and we are concerned to end only continuous bad weather.)

I think it will also be more fun for you if now you play a proper patrol in any sea area which you prefer.

But please keep posting the results!

Thanks again,
Stiebler.

h.sie
12-02-10, 05:05 PM
some questions for fine-adjusting the bad weather control:

1. how many weather periods with storm 15m/s are common/okay/normal?

2. how many weather periods with storm 15m/s should not be exceeded?

3. how many weather periods with fog are common/okay/normal?

4. how many weather periods with fog should not be exceeded?

Hitman
12-02-10, 05:08 PM
What I see in NGT's tests is lot os of light fog (mist or horizon haze) :hmmm: but seems that overall the tendency to have better weather is good :up:

NGT
12-02-10, 06:41 PM
This is the second test for ''Stiebler_EnvSim''.

As Stiebler suggest, I check only every 24 hours for this test.

That is good, because the weather was changing at least every 24 hours this time, so I have one report per day. (as supposed to be, according Stieblers statement in post 29)

For test protocol, see post 50 . Only change: the final patrol area is FG, around equator.

Test/Patrol start: 4.6.1942 Lorient FRANCE
Test/Patrol end: 3.7.1942 FG area equator, west Africa. Total=29 days.

4.6.1942.......02:10.........5 m/s Fog none+ Precipitations none
5.6.1942.......02:10.........5 m/s Fog light + Precipitations none
6.6.1942.......02:10.........5 m/s Fog light + Precipitations none
7.6.1942.......02:10.........15 m/s Fog heavy + Precipitations heavy (North to Madeira)
8.6.1942.......02:10.........1 m/s Fog light + Precipitations none (DH 54)
9.6.1942.......02:10.........7 m/s Fog medium + Precipitations none
10.6.1942.....02:10.........13 m/s Fog light + Precipitations none (DT 87)
11.6.1942.....02:10.........1 m/s Fog none + Precipitations none (EJ 49)
12.6.1942.....02:10.........12 m/s Fog light + Precipitations none (ES 35)
13.6.1942.....02:10.........7m/s Fog light + Precipitations none (ET 52)
14.6.1942.....02:10.........15 m/s Fog heavy + Precipitations heavy (EU 72)
15.6.1942.....02:10.........2 m/s Fog light + Precipitations none (EU 98)

...............................START PATROL INSIDE FG AREA (grid FG 11 - 06:00)..................

16.6.1942.....02:10.........7 m/s Fog light + Precipitations none
17.6.1942.....02:10.........0 m/s Fog none + Precipitations none
18.6.1942.....02:10.........6 m/s Fog light + Precipitations none
19.6.1942.....02:10.........10 m/s Fog light + Precipitations none
20.6.1942.....02:10.........9 m/s Fog heavy + Precipitations heavy
21.6.1942.....02:10.........7 m/s Fog light + Precipitations none
22.6.1942.....02:10.........8 m/s Fog light + Precipitations none
23.6.1942.....02:10.........11 m/s Fog light + Precipitations none
24.6.1942.....02:10.........15 m/s Fog light + Precipitations none
25.6.1942.....02:10.........15 m/s Fog heavy + Precipitations heavy
26.6.1942.....02:10.........2 m/s Fog light + Precipitations none
27.6.1942.....02:10.........0 m/s Fog none + Precipitations none
28.6.1942.....02:10.........2 m/s Fog none + Precipitations none
29.6.1942.....02:10.........7 m/s Fog medium + Precipitations none
30.6.1942.....02:10.........15 m/s Fog light + Precipitations none
1.7.1942.......02:10.........15 m/s Fog light + Precipitations none
2.7.1942.......02:10.........13 m/s Fog light + Precipitations none
3.7.1942.......02:10.........5 m/s Fog light + Precipitations none


Maximum number of consecutive days with 15 m/s: 2
Total number of days with 15 m/s: 6 from 29.

We can see in the beginning of the test/patrol, close to Lorient, the weather needs 2 days for changing, like in previous test inside AK area in North Atlantic. But from Madeira already it changes every 1 day only.

I hope all that was a little bit useful for the moders....:-?

Thank you for your attention

Stiebler
12-03-10, 05:08 AM
That is an excellent report, NGT, thanks again.

Could I suggest that you (or someone else) now try a patrol from France towards the most northern patrol grids of squares AL or in grid AE south of Iceland? I think you will encounter more persistent bad weather in these areas.

@H.sie:
It seems now certain that the devs altered the time interval for changing the wind speed, according to sea area (probably according to latitude).

If we agree that this principle is correct, that winds and fog should change less often in the north or south, and more often near the equator, then my opinion about duration of wind speed changes is this:

The wind speed should not stick at 15 m/s for more than six consecutive days anywhere. Therefore, since the weather may be checked in some areas only every 2-3 days, it is necessary that the windspeed be reset to (say) 6 m/s after every 3rd call to the windspeed code, if windspeed equals 15 m/s (or perhaps >12 m/s). I have come to the conclusion with recent tests that a random reset of the wind is not good enough, because the random wind may still be > 12 m/s, causing the fog and rain to persist. However, we could introduce a random wind in the new range of 0-6 m/s.

A better solution, perhaps, is to limit the fog to a maximum of 4 days; that is, to cancel the fog after every second call to the fog-creating code. In that case, it will still be necessary to limit the wind, since persistent high winds will cause the fog to return quickly.

Does anyone else have any alternative/better ideas?

Stiebler.

Lanzfeld
12-03-10, 08:08 AM
Wow,

I have been gone for a long time. After the epic fail of SH5 it is nice to see someone fixing up the classic! Keep up the great work guys! Maybe after you get it all tweaked (weather & your other fixes) you can blend it with GWX to make the ultimate mod?

GREAT WORK!:rock:

h.sie
12-03-10, 08:54 AM
Hello Stiebler,

until now I was not successful to find variables or code to affect fog.

But I think it'a a good way to force better weather by allowing only negative random numbers, say, from -0.5 to -1.0. This automatically reduces wind to < 7m/s and in most cases (but not in 100%), fog disappears. So there remains a very small statistical chance of persistent fog, but I never had such a situation during my tests.

I also try to limit the weather period to 1 (maybe 2) days. Maybe by making all periods shorter by a factor of 1,5 or only shorten the very long periods, so that I can allow more than 3 fog periods. It will be a randomly chosen, variable value between 3 and 5 or 6 periods.

In which areas do the longest periods occur?

h.sie

Hitman
12-03-10, 09:28 AM
I think it'a a good way to force better weather by allowing only negative random numbers, say, from -0.5 to -1.0

That's something Stiebler and I tried some time ago but with the scene.dat file, i.e. giving the wind negative values in the changespeed. Apparently when Stiebler tested it, the game crashes, but the concept was good and I'm happy to see it confirmed now :up:

So there remains a very small statistical chance of persistent fog, but I never had such a situation during my tests.

Since Stiebler says that there is a counter for fog also, I would beg to manipulate it and ensure that fog is a really rare occurence. In the reports from NGT you see that 80% of the days there was light fog, i.e. horizon mist that reduces you visibility (depending on the environment mod used) to 75% of the normal maximum visibility distance (20k, 16k or 8k, depending on the mod used). This is a terrible thing in SH3, considering that you are already limited in what you can see (In real life up to 50km you can see smoke columns over the horizon) and hence have less chances of spotting convoys & other targets (You also work alone, as there no wolfpacks).

I should also not that fog can be absolutely disabled with a simple tweak on the scene.dat, but of course keeping it in the game albeit with a lower chance to appear will always be better.

Keep the good job :yeah:

Stiebler
12-03-10, 10:25 AM
I believed that I was quoting H.sie when saying above that there would be a fog counter. But evidently it is harder to find the fog variable than we supposed.

H.sie has delivered to me a variant of envsim.act in which data can be written to the file, as well as the standard read/execute of a code file.

I have made the change to my existing envsim.act file and modified it to allow a windspeed counter which forces a return to 6 m/s if high winds persist despite the existing subtraction code. Testing it now. It works all right with the Ollydbg2 disassembler attached.

Stiebler.

h.sie
12-03-10, 10:30 AM
Hitman,

your post gave me a new idea:

1) Search where in memory "fog_change_speed" from scene.dat is stored.

2) Using a little fix that forces "fog_change_speed=0" (or extremely low value, if 0 is impossible) in that variable for most of the times, so with a little luck fog isn't able to occur.

With a little luck we can directly control fog this way.
I'll test that idea this evening!

Hitman
12-03-10, 10:58 AM
Alternatively I could fix things in the very same scene.dat by setting following values:

No fog= 100% visible distance
Light fog=100% visible distance
Medium fog= 50% visible distance
Heavy fog=25% visible distance

This would solve from our perspective the game tendency to produce light fog, but would screw the IWO reports about weather, as he would say light fog when you actually can see at top distance. May be I could also fix that in the text file, changing the wording for the IWO report on light fog (visibility).

But of course the better option would be to have properly working fog in the game :)

NGT
12-03-10, 11:27 AM
That is an excellent report, NGT, thanks again.

Could I suggest that you (or someone else) now try a patrol from France towards the most northern patrol grids of squares AL or in grid AE south of Iceland? I think you will encounter more persistent bad weather in these areas.

@H.sie:
It seems now certain that the devs altered the time interval for changing the wind speed, according to sea area (probably according to latitude).

If we agree that this principle is correct, that winds and fog should change less often in the north or south, and more often near the equator, then my opinion about duration of wind speed changes is this:

The wind speed should not stick at 15 m/s for more than six consecutive days anywhere. Therefore, since the weather may be checked in some areas only every 2-3 days, it is necessary that the windspeed be reset to (say) 6 m/s after every 3rd call to the windspeed code, if windspeed equals 15 m/s (or perhaps >12 m/s). I have come to the conclusion with recent tests that a random reset of the wind is not good enough, because the random wind may still be > 12 m/s, causing the fog and rain to persist. However, we could introduce a random wind in the new range of 0-6 m/s.

A better solution, perhaps, is to limit the fog to a maximum of 4 days; that is, to cancel the fog after every second call to the fog-creating code. In that case, it will still be necessary to limit the wind, since persistent high winds will cause the fog to return quickly.

Does anyone else have any alternative/better ideas?

Stiebler.

@Stiebler I will go for the Arctic asap.

I would like to say my humble opinion about all that:

In the second test I had hat a maximum of 2 consecutive days with 15 m/s.

However, the total days with 15 m/s were 6 from 29 patrol days.

This means almost 21 % of the patrol with 15 m/s. Plus 3 days with 12 m/s or more.

But in my first test, North Atlantic area, only 5 days from 32 with 15 m/s. There, the weather change every 2 days, and not every 1 day like in equator.

This means ''only'' 15.6 % of the patrol with 15 m/s.

Because, the oftener the weather change, the more often the bad weather come again.

So, the problem is not to change often the weather, but to change quicker if bad weahter occur (> 11 m/s).

My reflection is to leave the change speed as it is, but force a quick change if bad conditions occur.

Thank you very much.

Stiebler
12-03-10, 02:13 PM
@NGT,

Thanks for the report again.

@H.sie:
I have identified in the windspeed code that persistent negative values created by the random number generator often cause negative windspeeds, which are subsequently set by the devs' code to a minimum limit (normally 0.44999).

This appears in the game as persistent values of 0 m/s. The result has nothing to do with my coding, it is the very odd way in which the program code handles negative random values. Possibly this was originally intentional, to give longer spells of quiet weather before the rise to 15 m/s starts all over again.

Stiebler.

Hitman
12-03-10, 02:23 PM
@Stiebler I will go for the Arctic asap.

I would like to say my humble opinion about all that:

In the second test I had hat a maximum of 2 consecutive days with 15 m/s.

However, the total days with 15 m/s were 6 from 29 patrol days.

This means almost 21 % of the patrol with 15 m/s. Plus 3 days with 12 m/s or more.

But in my first test, North Atlantic area, only 5 days from 32 with 15 m/s. There, the weather change every 2 days, and not every 1 day like in equator.

This means ''only'' 15.6 % of the patrol with 15 m/s.

Because, the oftener the weather change, the more often the bad weather come again.

So, the problem is not to change often the weather, but to change quicker if bad weahter occur (> 11 m/s).

My reflection is to leave the change speed as it is, but force a quick change if bad conditions occur.

Thank you very much.Another thing we might have forgotten about, is that IIRC the Devs said that the weather will not only change more frequently near the equator vs. near the poles, but ALSO change more frequently in summer vs. winter. :hmmm:

We should conduct therefore tests in extreme weather conditions, i.e. a test row in the winter (January) and another in the summer (August) in the same area before drawing conclusions :damn:

h.sie
12-03-10, 03:08 PM
My idea (inspired from Hitman) works in the debugger. I found the location where FogChangeSpeed is stored. By setting this value to 0 no fog can arise. So it's possible now (in principle) to directly affect fog - without using the indirect way by changing windspeed. So one could reduce fog occurence arbitrarily (using random numbers or counters).

Hitman
12-04-10, 02:58 AM
My idea (inspired from Hitman) works in the debugger. I found the location where FogChangeSpeed is stored. By setting this value to 0 no fog can arise. So it's possible now (in principle) to directly affect fog - without using the indirect way by changing windspeed. So one could reduce fog occurence arbitrarily (using random numbers or counters).

:yeah:

As you already rightfully stated, the first thing to do is just to fix the weather, i.e. prevent it from sticking in persistent 15 m/s winds. While actually making an improved weather mod is a second stage, that might come or not at a different time in the future.

But if you find the variables for fog, rain, wind, cloudy skies, etc while you do the first stage fix, then we will already have the foundation of a future weather mod. An added algorythm could relate the wind, rain, fog and cloudy skies, and provide a more realistic climate :up:

h.sie
12-04-10, 05:33 AM
@Stiebler:

Maybe of interest:

EnvSim.act+DD9F:
In this code area windspeed (float) is calculated (you already know!)

EnvSim.act+DE18:
In this code area winddirection (float) is calculated

EnvSim.act+DEA0:
In this code area clouds (Integer) are calculated

EnvSim.act+DF65:
In this code area rain (float) is calculated

EnvSim.act+DFF5:
In this code area visibility (Integer) is calculated from the weather above.

h.sie

Stiebler
12-04-10, 05:46 AM
@H.sie,

Acknowledged, many thanks. Useful discoveries!

Stiebler.

h.sie
12-04-10, 06:12 AM
Yeah, most important discovery: I think i found the key section of the weather code to affect/prevent fog in an easy way:

EnvSim.act+DEA0 .... to ..... EnvSim.act+DEBC:

If I add a little patch and continuously force
clouds = 0 (clear sky) or
clouds = 1 (partial cloudy)
I never got rain and fog so far.

If I force
clouds = 2 (cloud Overcast)
I get a random mix of bad weather with rain, fog and so on on.

So after one or two fog periods one could easily force clouds=0 (or 1) in order to end fog.

That's it. Weather bug fixed in principle. Now I can start to program.

This is also suited to make average weather and visibility better.

Additionally and (halfway) independently from that, one can restrict periods of storm to a certain maximum time.

h.sie

NGT
12-04-10, 07:34 AM
.................................................. .............................................

Additionally and (halfway) independently from that, one can restrict periods of storm to a certain maximum time.

h.sie

Thank you very much, for all efforts ! :yeah:

Did you think that can be possible to have a EnvSim.act with just the above mentioned fix?

Nothing more than ''restrict periods of storma to certain maximum time'', lets say...... 18 hours ?

Yes? No? Maybe?

(I don't want dictate how you must work, just I express my reflections. Thank you for everything until now...)

__________________________________________________

@Stiebler: I was up to Arctic cycle with your EnvSim.act.

Test interrupted by CDT. Until there, mid July, I had hat weather change every day patrolling the very last grids. For these reason I left the northern grid AF 29 for the out of grid area, sealing for Murmansk and Archangelsk.

The bad news is that the weather change irregularly, from 1 to 3 days, and was stick with 15 m/s for 5 days. After that, one day 7 m/s and again 15 m/s. One day after, CDT.

h.sie
12-04-10, 07:47 AM
@NGT,

it is surely possible to only restrict storm, since my fix will consist of two separate controlling mechanisms:

1) counts storm periods and restricts storm if necessary

2) counts fog periods and restricts fog if necessary

so in your opinion fog isn't the main problem?

Lanzfeld
12-04-10, 07:53 AM
I forget...
A question about visibility since we are on the subject. Does visibilty change in 1 meter steps or does it go instantly from say 5000 meters to 500 in a snap? Can we have (for example) 2464 meters visibility?

NGT
12-04-10, 08:47 AM
@NGT,

it is surely possible to only restrict storm, since my fix will consist of two separate controlling mechanisms:

1) counts storm periods and restricts storm if necessary

2) counts fog periods and restricts fog if necessary

so in your opinion fog isn't the main problem?

Thank you asking my humble opinion.

I can say that with "modern" environmental mods the visibility go up to 20 km.

This is a common knowledge than we can see them far before they will see us.

Actually, we can see farther than the (U-boot) radars.

With 16km mods or 20km mods I never had problem of visibility.

Because fog, is a visibility problem.

BUT, I speak about MY computer. You can see in my test above, I have rarely heavy fog. In the other hand, if you can "count fog periods and restricts fog if necessary" why not to do it?

Thanks

Stiebler
12-04-10, 10:34 AM
@NGT:

Thanks again for your weather results.

Try again in the Arctic. Can you repeat your CTD?

Stiebler.

Reece
12-04-10, 08:56 PM
This is coming along very well indeed!!:yep: I started testing a few days ago but RL commitments stopped me! Sorry guys!:oops:

Stiebler
12-05-10, 07:34 AM
@H.sie:

Well, well, well:
Just when I thought we had fixed the windspeed problem, it becomes evident that the devs added another 7.5 m/s to the calculated wind speed whenever the clouds are sufficiently overcast (see line envsim.act+DF68).

Then the extended windspeed is limited in the same old way to 15 m/s. And finally the result is stored again as windspeed. In short, heavy clouds are driving up the windspeed. My mistaken belief that high windspeeds drove up the cloud and fog was due to the fact that high windspeeds tended to stick with the extra 7.5 m/s added, and therefore were always associated with heavy clouds and fog.

That explains a lot.

The code here is very complex. I think I shall just kill the addition of 7.5 with NOPs. That will stop the strong winds properly. My existing combination of randomised windspeeds and a counter to stop repeated high windspeeds provides adequate control of windspeed.

I've now checked all other uses of windspeed [esi+3d4h] in envsim.act. It gets used several times, but is only stored once more as a fixed 6.0 m/s in line envsim.act+E529, if previously it exceeded 6.0 m/s. I don't know why. But it is certain that windspeed is being used to influence other weather variables.

It seems increasingly likely that a cloud limiter is going to be needed, as you suggested. I am testing many patrols now with my windspeed limiter and randomiser, and with presence of clouds now having zero impact on windspeed.

Stiebler.

Lanzfeld
12-05-10, 09:15 AM
I forget...
A question about visibility since we are on the subject. Does visibilty change in 1 meter steps or does it go instantly from say 5000 meters to 500 in a snap? Can we have (for example) 2464 meters visibility?

Not to be a pest while you guys are hard at work here, but I was really curious as to the "steps" visibility can take. Is the visibilty fixed to 100%, 50%, 10%, ect or is it in 1 meter resolution? Many thanks.

Hitman
12-05-10, 11:19 AM
Not to be a pest while you guys are hard at work here, but I was really curious as to the "steps" visibility can take. Is the visibilty fixed to 100%, 50%, 10%, ect or is it in 1 meter resolution? Many thanks.

While I have never been on the bridge in the precise moment that a fog change happened (From light to medium, or to heavy or vice-versa) the scene.dat parameters suggest that the change is sudden and abrupt, as there are no intermediates defined. I once witnessed a weather change as I was on the bridge, the sky went from normal white clouds to dark ones INSTANTLY, no transition at all ( I was maybe at 16x or 32x hunting a convoy from beyond the horizon, hence I was on the bridge). I suppose the fog followed the same pattern, but I did not check it at that moment. Theoretically, same as with waves, nothing stops us from defining in the scene.dat fog states that change progressively, f.e. in 1000 metres steps (In fact you change a % of the maximum visibility always), thus allowing a more progressive fog appearence/dissapearence.

Wonder however how it affect the IWO reports. He just can give you 4 different ones about visibility, so we might screw the system, hit a limitation due to the IWO reports that actually prevents us from having progressive fog, or simply have it working OK and the IWo only changing his report when fog reachres 75%, 50%, 25% of current visibility.... posibilities are endless.

But first of all we should determine with a 100% confidence if it really changes in abrupt steps. Which is not sure right now.

h.sie
12-05-10, 12:09 PM
@Stiebler: Thanks for that information, but fortunately "my" algorithm is not affected. I tried to stop fog by forcing clouds=1 and it works perfectly. Never had fog when clouds=1. Works much better than the indirect (and not always working) way by reducing windspeed, since fog and windspeed seem not to be coupled closely.

@Hitman, yesterday I discovered FogChangeSpeed=1 in scene.dat. Then I triggered a weather change and discovered an immediate change of fog. Setting FogChangeSpeed to lower values fixed that behaviour. I think that is a buggy setting in scene.dat that noone discoverd so far, because weather changes normally occur during high time compression. But I have to look into it in order to be 1000% sure.

Stiebler
12-05-10, 12:18 PM
@H.sie,

By removing the 7.5 m/s increase in windspeed when clouds are overcast, I have found that it is possible to get overcast clouds, medium or heavy rain, and heavy fog, for up to 5 days at a time in the North Sea, while windspeed remains at 0 m/s.

It is now completely clear that we must control the clouds first.
It remains to be seen whether this will control the windspeed as well.

Stiebler.

h.sie
12-05-10, 01:02 PM
My first version of the weather fix works perfectly.
Beta version will be released in the next days.

No endless storms. No endless fog! Slightly better average weather.

@ALL: What do you think: Is there a shortening of the weather period needed?

h.sie

SkyBaron
12-05-10, 01:25 PM
Not sure if this will add any more insights but here's another (short) patrol weather report -- not as comprehensive as NGT's. :)

Patrol Started on May 3, 1944 and ended on May 16, 1944 - 13 days.
11th flotilla - Type XXI

System: Windows XP SP3

I tried to ask for weather reports once or twice a day, no specific time.

Just in case it's relevant I've saved/reloaded this patrol twice and I've also used RealWeatherFix2.exe in the past.

Most of the time I was "cruising" at 1024x TC and whenever the map "slowed down"(when ships where nearby) I'd bring it back to 64x-128x TC

I didn't experience any CTD.


Rough route:

http://img255.imageshack.us/img255/4986/patrol.jpg


Weather reports:


[Log Entry 52]
Type=0
EntryText=Light clouds, no rain, excellent visibility (15km). Wind speed 4 m/s, direction 135.
Date=19440503
Time=453
Categ=1

[Log Entry 71]
Type=0
EntryText=No clouds, no rain, excellent visibility (15km). Wind speed 7 m/s, direction 24.
Date=19440503
Time=1216
Categ=1

[Log Entry 217]
Type=0
EntryText=No clouds, no rain, excellent visibility (15km). Wind speed 7 m/s, direction 333.
Date=19440504
Time=1113
Categ=1

[Log Entry 324]
Type=0
EntryText=No clouds, no rain, moderate visibility (9km). Wind speed 13 m/s, direction 271.
Date=19440505
Time=1805
Categ=1

[Log Entry 376]
Type=0
EntryText=No clouds, no rain, moderate visibility (9km). Wind speed 13 m/s, direction 271.
Date=19440506
Time=1123
Categ=1

[Log Entry 562]
Type=0
EntryText=Light clouds, no rain, excellent visibility (15km). Wind speed 12 m/s, direction 276.
Date=19440507
Time=238
Categ=1

[Log Entry 568]
Type=0
EntryText=Light clouds, no rain, excellent visibility (15km). Wind speed 10 m/s, direction 35.
Date=19440507
Time=557
Categ=1

[Log Entry 609]
Type=0
EntryText=Light clouds, no rain, excellent visibility (15km). Wind speed 10 m/s, direction 47.
Date=19440508
Time=604
Categ=1

[Log Entry 612]
Type=0
EntryText=Heavy clouds, heavy rain, zero visibility (1km). Wind speed 7 m/s, direction 106.
Date=19440508
Time=1813
Categ=1

[Log Entry 648]
Type=0
EntryText=Heavy clouds, heavy rain, zero visibility (1km). Wind speed 7 m/s, direction 106.
Date=19440509
Time=802
Categ=1

[Log Entry 664]
Type=0
EntryText=Heavy clouds, heavy rain, zero visibility (1km). Wind speed 15 m/s, direction 44.
Date=19440510
Time=801
Categ=1

[Log Entry 813]
Type=0
EntryText=Heavy clouds, light rain, zero visibility (1km). Wind speed 15 m/s, direction 354.
Date=19440511
Time=1223
Categ=1

[Log Entry 825]
Type=0
EntryText=Heavy clouds, light rain, zero visibility (1km). Wind speed 10 m/s, direction 34.
Date=19440512
Time=820
Categ=1

[Log Entry 828]
Type=0
EntryText=Heavy clouds, no rain, poor visibility (5km). Wind speed 7 m/s, direction 38.
Date=19440513
Time=600
Categ=1

[Log Entry 833]
Type=0
EntryText=Heavy clouds, no rain, poor visibility (5km). Wind speed 15 m/s, direction 228.
Date=19440514
Time=811
Categ=1

[Log Entry 848]
Type=0
EntryText=Heavy clouds, heavy rain, zero visibility (1km). Wind speed 15 m/s, direction 130.
Date=19440515
Time=1419
Categ=1

[Log Entry 849]
Type=0
EntryText=No clouds, no rain, excellent visibility (15km). Wind speed 9 m/s, direction 26.
Date=19440516
Time=216
Categ=1

Stiebler
12-05-10, 01:41 PM
Thanks for the report, NewCaptain, although it begins to appear that my original fix is now outdated.

The weather you reported is very similar to the types of weather that I obtained in trials.

Stiebler.

Reece
12-05-10, 07:12 PM
Where do you guys get your weather logs from?:hmmm:

SkyBaron
12-05-10, 08:27 PM
Thanks for the report, NewCaptain, although it begins to appear that my original fix is now outdated.

The weather you reported is very similar to the types of weather that I obtained in trials.

Stiebler.Yeah, I just have read your last posts :) oh well I'll be happy to test the next version whenever it's available.

Where do you guys get your weather logs from?:hmmm:Reece, after you save your patrol if you go to:

...My Documents\SH3\data\cfg\Careers\(whatever-name-you-have)\0 (1..2..3.. depending on the patrol's number)

you'll find a few files with extensions like

.sav
.rsf
.rmr...
.crp <-- that's where all your logged messages and dialogues are saved.

you can open it with notepad, it's just a plain text file. That's where I got the whether reports after finishing my patrol. hope that helps.

Reece
12-06-10, 02:26 AM
Thanks for that!:up:

Lanzfeld
12-06-10, 09:38 AM
Thank you for the information. t is just a shame that the visibility is "fixed" at certain levels. It becomes repetitive and predictable when you know that medium fog is 3000 meters all the time and heavy fog is 400 all the time for example. :zzz:

I guess this is something that might be too much to fix.:damn:

Stiebler
12-06-10, 10:07 AM
I can confirm H.sie's idea that setting the clouds factor to 0 in in envsim.act is very effective at controlling the persistence of fog.

I am currently testing a combination mod where both wind and clouds are controlled with parameters reset after every three consecutive changes of weather during which 'overcast' clouds and 15 m/s storms persist.

In long trials, this combination is completely effective at controlling 'foggy-storms'. They still persist - but never for more than four days except by very, very, unlucky statistical chance. Most foggy storms collapse within one weather change. The longest bad weather seen in a 3/4-month patrol with a IXD2 from Bordeaux to Penang was just one session of four days of fog, but winds reducing. The patrol went to the equator, back around the Azores, then to South Africa, then to the Antarctic, then to the northern Indian Ocean, and finally to Penang.

Stiebler.

h.sie
12-06-10, 10:35 AM
I will randomly set clouds to 0 or 1 in order to have more uncertainty. Clouds=1 is sufficient to stop fog

GT182
12-06-10, 11:40 AM
Please don't take this wrong guys. I agree on the length of severe storms being too long. But two things to remember, fog is not good but bad weather can be your friend. The enemy has a harder time finding you in bad weather, especially when you are running silent after an especially good convoy attack and it's stormy. In turn you also can have a hard time finding them. Clear weather and calm seas can and will get you sunk no matter how silent or deep you are. Just my 2cents from what I've seen in several campaigns I've run..... with and without weather mods.

h.sie
12-06-10, 11:51 AM
@GT182: Thanks for your posting. There seem to be 3 groups ouf people. Some like the current sh3 weather. Others don't like the sh3 weather, and some (like me) don't even know if they should like it or not.

Until now only the 1st group was pleased.

These mods from Stiebler and me are for the second group. The people from the first group don't have to use the mods.

So the advantage is diversity - more people have the chance to have a sim that fits their personal taste.

Victor Schutze
12-06-10, 01:14 PM
@GT182: Thanks for your posting. There seem to be 3 groups ouf people. Some like the current sh3 weather. Others don't like the sh3 weather, and some (like me) don't even know if they should like it or not.

Until now only the 1st group was pleased.

These mods from Stiebler and me are for the second group. The people from the first group don't have to use the mods.

So the advantage is diversity - more people have the chance to have a sim that fits their personal taste.

One option would be to make SH3 Commander to apply a weather mod at mission start. It could implement at random:

1) the standard weather settings defined the devs, so that you can have a long and awful rotten weather as in das boot.

2) any other weather mod made. If 5 or 6 weather mods exist, SH3 Commander would pick up 1 of out of a total of 6 or 7 weather patterns/mods. Furthermore, it could implement the probability to have one type of weather mod depending on the season and/or location.

I tried these weather mods. I found they change positively the u boot experience. :arrgh!:

So is this feasible with SH3 Commander?

Thank you to the modders for their effort to make SH3 a more enjoyable experience.:up:

h.sie
12-06-10, 04:07 PM
@Victor_S: Yes, that could work in principle. Why don't you try it out? The question is: Is it really necessary?

Greetings, h.sie

Reece
12-06-10, 07:31 PM
Please don't take this wrong guys. I agree on the length of severe storms being too long. But two things to remember, fog is not good but bad weather can be your friend. The enemy has a harder time finding you in bad weather, especially when you are running silent after an especially good convoy attack and it's stormy. In turn you also can have a hard time finding them. Clear weather and calm seas can and will get you sunk no matter how silent or deep you are. Just my 2cents from what I've seen in several campaigns I've run..... with and without weather mods.
I agree to a degree, what annoys me is when the weather changes to heavy rain and fog with poor visibility it seems to get stuck there for a week or more, during this time it is virtually impossible to sink anything, certainly the deck gun is out and trying to use the scope to see your target is out, if you get close enough to see the target you are then too close to fire a torpedo, it will just bounce off the hull! You can fire using the hydrophone but you can't identify the ship and is rather unrealistic!:doh: I actually set the maximum fog level down to be visible up to 600m this is a lot better but would much prefer the duration of storms to be halved, I've had a few that lasted around 2 weeks had a few days fine weather then back to storms!:damn: too much!:doh:

Volk2
12-07-10, 05:03 AM
I actually set the maximum fog level down to be visible up to 600m this is a lot better

How did you do this?

Reece
12-07-10, 07:50 AM
How did you do this?
Open Scene.dat with S3D, then in the left pane select the nodes:
Sky/EnvSim/ then select EnvSim, in the right pane select:
FogDistances [4] this opens to show the 4 fog states 0 to 3.
just do a comparison between the 4 to get an idea or to cheat just change state 3 to reflect 2, then you will have no heavy fog!, it has been a while since I have done work here so I don't recall the lines that actually change the viewable distance but if you study the data of the 4 states you should be able to work it out easy enough.:yep:
BTW, sensors/visability react accordingly, if you can see them they can see you, in other words it works fine!:up:
Hope this helps.

GT182
12-07-10, 12:29 PM
Reese, remember back when the first weather mods were coming out they did help quite a bit. But there were still times that severe weather lasted for days and up to a week. Some of this I believe was due to the time of year. The North Atlantic is a hell hole during the winter months. I can't remember all of went on seeing I took a hiatus from SHII just after the GWX 2.0 mod came out.

I do remember that even with the severe storms that if you were lucky enough, you could still come across a convoy. I was lucky enough a couple of times to do this and had good success on sinking quite a few merchants and a few warships. That severe weather was a very good friend and helped my U-boat slip away. And even return on one occasion to sink a few more, and still slip away.

Reece
12-07-10, 08:22 PM
Reese, remember back when the first weather mods were coming out they did help quite a bit. But there were still times that severe weather lasted for days and up to a week. Some of this I believe was due to the time of year. The North Atlantic is a hell hole during the winter months. I can't remember all of went on seeing I took a hiatus from SHII just after the GWX 2.0 mod came out.

I do remember that even with the severe storms that if you were lucky enough, you could still come across a convoy. I was lucky enough a couple of times to do this and had good success on sinking quite a few merchants and a few warships. That severe weather was a very good friend and helped my U-boat slip away. And even return on one occasion to sink a few more, and still slip away.Constantly diving and checking Hydrophone I could come across convoys and plot a course then intercept but with stock fog visibility during this storm period you would not be able to see the ships to identify, you wouldn't be able to see them sink unless you use the external camera, certainly as you say you can escape more easily! this is why I adjusted the fog distance so that I could "just" see them, it does make it a far better experience imo.:yep:
One of the biggest thrills I got was due to fog and poor visibility, I was heading for my patrol grid when a destroyer came out of the fog, my crew reacted and the DD opened fire, (scared the daylights out of me) what a panic to crash dive, repair damage, after a time of cat and mouse I made a decision to blow ballast timing it when he passed over to drop DC,s to break the surface a distance from the destroyer and disappear at full speed in the fog changing direction just after surfacing, it worked!!:oops::up:

Lanzfeld
12-07-10, 10:44 PM
Imagine tracking that convoy and intercepting it to find 250 meters visibilty :hmmm:. Too close to ID and shoot. Now imagine you stick with those contacts for 4 hours until visibility increases to 600 meters ;)! now you can start to attack! During attack visibility goes to 1000 meters and now you can see several ships :rock:! Hurry because vis may drop again! :arrgh!:

We need variable fog visibility like in AOD. Remember that visibility circle getting bigger and smaller in 1 meter resolution? The "fixed" fog levels are a real buzz kill. :dead:

Reece
12-08-10, 12:19 AM
Imagine tracking that convoy and intercepting it to find 250 meters visibilty :hmmm:. Too close to ID and shoot. Now imagine you stick with those contacts for 4 hours until visibility increases to 600 meters ;)! now you can start to attack! During attack visibility goes to 1000 meters and now you can see several ships :rock:! Hurry because vis may drop again! :arrgh!:

We need variable fog visibility like in AOD. Remember that visibility circle getting bigger and smaller in 1 meter resolution? The "fixed" fog levels are a real buzz kill. :dead:That is rare! more likely to catch a convoy and fog too thick so you stick with them just out of range till conditions improve, 2 days later no change, 4 days later no change, give up in disgust!!:doh:

h.sie
12-08-10, 01:53 AM
@Lanzfeld: Weather does not change often and the change itself is relatively quick, so the chance that weather changes while you do an attack is very low. I fear I cannot program continuous visibility instead of these 4 visibility steps.

@ALL: I hope I could fix (workaround) another weather bug of lower priority: Until now the weather counter is reset to 0 everytime you start a game or reload a savegame, because the weather counter is not stored in the savegame. This means you always have to wait a full weather time interval (20-40 hours) to see the first weather change. In my fix I'll initialize the counter with a randomly chosen value between 0 and 95% of the full weather time interval, so that there is a good chance to sometimes see a weather change short time after (re)loading a game. So weather behaves more random, not determined

First beta version hopefully this weekend.

Magic1111
12-08-10, 03:57 AM
@ALL: I hope I could fix (workaround) another weather bug of lower priority: Until now the weather counter is reset to 0 everytime you start a game or reload a savegame, because the weather counter is not stored in the savegame. This means you always have to wait a full weather time interval (20-40 hours) to see the first weather change. In my fix I'll initialize the counter with a randomly chosen value between 0 and 95% of the full weather time interval, so that there is a good chance to sometimes see a weather change short time after (re)loading a game. So weather behaves more random, not determined

First beta version hopefully this weekend.

Very good news, h.sie !!! :up::up::up:

I´m looking forward to the beta....:yeah:

Best regards,
Magic:salute:

Hitman
12-08-10, 04:05 AM
We need variable fog visibility like in AOD. Remember that visibility circle getting bigger and smaller in 1 meter resolution? The "fixed" fog levels are a real buzz kill. :dead:

There is a slight hope that it could be made possible by modding the scene.dat and adding many more fog states. But I don't have much time for testing that, so you need to be patient.

Reece
12-08-10, 04:16 AM
@ALL: I hope I could fix (workaround) another weather bug of lower priority: Until now the weather counter is reset to 0 everytime you start a game or reload a savegame, because the weather counter is not stored in the savegame. This means you always have to wait a full weather time interval (20-40 hours) to see the first weather change. In my fix I'll initialize the counter with a randomly chosen value between 0 and 95% of the full weather time interval, so that there is a good chance to sometimes see a weather change short time after (re)loading a game. So weather behaves more random, not determined.As Magic1111 said very good news!:rock:

h.sie
12-08-10, 04:27 AM
@Hitman, Stiebler: In SH3.exe there are 4 possible states for visibility, coded in integer format (numbers 0 to 3). That can be found at [ESI+2bc] (assuming the right pointer context). So internally, sh3 doesn't handle visibility continuously but in discrete steps. I think these 4 states are mapped to the 4 states in scene.dat. Changing this into continuous behaviour means to re-write the most irritating part of the weather algorithm I didn't understand until now. And one would have to consider all the side-effects this deep change could have.

But there is a little chance left: Currently the visibility changes very fast between two of these states because of FogChangeInterval=1 in scene.dat. I'll test the effect of setting this value to 0,001 instead, that means: very slow change of fog. With a little luck visibility during this change also changes continuously and not abrupt.

Reece
12-08-10, 05:18 AM
I'll test the effect of setting this value to 0,001 instead, that means: very slow change of fog. With a little luck visibility during this change also changes continuously and not abrupt.Since there is still only the 4 states I would imagine that this value would still change abruptly from one state to another but over a longer period.:hmmm:

h.sie
12-08-10, 05:29 AM
@Reece: How can an abrupt change last for a longer period. this is a antilogy.

EDIT: Now I know what you mean. Fog changes slowly, but sensors still are only affected by the discrete visibility variables/states (0,1,2,3).

With a little luck sensors are not directly affected by the discrete visibility variable (0,1,2,3) but much more by the current amount of fog, which hopefully changes slowly when we set FogChangeSpeed to , say, 0.0001 or similar.
We'll see, but I'm pessimistic.

Hitman
12-08-10, 01:45 PM
I agree with Reece, probably the fogchange speed is just the timer for the fog change to trigger, not the speed of the transformation of one fog state into another. But worth and easy trying ...

h.sie
12-08-10, 04:34 PM
@Hitman. My tests (manually triggering some weather changes) have shown that "something" (fog, visibility?) transists very fast (immediately) when FogChangeSpeed = 1. Looks ugly, as if someone swichtes on/off the light. Reducing that value to 0.01 makes this transition much more slow - realistic. Looks better, but I don't know if sensors are affected accordingly or if that is only an optical effect.

One can see it very good in the navigation lesson. In one moment you can see the trees at the coast, but when fog comes, the trees are invisible immediately.

Lanzfeld
12-09-10, 02:03 AM
I applaud you all for your work.

Can you imagine SH-3 with AOD weather? Dream that shouldnt be a dream with modern tech. I want 1213 meters visibility!!!!:rock:

h.sie
12-09-10, 02:59 AM
@Lanzfeld: Thanks. Currently I'm working on a V1 version of my weather fix, which will be released this weekend, if all tests are fine.

After that, I'll look into this FogChangeSpeed issue. For this, I try to program a special EnvSim.act with MUCH shorter weather change intervals -OR EVEN BETTER- which allows to manually trigger a weather change (e.g. by ordering Silent-Running or similar:)) so that one can examine the weather transitions in detail. Then we can test, if the slow fog transitions are an optical effect only or if sensors are also affected according to the current visibility. If so, we can have 1317,3m visible range during a transition, but I'm pessimistic. Looking at the code, I came to the conclusion that the devs often tried to make things as simple as possible - comprehensible for me, since sh3 is nothing more than a game for a niche market.

I think noone yet saw these ugly fog transitions, because a weather change is very, very short in time compared to the time of constant weather, what means, that almost all waether transitions occur during high TC.

Changing FogChangeSpeed from 1.0 to 0.01 looks much better, but we have to test, if that has side-effects. I guess the devs had an important reason to set it to 1, maybe in order to hide something ugly. Best example for this procedure: There IS code in sh3.exe for longer repair times - but deactivated! The according realism option is simply ignored. I activated that code section. Result: the damage screen (F5) was shredded. So I guess this was the reason the devs choose the easy way by simply deactivating the longer repair times code section. They should have asked me.....because, as one can see, it was not hard to program longer repair times without shredding the damage screen.

h.sie
12-10-10, 04:40 PM
Bad Weather Fix V1 BETA - h.sie Edition
---------------------------------------

Background
----------

Although I've never seen it myself, some people reported about a serious bug in sh3:
the weather sometimes sticks at high windspeeds with 15m/s, fog and no visibility.

This mod tries to eliminate this bug, or at least, reduce it's impact on gameplay.


What does this mod do?
----------------------

Mainly nothing.

It does not change the sh3 weather algorithm at all
and will only be active, when strom- or fog periods are too long.

It consists of 2 independent counters:

1) a STORM_COUNTER that counts the number of weather periods with storm.
2) a FOG_COUNTER that counts the number of weather periods with fog.


If STORM_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix forces a reduction of the windspeed to a randomly chosen lower value.

If FOG_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix reduces clouds and thus fog.


Maximum values
--------------

The maximum value for STORM_COUNTER is randomly chosen between 1 and 5 weather periods.

The maximum value for FOG_COUNTER is randomly chosen between
1 weather period (chance: 50%),
2 weather periods (chance: 33%) and
3 weather periods (chance: 17%).

I also programmed a little chance that this controlling mechanism is bypassed
in order to keep some uncertainty, so that a very little chance remains
for storm- and fog periods longer than the maximum values, but that's improbably.


EXTRA
-----

This fix also fixes a bug, that the weather time counter is not saved in a savegame,
so that the counter always starts at 0 every time you load a mission or savegame.
That means, that the first weather change always occurs exactly after a full
weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the
weather period, so that a weather change shortly after loading a mission is possible.


Compatibility
-------------
- Should work with every sh3.exe.
- Tested with WinXP/32Bit and Win7/64Bit.


Credits
-------
To all who helped, but especially to Stiebler and Hitman
for detailed information, which made this fix possible.


h.sie

Hitman
12-11-10, 02:25 AM
Excellent, going to try it ASAP :yeah:

But you didn't post any direct link, so I went to your mediafire page and browsed to find it. ;)

Direct link for all youguys to find it faster: http://www.mediafire.com/?in6769292omc2on

Stiebler
12-11-10, 04:27 AM
I have got it also, and I shall test it asap too.

Stiebler.

rik007
12-11-10, 05:13 AM
Excellent! This mod is more valuable to me thanthe whole SH5 Science fiction. What a breakthrough. h.sie keep up the pace.

coronas
12-11-10, 07:57 AM
Excellent!
Great work!:yeah:
:salute:

Hitman
12-11-10, 08:13 AM
I have also changed the thread's name to REL-BETA with indication to look for post #112. H.sie, If you want me to name the thread otherwise let me know :up:

Magic1111
12-11-10, 08:29 AM
Bad Weather Fix V1 BETA - h.sie Edition
---------------------------------------

Background
----------

Although I've never seen it myself, some people reported about a serious bug in sh3:
the weather sometimes sticks at high windspeeds with 15m/s, fog and no visibility.

This mod tries to eliminate this bug, or at least, reduce it's impact on gameplay.


What does this mod do?
----------------------

Mainly nothing.

It does not change the sh3 weather algorithm at all
and will only be active, when strom- or fog periods are too long.

It consists of 2 independent counters:

1) a STORM_COUNTER that counts the number of weather periods with storm.
2) a FOG_COUNTER that counts the number of weather periods with fog.


If STORM_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix forces a reduction of the windspeed to a randomly chosen lower value.

If FOG_COUNTER reaches a certain randomly chosen maximum value (see below),
the fix reduces clouds and thus fog.


Maximum values
--------------

The maximum value for STORM_COUNTER is randomly chosen between 1 and 5 weather periods.

The maximum value for FOG_COUNTER is randomly chosen between
1 weather period (chance: 50%),
2 weather periods (chance: 33%) and
3 weather periods (chance: 17%).

I also programmed a little chance that this controlling mechanism is bypassed
in order to keep some uncertainty, so that a very little chance remains
for storm- and fog periods longer than the maximum values, but that's improbably.


EXTRA
-----

This fix also fixes a bug, that the weather time counter is not saved in a savegame,
so that the counter always starts at 0 every time you load a mission or savegame.
That means, that the first weather change always occurs exactly after a full
weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the
weather period, so that a weather change shortly after loading a mission is possible.


Compatibility
-------------
- Should work with every sh3.exe.
- Tested with WinXP/32Bit and Win7/64Bit.


Credits
-------
To all who helped, but especially to Stiebler and Hitman
for detailed information, which made this fix possible.


h.sie

Wonderful, many thanks h.sie !!! :yeah:

Best regards,
Magic:salute:

Corsair
12-11-10, 06:54 PM
Great job guys! I suppose it is better to apply it when in port, so I will give it a try both in NYGM 3.4 and Living SH3 V5.1 as soon as my patrols are finished, and will report later how it works.

Reece
12-11-10, 07:07 PM
Thanks to those involved!:yeah:

Corsair
12-11-10, 09:45 PM
I get a readme file in a Doc folder, which is what is written in post 112, and a file named EnvSim.act.
What do I do with this file ? (sorry if question looks stupid to you who are familiar with SH3 coding, but it's late here...:cry:)

h.sie
12-12-10, 04:37 AM
it's a JSGME ready mod.

MCHALO12
12-12-10, 09:26 AM
Hello h.sie,

I have been searching the right value to shorten weather intervalls for many hours now, without any success. As I am playing much of the game in real time, 4 days are a very long time to wait for a weather change. Your mod does partly solve this problems as it prevents the counter to be set to zero when the game is loaded.

Nevertheless is want to shorten weather intervalls even more. I first thought it could be the values in the three campaign.mis - files, but they do not seem to have any effect. Could you please please tell me which value I have to change in order to shorten weather intervalls?!

Best regards, MCHALO12.

h.sie
12-12-10, 11:09 AM
Hi MCHALO,

I don't know if there is a way to shorten weather intervals by changing some parameters in .mis or .cfg files. I made a weather fix that does nothing more than shortening the weather intervals by a factor of 3 by changing the weather code. Look at my mediafire page, folder "Bad weather fix" and try "Yoriyn Edition". Maybe that's the right one for you.

h.sie

MCHALO12
12-12-10, 11:25 AM
Thank you h.sie, I will try this fix. Can you tell me if it is compatible with the Beta of your "bad weather fix for SH3", will especially the problem with the counter still be fixed?

Thanks for your help!

Best regards, MCHALO12.

h.sie
12-12-10, 01:58 PM
@MCHALO: No these 2 mods are not compatible. Either use one or the other.

h.sie
12-12-10, 01:59 PM
Release: Weather Transitions Test Fix

This is a EnvSim.act weather fix ONLY for watching the weather transitions
in order to eventually adjust some parameters in scene.dat like
e.g. FogChangeSpeed.


What does this mod do?
----------------------

It triggers a weather change from "good weather" to "bad weather"
and back to "good weather" and so on exact EVERY 30 minutes.


Compatibility
-------------
- Should work with every sh3.exe.
- Tested with WinXP/32Bit + Win7/64Bit.

h.sie

MCHALO12
12-12-10, 02:39 PM
Hi h.sie,

could you describe how you generate these fixes? I thought me to have a rough idea of modding Silent Hunter, but I simply have no clue how your work is done...

Best regards, MCHALO12.

h.sie
12-12-10, 03:53 PM
@MACHALO: I directly change the Hex code. That's a little bit more flexible than just changing .cfg files or similar, but also a little bit more complex.

Corsair
12-12-10, 06:18 PM
it's a JSGME ready mod.
OK I'm really stupid or it was really late. I just need to create a "data" subfolder then... will give it a go as soon as back to W'haven.:DL

Edit : I'm really stupid, just found the file was in the root files of SH3. I should go to sleep earlier...

Jimbuna
12-12-10, 07:52 PM
OK I'm really stupid or it was really late. I just need to create a "data" subfolder then... will give it a go as soon as back to W'haven.:DL

Edit : I'm really stupid, just found the file was in the root files of SH3. I should go to sleep earlier...

Take more water with it :03:

Reece
12-12-10, 10:31 PM
Take more water with it :03:
Don't be silly Jim!:nope:

h.sie
12-13-10, 01:45 AM
@Corsair: Nono. No data folder. Put Mod into MODS folder and activate it. Done. EnvSim.act is not located in the data folder!

Stiebler
12-13-10, 03:39 AM
I have now completed three full patrols with this, two to the Freetown area, one to the east coast of the USA, all in 1943-44. These were proper patrols to continue a complete campaign (see below).

This fix appears to work perfectly with NYGM. It functions by controlling the clouds and fog parameters with counters.

It has been interesting to compare this fix with the weather fix that I made which controls the windspeed, and which I have been using for a long campaign with NYGM (1939-1943). The windspeed fix controls the buggy wind force with subtraction of 15 m/s when the wind is too high, and with a counter if winds of 15 m/s or more are encountered too often.

H.sie's cloud/fog fix is very effective at controlling these parameters, but not the wind, except indirectly. The windspeed fix controls the wind, but not the clouds and fog (except indirectly). The result is that the weather is more varied with the windspeed fix, but there are fewer 'foggy-storms' with the clouds fix.

There was just one continuous period of eight days of 'foggy-storm' off the USA in my patrols with the H.sie fix (two days with 15 m/s winds, medium visibility; six days with 15 m/s winds, heavy rain, heavy fog). However, this added useful variety, and it never recurred during my three long test patrols.

In case anyone wants to compare the windspeed fix with H.sie's clouds fix, I have updated the link for the winds fix here:
http://www.subsim.com/mods1/nygm/Stiebler_EnvSim.7z

However, my own preference is for H.sie's mod!

[To anticipate the obvious suggestion:
H.sie and I both agreed that the combination of a windspeed and clouds fix created far too much good weather.]

Stiebler.

h.sie
12-13-10, 04:01 AM
@Stiebler: Glad to read that it seems to work for you. But: There IS also a controlling mechanism for windspeed. but since the main problem is fog/visibility, and since fog is controlled by its own, rigorous controlling mechanism, I decided to program the controlling mechanism for windspeed to be soft. this could lead to longer periods with storm (1-6 periods). But fog is controlled, as I said, rigorously, so that the probability of fog to last longer than 3 periods is very small. I could eliminate the little chance for longer fog periods, but then weather will be very predictable: Then, after 2 or 3 fog periods you would definitely know that fog will disappear in the next period. I don't like this, so I left the little chance for longer bad weather, but the chance is much smaller now compared to sh3 without this fix.


By the way: I must disappoint those (e.g. Hitman) who wanted me to program an enhanced weather modelling. Even this "simple" fix consists of about 70 lines of assembler and I fear to lose overview when I make deeper changes.

Reece
12-13-10, 04:36 AM
There was just one continuous period of eight days of 'foggy-storm' off the USA in my patrols with the H.sie fix (two days with 15 m/s winds, medium visibility; six days with 15 m/s winds, heavy rain, heavy fog).Bummer!!:cry:

h.sie
12-13-10, 04:41 AM
65 downloads in 2 days. I would be glad to see more test reports.

h.sie
12-13-10, 05:04 AM
@Stiebler: Your 6-days-period of storm made me sad. I never had that during my tests. So I'll have to look into the weather code again but I think I already know the reason:

I remember a scrambler (related to the counter at 0xDD02BC) that causes a bypass of the whole or at least some parts of the weather algorithm in 1 of 3 cases. and obviously, my fixes are also bypassed in 1 of 3 cases what makes them less effective.

I don't know the reason the devs added this scrambler. Maybe to disturb the strong correlation between the random numbers and the generated weather.

If my assumption really is the reason, what I hope, I will program a second version of the fix in which I simply disable the scrambler when I force good weather.

Stiebler
12-13-10, 05:49 AM
@H.sie:

I have observed only ONE 6-day foggy-storm in about six game-months of patrols.

I would call that good - it would be very boring to have no week-long storms at all.

Stiebler.

Hitman
12-13-10, 01:28 PM
By the way: I must disappoint those (e.g. Hitman) who wanted me to program an enhanced weather modelling. Even this "simple" fix consists of about 70 lines of assembler and I fear to lose overview when I make deeper changes. Oh don't worry, you have done already a huge task in opening the way :yeah: may be someone else will pick it from where you leave it in the future, and we already have a GREAT fix :up:

I haven't been able to do much testing, but I loaded it between saves on a 1942 Drumbeat patrol to the US east coast where I had been already sitting for a week in stormy weather, and after reloading and giving it some time, the weather kicked back to something reasonable. I noticed that in general winds tend to stay higher (>5 m/s and not yet seen 0 m/s) which is a great thing, as you would only rarely see that at Sea except in the tropics on certain seasons.

This has been a tremedous mod for SH3, as it has given us the chance to really play the game as intended -with varied weather- instead of having to do forced fixes like blocking fog at all and reducing waves size.

I have observed only ONE 6-day foggy-storm in about six game-months of patrols.

I would call that good - it would be very boring to have no week-long storms at all.

Agree! The important thing is that now you can hope realistically for the weather to improve somewhen, instead of having to go like "Sigh ... finally stuck in bad weather again"

Corsair
12-13-10, 06:48 PM
Take more water with it :03:

Don't even think about it... Rhum has always been the seaman's friend. I would be cursed by my ancestors till the end of times and would have to rename my sub "Flying Dutchman" :03:

Reece
12-13-10, 07:18 PM
@H.sie:

I have observed only ONE 6-day foggy-storm in about six game-months of patrols.

I would call that good - it would be very boring to have no week-long storms at all.

Stiebler.That's a different story, I assumed it was only after one or two patrols!:yep:

makman94
12-14-10, 05:14 AM
Congratulations H.Sie !!!!
(and to Stiebler and to all rest envolved)

i play the game again (thanks to this mod) for about two days now and all that i can say is that i 'love' the way of weather's behaviour . i haven't see till today anything that annoyed me ....weather is changing as often as about every 12 hours ...not always as for windspeed .sometimes is stick at a given windspeed and changes only the visibility !
realy ,did that happened before ? haven't notice it....
anyway, i really like the weather now !!

H.Sie....also the last version of sh3.exe is working excellent !!

bravo ! bravo !

h.sie
12-14-10, 07:14 AM
Thanks makman,

that's a nice christmas present for me.:)

Delareon
12-14-10, 10:25 AM
Not sure in which of your both threads i have to ask this so i do it here:
i want to use your latest exe and the weather fix together.
Do i just need to install the exe stuff as described and activate the weather fix with jsgme?
Or is there some extra magic i didnt see so far?

h.sie
12-14-10, 10:53 AM
@Delaron: That's exactly correct!

Delareon
12-14-10, 02:35 PM
Thanks h.sie, for some reason i expect something like an additional batch file when i use a mod from you so i was thinking i miss something ;)

h.sie
12-14-10, 04:24 PM
@Delareon: If it is possible, I of course try to make JSGME compatible mods. I could do that in principle also for sh3.exe, but then I fear to get in conflict with copyright laws.

h.sie
12-14-10, 05:58 PM
@Stiebler: Since the resonance to my weather fix V1 is positive, I think about to change the 1st post of this thread. Should I still consider your fix as an alternative or should we restrict on one solution - which is the product of a good cooperation?

I could also give you the (english) commented asm codes, maybe you are interested in enhancing the weather model?

h.sie

h.sie
12-16-10, 03:37 PM
New version "Weather Transitions Test Fix V2" is available.

This is a weather fix ONLY for watching the weather transitions
in order to eventually adjust some parameters in scene.dat like
e.g. FogChangeSpeed.

What does this mod do?
----------------------
It triggers a weather change from "good weather" to "bad weather"
and back to "good weather" and so on exact EVERY 30 minutes.

Compatibility
-------------
- Should work with every sh3.exe.
- Tested with WinXP/32Bit and Win7/64Bit.

Version History
---------------
V2: Bugfix: Weather did not always change from good to bad and back.
V1: First Version

Download: My Mediafire page, Folder: "Testing"

avee
12-17-10, 04:54 AM
65 downloads in 2 days. I would be glad to see more test reports.
Report here.

I was always bugged by SH3 weather because it doesnt change for a long time after loading game. That`s why i like your work direction.

I began a career with your mod and it worked great, until today i loaded yesterdays patrol and decided to measure how much time it takes for weather to change. I was checking weather every hour while being at x256 or x512 time compression. It seems my weather is stuck at "No clouds, no rain, excellent visibility, wind 0 kts".
Here is the log:

[Log Entry 472]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=1800
Categ=1

[Log Entry 473]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=1859
Categ=1

[Log Entry 474]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=2000
Categ=1

[Log Entry 475]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=2100
Categ=1

[Log Entry 478]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=2200
Categ=1

[Log Entry 479]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390906
Time=2300
Categ=1

[Log Entry 480]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=0
Categ=1

[Log Entry 481]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=101
Categ=1

[Log Entry 482]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=200
Categ=1

[Log Entry 483]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=300
Categ=1

[Log Entry 485]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=400
Categ=1

[Log Entry 486]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=501
Categ=1

[Log Entry 487]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=559
Categ=1

[Log Entry 488]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=700
Categ=1

[Log Entry 489]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=800
Categ=1

[Log Entry 490]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=900
Categ=1

[Log Entry 491]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1000
Categ=1

[Log Entry 492]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1059
Categ=1

[Log Entry 493]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1200
Categ=1

[Log Entry 495]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1300
Categ=1

[Log Entry 497]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1400
Categ=1

[Log Entry 499]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1500
Categ=1

[Log Entry 501]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1601
Categ=1

[Log Entry 502]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1700
Categ=1

[Log Entry 504]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1758
Categ=1

[Log Entry 506]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=1900
Categ=1

[Log Entry 507]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=2000
Categ=1

[Log Entry 509]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=2100
Categ=1

[Log Entry 510]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=2200
Categ=1

[Log Entry 511]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390907
Time=2301
Categ=1

[Log Entry 513]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390908
Time=0
Categ=1

[Log Entry 514]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390908
Time=100
Categ=1

[Log Entry 516]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390908
Time=201
Categ=1

[Log Entry 518]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 162.
Date=19390908
Time=313
Categ=1

[Log Entry 519]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 154.
Date=19390908
Time=359
Categ=1

[Log Entry 520]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=500
Categ=1

[Log Entry 521]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=600
Categ=1

[Log Entry 523]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=700
Categ=1

[Log Entry 524]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=801
Categ=1

[Log Entry 525]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=900
Categ=1

[Log Entry 526]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1001
Categ=1

[Log Entry 527]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1100
Categ=1

[Log Entry 531]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1200
Categ=1

[Log Entry 533]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1300
Categ=1

[Log Entry 534]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1400
Categ=1

[Log Entry 535]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1501
Categ=1

[Log Entry 538]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1600
Categ=1

[Log Entry 539]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1700
Categ=1

[Log Entry 541]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1804
Categ=1

[Log Entry 543]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=1901
Categ=1

[Log Entry 544]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=2000
Categ=1

[Log Entry 545]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=2101
Categ=1

[Log Entry 547]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=2159
Categ=1

[Log Entry 548]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390908
Time=2300
Categ=1

[Log Entry 549]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1
Categ=1

[Log Entry 551]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=102
Categ=1

[Log Entry 553]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=256
Categ=1

[Log Entry 554]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=408
Categ=1

[Log Entry 556]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=519
Categ=1

[Log Entry 557]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=610
Categ=1

[Log Entry 559]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=715
Categ=1

[Log Entry 560]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=800
Categ=1

[Log Entry 561]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=900
Categ=1

[Log Entry 562]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1006
Categ=1

[Log Entry 563]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1058
Categ=1

[Log Entry 564]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1200
Categ=1

[Log Entry 567]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1251
Categ=1

[Log Entry 568]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1401
Categ=1

[Log Entry 570]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1502
Categ=1

[Log Entry 571]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 124.
Date=19390909
Time=1545
Categ=1

[Log Entry 572]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 167.
Date=19390909
Time=1659
Categ=1

[Log Entry 573]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 204.
Date=19390909
Time=1800
Categ=1

[Log Entry 574]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 240.
Date=19390909
Time=1900
Categ=1

[Log Entry 575]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 277.
Date=19390909
Time=2001
Categ=1

[Log Entry 576]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390909
Time=2101
Categ=1

[Log Entry 577]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390909
Time=2201
Categ=1

[Log Entry 578]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390909
Time=2300
Categ=1

[Log Entry 579]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=3
Categ=1

[Log Entry 580]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=59
Categ=1

[Log Entry 581]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=202
Categ=1

[Log Entry 582]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=259
Categ=1

[Log Entry 583]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=401
Categ=1

[Log Entry 584]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=500
Categ=1

[Log Entry 585]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=601
Categ=1

[Log Entry 587]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=703
Categ=1

[Log Entry 588]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=800
Categ=1

[Log Entry 589]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=901
Categ=1

[Log Entry 590]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1000
Categ=1

[Log Entry 591]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1059
Categ=1

[Log Entry 592]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1200
Categ=1

[Log Entry 593]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1300
Categ=1


[Log Entry 595]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1401
Categ=1

[Log Entry 596]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1500
Categ=1


[Log Entry 598]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1556
Categ=1


[Log Entry 600]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1701
Categ=1

[Log Entry 602]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1800
Categ=1

[Log Entry 603]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=1901
Categ=1

[Log Entry 604]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=2001
Categ=1

[Log Entry 605]
Type=0
EntryText=No clouds, no rain, excellent visibility, Wind speed 0 m/s, direction 296.
Date=19390910
Time=2100
Categ=1Patrol was loaded at about 16:40 (game time) september 6 1939. First weather change (wind direction only!) happened around 03:59 september 8. Wind direction changed several times and freezed again for a long time. There were several such wind direction changes but no other changes at all!

Maybe, the problem is with my sh3.exe file - it is "old" .exe file with starforce manually removed, but your mod is supposed to work with all .exe. And "Weather Transitions Test Fix V2" works fine...

Maybe that "magic" weather of 0 fog, 0 cloud, 0 wind may cause such problems? Or is such weather already a symptom of some serious weather system problems on my rig?

Thanks for your help!

Stiebler
12-17-10, 05:40 AM
@H.sie,

I have only just noticed your post #149 asking for my input, sorry about that.

I prefer your bad weather fix (changing clouds and fog) to my own (changing windspeeds), so probably it will be less confusing for everyone if you give only the link to your own bad weather fix in the first post of this thread.

Two more proper war patrols completed here, each of two months in late 1944, with NYGM and with your bad weather fix installed (also with your V15D beta 4 mod installed, with repairs disabled) - no problems at all. The weather patterns look very good.

Yes, I would like to see your commented assembly code, please, for instructional purposes. Thanks very much for the offer.

Stiebler.

Reece
12-17-10, 05:47 AM
@ avee, Your log only shows weather for part of a day only!!:06: this mod is to fix the old bug of weather being stuck for weeks (mostly with poor fog/visibility), your results seem fine to me, see how it goes over a whole patrol.:hmmm:

h.sie
12-17-10, 08:24 AM
@Reece: His logs show 3-4 days. scroll down the list box.

@avee: I also had such a behaviour during testing in very high time-compression (1024) and in a single-mission. but since I was not able to reproduce this, I didn't pay much attention to it. After reloading all worked well. So I still don't know if that is related to my fix or not.

Any others have this behaviour??

avee
12-17-10, 11:23 AM
@avee: I also had such a behaviour during testing in very high time-compression (1024) and in a single-mission. but since I was not able to reproduce this, I didn't pay much attention to it. After reloading all worked well. So I still don't know if that is related to my fix or not.

I repeated test run from the same save 2 more times.

First time first weather change happened 36 hours after loading and changed wind direction and clouds (light). Several days later visibility became moderate. Several more days later wind speed changed to 1 m/s and clouds to heavy.

Second time first weather change again happened around 36 hours after loading and changed wind direction and visibility (moderate).

It seems that either i am very unlucky or this part works wrong:


This fix also fixes a bug, that the weather time counter is not saved in a savegame,
so that the counter always starts at 0 every time you load a mission or savegame.
That means, that the first weather change always occurs exactly after a full
weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the
weather period, so that a weather change shortly after loading a mission is possible.

h.sie
12-17-10, 05:19 PM
Start value for time counter is randomly chosen (and this worked well in my tests), so I think that 2 trials are not enough to get a reliable result. Additionally, at the start of a new weather period sometimes weather does not change. So, Please, give it a chance and some more tests. If it does not work, I'll look into it.

Thank you for helping!

ryanwigginton
12-18-10, 03:19 AM
Providing h.sie doesn't mind, can we have this thread along with h.sie's realistic repair thread stickied please? Both are SH3 essentials.

Hitman
12-18-10, 05:00 AM
can we have this thread along with h.sie's realistic repair thread stickied please? Both are SH3 essentials.

Good idea, I'll take a look into that later as I would probably need to clear a bit the stickies before, or risk cluttering too much the main page:hmmm:

h.sie
12-18-10, 05:33 AM
I think there is currently no need to make them sticky ATM:

1) Too less downloads. So these mods are essential - for a minority.

2) They seem to be sticky already by high activity.

3) Not 100% clear that Bad Weather Fix works. See posts from user avee.

SquareSteelBar
12-18-10, 05:45 AM
...Too less downloads. So these mods are essential - for a minority...Not only these mods are essential, even that minority is essential since it consists of Hardcore Kaleuns... ;)

h.sie
12-18-10, 05:57 AM
avee is right!

under certain conditions, during game load, the weather time counter is still initialized with 0 instead of a random number. I already found the reason, so expect a new version in the next time.

no worry, the current weather fix V1 beta works, but the first weather change always occurs after 20-40 hours, and not randomly, as I promised. this will be fixed soon.

THANK YOU AVEE!

ridley
12-18-10, 08:24 AM
Would it be possible to have a version of your mod that changed the weather at a fixed, not random interval.

I mainly play multiplayer and would love to have the weather change during the game for obvious reasons this would have to be the shorts time possible, 1/2 hour? It would have to be non random in some wy to avoid sync problems with other players, wouldnt it?

Ridley

h.sie
12-18-10, 08:44 AM
@ridley: oops, I never thought about multi-players, since I never played this. My patch won't work for multiplayers, because weather changes are randomly generated and so maybe weather could change to good for one player and to bad for the second. I don't know if there is a sync-mechanism included.

I even cannot test it, since I have only one PC (XP and Win7 in dual boot).

Sorry to say, but for multiplayers I recommend to use stock SH3 waether.

ridley
12-18-10, 09:13 AM
If there was a way to remove the randomisation and set the interval to say 1/2 hour I would love to give it a try in multiplayer. There is a sync option BTW.

Ridley

h.sie
12-18-10, 10:04 AM
Regarding Multiplayer: It is very much possible that the random seed is synchronized for all multiplayers - that means, that the generated random numbers (and thus the weather changes and intervals) are the same for all connected players. it is worth testing.

you want 30 minutes weather changes??? common are 20-40 hours

h.sie
12-18-10, 10:39 AM
New Version Bad Weather Fix V1.1 BETA avaliable.

Fixed a little bug which caused the weather change time counter to still start at 0 instead of an randomly chosen time. Thanks to avee for reporting.

@Stiebler: I just sent you the commented sources for V1.1 Beta, in case you want to add some advanced weather model or make any individual changes for NYGM.....

h.sie

ridley
12-18-10, 10:55 AM
you want 30 minutes weather changes??? common are 20-40 hours

Ah but in multiplayer there is no time compression and games last about 1-3
hours, typically about 1.5 hours (at least for me they do. Well OK for me they are often quite a bit shorter than that :dead:)

Ridley

Magic1111
12-18-10, 02:47 PM
New Version Bad Weather Fix V1.1 BETA avaliable.

h.sie

Many thanks h.sie for the new Version !!! :yeah: I´ll give it a try....:yep:

Best regards,
Magic:salute:

Magic1111
12-18-10, 05:20 PM
Hello h.sie !

I play with the Fix v1.1 Beta my Career savegame now 4 weeks (ingame-time) without saving and I must say, the weather change intervall are very good ! :up:

But I´ve questions: In this 4 weeks Ingame-time play the lowest windspeed was 7m/s, never under this. I mean, I´ve never windspeed from 0 to 6 m/s !

Is 7m/s the lowest windspeed with your fix ? Or can I have also windspeed from 0 to 6 m/s with your fix?

Best regards,
Magic

h.sie
12-18-10, 05:41 PM
Hi Magic,

most of the time my fix does nothing more than watching the weather and it only is active when bad weather is too long. so your issue is not related to my fix. there are areas in the sh3-world where windspeed is restricted to 7m/s and above. try a different area and you'll see lower windspeeds.

h.sie

Magic1111
12-18-10, 05:51 PM
Hi Magic,

most of the time my fix does nothing more than watching the weather and it only is active when bad weather is too long. so your issue is not related to my fix. there are areas in the sh3-world where windspeed is restricted to 7m/s and above. try a different area and you'll see lower windspeeds.

h.sie

Aaah, okay, I understand ! Many thanks for Reply ! :salute:

Best regards,
Magic

P.S. My Patrol Area was around the "Dänemark-Straße" !

Stiebler
12-19-10, 07:04 AM
@Magic1111:

The Devs set a minimum windspeed for the Arctic (including Denmark Strait) and Antarctic sea areas of 7 m/s.

Also, note that weather in these areas is updated only every 2 days or more, depending on latitude. The wind direction is the weather item updated most noticeably on the screen. As long as this remains fixed, you can be sure that nothing else is changing either.

Stiebler.

Magic1111
12-19-10, 02:26 PM
@Magic1111:

The Devs set a minimum windspeed for the Arctic (including Denmark Strait) and Antarctic sea areas of 7 m/s.

Also, note that weather in these areas is updated only every 2 days or more, depending on latitude. The wind direction is the weather item updated most noticeably on the screen. As long as this remains fixed, you can be sure that nothing else is changing either.

Stiebler.

Many thanks Stiebler for explain:up:, now ALL is cleared ! ;)

Best regards,
Magic:salute:

Hartmann
12-19-10, 07:36 PM
In SH3 there are three types of water, Mediterranean, Artic, and Atlantic
but the game don´t switch from one type to another unless you change it in the config files.

could it be fixed ?? :hmmm:

h.sie
12-20-10, 02:38 AM
@Hartmann: All can be done in principle. The question is if it's worth the effort, because, as you said, colours can be changed in cfg-files. This takes 1 second for you to activate via JSGME, but will take weeks for me to fix. so I concentrate mainly on issues that are essential, halfway easy to fix and cannot be fixed in a different way.

Hartmann
12-20-10, 11:04 PM
Don´t worry h.sie

continue your great work in true important things that are difficult to fix :up:

Matyas
12-21-10, 05:41 AM
Excellent effort, h.sie! :rock: I will try this out as soon as I finish my current patrol.

Currently I shadow a convoy in 15 m/s wind, heavy fog, heavy rain conditions (visibility around 300ms) for 24 hours without real hope that the weather improves a bit for giving me a chance to conduct an attack before the convoy reaches shallow water in around 36 hours...

Hopefully with your fix that won't be an issue again and at least there will be hope for better weather after a couple of days of storms.

"Keep up the good work!" :salute:

Obelix
12-21-10, 08:46 AM
Please forgive me if this has already been discussed:
Can make with strong and medium fog
wind speed decreased, not only to the 6-7 m / s, but below, to 5-3 and up to scratch?
Or tell me where I can find the settings for these options

h.sie
12-21-10, 09:06 AM
Sorry, but I don't understand what you are asking for (non-native english). Could you please explain in detail what's your problem / question.

Greetings, h.sie

Obelix
12-21-10, 09:16 AM
Sorry, but I don't understand what you are asking for (non-native english). Could you please explain in detail what's your problem / question.

Greetings, h.sie
OK, For me, English is also not a native.
In SH3 during a heavy fog, and medium fog the average wind speed falls below 7 - 6 m / sec.
Is it possible in this case, the lower wind speed of 3 - 5 m / s? Or to zero?
Thank's

h.sie
12-21-10, 09:31 AM
@Obelix: Windspeed is generated randomly, but also considering season, position and so on. I tried to do as few modifications on weather code as possible. Fulfilling your individual wishes would mean to totally change the weather model, which is impossible for me. See it this way: It's some kind of realism that you cannot choose the weather as you like.

But if you want to have lower waves at all in average, this can be made by a tweak in scene.dat. I think an envrionment expert can tell you what exactly to change.

h.sie

Obelix
12-21-10, 09:33 AM
h.sie
I understanded, thank you!:salute:

h.sie
12-21-10, 09:57 AM
I think Hitman or Makman can tell you how to reduce wave amplitude.

Obelix
12-21-10, 10:10 AM
I think Hitman or Makman can tell you how to reduce wave amplitude.
Thanks, I'll ask them. But I'm interested in is a Wind.

schmutt
12-21-10, 11:41 AM
h.sie, I spent a day trying out your mod.

I'm using LSH3 V5.1 as my basic mod. Went out for a 2 months trip to Canada near Halifax in Aug, 1941. Had no probs. And weather changes even at 4096 tc. My impression was that I didn't have long term bad weather periods lasting for 4 weeks and longer. Even the 15 m/s winds didn't show up so often. Often the wind was blowing between 0 and 7 m/s. And only sometimes, for not so long as usual, blowing over that.

One thing I realized: Asking for Weather Report, what I did very often (poor devil having to do that over a hunded times a day :D) it showed thick fog and no rain, but it did rain, I saw it! But that's all. Verry good work. :yeah:

Your mod is sticky in my mod collection! Hope it will leave Beta-Status some day :D

Cheers
Schmutt

h.sie
12-21-10, 12:57 PM
hi schmutt, thanks for reporting.

the behaviour you described (wrong weather report) occurs only short after a new weather period has begun when new weather has been calculated, but old weather still is there (because weather changes slowly). If you now ask for weather report in this situation, you always get the new calculated weather, even if it not has completely changed from old to new. this behaviour is hard-coded, could be changed in principle, but isnt worth the huge effort in my opinion.

I think it's final, but I call it beta, only for the case someone finds a bug. So I can say, that it was just a beta.

h.sie

h.sie
12-22-10, 11:55 AM
@Hitman: The link in post 112 is no more valid, could you please change the Threads name. Thanks. h.sie

Hitman
12-22-10, 03:41 PM
Yes, I'll leave it simply as REL :up:

h.sie
12-28-10, 07:54 PM
Question to the environment modders:

While doing some tests with my Weather Transitions V2 mod

http://www.mediafire.com/?6h7v5xkka645dgl

which triggers weather changes every 30 minutes from good to bad to good to bad and so on, I found out that clouds and ambient light change abrupt for OLC environment (=GWX 16km athmosphere) when weather changes from good to bad. Does not look good. This also happens for GWX-20km athmosphere and M.E.P V2.1.

But in NYGM environment and in M.E.P V3 the clouds and ambient light transmissions from good to bad changes slowly as aspected.

Any idea where I could find the reason for that?

Thanks!

Hitman
12-29-10, 11:56 AM
But in NYGM environment and in M.E.P V3 the clouds and ambient light transmissions from good to bad changes slowly as aspected.

Any idea where I could find the reason for that?

NYGM uses the first 16k mod that was created, which was simply an enlarged version of the stock 8km one. Refelecting upon those environments that display correctly the transition, one thing I can think of are the clouds graphics (Nori.tga files in "Misc" folder). Try using the original clouds in those environments that cause trouble and see if that makes a difference :hmmm:

h.sie
12-29-10, 12:15 PM
@Hitman: Thanks. I aready found the reason: See

http://www.subsim.com/radioroom/showthread.php?t=178497

Flyingsub
01-09-11, 02:41 PM
I see a jagged tearing along the horizon when using the mod with gwx 20km and lsh3 stock 16k mep. Under the tearing you can see clear sky while the weather is cloudy. This only happens on the bridge view and cloudy weather. Can't be seen from uzo or binocular stations. Reloading the save doesn't help. Would changing over to mep 3 remove this? Thanks

h.sie
01-09-11, 05:10 PM
@FlyingSub: Are you sure that this effect does not occur without the BadWeatherFix?

The effect you described is surely related to Environment/scene.dat or similar. My mod does not change graphical things. It affects only the weather changes, but not how the weather looks.

Flyingsub
01-09-11, 07:24 PM
No, it only happens with the bad weather fix. When I go back to the default file and reload its gone. It works fine with NYGM with the stock environment. Am going to try lsh3 atmosphere instead of environment and see how that goes.

LGN1
01-15-11, 09:36 AM
Hi h.sie & Stiebler,

yesterday I had an idea that might be a nice addition to the weather mod: lower waves in the home port.

Since many years players complain about the silly high waves in harbors. Now that you learned how to control the wind speed it might be possible to force lower wind speeds when the boat is in port. (IIRC, Anvart uses the 'state' 'in home port' for his pennants mod (the 'state' also controls whether the crew uses the binoculars). Since the wind speed close to land is always 6m/s (as far as I know), there would not be a big jump from storm to low waves).

I don't think this is a really crucial mod idea, but depending on the required effort, it might be a nice addition to a future weather mod.

Cheers, LGN1

Reece
01-15-11, 10:30 PM
Hi h.sie & Stiebler,

yesterday I had an idea that might be a nice addition to the weather mod: lower waves in the home port.

Since many years players complain about the silly high waves in harbors. Now that you learned how to control the wind speed it might be possible to force lower wind speeds when the boat is in port. (IIRC, Anvart uses the 'state' 'in home port' for his pennants mod (the 'state' also controls whether the crew uses the binoculars). Since the wind speed close to land is always 6m/s (as far as I know), there would not be a big jump from storm to low waves).

I don't think this is a really crucial mod idea, but depending on the required effort, it might be a nice addition to a future weather mod.

Cheers, LGN1The main problem I see is the cutoff point from really bad weather and hence high waves to calm, also the controller he uses is only effective for around 200mts from the dock where the people wave and cheer you in and out! (IIRC):hmmm:

LGN1
01-16-11, 07:39 AM
The main problem I see is the cutoff point from really bad weather and hence high waves to calm, also the controller he uses is only effective for around 200mts from the dock where the people wave and cheer you in and out! (IIRC):hmmm:

Hi Reece,

I don't think there would be any strong cutoff because the max. wind speed close to land is 6 m/s (at least I think so). So the wind speed would drop from 6 m/s to maybe 3 m/s. I guess that would be fine, however, it should be checked.

You are right that the 'range' of the controller is a bit small, but I think the high waves are most annoying when you are docking (close to harbor wall and slow speed). So, it would at least allow you to dock close to the cheering crowd without high waves.

Anyway, this would only be for those who like to really dock their boat at the end of a patrol and I guess there are not many who do this.

Cheers, LGN1

Corsair
01-16-11, 07:35 PM
Mmm... I do !!;)

FUBAR295
01-16-11, 07:48 PM
Me too!!!:DL

Good Hunting,
FUBAR295

Reece
01-16-11, 07:56 PM
I always return to dock and raise the pennants etc,:up: so I would still give it a go, nothing ventured nothing gained, just pointing out the possible problems!:yep:
Cheers.

h.sie
01-17-11, 04:54 AM
New weather is calculated approx. every 20-40hours. So if the mentioned controller is used to affect the windspeed, it will take 20-40 hours after you leave the port until "normal" ocean weather is calculated.

I already tried to access these "states" or "controllers" in order to calculate CO2 production depending on them ("being hunted" -> High CO2-production") but without success.

LGN1
01-17-11, 02:40 PM
Hi h.sie,

the main problem with waves in the home port is when you are getting home. When you start a patrol you can control the wave height via the starting values for wind speed in the campaign files.

Anyway, since it seems to be more involved than I thought (if it's possible at all), it's not really worth spending any time/efforts on this issue.

Cheers, LGN1

Reece
01-17-11, 07:07 PM
It would have been nice, like icing on a cake, but can live without it! I for one am grateful for what you have done!:yeah:

h.sie
01-21-11, 03:51 PM
There are now 2 versions of the Bad Weather Fix 1.1 available:

1) The standard version of the mod and

2) A new "Forte" version which results in shorter storm and fog periods, for those who think that the standard version is not strong enough.

h.sie

Magic1111
01-21-11, 06:07 PM
There are now 2 versions of the Bad Weather Fix 1.1 available:

1) The standard version of the mod and

2) A new "Forte" version which results in even shorter storm and fog periods, for those who think that the standard version is not strong enough.

h.sie

Many thanks h.sie, I´ll give both versions a try !!! :up:

Best regards,
Magic:salute:

h.sie
06-05-11, 05:25 PM
Besides the Bad Weather Fixes from me (standard, forte and yoryin version) one can now find a 4th solution on my mediafire website:

Stieblers NYGM Bad Weather Fix

It is part of NYGM 3.5 supermod and uses a different approach to fix the bad weather bug of sh3.
Please directly ask Stiebler about the differences between his and my solution.


@Hitman: Could you please replace [REL-BETA] by [REL] in the title of this thread.
Thanks very much!

Hitman
06-06-11, 10:02 AM
@Hitman: Could you please replace [REL-BETA] by [REL] in the title of this thread.
Thanks very much!

Sure thing :salute:

Volk2
06-06-11, 12:55 PM
Please directly ask Stiebler about the differences between his and my solution.

Stiebler, could you please write something about the differences?

Magic1111
06-06-11, 02:34 PM
Stiebler, could you please write something about the differences?

Yes, I´m interested too...! :ping:

Stiebler
06-07-11, 04:19 AM
By 'popular request':

The envsim.act file, which contains the weather for SH3.exe, contains a serious bug. Winds can be generated randomly between 0 and 15 m/s. However, if there is bad weather, another random 0-15 m/s can be added, and a further 7 m/s is added automatically for fog regardless of wind. (I forget the details of how these values are added together now.) However, it is obvious that often winds of up to 30 m/s can be generated.

The devs' answer to this problem was to limit the winds to 15 m/s. However, there is also a feedback loop so that, when high winds are encountered, fog is more likely to arise. (When the devs say 'fog', what they really mean is poor visibility caused by rain driven by wind.)

Thus, once the winds became high, the fog began, and this caused extra wind strength to be added, which was then cut back to 15 m/s. This loop remained in place for a long time (15 m/s winds + fog), until, by lucky chance, the two/three random winds generated and added together were all low winds, causing the fog to disappear slowly. Low winds = less fog.

H.sie's weather solutions control this feedback loop by blocking all of fog, clouds and winds in a random manner after a certain number of calls to the weather mechanism. Even the number of calls, before the block occurs, is random. H.sie's different modifications to envsim.act involve lesser or stronger blocks on the bad weather, resetting it to better weather.

My solution involves an automatic deduction of 15 m/s wind in the feedback loop, but only if the wind strength is already more than 15 m/s. Thus the effect of persistent strong winds causing persistent fog is broken in a random manner (because the wind strength might have been previously anything between 15.1 and 30 m/s). Because the winds are less, the fog disperses naturally.

Phew! I hope that is all clear.

These different code approaches to the bug in envsim.act are both effective, but the patterns of weather are different. I prefer the 'natural' wind reduction resulting in less fog, but many players will prefer H.sie's more certain approach. That is why all the options are available. Use whichever *you* prefer.

Stiebler.

h.sie
06-07-11, 04:46 AM
Stieblers solution tends to produce more english weather, whereas my solution produces more german weather (standard version = hamburg and forte version = munich).

SquareSteelBar
06-07-11, 05:07 AM
Hmm...never saw a sub in Munich yet :hmmm:

Magic1111
06-07-11, 06:47 AM
Hmm...never saw a sub in Munich yet :hmmm:


http://www.deutsches-museum.de/ausstellungen/verkehr/schifffahrt/panoramabilder/u-boot/

:haha::haha::haha:

Fish In The Water
06-07-11, 02:17 PM
By 'popular request':...

Thanks for the explanation... :salute:

Hitman
06-07-11, 02:48 PM
By 'popular request':

The envsim.act file, which contains the weather for SH3.exe, contains a serious bug. Winds can be generated randomly between 0 and 15 m/s. However, if there is bad weather, another random 0-15 m/s can be added, and a further 7 m/s is added automatically for fog regardless of wind. (I forget the details of how these values are added together now.) However, it is obvious that often winds of up to 30 m/s can be generated.

The devs' answer to this problem was to limit the winds to 15 m/s. However, there is also a feedback loop so that, when high winds are encountered, fog is more likely to arise. (When the devs say 'fog', what they really mean is poor visibility caused by rain driven by wind.)

Thus, once the winds became high, the fog began, and this caused extra wind strength to be added, which was then cut back to 15 m/s. This loop remained in place for a long time (15 m/s winds + fog), until, by lucky chance, the two/three random winds generated and added together were all low winds, causing the fog to disappear slowly. Low winds = less fog.

H.sie's weather solutions control this feedback loop by blocking all of fog, clouds and winds in a random manner after a certain number of calls to the weather mechanism. Even the number of calls, before the block occurs, is random. H.sie's different modifications to envsim.act involve lesser or stronger blocks on the bad weather, resetting it to better weather.

My solution involves an automatic deduction of 15 m/s wind in the feedback loop, but only if the wind strength is already more than 15 m/s. Thus the effect of persistent strong winds causing persistent fog is broken in a random manner (because the wind strength might have been previously anything between 15.1 and 30 m/s). Because the winds are less, the fog disperses naturally.

Phew! I hope that is all clear.

These different code approaches to the bug in envsim.act are both effective, but the patterns of weather are different. I prefer the 'natural' wind reduction resulting in less fog, but many players will prefer H.sie's more certain approach. That is why all the options are available. Use whichever *you* prefer.

Stiebler. Thanks for the explanation John :up:

Anyway I'd like to add that, given that proper fog (NOt the water ripped by the air from the wave tops, as in storms) as seen in the north sea, british coast, the channel -and terranova, where the hot water from the sea current coming from the caribbean meets the ice cold air from the north- is usually something that happens with low winds or no wind at all. It would thus be interesting to have a weather fix file that mutually excludes fog and high winds, in the interest of having realistic weather when patrolling in the early war near the british isles. Also, more "area adjusted" weather files could be interesting for recreating with some success the climate in the different patrol areas like the Mediterranean (Little rain, sudden storms with short duration), Arctic Sea (permanently rough but rarely mountanious sea and rarely rain -would be snow instead) and Indian Ocean (Moderate swell but persistant heavy rain in monsoon station). Combined via JSGME and/or SH3 Commander with the different available water colours from different modders, it would be a true dream :yeah:

LGN1
06-25-11, 09:56 AM
Hi Stiebler,

does your version also include this feature mentioned in h.sie's readme:

EXTRA
-----
This fix also fixes a bug, that the weather time counter is not saved in a savegame, so that the counter always starts at 0 every time you load a mission or savegame. That means, that the first weather change always occurs exactly after a full weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the weather period, so that a weather change shortly after loading a mission is possible.

Regards, LGN1

Stiebler
06-26-11, 11:26 AM
@LGN1:
does your version also include this feature mentioned in h.sie's readme:

EXTRA
-----
This fix also fixes a bug, that the weather time counter is not saved in a savegame, so that the counter always starts at 0 every time you load a mission or savegame. That means, that the first weather change always occurs exactly after a full weather period (20 - 40 hours).

Now, the time counter is initialized with a randomly chosen value between 0 and 95% of the weather period, so that a weather change shortly after loading a mission is possible.I regret that my weather fix does not alter this known bug.

Stiebler.

LGN1
06-27-11, 01:58 PM
Thanks for the information, Stiebler!

Regards, LGN1

Foxhound
12-25-11, 01:50 AM
hello there h.side. i was wondering how you decoded the EnvSim.sct file in the first place? Did you use a compiler of any sort? how could it be opened in a meaningful way?

TheDarkWraith
12-25-11, 02:00 AM
hello there h.side. i was wondering how you decoded the EnvSim.sct file in the first place? Did you use a compiler of any sort? how could it be opened in a meaningful way?

Olly Debug and hex editor would be my guess. Olly Debug lets you attach to a process thus you can 'view' the dll/exe in real-time. You can also set breakpoints, pause, change values, etc. Hands down the best free debugger :yep:

h.sie
12-25-11, 05:52 AM
Yup, a Debugger or Disassembler is helpful.

Foxhound
12-25-11, 09:35 AM
hello there h.side

how did you manage to open the EnvSim.act file in the first place? it's a code file. did you use a compiler to do so? is there a thread dealing with this topic?

h.sie
12-25-11, 05:30 PM
it's a DLL (but renamed to .act) containing x86 machine code. I don't know whether one can find information about assembler coding and DLL in this forum, but in the WWW you can find tons of information. a compiler won't help you. use a debugger or similar to look into the code.

Foxhound
12-27-11, 04:54 PM
thanks for the information h.side. i tried visual studio to open the file and it didn't provide any more insight than opening the file in HEX format. i didn't much effort into it by the way. but i have found a way to cheat SH3 with your file in a way. i start with the "standard" version and whenever i hit a storm, i save and quit, then i replace it with the "FORT" version. then i reload the game and the weather is always 5 m/s. nice for the gun deck. i repeat the process like for ever. i hope you forgive me.:up:

Foxhound
12-29-11, 12:22 PM
i am not able to run any of the upgrade patches on my installation of SH3 so i am stuck with v.1.0.0.1. in this mod adjustment such as this

StormConditions=16,1;max wind speed [m/s], max rain intensity [0,1]

has no effect on the sub or the surface vessel. as i am using SH3 warship mod, i can't man the ship guns once the wind speed passes 7m/s. this is pretty crab sailing with the Bismarck and not being able to confront a pretty little destroyer (say for example HMS Foxhound). i request to tell me if there is way to eliminate the bad weather once and for all, because i am working on other aspects of the game (such as concentration fire). can you tell me where to manipulate inside the EnvSim.act dll file? i would be very thankful if you guide me.

h.sie
12-29-11, 12:41 PM
@Foxhound: The bad weather fix only works with v1.4 or above of sh3.exe. You should update to v1.4 since many bugs have been fixed compared to v1.0.

Sorry, please understand that I cannot compress 5 years of education into an instant_course.pdf in assembler programming.

Foxhound
12-29-11, 02:13 PM
i am fully aware of the gravity of the work you've done because i am a programmer of a sort myself. thanks for your attention. it's just that i see so many potentials in this game and i want to have a way to contribute.

Foxhound
12-31-11, 06:07 AM
can't you tell me anything to start with? i am very studios. how can i manipulate the DLL? plz. i can't upgrade to V1.4.:damn:

SquareSteelBar
12-31-11, 08:41 AM
... i can't upgrade to V1.4.:damn:What is the prob?

http://www.subsim.com/radioroom/showpost.php?p=1799771&postcount=6

Foxhound
12-31-11, 09:34 AM
you know i believe h.side has down a great job here on bad weather fixes and since i don't want to sabotage this thread with a completely different issue (if i haven't already done so) let's redirect to this page of subsim (the last page on the thread Silent Hunter 3 Will it run on Windows7? (http://www.subsim.com/radioroom/showthread.php?t=188789&highlight=silent+hunet+3+win7) which hopefully could be found under this link:

http://www.subsim.com/radioroom/showthread.php?p=1812899&posted=1#post1812899

thanks

h.sie
12-31-11, 09:56 AM
I decided not to give any instructions to hack the .exe and the .act's, since it has a high potential for destructive actions. Would be easy to install some TCP/IP routines in a .act and do disastrous things.

Once a malware is found in any .act , and I have to fear to get banned from this forum.

But I can help you to update your V1.0.0.1 to V1.6. This works with the Weather Fix.

Foxhound
12-31-11, 03:31 PM
i am listening.:yeah:

h.sie
01-01-12, 06:47 AM
Does anybody know whether the UBI patch to V1.4b affects only the sh3.exe file including the .act files or does it also update some other files (like .cfg, .dat, .sim and so on)

????

SquareSteelBar
01-01-12, 07:04 AM
Many other files....


I'll send you a PM in a few minutes...

h.sie
01-02-12, 04:39 AM
@Foxhound: The UBI patch only works on a unmodified, uncracked sh3 installation. Do you have one?

SquareSteelBar
01-02-12, 05:35 AM
I asked that already in the thread he mentioned above:

http://www.subsim.com/radioroom/showthread.php?p=1812899&posted=1#post1812899

Foxhound
01-02-12, 06:36 AM
thank you for your attention H.side. i guess the fault is mine. the original problem is about licensing and i think it would be for a while before i could get my hand on a verified licensed edition of the game. however i should say that the FORT bad weather fix (which you made) actually does work with V1.0.0.1 to my knowledge. it does reduce thunderstorm durations, however saving the game while using the file is pretty risky.

Foxhound
01-02-12, 11:42 AM
h.side, i know you said you are not gonna say anything about manipulating a DLL for possible sabotage attempts that this could lead to. but i was thinking if the value of "RandomWindSpeedMax" could be limited to for example 5m/s. this would eliminate the bad weather once and for all (this of course is not a bad weather fix). i ask you how could this be done in EnvSim.act file. and as you can see, i am not asking for you to give me a crash training course on diss assembly. it's not a process, it's just changing a value. is it feasible? i would e very happy if you give me some advice on that.:cry: i am sick of shadowing enemy task force with Scharnhorst for days and not being able to catch a cold about it just because WinSpeed is 8m/s and not 6m/s. thanks admiral.