SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [REL]Bad weather fix for SH3 (https://www.subsim.com/radioroom/showthread.php?t=177507)

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

Quote:

Originally Posted by h.sie (Post 1544046)
...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

Quote:

Originally Posted by h.sie (Post 1544002)
@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

Quote:

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

Quote:

Originally Posted by Hitman (Post 1544358)
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

Try a weather fix
 
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.


All times are GMT -5. The time now is 11:15 PM.

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