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 12-02-10, 09:33 AM   #46
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
At northern latitudes, the code changing the weather (specifically, the wind speed) is accessed only very infrequently.
This seems to confirm the notes from the Devs we had, saying that the weather changes less frequently in the artic areas. What we didn't know yet is how it was done, and now we do: The code changing the wind is accessed less frequently. This seems also to indirectly confirm that wind leads most other changes, which is again logical because most storms I have seen in real life were preceded by a sudden increase in wind strength.
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 12-02-10, 09:53 AM   #47
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Instead of an overall reducing of the weather change interval I could only make very long intervals shorter.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 12-02-10, 10:04 AM   #48
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by Stiebler View Post
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.
Thank you very much for your efforts Stiebler (and H.Sie of course) for this envsim.act
start testings ASAP
does the testings must be only in campaign mode or it is not necessery ?
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 12-02-10, 10:40 AM   #49
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@Makman:

Mission weather is supposed to be different from campaign weather (when a mission is used, the weather paramenters set by the user are supposed to override everything else). Whether this is really true is doubtful - the weather always changes in mission mode too.

However, everyone plays in campaign mode, therefore that is much preferred for testing. If you test in mission mode, no one will know what the results mean.

Stiebler.
Stiebler is offline   Reply With Quote
Old 12-02-10, 11:15 AM   #50
NGT
Lieutenant
 
Join Date: Sep 2006
Posts: 259
Downloads: 290
Uploads: 3
The Feedback

Quote:
Originally Posted by Stiebler View Post

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

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

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

*WE WANT FEEDBACK*


Stiebler.
Hello Stiebler, h.sie and other friends

There is the results from my test with Stiebler's first approach.

................................Test Protocol:...............................

PC with 4 GB RAM, (3.25 effective) with Windows XP 32 bits
Processor: Intel Core 2 Duo 6850 / 3.0 MHz
Graphics by ATI Randeon HD 5850

NYGM 3.4 with MEP 3.0 16 km environment and several additional ships

(MEP 3.0 16 km is standard environment for LSH3-v.5)

Patrol with full campaign filles, no empty campaign filles. Attack and sink some ships, for better game reality.

Flottila II, start at 1.4.1942 // patrol end at 3.5.1942 >>> 32 days

All test/patrol inside area AK, north Atlantic

Time compression 2048 at 95% of game time.

Weather check every 3 hours, average value.

U-boot IXC

................................................The Test.................................................. .

Starting wheather: 5 m/s wind 1/4/1942.........23:30
.......fog+precipitations none from Lorient FRANCE

1st change: 3.4.42 at 23:00......1 m/s.................fog+precipitations none
2
change: 5.4.42 at 21:30......9 m/s.................fog light+precipitations none
3 change: 7.4.42 at 15:30......15 m/s.................fog light+precipitations none
4 change: 9.4.42 at 10:50......12 m/s.................fog light+precipitations none
5 change: 11.4.42 at 05:40......15 m/s.................fog light+precipitations none

................................SAVE+EXIT......... ..................(must take children from school... )

6 change: 13.4.42 at 01:50......10 m/s.................fog light+precipitations none
7 change: 14.4.42 at 20:00......7 m/s.................fog light+precipitations none
8 change: 16.4.42 at 11:30......13 m/s.................fog light+precipitations none
9
change: 18.4.42 at 05:00......9 m/s.................fog light+precipitations none
10
change: 19.4.42 at 16:00......1 m/s.................fog light+precipitations none
11
change: 21.4.42 at 04:20......9 m/s.................fog light+precipitations none
12
change: 22.4.42 at 16:20......6 m/s.................fog light+precipitations none
13
change: 24.4.42 at 04:50......0 m/s.................fog none+precipitations none {=8 days stick at 0 m/s}
14
change: 2.5.42 at 08:30......3 m/s.................fog light+precipitations none
........................GAME PAUSE FOR 20 REAL LIFE MINUTES.........................wind change after 3 game hours only:
15
change: 2.5.42 at 11:40......10 m/s.................fog light+precipitations none
16
change: 3.5.42 at 13:40......11 m/s.................fog heavy+precipitations heavy {=next change after only 1 hour}
17
change: 3.5.42 at 14:40......15 m/s.................fog heavy+precipitations heavy

END PATROL INSIDE AREA AK


..............................Test End.......................................

