![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Admiral
![]() |
![]()
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) Last edited by h.sie; 06-05-11 at 05:28 PM. |
![]() |
![]() |
![]() |
#2 |
Ocean Warrior
![]() Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
|
![]()
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. ![]() 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! ![]()
__________________
One gamer's must-have mod is another gamer's waste of time. -Sailor Steve |
![]() |
![]() |
![]() |
#3 |
Admiral
![]() |
![]()
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.
Last edited by h.sie; 11-29-10 at 03:01 AM. |
![]() |
![]() |
![]() |
#4 |
Lieutenant
![]() Join Date: Sep 2006
Posts: 259
Downloads: 290
Uploads: 3
|
Stop the rain! mod by Rubini
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) |
![]() |
![]() |
![]() |
#5 |
Admiral
![]() |
![]()
@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. |
![]() |
![]() |
![]() |
#6 |
Planesman
![]() Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
|
![]()
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. ![]()
__________________
Oblt.zS. Kurt Hanke, commander of U-83 (Type VIIB) in WaW 5. Patrol 1 - at sea : 5 ships - 10095 BRT My filefront mods link To Battle Station order mod for SH3 and more |
![]() |
![]() |
![]() |
#7 |
Admiral
![]() |
![]()
@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. |
![]() |
![]() |
![]() |
#8 | |
Ocean Warrior
![]() Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
|
![]() Quote:
And obviously a definitive solution will be even better, so I'm also waiting for h.sie/Stiebler fixes. ![]() 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.
__________________
One gamer's must-have mod is another gamer's waste of time. -Sailor Steve |
|
![]() |
![]() |
![]() |
#9 | |
Ace of the Deep
![]() Join Date: Nov 2006
Location: Toulouse France
Posts: 1,140
Downloads: 51
Uploads: 0
|
![]() Quote:
__________________
![]() NYGM 3.4A / Living SH3 V5.1 + SH3 Commander |
|
![]() |
![]() |
![]() |
#10 |
Admiral
![]() |
![]()
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. Last edited by h.sie; 12-01-10 at 03:03 AM. |
![]() |
![]() |
![]() |
#11 |
Fuel Supplier
|
![]()
@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.
__________________
NYGM Tonnage War Mod - More than a mod: it's an experience! Last edited by Stiebler; 11-29-10 at 10:40 AM. |
![]() |
![]() |
![]() |
#12 |
Admiral
![]() |
![]()
Mine is better, mine is better
![]() 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. |
![]() |
![]() |
![]() |
#13 |
Ocean Warrior
![]() Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
|
![]()
@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! ![]() 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... ![]() I really hate that just "plain" ocean even with wind more than 5m/s... ![]()
__________________
One gamer's must-have mod is another gamer's waste of time. -Sailor Steve |
![]() |
![]() |
![]() |
#14 | |
Ocean Warrior
![]() Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
|
![]() Quote:
![]()
__________________
One gamer's must-have mod is another gamer's waste of time. -Sailor Steve |
|
![]() |
![]() |
![]() |
#15 | |
Pacific Aces Dev Team
|
![]() Quote:
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 ![]() [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.co...ications/9.pdf
__________________
One day I will return to sea ... |
|
![]() |
![]() |
![]() |
|
|