SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-26-10, 03:14 PM   #631
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi,

it's great to see this thread gathering momentum

Just a comment about higher waves: I don't think they look nice/realistic in-game. They are just too short. It's not really possible to 'ride' them (just compare them to some storm pictures from Buchheim). I guess the engine is not capable to model large waves properly. Maybe that's the reason why they limited the wind speed

Now some weather questions :

- Is it known what happens if a new weather pattern is created before the old pattern has been reached? Can this cause problems?

- A possible weather change every 10-12h sounds really short to me Is this realistic? When shadowing a convoy for some time (up to days) I don't want to see the whole weather pattern of SH3 so that I can choose the best weather to attack.

Anyway, I am sure we will see a good algorithm in the end! Keep up the great work, h.sie.

Cheers, LGN1
LGN1 is offline   Reply With Quote
Old 11-26-10, 03:36 PM   #632
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

I'm glad that I can finally use some boring statistics knowledge I learnt and never needed up to now.

Lets say because of the bug the weater algorithm sticks at high windspeeds. My fix will only be active if windspeed is 14 or 15. Then, with a certain chance C the windspeed will be reduced to a lower value (1m/s ... 8m/s) .

In order to adjust the chance C, I must have an idea of what is the resulting probability P that the bad weather period is interrupted after n = 1, 2, 3, 4,..... weather periods.

Solution: P = C * (1-C)^(n-1)

That means:

If I chose for the chance C = 10%
---------------------------------
P that bad weather is interrupted after the 1. weather period: 10%
P that bad weather is interrupted after the 2. weather period: 9,0%
P that bad weather is interrupted after the 3. weather period: 8,1%
P that bad weather is interrupted after the 4. weather period: 7,3%
P that bad weather is interrupted after the 5. weather period: 6,6%
P that bad weather is interrupted after the 6. weather period: 5,9%
P that bad weather is interrupted after the 7. weather period: 5,3%
P that bad weather is interrupted after the 8. weather period: 4,8%
P that bad weather is interrupted after the 9. weather period: 4,3%
P that bad weather is interrupted after the 10. weather period: 3,9%
P that bad weather is interrupted after the 11. weather period: 3,5%
P that bad weather is interrupted after the 12. weather period: 3.1%
P that bad weather is NOT interrupted after 12 weather periods: 28%

If I chose for the chance C = 20%
---------------------------------
P that bad weather is interrupted after the 1. weather period: 20%
P that bad weather is interrupted after the 2. weather period: 16%
P that bad weather is interrupted after the 3. weather period: 12,8%
P that bad weather is interrupted after the 4. weather period: 10,2%
P that bad weather is interrupted after the 5. weather period: 8,2%
P that bad weather is interrupted after the 6. weather period: 6,5%
P that bad weather is interrupted after the 7. weather period: 5,2%
P that bad weather is interrupted after the 8. weather period: 4,2%
P that bad weather is interrupted after the 9. weather period: 3,3%
P that bad weather is interrupted after the 10. weather period: 2,6%
P that bad weather is interrupted after the 11. weather period: 2,1%
P that bad weather is interrupted after the 12. weather period: 1,7%
P that bad weather is NOT interrupted after 12 weather periods: 7,2%

So C = 20% seems to be the optimal value for me.

By the way: this is not for bragging with formulas. I'm too old for that. But much more I think it's good for all interested people to know what we can expect from the fix (which is almost done!)

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 11-26-10 at 03:56 PM.
h.sie is offline   Reply With Quote
Old 11-26-10, 06:54 PM   #633
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: Funny, I found out that in the arctic sea I could not force windspeed lower than 7,5, even if I set ESI+3D4 to 0.

In other regions, St. Naziere, setting ESI+3D4 to 0 lets the wind go down to 0. So there is more code related to windspeed, maybe a location-dependent lower limit?

Lets hope that reducing wind to 7,5 is sufficient to remove fog.

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-27-10, 06:15 AM   #634
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

I'm very sceptic about all this messing in weather algorithms. Even the described Stiebler constant bad weather bug don't convince me. Maybe I only one who wahe a different weather experiences. I agree the storms can be big pain in the a**, but when they finish weather can back to "normal". Only problem what I see is a waiting for a weather change. Problem with fog is bad, cos minimum constant fog period is to first weather change interval (as we agree 40h), so that give as almost two days with fog. I think reducing intervals time should reduce all problems with weather. Reducing waiting time for change we also reducing time of duration of specific weather.

Actual "fixing" wind in north atlantic can have a bad effect on wind in south atlantic or mediterranean sea or increasing bad weather periods or decrasing muchly on arctic sea.
__________________
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
Yoriyn is offline   Reply With Quote
Old 11-27-10, 06:31 AM   #635
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

In fact: The delimiter at EnvSim.act+DDA5 does not always use the same limits. In the arctic, windspeed limits are not [0,49....15] but [7.5....15].
The limits itself can be found at ESI+3DC and ESI+3E0.

@Yoryin: I'll make a special version for you without any code messing except for time period reduced by 3. but for Stiebler et al. this is not sufficient. where is the problem?
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-27-10, 07:09 AM   #636
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

In some tests in the northsea:

1. I fixed windspeed to 1m/s and watched fog over the time. then
2. I fixed wind to 15m/s and watched fog.

My first impression: Reducing windspeed does not affect fog and rain, at least there is no obvious strong correlation, which we need to control fog by windspeed. So I fear our idea does not work as intended. So I'll try to control fog directly.

Maybe in the game fog often occurs when wind is 15. but that does not automatically mean that windspeed controls fog.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-27-10, 07:35 AM   #637
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

