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 01-04-06, 12:31 PM   #1
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default Modifying Start of Patrol Weather

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 is offline   Reply With Quote
Old 01-04-06, 12:31 PM   #2
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

PS - you can email it to me at: jamie (at) trux (dot) com
Skweetis is offline   Reply With Quote
Old 01-04-06, 12:37 PM   #3
CWorth
Grey Wolf
 
Join Date: Apr 2005
Location: Gettysburg PA
Posts: 845
Downloads: 38
Uploads: 0
Default

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.
CWorth is offline   Reply With Quote
Old 01-04-06, 01:00 PM   #4
GT182
Ocean Warrior
 
GT182's Avatar
 
Join Date: May 2005
Location: New Castle of Delaware
Posts: 3,231
Downloads: 658
Uploads: 0
Default

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.
__________________
Gary

No Borders, No Language, No Culture =s No Country

I'm a Deplorable, and proud of it.
GT182 is offline   Reply With Quote
Old 01-04-06, 01:01 PM   #5
Sailor Steve
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

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.
  Reply With Quote
Old 01-04-06, 01:39 PM   #6
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

Yes it´s possible.

I modified the weather start to partial clouds and sunny
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
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 01-04-06, 02:07 PM   #7
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

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
Skweetis is offline   Reply With Quote
Old 01-04-06, 07:13 PM   #8
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

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
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 01-04-06, 09:01 PM   #9
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

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 is offline   Reply With Quote
Old 01-04-06, 10:30 PM   #10
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

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 is offline   Reply With Quote
Old 01-05-06, 01:55 AM   #11
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

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
Skweetis is offline   Reply With Quote
Old 01-05-06, 07:16 PM   #12
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

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

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
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 02-14-06, 09:17 PM   #13
trenken
Samurai Navy
 
Join Date: Feb 2006
Location: New Jersey
Posts: 565
Downloads: 0
Uploads: 0
Default

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?
trenken is offline   Reply With Quote
Old 02-15-06, 11:27 PM   #14
kapitanfred
Planesman
 
Join Date: Sep 2002
Location: South Australia
Posts: 191
Downloads: 28
Uploads: 0
Default

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:
kapitanfred is offline   Reply With Quote
Old 02-16-06, 11:52 PM   #15
Skweetis
Watch Officer
 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
Default

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
__________________
"Is the glass half-empty? Or half-full? Either way, when you're thirsty, there's water to be had in that glass." - Neal Stevens
Skweetis is offline   Reply With Quote
Reply


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

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

Forum Jump


All times are GMT -5. The time now is 04:17 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.