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-21-10, 03:41 AM   #541
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

I can say after my readings wind 0m/s is very rare phenomena at sea , more frequent only at 30deg latitude on both hemispheres.
__________________
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-21-10, 05:34 AM   #542
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

As one could see in the past, every little code change has the potential for errors (3 bugs in V15D). In Assembler you can easily lose overview. Obvious errors (CTD) are okay, because you can see and eliminate them. but the real problem are invisible side-effects which always are possible even if one works accurate as I do (mostly).

So I tend to make as few changes as possible, hopefully with acceptable results. And only if these easy fixes don't work, I must go the next step in complexity in order to reach the aim.

Reducing weather change interval was such an easy change. I think we should give this little change a chance. According to my observations weather changes are well balanced and homogenuous with some short-time sticking on high windspeed. Where is the problem with that? Because with the much shorter weather change intervals these nasty time periods with wind=15, fog and rain are much shorter now!

In Stieblers NYGM-weather report I could read that the devs - EVEN WITH SDK - lost overview over their weather algorithm. So how should I achieve overview WITHOUT SDK?

Since the time counter always starts at 0 when reloading a game, you had to wait 40 hours in the past for the first weather change after loading a game. now the weather change comes much earlier.

So although I fear very much to make deeper code changes, I try to achieve a better understanding of the complex weather routines. I am not yet able to locate the variables for fog and rain, but I think that's only a quesion of time.

By the way: Could someone provide a better weather algorithm, especially in C/C++??

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

So maybe good compromise is set the weather change intervals to 10-12h. This should create half shorter storms with chances to weather change twice a day.
__________________
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-21-10, 06:04 AM   #544
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@YoriYn: Does it work for you now?
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-21-10, 06:14 AM   #545
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Hitman: After loacating rain and fog variables I can post some statistics.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-21-10, 06:36 AM   #546
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

I'm very glad to see that H.sie is making progress with this, and that others are willing to test his work with published results.

I have some general observations to make:

1. For testing:
a) I found, with the RealWeatherFix, that the best way to test is to take a IXD2 boat down to the equator (where weather changes occur more often) and then cruise around at tc=1024x. Sail out of France in late 1942 at 2048x tc to avoid most or all air attacks in the Bay of Biscay, then cruise down to the equator, taking readings every 24 hours of game time. That really sorts out when you are getting protracted 'rainy-storms' (15 m/s, heavy rain, heavy fog).
b) It is essential to test in campaign mode. Mission mode is supposed to use its own weather parameters. I don't think it does, due to a bug, but I might be wrong, so why take the chance? Test in campaign mode. That is how everyone plays SH3.

2. Envsim.act.
I've examined this now as best as I can. H.sie is right, this is where all the weather parameters are stacked. However... the subroutines are all short, just changing a couple of parameters, and then call subroutines elsewhere, probably in sh3.exe.

This is really inconvenient, since it means we cannot just slice out a section of buggy code and replace it with fresh code. It becomes necessary to understand the function of each subroutine, and then (perhaps) to replace it without any real understanding of the interaction with the bulk of the weather code that it replaces.

I don't know why the devs did things like this, although there must have been a reason.

3. Replacement C/C++ code.
H.sie asked for replacement code. I'm an AI programmer (AI = Artificial Intelligence) and I could easily write a replacement weather code (not as sophisticated as the original, but less tiresome in its effect) as a chunk of code, but, as stated above, how would you fit it into the existing code? (which also includes sun halo effects, boat shadows and so on.)

Maybe if H.sie could isolate that part of envsim.act that affects ONLY the weather, then we could just redirect the pointer to my code, attached to the end of the envsim.act as a discrete chunk. That might work (if we knew to what point my code should return to the original without being overwritten afterwards), but I suspect from what I have seen that this will affect lots of other parameters too. We would see many unwanted effects that are also controlled by envsim.act.