Sorry I was sure there will be only one version. I thought you joking with all this extra versions. Sorry again, no more problems with me I'm closing my mouth forever
__________________
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
Yoriyn is offline   Reply With Quote
Old 11-27-10, 08:02 AM   #638
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

I'm not joking
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-27-10, 09:04 AM   #639
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Yoriyn: So what factor would you like? 3.0?

Since I wasn't able to reproduce the long-time sticking on no-visibility, I think the idea to simply reduce time interval is not that bad. i like there more often changes, even if they are not 100% realistic. and even if the bug occurs, its length is reduced by 3.

Nevertheless I'll not give up to make a better fix. But for this I need to REPRODUCE the bug. Under which circumstances does it occur? location? season? year? month? any suggestions?

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-27-10, 09:19 AM   #640
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

Yes factor 3 for me please

When I can expect relase?
__________________
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
Yoriyn is offline   Reply With Quote
Old 11-28-10, 06:57 AM   #641
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@ALL (who are interested) : Good news:

1) I finally managed to get write access to EnvSim.act. That means, I can work with a counter and store some stuff, which could be important when measuring the length of a bad-weather period. Patched sh3.exe is not required.

2) Also, I found a way to force windspeed AND fog to good conditions. The trick is not to change windspeed variable itself directly, that didn't change fog. Instead, I found out that the random numbers generated influence not the absolute weather but the weather tendency. If the random number is +1, weather gets worse. storm, fog are the result in 2 of 3 cases (@Stiebler: the other missing case of these 3 cases is caused by a scrambler related to the counter at 0xDD02BC). When the random number is -1, weather gets better in most cases (not always, maybe also because of a scrambler, but not absolutely sure in this point).

So I can now realise a fix that:

1) Measures the length of the bad weather period, which could be identified

a) either only by the amount of fog, or,
b) by the amount of fog AND windspeed.

2) If the bad weather period is longer than a certain value (could be a constant or a randomly chosen value), I bypass the random generator and load some -1 instead (or allow only negative random values), and wait, until weather gets better. I am slightly optimistic now, that we can fix the weather bug (which I have never seen, bru-har-har!)


@Yoriyin I think, your patch will be done in the next 0-2 days.

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 11-28-10 at 01:05 PM.
h.sie is offline   Reply With Quote
Old 11-28-10, 07:25 AM   #642
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Release: Bad Weather Fix - Yoryin special Edition

From the readme:

Weather Fix - Yoriyn Edition
----------------------------

Background
----------

Due to a serious bug, the sh3 weather sometimes sticks at high windspeeds with 15m/s and fog, rain and no visibility.

What does this mod do
---------------------
It simply reduces the weather changing period by a factor of 3, so that bad weather periods are shorter now. I don't know if now all problems are solved.

- Tested with WinXP/32Bit and Win7/64Bit.

- Should work with every version of sh3.exe

h.sie

Download: See my mediafire page, folder "Bad weather fix"
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-28-10, 07:27 AM   #643
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Quote:
Originally Posted by h.sie View Post
@ALL (who are interested) : Good news:

1) I finally managed to get write access to EnvSim.act. That means, I can work with a counter and store some stuff, which could be important when measuring the length of a bad-weather period. Patched sh3.exe is not required.

2) Also, I found a way to force windspeed AND fog to good conditions. The trick is not to change windspeed variable itself directly, that didn't change fog. Instead, I found out that the random numbers generated influence not the absolute weather but the weather tendency. If the random number is +1, weather gets worse. storm, fog are the result in 2 of 3 cases (@Stiebler: the other missing case of these 3 cases is caused by a scrambler related to the counter at 0xDD02BC). When the random number is -1, weather gets better in most cases (not always, also because of a scrambler).

So I can now realise a fix that:

1) Measures the length of the bad weather period, which could be identified

a) either only by the amount of fog, or,
b) by the amount of fog AND windspeed.

2) If the bad weather period is longer than a certain value (could be a constant or a randomly chosen value), I bypass the random generator and load some -1 instead, and wait, until weather gets better. I am slightly optimistic now, that we can fix the weather bug (which I have never seen, bru-har-har!)


@Yoriyin I think, your patch will be done in the next 0-2 days.

h.sie
Hi h.sie !

Wonderful news !

When do you plan to release your mod / the files ?

Best regards,
Magic
__________________
Magic1111 is offline   Reply With Quote
Old 11-28-10, 07:43 AM   #644
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

Thank you, I starting tests now.

After first tests I can say weather changing intervals in my SH3 is 10h:40min. So it is perfect exacly what I expect. Now I'm starting longer tests to check weather behavior.

Great job
__________________
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

Last edited by Yoriyn; 11-28-10 at 08:13 AM.
Yoriyn is offline   Reply With Quote
Old 11-28-10, 12:43 PM   #645
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Yoriyn: In the arctic sea weather changes more often, hopefully not too often now.

@Magic1111: I don't know. days? weeks?

@LGN1: One has to differ between the, say "current_weather" and, say, "current_end_weather". the second is what's calculated every weather period (20-40h), the first then slowly fits to the second during the time. but only the second is considered for the calculation of a new weather, that means it doesn't matter if the first has already fitted to the second or not. We have to discuss about the weather period. I asked earlier, but only got 1 answer: factor 3. I don't know what e.g. Hitman and Stiebler are thinking about that.

@ALL: The released Fix "Yoriyn edition" is not my final fix, it's just a quick fix for those who want shorter weather periods without any changes to the weather algorithm.

There will follow my fix I described above and perhaps, if necessary, a Stiebler's edition containing Stieber's approach to fix the weather bug.

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 11-28-10 at 01:08 PM.
h.sie is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:20 PM.


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