Log in

View Full Version : Modifying Start of Patrol Weather


Skweetis
01-04-06, 12:31 PM
Hi All,

I'm tired of loading a patrol and having the weather reset back to calm and clear. Im thinking of creating a "quick and dirty" mod that will have the user enter the weather as it was when they saved and exited, so that when they reload, the programme will modify the appropriate file to match that weather (provided starting weather is not hard-coded, but I think I saw someone mention that they manually edited this at the start of each patrol, but I cant find that thread again!!!!) then launch SH3 (or SH3Commander) as appropriate.

If you could advise me as to which file it is (better yet, email it to me, as I am at work and do not have access to the SH3 files from here) I can whip it together as quickly as possible!

Thanks for any help

Cheers,

Jamie

Skweetis
01-04-06, 12:31 PM
PS - you can email it to me at: jamie (at) trux (dot) com

CWorth
01-04-06, 12:37 PM
Im not sure it is possible to change what the weather will start at or even the weather at all.

From other discussions that have come up over time about the subject it seems to be a hard coded issue that no one has been able to do anything with.

GT182
01-04-06, 01:00 PM
Skweetis, I'm not sure I'd like the weather to be the same when I end a patrol and start the next one. I don't think real bad weather would last for close to a month while in port and then heading out to sea on your next patrol. LOL Maybe for a few days only but not a whole month, or 20 days, which I'm using as my in base time. ;)

:hmm: If it's possible to change it one day, then maybe have it be random for starting your next patrol. That might go over better with everyone.

Sailor Steve
01-04-06, 01:01 PM
I agree; it would be nice to start a patrol with it raining or overcast, or even foggy. Always starting with perfect weather is annoying. That said, I'd rather see the weather randomized than be the same as when the last patrol ended.

On the other hand CWorth is probably right. If the weather could be modified I'm sure someone would have done it by now.

Hartmann
01-04-06, 01:39 PM
Yes it´s possible. :88)

I modified the weather start to partial clouds and sunny :yep:
but you can choose a heavy storm to depart :rotfl:

Replace the values in the start of the SCR RND and LND campaign files

Also i modified the Rnd values, now i have a lot more of random weather in my installation.

No more continuous weeks of sunny weather or storms

could be nice some way to randomize the start values and Random settings in every patrol. :hmm:

*Fog=0 (0,1,2,3)
FogRand=0
*Clouds=1 (0,1,2)
CloudsRand=1
*Precip=0 (0,1,2)
PrecipRand=0
*WindHeading=95 (o to 360º)
*WindSpeed=2.000000 (0 to 15.000000 knts)
WindRand=1
WeatherRndInterval=2 (in hours, minimum 2 to 96 h)
SeaType=0

*=values at the start of the patrol in home base
Rand values=porcentage of variation

cloudsrand= no changes 0
small changes 1
heavy changes 2

precipRand = no changes 0
small changes 1
heavy changes 2

fogrand = no changes 0
small changes 1
heavy changes 2

winrand= no changes 0
small changes 1
heavy changes 2

Skweetis
01-04-06, 02:07 PM
Yeah, for new patrols, it will generate a random Weather pattern, but reloading an existing patrol will prompt for previous weather information. The only caveat is that you will have to remember/write down what the weather was at the time of saving.

Ill get cracking. Now I just need a copy of the file, if someone would be kind enough to email it to me. Ill try and get this done tonight, before I leave work.

Thanks for the info Hartmann!!!!!!!!

Cheers!

Jamie

Hartmann
01-04-06, 07:13 PM
Go to the sh3 directory \data\Campaigns\Campaign\

Campaign_LND.mis (land)
Campaign_RND.mis (Random)
Campaign_SCR.mis (scripted)

i just edited the with a simple text editor, windows notepad works well for me ,because is a text information.

is simple, replace the values for the things that you want in the first chapter (here the deffault and stock values)


[Mission]

Fog=0
FogRand=0
Clouds=0
CloudsRand=0
Precip=0
PrecipRand=0
WindHeading=0
WindSpeed=5.000000
WindRand=0
WeatherRndInterval=5
SeaType=0


Another option is make some different files and swap they with the mod manager

I discovered this because i noticied a different weather behaviour in the campaign weather and the convoy attack mission in the academy, ( sailing to the atlantic during some days)
Another single missions has a different weather settings

Skweetis
01-04-06, 09:01 PM
Ive got most of it laid out. If my wife doesnt catch me hiding out down here and programming, I should have it done for the morning. ;)

Im going to edit the 3 files directly, that way, if people have custome .mis files, it wont matter.

I am also going to randomly generate values for the change variations and Intervals, so that each time you launch it will be much less predictable.

Thanks so much for the help!

Cheers,

Jamie

Skweetis
01-04-06, 10:30 PM
Okay, its pretty much done, outside of pretty pictures, fancy icons and all that aesthetic stuff.

All thats left is tweaking of the formulas.

Should be available tomorrow sometime.

Skweetis
01-05-06, 01:55 AM
wee bit of a snag...

Hartmann, do you happen to know what those values for fog, clouds etc represent?

for example is Clouds=0 mean clear skies, Clouds=1 Scattered etc.

Correct me here, but does SH3 remember the weather you had when you saved, it just resets the interval timer to 0? or Does it peek into the .mis files regardless when you load and reset the weather to default?

I have the random weather at start of patrol working just fine (what a difference!)

Any input would be appreciated!

Cheers,

Jamie

Hartmann
01-05-06, 07:16 PM
I used the mission editor that has the options in a menu,

Open the editor and choose a option then save the mission, open the file with the text editor, and you can see the changes of the numbers. is easy

i open a training mission but the campaign use the same values i think :roll:

i´ts only see the relation .... the choosed option vs the changes in the text file.

i think that the game save the actual state of the weather, when you reload a savegame the weather is the same when you save it, but the counter timer resets to 0, and its needs some time to randomize again.

I don´t know if saving the game affects to the timer :88)

trenken
02-14-06, 09:17 PM
Can someone tell me if there is something that I can modify, that will let me control the weather at will? This way I modify something, and it just stays partially cloudy and no wind until I change it?

kapitanfred
02-15-06, 11:27 PM
What if you used:

Fog=>0
FogRand=>0
Clouds=>0
CloudsRand=>0
Precip=>0
PrecipRand=>0
WindHeading=>0
WindSpeed=>5.000000
WindRand=>0
WeatherRndInterval=>5
SeaType=>0

Where => is "equals to or greater than" the value shown.

Just a thought :hmm:

Skweetis
02-16-06, 11:52 PM
Trenken: Lookey here:
http://www.subsim.com/phpBB/viewtopic.php?t=46991

[bKapitanFred: [/b]unfortunately the values dont work that way in the cfg files. The "=" is not a mathematical operand per se when it comes to the way the program reads the files. In this case it is simply a seperator, [Variable]=[Value]. Thus, to include the > symbol would simply have the program include it as part of the Value, and most likely cause it to crash as SH3 would be expecting just a number not a symbol. I wish it could work that way though! ;)

Cheers

Jamie

kapitanfred
02-17-06, 05:10 PM
Silly me, should have known that :oops: Perhaps this may work:

Fog=0,3
FogRand=0,3
Clouds=0,5
CloudsRand=0,5
Precip=0,5
PrecipRand=0,5
WindHeading=0,5
WindSpeed=5.000000,15.000000
WindRand=0,5
WeatherRndInterval=5,7
SeaType=0,2

Try using the comma as the seperator. Something similar what Floater's Kriegstanz Generator does in SH2.