So everything depends still on H.sie. I must confess that I am also nervous about what Ubisoft lawyers might think about my recoding proposal, although clearly there is no intention to deprive Ubisoft of royalties, nor to steal Ubisoft's programming secrets. Meddling with their code is substantially different from changing the values of parameters.

@H.sie:
When I tried yesterday, I could not find either your V15D beta mod, nor your revised envsim.act file on your mediafire page.

Stiebler.
Stiebler is offline   Reply With Quote
Old 11-21-10, 06:44 AM   #547
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

h.sie: I reinstall my SH3 once again, deleting all old files. But have the same problem on the stock game with your v15d patch. Are you sure you put good file EnvSim.act to download section?

Other thing is, can you create bigger wind then 15m/s, cos 15m/s is moderate wind.
Look here:
http://en.wikipedia.org/wiki/Beaufort_scale
__________________
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-21-10 at 07:08 AM.
Yoriyn is offline   Reply With Quote
Old 11-21-10, 07:15 AM   #548
casso
Swabbie
 
Join Date: Aug 2007
Location: Poland
Posts: 11
Downloads: 127
Uploads: 0
Default

Hi H.Sie
I like the idea to change weather code, and as Yoriyn said I have that question too - is it possible to code wind speeds above 15m/s for example to 25m/s (which is 10 on Beaufort scale and when the real storm begins) ? Or is this much more complicated than I can imagine ?
casso is offline   Reply With Quote
Old 11-21-10, 07:36 AM   #549
Volk2
Medic
 
Join Date: Sep 2010
Posts: 160
Downloads: 25
Uploads: 0
Default

Quote:
Originally Posted by casso View Post
I like the idea to change weather code, and as Yoriyn said I have that question too - is it possible to code wind speeds above 15m/s for example to 25m/s (which is 10 on Beaufort scale and when the real storm begins) ? Or is this much more complicated than I can imagine ?
Lets focus on the weather problem for now. The constant fog/zero visibility case is much more important. Anyway, the sea at 15m/s looks ok in game, there could be possibly engine/graphical problems with the sea and ship behaviour on 25m/s, like the old sinking ships problem, weird looking waves or u-boat flying above water...
__________________
Volk2 is offline   Reply With Quote
Old 11-21-10, 08:01 AM   #550
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

Wolk (sorry for translate you name, but I can't write in cyrillic on my PC): You right !!!! Anyway all decisions depends from h.sie

Or maybe the weather stick to 15m/s because game can work on variables above 15, and all variables above 15 are limited to create 15m/s wind. Maybe developers create artificial 15m/s border to prevent above (Wolk writed) problems.
__________________
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-21-10 at 11:12 AM.
Yoriyn is offline   Reply With Quote
Old 11-21-10, 11:24 AM   #551
casso
Swabbie
 
Join Date: Aug 2007
Location: Poland
Posts: 11
Downloads: 127
Uploads: 0
Default

If you remember, there is wave height paramter in SH3C, so what you think about doubled wave height when wind speed is above 15m/s? If it's impossible to code speeds above 15m/s maybe make current rough 15m/s sea state appear on 14m/s and at 15 make waves two times bigger to simulate real storm... then if it could be possible too, make WO to report no 15m/s wind but 25m/s.
I was running SH3 for a while to test 2x waves and I didn't see any problems with ships behaviour and graphics.
casso is offline   Reply With Quote
Old 11-22-10, 03:02 AM   #552
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

H.Sie , the envsim.act you uploaded is crashing (maybe is an issue again for the win 7 ?)

seriously now .....you don't know what the ruler is ? Anyway , i will get back to it when you relax a little bit after all these requests-wishes (that some of them are really interesting to be fixed .....such the weather for example)

@Stiebler : when you say ''...zero vissibility...problem'' what exactly do you mean ? i am asking this becuase some settings at sensors and at scene.dat (fog settings) are also responsible for the game's behaviour there
__________________
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 11-22-10, 03:18 AM   #553
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: Thanks for your detailed information.

1) Tests, SingleMissions & Campaigns:
So in the future I'll test mainly in Campaign mode. Never thought that weather is different in single missions, because I see no reason for that. But now I really discovered a shorter weather change period in campaigns.