As we can see, the rain is not a common phenomenon on my computer.... Same for the fog.....

And the wind seems to be more often over 7 m/s.

The 20 minutes paused game do not affect weather counter, obviously, it continue counting.

The weather stick on 0 m/s now, instead of 15 m/s (but I like that ).


@Stiebler: I should continue with equator area, with the same protocol, or you would like I change something?

Thank you all for yours attention
(hope you understand basic English...)

Last edited by NGT; 12-02-10 at 11:32 AM.
NGT is offline   Reply With Quote
Old 12-02-10, 02:01 PM   #51
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

Many thanks for the feedback, NGT. (Also, there is no problem with your English.)

The results around the equator are very much as we expect, however I suggest you check the weather only every 24 hours (it is less effort for you, and we are concerned to end only continuous bad weather.)

I think it will also be more fun for you if now you play a proper patrol in any sea area which you prefer.

But please keep posting the results!

Thanks again,
Stiebler.
Stiebler is offline   Reply With Quote
Old 12-02-10, 05:05 PM   #52
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

some questions for fine-adjusting the bad weather control:

1. how many weather periods with storm 15m/s are common/okay/normal?

2. how many weather periods with storm 15m/s should not be exceeded?

3. how many weather periods with fog are common/okay/normal?

4. how many weather periods with fog should not be exceeded?
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 12-02-10, 05:08 PM   #53
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

What I see in NGT's tests is lot os of light fog (mist or horizon haze) but seems that overall the tendency to have better weather is good
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 12-02-10, 06:41 PM   #54
NGT
Lieutenant
 
Join Date: Sep 2006
Posts: 259
Downloads: 290
Uploads: 3
2nd test in equator area (FG)

This is the second test for ''Stiebler_EnvSim''.

As Stiebler suggest, I check only every 24 hours for this test.

That is good, because the weather was changing at least every 24 hours this time, so I have one report per day. (as supposed to be, according Stieblers statement in post 29)


For test protocol, see post 50
. Only change: the final patrol area is FG, around equator.

Test/Patrol start: 4.6.1942 Lorient FRANCE

Test/Patrol end: 3.7.1942 FG area equator, west Africa. Total=29 days.

4.6.1942.......02:10.........5 m/s Fog none+ Precipitations none

5.6.1942.......02:10.........5 m/s Fog light + Precipitations none
6.6.1942.......02:10.........5 m/s Fog light + Precipitations none
7.6.1942.......02:10.........15 m/s Fog heavy + Precipitations heavy
(North to Madeira)
8.6.1942.......02:10.........1 m/s Fog light + Precipitations none (DH 54)
9.6.1942.......02:10.........7 m/s Fog medium + Precipitations none
10.6.1942.....02:10.........13 m/s Fog light + Precipitations none (DT 87)
11.6.1942.....02:10.........1 m/s Fog none + Precipitations none (EJ 49)
12.6.1942.....02:10.........12 m/s Fog light + Precipitations none (ES 35)
13.6.1942.....02:10.........7m/s Fog light + Precipitations none (ET 52)
14.6.1942.....02:10.........15 m/s Fog heavy + Precipitations heavy (EU 72)
15.6.1942.....02:10.........2 m/s Fog light + Precipitations none (EU 98)

...............................START PATROL INSIDE FG AREA (grid FG 11 - 06:00)..................

16.6.1942.....02:10.........7 m/s Fog light + Precipitations none

17.6.1942.....02:10.........0 m/s Fog none + Precipitations none
18.6.1942.....02:10.........6 m/s Fog light + Precipitations none
19.6.1942.....02:10.........10 m/s Fog light + Precipitations none
20.6.1942.....02:10.........9 m/s Fog heavy + Precipitations heavy
21.6.1942.....02:10.........7 m/s Fog light + Precipitations none
22.6.1942.....02:10.........8 m/s Fog light + Precipitations none
23.6.1942.....02:10.........11 m/s Fog light + Precipitations none
24.6.1942.....02:10.........15 m/s Fog light + Precipitations none
25.6.1942.....02:10.........15 m/s Fog heavy + Precipitations heavy
26.6.1942.....02:10.........2 m/s Fog light + Precipitations none
27.6.1942.....02:10.........0 m/s Fog none + Precipitations none
28.6.1942.....02:10.........2 m/s Fog none + Precipitations none
29.6.1942.....02:10.........7 m/s Fog medium + Precipitations none
30.6.1942.....02:10.........15 m/s Fog light + Precipitations none
1.7.1942.......02:10.........15 m/s Fog light + Precipitations none
2.7.1942.......02:10.........13 m/s Fog light + Precipitations none
3.7.1942.......02:10.........5 m/s Fog light + Precipitations none


