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)

Reece 12-08-10 05:18 AM

Quote:

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

Quote:

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


All times are GMT -5. The time now is 03:50 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.