2) Envsim.act:
Yes, the code is complex and often interacts with code from other dlls and so it is no good idea to bypass or replace it by our own algorithm. Too dangerous. But there is a little chance left:

Every time the time counter reaches the weather change period (which I can reduce), a certain routine is called which calculates a New_Weather (New_Windspeed, New_Winddirection, New_RainIntensity, New_FogIntensity, New_CloudsIntensity). Then, in the following time, the Current_Weather (Current_Windspeed, Current_RainIntensity and so on) slowly adjusts to New_Weather. New_Weather keeps constant until it is changed at the end of the change period.

At the end of this New_Weather routine I could place a jump command to a code section in order to make some corrections, especially for New_FogIntensity (and maybe New_Windspeed) and than jump back to the original code.

But unfortunately, currently I can only arbitrarily manipulate New_Windspeed, New_Winddirection and New_RainIntensity, but not New_FogIntensity and New_CloudsIntensity. But with a little luck I'll find the variables responsible for New_FogIntensity.

3. Question:
Wouldn't it be enough to
a) shorten the weather change period (already possible)
b) correct New_Windspeed (already possible)
c) correct New_FogIntensity (not yet possible) ???

5. Windspeed:
The internal algorithm for windspeed calculates an emphasis factor (depending on season, region and so on) and multipies this emphasis factor with a random number. The result lies between 0 and sometimes more than 20m/s. But later the values are delimited to [0,499.....15m/s]. We should not change that -> Side effects. But that's the reason why windspeed sticks at 15m/s; the algorithm is overdriven in some situations.

6. Weather report:
Funny: Weather report always relates to New_Weather and NOT to Current_Weather. So if at the beginning of a new weather period Current_Weather has not adjusted to New_Weather, you get a wrong report.

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

Last edited by h.sie; 11-22-10 at 03:36 AM.
h.sie is offline   Reply With Quote
Old 11-22-10, 03:57 AM   #554
Yoriyn
Planesman
 
Join Date: Jan 2008
Location: Control room
Posts: 181
Downloads: 154
Uploads: 0
Default

I agree with Makman94, after downloading and using MEPv3 even zero visibility is not that bad, so I'm sure we can make fog manipulation.

h.sie: Can you "unlock" stronger wind in the game?
__________________
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-22-10, 04:42 AM   #555
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie:
Quote:
At the end of this New_Weather routine I could place a jump command to a code section in order to make some corrections, especially for New_FogIntensity (and maybe New_Windspeed) and than jump back to the original code.
Now that is a good idea, which will probably solve all problems if you can work out the remaining issues with the fog intensity and cloud intensity.
Quote:
3. Question:
Wouldn't it be enough to
a) shorten the weather change period (already possible)
b) correct New_Windspeed (already possible)
c) correct New_FogIntensity (not yet possible) ???
If by 'correct' you mean 'change to a different constant setting', then I doubt if that would be enough to improve the weather by itself. (But it is worth trying first, of course.)

@Makman, Yoriyn:
When I wrote 'zero visibility', I wrote too carelessly. I meant the visibility that follows after heavy rains and heavy fog, which is too low/short to make attacks on convoys or even on single ships unless you are very close (< 1,000m). I intended no criticism of the poor visibility; my criticism is of the frequency with which this happens due to poor weather control.

@General:
Like Makman, I found that use of H.sie's new envsim.act file caused a crash in second-stage loading (after the main menu appears, and the player starts a patrol). I am also using 64-bit Windows-7. This occurred with an un-modded form of the 4GB_Sh3.exe that I have been using for some time now without problems.
In my case, it was a very serious crash, that apparently corrupted at least one other key file. I had to copy over a clean install from another drive and start again.

Stiebler.
Stiebler 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 01:41 AM.


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.