Maximum number of consecutive days with 15 m/s: 2

Total number of days with 15 m/s: 6 from 29.

We can see in the beginning of the test/patrol, close to Lorient, the weather needs 2 days for changing, like in previous test inside AK area in North Atlantic. But from Madeira already it changes every 1 day only.

I hope all that was a little bit useful for the moders....

Thank you for your attention
NGT is offline   Reply With Quote
Old 12-03-10, 05:08 AM   #55
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

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 is offline   Reply With Quote
Old 12-03-10, 08:08 AM   #56
Lanzfeld
Grey Wolf
 
Join Date: Jan 2002
Location: New Tripoli, PA
Posts: 994
Downloads: 64
Uploads: 0
Default

Wow,

I have been gone for a long time. After the epic fail of SH5 it is nice to see someone fixing up the classic! Keep up the great work guys! Maybe after you get it all tweaked (weather & your other fixes) you can blend it with GWX to make the ultimate mod?

GREAT WORK!
Lanzfeld is offline   Reply With Quote
Old 12-03-10, 08:54 AM   #57
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Hello Stiebler,

until now I was not successful to find variables or code to affect fog.

But I think it'a a good way to force better weather by allowing only negative random numbers, say, from -0.5 to -1.0. This automatically reduces wind to < 7m/s and in most cases (but not in 100%), fog disappears. So there remains a very small statistical chance of persistent fog, but I never had such a situation during my tests.

I also try to limit the weather period to 1 (maybe 2) days. Maybe by making all periods shorter by a factor of 1,5 or only shorten the very long periods, so that I can allow more than 3 fog periods. It will be a randomly chosen, variable value between 3 and 5 or 6 periods.

In which areas do the longest periods occur?

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 12-03-10, 09:28 AM   #58
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
I think it'a a good way to force better weather by allowing only negative random numbers, say, from -0.5 to -1.0
That's something Stiebler and I tried some time ago but with the scene.dat file, i.e. giving the wind negative values in the changespeed. Apparently when Stiebler tested it, the game crashes, but the concept was good and I'm happy to see it confirmed now

Quote:
So there remains a very small statistical chance of persistent fog, but I never had such a situation during my tests.
Since Stiebler says that there is a counter for fog also, I would beg to manipulate it and ensure that fog is a really rare occurence. In the reports from NGT you see that 80% of the days there was light fog, i.e. horizon mist that reduces you visibility (depending on the environment mod used) to 75% of the normal maximum visibility distance (20k, 16k or 8k, depending on the mod used). This is a terrible thing in SH3, considering that you are already limited in what you can see (In real life up to 50km you can see smoke columns over the horizon) and hence have less chances of spotting convoys & other targets (You also work alone, as there no wolfpacks).

I should also not that fog can be absolutely disabled with a simple tweak on the scene.dat, but of course keeping it in the game albeit with a lower chance to appear will always be better.

Keep the good job
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 12-03-10, 10:25 AM   #59
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

I believed that I was quoting H.sie when saying above that there would be a fog counter. But evidently it is harder to find the fog variable than we supposed.

H.sie has delivered to me a variant of envsim.act in which data can be written to the file, as well as the standard read/execute of a code file.

I have made the change to my existing envsim.act file and modified it to allow a windspeed counter which forces a return to 6 m/s if high winds persist despite the existing subtraction code. Testing it now. It works all right with the Ollydbg2 disassembler attached.

Stiebler.
Stiebler is offline   Reply With Quote
Old 12-03-10, 10:30 AM   #60
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Hitman,

your post gave me a new idea:

1) Search where in memory "fog_change_speed" from scene.dat is stored.

2) Using a little fix that forces "fog_change_speed=0" (or extremely low value, if 0 is impossible) in that variable for most of the times, so with a little luck fog isn't able to occur.

With a little luck we can directly control fog this way.
I'll test that idea this evening!
__________________
My Mediafire page: http://www.mediafire.com/hsie
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 07:37 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.