View Full Version : Weather control
Wave Skipper
12-08-07, 09:29 AM
I reloaded SH3 to review the good old days but something strange has taken place - in every career mission the weather starts out typical harbor - wind 5 knots, clear skies - and then moves to a wind of 8 knots or so with cloudy skies but no rain - and then the sea becomes like glass with wind 0 knots and clear skies FOR THE REST OF THE GAME. Is my DVD screwed up or what? Has there been a reality shift? I have reloaded it twice and still the same results.
So where exactly is the weather data and how can I change it?
kenijaru
12-08-07, 09:34 AM
i have sort of the same problem... but the other way around, lets say i couldn't man the deck gun for 35 days straight...
Subtype Zero
12-08-07, 08:57 PM
There are currently two ways to make changes to the weather, manually or with Skweetis' SH3 Weather program. You can use Skweetis' program in port, just before starting a mission; you can set your own weather settings, or allow the program to make random changes. However, this only works at the beginning of your mission and is set until you start a new patrol. Most likely, your weather will change, but you will not have any control over it.
Personally, I like to change the weather myself. To make changes manually, and in the middle of a patrol, you need to edit a few text-files (easy to do). Open your Ubisoft/SilentHunterIII/data/Campaigns/Campaign folder and change the highlighted text in each of these files: Campaign_LND.mis, Campaign_RND.mis, and Campaign_SCR.mis :
[Mission]
Title=GWXR1.02FULL
MissionType=0
MissionDataType=1
Year=1939
Month=1
Day=1
Hour=12
Minute=0
Fog=1
FogRand=0
Clouds=1
CloudsRand=1
Precip=0
PrecipRand=1
WindHeading=192
WindSpeed=7
WindRand=1
WeatherRndInterval=2
SeaType=0
Briefing=
where Fog can be set to 0-3 (none, light, medium, heavy), Clouds 0-2 (none, medium, heavy), and Precip 0-2 (none, medium, heavy). The "xxxRand=" settings control the degree of change and can be set to 0-2 (none, minor, extreme). Finally, WeatherRndInterval (maybe the most important variable) controls how rapidly the program will check to "change" the weather. This value can range from 2 to 96, but I never set it above 7 or 8 because values higher than that makes the weather change too slowly for my tastes.
Finally, note that the frequency that you save seems to effect weather changes. When you save, the game resets its timer for weather changes to zero, with the result that the more saves you make, the more likely you are to have unchanging weather. :stare:
Subtype Zero
12-08-07, 09:33 PM
Forgot to mention: to open the .mis files, click on the file, pick the "Select the program from a list" button, and then select Notepad or any other textfile program to edit the file. Be sure to uncheck the button which says "Always use the selected program to open this kind of file." (Stupid Microsloth) :roll:
Wave Skipper
12-09-07, 02:54 AM
I will try it. I did finally get my career weather to rain and how I did it was to build a simple mission called: rainlikehell - and in it made the wind 15 and rain total. I sailed around in that mission for about 30 minutes and then returned to my career. Understand that I had played all through 1939 and 40 with no rain at all. But in the next mission after playing the rain mission, I ran into a heck of a storm on the second day. For me it was great - if I could have been there in person I'd have been running around trying to catch the rain in my cap. I think somehow my rain mission kicked what ever it was blocking up my weather in my careers.
But I will try your fix too.
That could be my problem – I was playing my mod called Victory-Mod ( http://www.angelfire.com/crazy/redbrow12/vmod_theory.htm ) in which I built a totally new Campaign_LND.mis, Campaign_RND.mis, and Campaign_SCR.mis. It always worked in the past – I built it back in early 2006. But I did alter many things in it last month and maybe I inadvertently screwed up the weather settings in one of those files. I’ll have to check. I used to be on here as Redbrow in 2005 but switched to Wave Skipper later. Glad to see so much stuff still being done to SH3.
Quagmire1975
12-09-07, 03:17 PM
I reloaded SH3 to review the good old days but something strange has taken place - in every career mission the weather starts out typical harbor - wind 5 knots, clear skies - and then moves to a wind of 8 knots or so with cloudy skies but no rain - and then the sea becomes like glass with wind 0 knots and clear skies FOR THE REST OF THE GAME. Is my DVD screwed up or what? Has there been a reality shift? I have reloaded it twice and still the same results.
So where exactly is the weather data and how can I change it?
I have the opposite problem.
In my game (stock + patch 1.4) the weather is fine when leaving harbour then turns crap further out and stays crap for most of the mission. I've been in storms that have lasted WEEKS!
Also, the later in the war, the worse the weather gets for some reason.
In 1939-40 the weather is superb most of the time, but from '43 onwards it turns really bad:down:
Subtype Zero
12-09-07, 08:56 PM
I have the opposite problem.
In my game (stock + patch 1.4) the weather is fine when leaving harbour then turns crap further out and stays crap for most of the mission. I've been in storms that have lasted WEEKS!
He, he. Yes, that is the usual complaint about SH weather. As I understand it, the game is set up so that the weather around your port is ALWAYS relatively calm. Some kind of design decision, perhaps to avoid excessive crashing and swamping of harbor ships, I believe. The weather usually changes to crap and stays that way after you have been to sea for 2 or 3 days.
Are you up for an experiment? If so, go out on a patrol. Just after leaving port, save your game and check one of the Campaign.mis files. Look for the WeatherRndInterval value. Write down or remember the number. Reload the game and continue your patrol. When the weather changes to stormy, save and exit again and recheck one of the Campaign.mis files. Has the WeatherRndInterval number changed or is it the same? If the number has changed, what number did it change to? If it is a low number (2 or 3), your weather will probably change relatively quickly. If it is a high number (anything over 7 or 8), I bet your bad weather will last a very long time. I'm curious to know what happens, so post your results if you are able.
The reason I am curious is because I'm not sure if the game changes the weather dynamically or if all weather changes are decided by the game engine and set at the beginning of each patrol. If it is the latter, then I don't know if there is much we can do to change the weather behavior of the game, even with programs like SH3Weather or user edits like mine and others. I'm not a modder, so I don't know the answer to this question.
Are there any modders out there who are willing to look at the game files to see if they can figure out how weather changes are implemented by the game? I would really appreciate any insight I can get into this, ahem, interesting :damn: problem.
Subtype Zero
12-09-07, 09:15 PM
I just thought of another possible experiment. After you dock in base, but before you go out on a new patrol, change the WeatherRndInterval value in the three Campaign.mis files to a very high number, preferably between 72 and 96. Reload the game and note how long it takes for your weather to change from nice to crappy. If player editing makes any difference, it should take at least 3-4 days before your weather changes (and maybe even longer than that). On the other hand, if your weather changes in less than 3 days, then we are probably safe to assume that the WeatherRndInterval number is set in the executable and that user input is irrelevant. :down:
I think I will create a new career myself and check this out. Anyone else who wishes to test my theory are more than welcome to do so! Post your results (and any results from the experiment mentioned in my previous post) to this thread. Thanks!
Subtype Zero
12-11-07, 02:26 AM
Mumble, mumble...hello? I think I must be having a conversation with myself! :cry:....:lol:
If anyone is interested, I am still in the middle of several experiments, but I have a few early observations: 1) modifying the .mis files does have some effect. For instance, it will take your initial settings for cloud cover, precip, fog, and wind. 2) Not sure if changes to the xxxRand= do anything, still checking.
3) Changes to the WeatherRndInterval= setting seems to have little effect on the rate of change for the clouds, rain, and fog settings. Has its biggest effect on the wind direction but not the wind speed. :doh: Even with WeatherRndInterval=2, one of my patrols had almost 4 1/2 consecutive days of 15m/sec wind. However, the wind direction changed constantly! :roll: 4) Trying to conduct weather experiments in 1942 is a bad idea! Constantly diving to avoid air attacks. My next experiments will be in 1939 only!
My next step is to set WindRand=0 and see what effect that has...
Stiebler
12-12-07, 05:59 AM
This has all been discussed before:
http://www.subsim.com/radioroom/showthread.php?t=96710&highlight=weather
May I draw specifically to your attention my discovery given on page 4 of the above thread?
This has all been discussed before:
http://www.subsim.com/radioroom/showthread.php?t=96710&highlight=weather
May I draw specifically to your attention my discovery given on page 4 of the above thread?
Hi Stiebler,
I already read all that hread a lot of times...but we yet donīt have any good solution. Do you made any recent progress on the weather stuff?
Stiebler
12-12-07, 02:32 PM
Hi Rubini, nice to see you on this forum again. How is the medical course going?
As described in the original 'weather' thread, I completed a full campaign with settings that still can be seen in the NYGM campaign files (now commented out, but similar to those in the original 'weather' thread). Let us call these temporary settings 'test weather' (details below). It was during the campaign that it became apparent that these test weather settings were causing an aggregate increase in extreme weather (heavy fog and/or 15 m/s winds) over the stock model.
Afterwards, I restored the stock settings to remind me of what it had been like before. Fewer extreme weather conditions certainly, but also something else. I noticed with stock settings that high winds and thick fog often 'wrapped around' so that weather might jump from 15 m/s to 0 m/s, and thick fog to no fog. I had never noticed this with the test weather settings, high winds kept falling slowly to less strong winds, then rising again. The same with the fog - always from heavy fog down to medium fog and then down again to light fog or up again to heavy fog. I must emphasise: 'I had not noticed this'; I can't be sure whether a 'wrap around' occurred sometimes.
This seemed to explain why stock weather gave fewer extreme conditions than test weather, and might explain why the Romanian devs used the stock weather. It would have been just as easy for them to use the test weather, if these changes actually worked properly.
The following header is used in all three NYGM campaign files (_LND, _SCR, _RND):
[Mission]
Title=
MissionType=0
MissionDataType=1
Year=1938
Month=1
Day=1
Hour=12
Minute=0
;; There follows stock weather.
Fog=0
FogRand=0
Clouds=0
CloudsRand=0
Precip=0
PrecipRand=0
WindHeading=0
WindSpeed=5.000000
WindRand=0
WeatherRndInterval=5
;; There follows the NYGM preferred variable 'test' weather system, now abandoned.
;Fog=1
;FogRand=1
;Clouds=1
;CloudsRand=1
;Precip=1
;PrecipRand=1
;WindHeading=0
;WindSpeed=5.000000
;WindRand=1
;WeatherRndInterval=7
SeaType=0
Briefing=
To summarise, then, the 'test' weather produces faster changes of types of weather, compared with stock weather.
However, there is a tendency for the wind speed and fog to keep becoming worse, and the more the weather changes, the greater this tendency becomes. Modifications to the stock weather system seem to result in SH3 providing many storms of short duration, rather than the stock weather of few storms of long duration. In aggregate, stormy days at sea are fewer from the stock system than from the modified systems.
As a result, NYGM campaign files have reverted to the stock system.
I hope that helps.
Stiebler.
Thanks for the reply Stiebler!:up:
Hopes that all goes well with you too!
(excuse me my poor english :D )
Thanks to share your experience on this matter with all us. When you say that the stock settings are in the end, after more long observation, the best ones due Sh3 engine, I just recall that when we mod a lot of things, sometimes we probably could be making some things just worse than stock. Frequently, after long mod sections I just go back to stock settings to compare them. And this "anti-modder rule" sometimes is really present ...LOL
I will try these stock weather settings on my self modded GWX and will post my impressions here after that (Probably will delong some time because I just can finish one patrol each 4-5days).
Just to speak a bit more about mod passion...I should like to say that I like very much yours mods also because you have the same style than I (and a lot of others great modders here): we are always messing with something here and there trying to make SH3 yet more enjoyable. After these almost three years I know Sh3 file structure so well that I can see it even with my eyes closed. And my wife canīt see me anymore with that "submarine always in the same place mid somewhere in the ocean" without ask if Iīm crazy or something like that...:arrgh!:
See you!
Subtype Zero
12-12-07, 10:01 PM
Stiebler--
Sorry if I stepped on the other thread concerning this topic. I was just about to post in that thread, but since you are "here" and that thread looks to be dead, I will continue here.
What you said about the weather algorithm causing the wind to quickly max out seems to make sense. I have thought the same thing myself, that the program first decides if the wind either increases or decreases before deciding how much the wind increases, with the result that if the wind is already at max and the program says the wind should increase, the result is it stays at max. However, if this is true, why doesn't the wind stay at speed "0" for long periods of time as well?
Regarding the difference between "stock" and "test" settings, again I think we are in substantial agreement. Overall, the way SH3 handles weather is like a pretty blunt instrument--not a lot of room for fine tuning. OTOH, I think there is also more going on beneath the surface than we really know about the weather handling in SH3. For example, see my next post for some interesting discoveries I have made concerning the scene.dat file (with thanks to Sober for bringing this up in the "other" thread). :up:
Subtype Zero
12-12-07, 10:36 PM
Ooooh, this is not going to work as I hoped, because I can't copy hex directly into a post. :nope: (As you might guess, I'm not a coder/hexer). Oh well, I'll try my best to make a little sense.
The file scene.dat can be found in the data folder of SH3. Viewed with a hex editor or the minitweaker, you can find some interesting variable names having to do with weather floating around there. Unfortunately, as I said, I am not a modder and do not have the foggiest idea how to hexedit, so I will have to leave it to others to figure out what the heck is going on in these files. Anyhoo, look at the following variable names I found: "WindSpeedChangeSpeed," "RandomWind," "ChangeTimeMin," "ChangeTimeMax," "RandomWindSpeedMax," "RandomWindSpeedVariationSpeed," among others. There are similar variables dealing with clouds, rain, and fog. It also appears that random wind changes interacts with rain somehow, for instance, all the "randomwind" variables are found under the section of the file dealing with rain. Maybe wind speed cannot change above or below a certain value when it is raining? I'm especially intrigued by the variable "RandomWindSpeedVariationSpeed," perhaps there lies the key for solving the "eternal sunshine (or storms :p) of the spotless SH3 patrol."
So, it appears that in addition to the limted user control one can exert over the weather in the Campaign_XXX.mis files, there seems to be some random weather variation built into the scene.dat file as well. Therefore, I am very interested to hear some modders thoughts on this file.
Stiebler
12-13-07, 06:57 AM
@Rubini:
Thanks for your kind thoughts, and I shall be interested to read of your results with the weather when available.
@SubType Zero:
Thanks also for your input. The variables that you mentioned have cropped up before, but no one seems to have done anything with them - until recently (see below). If you search for 'Randomwindspeed*' (don't forget the asterisk) in SubSim, you get just four hits, not counting this thread. Of these four hits, two are recent ones for SH4.
This is what Ref said in January 2007 (concerning file scene.dat):
RandomWind (Random wind parameters)
--ChangeTimeMin (The minimum time after which the random wind changes)
--ChangeTimeMax (The maximum time after which the random wind changes)
--RandomWindSpeedMax (The maximum intensity of the random wind)
--RandomWindSpeedVariationSpeed (The speed of intensity change for random wind)
--RandomWindHeadingVariationSpeed (The speed of heading change for random wind)
DropsNumber (Total number of rain drops)
FallSpeed (Rain drop fall speed)
RainIntensityChangeSpeed (The speed of change for rain intensity)
MinSize (Rain drop minimum size)
MaxSize (Rain drop maximum size)
HeadColor (The color of the start of the drop)
HeadAlpha (The alpha of the start of the drop)
TailColor (The color of the end of the drop)
TailAlpha (The alpha of the end of the drop)
The only use that seems to have been made of these parameters was in November 2007 for SH4, by LeoVampire, and he emphasised that he had tested them only briefly:
There are several node's that control the weather but the higher the time compression used the less the game read's and uses the base setting's.
Wind:
windheadingchangespeed= 0.01 0.03
windspeedchangespeed= 0.01 0.03
Random Wind and rain:
Changetimemin= 3 2 this is the key to weather changes
Changetimemax= 5 5 this is the key to weather changes
Randomwindspeedmax= 0.01 0.05
Randomwindspeedvariationspeed= 0.005 0.009
randomwindheadingspeedvariation= 0.005 0.009
rainintensitychangespeed= 0.01 0.009 I did this because the rain was changing too often.
Original value's are in white and my changes are in Green [Stiebler: second values are green, 1st values are white in original.]
As you can see I changed everything but the max main time. When I did the weather started to change every few hour's not day's so I left that alone.
If you feel like having a go changing these variables, then these two pieces of wisdom will help a lot.
It is easy for anyone to change parameters in scene.dat with TimeTraveler's Mini Tweaker or his SH3FileAnalyzer. I recommend the latter, because it is not sensitive to file size (someone else might have changed the file size). By coincidence, I posted a copy of TimeTraveler's SH3FileAnalyzer in connection with another thread, at this address:
http://files.filefront.com/SH3FileAnalyzer+build367spzip/;9222645;/fileinfo.html
But don't forget, because of the random nature of weather changes, you've got to do a lot of repeat testing of each changed setting to smooth out random fluctuations. And don't forget to make back-ups of original files *before* you change them!
Stiebler.
Wolfehunter
12-13-07, 11:15 AM
Thanks Stiebler for your input. I didn't know that time compression stunted the weather. That could also explain the long rainy storm sessions.
Did GWX 2.0 work on weather? I downloaded SH3 weather 1.5 but I don't know if it will work with GWX 2.0?
Tomi_099
12-14-07, 05:48 AM
Oh Good gave me a Snow ,Snow , Snow !!! :sunny: , or have somebody Snow ? ???
Or if I must make everything same!!!:rock:
Stiebler
12-14-07, 07:21 AM
Out of curiosity, I've tried three long patrols in a IXC U-boat using NYGM's campaign files with *stock weather* and small changes made as suggested by LeoVampire (see my earlier post).
I made the following small changes to scene.dat:
Windheadingchangespeed 0.03 (was 0.01)
Windspeedchangespeed 0.03 (was 0.01)
Changetimemin 2.0 (was 3.0)
Randomwindspeedvariation 0.007 (was 0.005)
Randomwindheadingspeedvariation 0.007 (was 0.005)
These settings were a disaster. Wind levels rose from the initial 5 m/s to 15 m/s, and then stuck there for one whole patrol at 13-15 m/s. It seems that the Windheadingchangespeed and Windspeedchangespeed settings need to be lowered (not increased) if the wind is to change more frequently.
So I abandoned the first two changes, and raised the Rainintensity change speed a little.
Now I have the following changes ONLY:
Changetimemin 2.0 (was 3.0)
Randomwindspeedvariation 0.007 (was 0.005)
Randomwindheadingspeedvariation 0.007 (was 0.005)
Rainintensitychangespeed 0.013 (was 0.010)
In two long patrols at tc=1024, these weather changes look really good - no long spells of bad weather, and fairly frequent minor changes. I'm going to stick with these values for a while.
If anyone else wishes to try these values, please share experiences in this thread. But remember - they are random changes. You must complete a long patrol for your results to have any meaning.
One last thing - I just cannot believe Leovampire's assertion in the SH4 thread (quoted above) that weather is dependent on time compression. Even at tc 4096, the game gets updated every 10 minutes or so. Weather changes take at least several hours even to be considered. The devs would have needed to make some pretty eccentric programming to introduce an effect dependent on time compression. Or does anyone else know better?
Stiebler.
@stiebler
Some great research you did, Sir :up:
Subject
12-14-07, 01:43 PM
:hmm: this is interesting... since this thread http://www.subsim.com/radioroom/showthread.php?p=679647, I have included weatherreporting duties into my patrols. Weather is checked and written down at least 6 times a day. And every change is reported when it occurs.
With the latest testsettings on this 5th patrol the whole, entire first week we had a constant wind of 7m/s, but then on the eigth day it dramatically rose to 8m/s http://i189.photobucket.com/albums/z15/subject_rod/smilies/faint2.gif
Now we are going into week three and no further change yet... :88)
:roll:
Didn't know you can make changed in .MIS files midpatrol! Thought SH3 would crash then... but that will make changing a lot easier, as I until now only changed setting between patrols.
Once completed I'll report my observations, but so far I can't draw a final conclusion. I guess the random factor is playing it's part?
Day 24... into the mist
http://i189.photobucket.com/albums/z15/subject_rod/Silent%20Hunter%20III/Weather.jpg
Thanks for the feeadback, Stiebler. Looks promising! :up:
Happy hunting!
Wolfehunter
12-14-07, 02:03 PM
I tried something dangerous or at I think it was risky... I'm using SH3weather 1.5 while playing in a game. Funny thing is I put random weather right and this is what happens.
The good,
I'm playing GWX2.0 so heavy weather mega rains for days I love the effect but it would be nice to see the sun. So I've change the settings while in the game. It was cool the weather slowly changed in a few minutes. Sun came out over the clouds and the wind died down. 3 days later heavy winds hit and still sunny with some clouds. 5 day before I was heading home Its was starting to rain. Funny thing was it was working good. Almost real.
Problems,
I couldn't shake off the heavy rain and wind sounds the whole game. It modifed the Campaign files... I don't know what effects it will do with untill I start a new patrol later. I will know if it breaks any of the files. I hope not..:hmm:
Other than that it works flawless. I will update you later with the after effect results.
Subtype Zero
12-15-07, 02:10 AM
Thanks for your input, Stiebler! I've also been playing around with some of the values in scene.dat (after first finally figuring out how to use Timetraveller's Tweakfile--the hex locations of some of the variables in scene.dat have changed--grrr).
This file is difficult to get a handle on! Like you said, the values seem to be counter-intuitive; when you think you are increasing a value, you may actually be decreasing the liklihood of some event occurring! I seem to have had the opposite problem that you had--instead of days of endless rain, I had a complete patrol with no rain whatsoever.
I am going to try a patrol with the following values and see how they work:
ChangeTimeMin 2 (was 3)
RainIntensityChangeSpeed .005 (was .01)
WindSpeedChangeSpeed .0075 (was .01)
RandomWindSpeedVariationSpeed .0075 (was .005)
I'm not bothering with the windheading variables, as they do not seem to have any effect on gameplay. (Although as I type this, I wonder if these values might interact with the other values in unpredictable ways? :hmm:Hmmm). Do you have any opinion on what RandomWindSpeedMax does? Its original setting is .01, but I have not tried changing its value yet.
I agree with you about TC not having any effect on weather changes. In my testing, the weather actually changes on a fairly predictable schedule. You just don't know which variable may change at a given time.
@Subject
Yeah, changing the .mis files can be done mid-patrol. And, I believe the .mis files interact with the settings in scene.dat as well!
Wave Skipper
12-15-07, 08:59 AM
I am amazed at the level of modding expertise hovering around these sub games. Of course there are the old greats who revamped SH2. But I see more and more newbies and the collective modding power is truly amazing. A great deal of activity is revolving around fixes that were perhaps fixed in 2005 and 2006, and I note old hands informing the newbies that such and such was already done. There really should be created a written volume file that would list all the old mods, changes etc., so that newbies don't re-invent the wheel. And by this I don't mean just a sticky thread of old postings. I mean something like a document with at least an index. I recall in the old DOOM 16 bit days , of 1993-94 (Doom hit the shelves in Dec 93) that many tricks were discovered to make the game better that by 1995 actually appeared in a thick book - a how to - for building Dome wads. The book was like 3 inches thick. It had many of my inventions (but not all. *note*) in it, and was packed with all kinds of ideas. But let's face it - SH3 modding is far advanced from 16 bit DOOM. One could make a two volume set how to book on these Ubi sub games.
I was thinking last night, if 1000 SH3 lovers could pool $250 per person, say by having Subsim collect it for us, perhaps $250,000 bucks (actually we should use Eruos)could induce the Devs to do some real things for us. Say for example, moving more of the hardwired data into data files that we could mod with. Perhaps fixing up many of the old troubles and also adding in things like real AI u-boats, torpedo firing torpedo boats, Japanese, and American subs and so forth.
As some know I created V-Mod, where Germany wins the war, because I am not all that much into historical reenactment. So one of my own dreams was to create an alternate reality SH3. All this weather talk has got my juices going. There was this old 1950s sci-fi book where aliens raised a sunken US WWII sub and reconstitued its crew using alien technology, so that the sub could fight for them on an alien planet completely covered with ocean. The Aliens who raised the sub had little expertise fighting under water (silly I know) but its something I wish I could mod.
*note*
Some of my old DOOM inventions: 1. standard oneway attack window - I believe I was first to build it. 2. BFG-only attack window. 3. A zombie machine that - if a player stepped into it - would turn a player for one level into a zombie (completely dead, but walking) so that monsters would ignore him. 4. a clone machine that when you stepped onto it that would create more copies of player 1. 5. a room created from a box turned wrong-side-out that would create a vast (I mean vast) area that would use almost no memory compared to creating a normal room (a good thing in the 4 meg memory and 386 and 486 days), 6. a special gate to BOZO space (basic game grid) where weapons took on strange properties and where players could go off the grid one direction and loop back to the opposite side of the map. 7. real double sided glass (something no one else did and had not done by 1999). 8. poison gas system that would slowly kill all players on a level. 9. A floor screen that would allow you to see what was going on in another room (was able to switch on or off). 10. a foot pad activated exploding barrel teleporting device that would teleport exploding barrels to various areas of a level. 11. a Zero room where you could run around killing monsters while they could not detect you. 12. 'Invisible force' poles that would block the monster sight across the line between two poles. 13. An alien making machine - where a pig beast demon would enter it and be changed into a blue uniformed alien gray.
Whats the feasibility of making a program that's runs when SH3 is running and changes
the weather whilst the game is running?
Stiebler
12-15-07, 09:30 AM
@Subtype Zero:
I don't know whether changing wind direction, or the rate at which it changes, has any effect on wind speeds or its rate of change.
However, since the effort to make the extra change for wind direction is absolutely trivial, why not remove the possibility (however remote) that it might have an effect? It will take 30 seconds to make the change compared with, what?, perhaps three hours of testing.
@Letum:
To make a program that runs in the background making weather changes while SH3 is running?
This question has been raised in other contexts before. The chance is zilch, because, although technically feasible, it would be incredibly complicated. In the special case of modifying the scene.dat file (or the campaign files), it would also serve no purpose since the data has *already* been put into memory. And who knows where?, which could only be discovered by reverse engineering the program code. Not only does the difficulty of this make the mind boggle, but a condition of purchase of SH3 was that you would not reverse-engineer the program!
@Waveskipper:
If you can find 1,000 SubSim forum members who will contribute $250 per person for *any* cause, you can raise the campaign funds for my putative attempt to run for next US president.
General:
I've just completed a very long patrol in an IXd2 from Bordeaux to U 488 (tanker) to Cape Town, to 'Brake' (tanker) and all the way back again with the settings for scene.dat from my last post. The weather settings appear again to be very good. There remains no evidence for a 'wrap-around' of effects (ie wind speed jumping from 15 m/s to 0 m/s), but large jumps are commonplace (eg 15 m/s to 7 m/s), which is nearly as good.
Stiebler.
@Letum:
To make a program that runs in the background making weather changes while SH3 is running?
This question has been raised in other contexts before. The chance is zilch, because, although technically feasible, it would be incredibly complicated. In the special case of modifying the scene.dat file (or the campaign files), it would also serve no purpose since the data has *already* been put into memory. And who knows where?, which could only be discovered by reverse engineering the program code. Not only does the difficulty of this make the mind boggle, but a condition of purchase of SH3 was that you would not reverse-engineer the program!
From other posts I am under the impression that changeing the scene.dat file whilst
ingame does effect the weather and so it can't be imprinted into the games memory
at first load.
Are you sure this is incorrect?
If it is, then I can easily make a program that edits the scene.dat file in real time.
Madox58
12-15-07, 02:31 PM
To intercept a program while running requires one most important thing!
You must be able to read and understand Assembly Language!!
If you can't do that?
No program out there will help you.
Then you must be able to write an intercept program.
That can be done in nearly any Programming language.
C++ being preferred.
I don't know for sure where Ubi stands at this time
on doing this.
I suspect, that if it means more sales of SH3 with no investment
on thier part?
If it was a small scale job, they'd let it ride.
Start doing it large scale and releaseing tech info?
Probably hear from the Suits!!!
Subtype Zero
12-15-07, 04:24 PM
@Cpt. Letum:
I have not had any problems changing the contents of the .mis files in the middle of a patrol, but I have not altered the scene.dat file in the middle of a patrol. The .mis files are simple text changes, whereas changing scene.dat involves moving bunches of bits and bytes around--much more of a risky proposition.
Madox58
12-15-07, 04:33 PM
Altering the scene.dat, or any dat while the game is running is useless.
All files are loaded into memory at run time.
They can only be affected during run time by a program that reaches into
those memory areas and changes things.
Files such as the random and scripted files only load what's in rendering range
to a certain extend, so we can change them on the fly.
Subtype Zero
12-15-07, 05:16 PM
The following values
ChangeTimeMin 2 (was 3)
RainIntensityChangeSpeed .005 (was .01)
WindSpeedChangeSpeed .0075 (was .01)
RandomWindSpeedVariationSpeed .0075 (was .005)
resulted in a generally well-balanced three-week patrol. The weather "changed" approximately fourteen times during that span, with only four intervals of 15 m/sec wind. Oddly, I did not have any periods of wind less than 6 m/sec, but that may have been simply a result of chance. The one thing I did not like about this setting was that it was too dry--only one interval of rain that lasted a day and a half. I also noticed something quirky about the behavior of the wind in this patrol, but I will save my description of that for later in this post. ;)
For my next patrol I kept all of the above settings (even RainIntensityChangeSpeed) threw in one more variable, and then started another patrol. The stock variable I added is called RandomWindSpeedMax. Its stock setting is .01, but I decreased it to .005. Not really knowing what this variable does (if anything), I launched the sub.
As I suspected, I still did not have a lot of rain during this patrol (only two rainy periods, out of 15 weather changes). OTOH, I really liked the rest of the settings. Out of 15 changes in the weather pattern, I only had four periods of 15 m/sec wind. I also experienced a full range of wind speeds during the course of the 3 week patrol. What may have been most interesting, however, was my observation that during 4 out of 15 weather periods, I experienced actual wind fluctuations! In other words, instead of the same wind speed for 30 some hours in a row, the wind speed varied slightly over a number of hours. For example, during one 36 hour period, my wind speed went back and forth between 8-12 m/sec. During the other three periods, it varied from 1-4 m/sec, 4-7 m/sec, and 6-9 m/sec. I have never seen this before in any of my SH3 patrols, so I am very excited about this. My theory is that this is controlled by RandomWindSpeedVariationSpeed, which I changed from the stock value of .005 to .0075.[EDIT: It appears that the wind variability is simply an artifact of TC values above 128. When 128 or below, wind speed remained constant. My apologies]
I have a few other observations to report, but in the interests of space, I think I will end my post here. In conclusion, however, I think there is a possibility of creating a weather mod which will perhaps balance out some of the weather issues in the stock game (crosses fingers). More information to come. :D :D
Subtype Zero
12-15-07, 06:05 PM
@Stiebler--
In addition to what you already have, I wonder if you might try the following two variables to see what kind of effect they have on your weather.
WindSpeedChangeSpeed = .0075 (.01 stock, .03 your previous setting)
RandomWindSpeedMAx = .005 (.01 stock)
I lowered WindSpeedChangeSpeed a bit and seemed to have fewer days of 15 m/sec wind. I also had fewer days of extremely slow wind conditions. Maybe this variable controls the degree of wind speed change, so increasing it may exaggerate this, while lowering it may make it less likely for wind to shift from one extreme to another.
Also, I disagree somewhat with Ref's interpretation of the RandomWindSpeedMax variable. He said that it controls "The maximum intensity of the random wind." Instead, I believe that it influences the probability that the wind at any given wind change will be set to the maximum speed. Having such a variable might be useful in a game that attempts to simulate the frequent gales in the North Sea. I'm going to play around a little more with this variable to see if that might be the case.
Good luck with your tweaking and let me know what your thoughts are on the matter.
Stiebler
12-16-07, 06:38 AM
@SubType Zero:
Nice work, and interesting results, although you don't indicate for how long you are pursuing patrols with your changed parameters. For example, you spoke of about 14 weather changes in one post, of which four resulted in winds of 15 m/s. That is quite a high percentage actually.
In fact, it is very interesting to see that you are doing the reverse to me. I've been trying to make changes occur faster, so that heavy storms (fog/15 m/s) don't persist so long, while you are aiming to make them appear less frequently. Both approaches are valid, and it will indeed be fascinating to see which works better. Although that requires a definition of what 'better' means, and there will probably be a lot of dispute about it!
I'll have a go at the values you suggested as changes to my current settings, to see what results.
General:
Two considerations have crossed my mind:
1. The wind can vary 16 ways: from 0 to 15 m/s. But the rain/precipitations can only vary three ways: from 0 to 2 (none, medium, heavy). Thus changes in wind are about five times as noticeable as changes in rain. Or, to put it another way, we should ensure that the rain changes much less frequently than the wind.
2. Since it is now certain that changes to the campaign.mis files can affect the weather without changing scene.dat, and it is certain that changes to scene.dat can affect the weather without changing the campaign files, it is very likely that the changes to the campaign files that people have made in the past are actually making fixed changes to scene.dat on load-up of files.
In other words, SH3 first loads scene.dat into memory. Then it checks the campaign file (_SCR.mis etc) weather settings. If they are non-zero, it applies predetermined changes to the weather values already stored in memory from scene.dat.
If I am correct, then altering parameters in scene.dat while maintaining stock weather values in the campaign.mis files is the correct approach. There is much more flexibility to alter the values.
Stiebler.
Stiebler
12-16-07, 02:37 PM
I'm testing with a standard format now.
Run out IXD2 from Bordeaux in February 1943 (obtained by starting a new career in 1942 for 12th Flotilla, then adding sufficient new hardware in port). Run at standard speed to square CF, all at time compression 2048 to avoid air attacks in Bay of Biscay. Then at 1/3-ahead all the way down to Cape Town, avoiding all convoys and other distractions.
This takes 50 days. Measure rain, wind velocity and fog at about mid-day (12:00) every day while running at 1024 or 2048 tc. It is essential to collect the data once each day at about the same time - skipping several days will upset the results. Then aggregate results.
Results from my new standard settings (listed above), from standard settings with RandomWindSpeedMax set to 0.005 (instead of 0.01 as per SubType Zero's suggestion), and from standard settings with both RandomWIndSpeedMax=0.005 and WindspeedChangeSpeed set to 0.0075 (instead of 0.01, as per STZ's suggestion).
NEW STANDARD:
Rain: (Not measured)
Fog: None 18, Light 25, Medium 3, Heavy 4 (days out of the 50 travelled)
Wind: <3 m/s 7, 3-6 m/s 7, 7-12 m/s 10, 13-15 m/s 26 (days out of 50)
NEW STANDARD WITH RANDOMWINDSPEEDMAX=0.005
Rain: None 42, Medium 4, Heavy 4
Fog: None 22, Light 14, Medium 4, Heavy 8
Wind: <3 m/s 27, 3-6 m/s 5, 7-12 m/s 5, 13-15 m/s 13
NEWSTANDARD WITH RANDOMSPEEDMAX=0.005 AND WINDSPEEDCHANGESPEED=0.0075
Rain: None 37, Medium 3, Heavy 10
Fog: None 11, Light 23, Medium 3, Heavy 13
Wind: <3 m/s 6, 3-6 m/s 4, 7-12 m/s 16, 13-15 m/s 24
It's quite interesting to see the variations in changes of rain, despite the fact that the same parameter (RainIntensityChangeSpeed=0.013) was used for each test. It shows the kind of problems that make it so hard to separate cause and effect when testing changes in weather parameters.
However, it would appear that the best combination so far is 'NEW STANDARD WITH RANDOMWINDSPEEDMAX=0.005'.
Random changes could be ironed out better if a lot of people took a hand with this kind of testing. If everyone uses my standard test procedure, outlined above, each test takes little more than half an hour. Plus pen and paper.
Stiebler.
Subtype Zero
12-16-07, 05:47 PM
Very interesting results, Stiebler! Seems you do most of your work early in the day, while I am more of a night owl, LOL. I will need a little time to digest your results and run some of my own tests. I will strongly consider your testing format, as well. Currently, I have been starting new careers in 1939 and patrolling for roughly 3 weeks. All of the data from my above posts are for 3 week cruises, so I experienced 14 or 15 "changes" in three weeks of game time.
My procedure had been to go to high TC and check weather every hour at roughly the top of the hour. Although I think I will probably adopt your testing procedure for the sake of saving some time, I did notice something using my method which may explain why long cruises seem to result in more and more protracted periods of unchanged weather. It seems that SH3 has a standard schedule for checking for weather changes (maybe ChangeTimeMin and ChangeTimeMax have something to do with this) :hmm:. However, I think there is a bug in the scheduler. What I noticed is that every time the weather changes, the change takes place around one hour later than the previous change. Plus, this delay gets slightly longer with each change. The result is that by the end of the patrol, the weather takes much longer to change than it did at the beginning of the patrol! For example, at the beginning of my patrols the weather changed, on average, after approximately 32 hours at sea. By the end of each of my 21 day patrols, the weather was changing 43 hours or so after the previous change! By the end of a 60 day cruise, I estimate that SH3 is only checking for weather changes 70 or more hours after the previous change!! :down: This can easily explain why many people have noted long patrols with more than 10-15 days of uninterrupted rain and wind. Unfortunatley, I do not see any way to resolve this issue. :nope:
Finally, I agree with your observations about loading scene.dat and Campaign.mis files into memory. I also recognize the problems with our limited testing. It's very hard to know whether random variation or our changes to scene.dat are causing the observed changes to SH3 weather. Ideally, we would be able to run dozens of tests on each variable, but I don't think either of us are that dedicated (cough, cough, crazy)!
Hartmann
12-16-07, 10:09 PM
I'm testing with a standard format now.
Run out IXD2 from Bordeaux in February 1943 (obtained by starting a new career in 1942 for 12th Flotilla, then adding sufficient new hardware in port). Run at standard speed to square CF, all at time compression 2048 to avoid air attacks in Bay of Biscay. Then at 1/3-ahead all the way down to Cape Town, avoiding all convoys and other distractions.
This takes 50 days. Measure rain, wind velocity and fog at about mid-day (12:00) every day while running at 1024 or 2048 tc. It is essential to collect the data once each day at about the same time - skipping several days will upset the results. Then aggregate results.
Results from my new standard settings (listed above), from standard settings with RandomWindSpeedMax set to 0.005 (instead of 0.01 as per SubType Zero's suggestion), and from standard settings with both RandomWIndSpeedMax=0.005 and WindspeedChangeSpeed set to 0.0075 (instead of 0.01, as per STZ's suggestion).
NEW STANDARD:
Rain: (Not measured)
Fog: None 18, Light 25, Medium 3, Heavy 4 (days out of the 50 travelled)
Wind: <3 m/s 7, 3-6 m/s 7, 7-12 m/s 10, 13-15 m/s 26 (days out of 50)
NEW STANDARD WITH RANDOMWINDSPEEDMAX=0.005
Rain: None 42, Medium 4, Heavy 4
Fog: None 22, Light 14, Medium 4, Heavy 8
Wind: <3 m/s 27, 3-6 m/s 5, 7-12 m/s 5, 13-15 m/s 13
NEWSTANDARD WITH RANDOMSPEEDMAX=0.005 AND WINDSPEEDCHANGESPEED=0.0075
Rain: None 37, Medium 3, Heavy 10
Fog: None 11, Light 23, Medium 3, Heavy 13
Wind: <3 m/s 6, 3-6 m/s 4, 7-12 m/s 16, 13-15 m/s 24
It's quite interesting to see the variations in changes of rain, despite the fact that the same parameter (RainIntensityChangeSpeed=0.013) was used for each test. It shows the kind of problems that make it so hard to separate cause and effect when testing changes in weather parameters.
However, it would appear that the best combination so far is 'NEW STANDARD WITH RANDOMWINDSPEEDMAX=0.005'.
Random changes could be ironed out better if a lot of people took a hand with this kind of testing. If everyone uses my standard test procedure, outlined above, each test takes little more than half an hour. Plus pen and paper.
Stiebler.
One very good thing fot Test the SH3 weather is use the training school missions.
I discovered a lot of time ago the effects of different settings in the files because one time i went to the atlantic using the convoy attack mission and i noticied that the weather behaviour was a lot more variable compared with the campaign.
every single mission and trainings have different values in stock sh3.
Another important thing is the non presence of enemy units, like convoys , ships or aircrafts, so you donīt have to worry about interferences and distractions .:up:
Stiebler
12-17-07, 04:59 AM
@SubType Zero:
Seems you do most of your work early in the day, while I am more of a night owl Perhaps we are in different time zones? Your atavar does not say. I'm from the UK.
I think there is a bug in the scheduler. What I noticed is that every time the weather changes, the change takes place around one hour later than the previous change. Plus, this delay gets slightly longer with each change. The result is that by the end of the patrol, the weather takes much longer to change than it did at the beginning of the patrol! This is very interesting. I had noticed fewer weather changes too, later in the patrol, with my 24 hour checks, but had always attributed it to random variation. Since you have identified the effect independently, and your tighter time checking of weather changes has shown a regular change, it looks as though your conclusion is right. This is a very significant observation! Well spotted!
Unfortunately, this may mean that our attempts to produce a better weather pattern will be always doomed to failure for long patrols, since no combination will be perfect for the beginning and end of the patrol. Still, we can at least attempt a good compromise. And most U-boat patrols with IIs and VIIs are quite short.
@Hartmann:
i noticied that the weather behaviour was a lot more variable [in single missions] compared with the campaign. That is why it is preferable to test all mods in campaign mode, a policy decision that Der Teddy Bar and I agreed nearly two years ago for NYGM. Of course, preliminary testing in single mission mode does have a place for checking things quickly, for example how easily a modded ship will sink, but final checking always has to be done in campaign mode.
Stiebler.
johan_d
12-17-07, 06:35 AM
When you find the sweet spot, will you release the scene.dat for download?
Subtype Zero
12-18-07, 01:16 AM
@Johan_d:
I'm sure that one of us would be more than happy to release an update to scene.dat once we find the "sweet spot." The trouble is, we may never find the sweet spot. The way SH3 handles weather is funky, to say the least. Several different variables with cryptic names that seem to do the same thing, etc. The main problem is that it is really hard to determine which of our tweaks are having an effect, or if it is just random fluctuation. In sum, very tedious work. :x Care to help out?
@Stiebler:
No exciting breakthroughs today. I did find reference in a file named EnvSim.act to something called a WeatherController, but I believe that is part of the SDK. :nope: If you are interested, I can send you an Excel spreadsheet containing the results of some of my testing. PM me and I will email a copy to you.
Oh, and I am a Yank. I do listen to BBC worldwide radio on occasion, though! :D
Stiebler
12-18-07, 04:29 AM
@SubType Zero:
Thanks for the information.
*** You have a PM from me ***
@Johnan_D:
It will not be possible to release a single mod (scene.dat) with our agreed changes - if we can ever agree on them! What I plan to do, if SubType Zero agrees, is to create a C-program that will stamp the 'sweet spot' values onto users' existing file 'scene.dat' while making a backup of the original. This technique worked very well for my November 2005 mod 'radar detectors', where a similar problem was encountered with different sensors.dat files used by different mods.
General:
I am disappointed that no one else wants to aid this project, and therefore I am reluctant to post any more hard data. However, since there are very few existing data about alteration of weather parameters in SH3 and SH4, in the interests of public dissemination of key information I provide these general conclusions after further testing:
Weather Conclusions (Stiebler's):
1. Scene.dat is loaded into memory first. Any changes found in the campaign_xyz.mis files overwrite these original values with fixed (and unsatisfactory) changes.
2. Clear signs of 'wrap around' with wind speeds with my preferred changes. Eg 15 m/s to 0 m/s and also 0 m/s to 15 m/s.
3. RandomWindSpeedMax: higher values cause chunkier changes with fewer variations (ie, roughly steady for days, then sudden big changes).
4. ChangeTimeMin: Stock is 3, value of 2 is much better, value of 1 results in 'sticky' behaviour (very few weather changes).
5. RainIntensitySpeed definitely affects wind behaviour, in that heavy rain is usually (but not always) associated with strong winds, even if winds were mild previously. The reverse (high winds causing heavy rain) appears not to be true, except coincidentally.
6. Lower values of RainIntensitySpeed result in more rain.
SubType Zero deduced, on basis of observing every time a change occurred, that there was a defect in the algorithm, causing each change to occur something like one hour after the previous change. I had observed similar, but had assumed it was random change. Looks like it is real effect. SubType Zero's observatons also prompted some of my conclusions above, after independent testing.
Stiebler.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.