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)

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

Little suggestion
 
Quote:

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

Quote:

@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

Quote:

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

That's it !!!
 
Quote:

Originally Posted by h.sie (Post 1546767)

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

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

My opinion ?
 
Quote:

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


All times are GMT -5. The time now is 10:47 AM.

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.