Setting weather systems?

Users who are viewing this thread

Wander

Regular
Used the search button, and can't find anything, but I'll keep looking. While I'm at it, I'll ask-

Is there a way to set weather conditions for certain parts of the map? I want to make a northern area almost always misty and snowy, and make other areas almost always warm and sunny. If anybody could help, that'd be nice. I'd greatly appreciate it. ^^
 
I'm not sure about on the map, but (by testing the terrain where an encounter happens) you can set the scene "weather" with set_rain and set_fog_distance operations look them up in the module system.
 
I've actually been trying to piece this one out myself.  I can't find anything to do with weather in module_scripts,  module_triggers, or module_simple_triggers.  I'm kinda thinking weather systems are hardcoded perhaps?
 
Zarthas said:
I've actually been trying to piece this one out myself.  I can't find anything to do with weather in module_scripts,  module_triggers, or module_simple_triggers.  I'm kinda thinking weather systems are hardcoded perhaps?

missed the obvious.  Where do you define what happens in a scene?

mission_templates

As to weather on the map, it's been a while since I actually played, does that happen?
 
jik said:
Zarthas said:
I've actually been trying to piece this one out myself.  I can't find anything to do with weather in module_scripts,  module_triggers, or module_simple_triggers.  I'm kinda thinking weather systems are hardcoded perhaps?

missed the obvious.  Where do you define what happens in a scene?

mission_templates

As to weather on the map, it's been a while since I actually played, does that happen?
Yes. Yes it does.
 
hmmm... interesting.  Yes and I don't see them use the rain stuff in mission_templates, though I have to see it work (and snow too).

Can't help you there then.  Don't know where that is handled. 
 
Okay thanks so much. I mostly just wanted some certain scenes to have certain weather. Thanks, again!
 
Heh, I was talking about weather systems on the main map, I was afraid you'd made me look foolish.  More so than usual.  Sorry for the necromancy but did anyone ever come to a conclusion on this? Still curious.

Sheriff-murder said:
It's weird, can't say I've ever noticed weather at all, except for fog once long, long ago.

This is actually what bothers me.  Weather rarely ever occurs in the game, and most of the time you get that damned fog.  Snow and Rain exist in the game, but I've actually never, ever, ever, seen snow in Native M&B.  I'm on day 200 or so.  I think it'd be great to just make weather occur a little more often.
 
I have it so certain towns are snowy/rainy when you enter them, you could make this a little more random if you wanted...

in mt_town_center I added the following:

Code:
        (ti_before_mission_start, 0, 0, [], 
			[
				(call_script, "script_change_banners_and_chest"),
				#SW - added script_change_weather
				(call_script, "script_change_weather", "$current_town")
			]),

in module_scripts I added the following:

Code:
    # script_change_weather
    #  Input: arg1 = c_town
    # Output: none (executes set_rain or set_fog_distance command)
    ("change_weather",
      [
        (store_script_param_1, ":c_town"),
		#SW - change the weather depending on the location
		(try_begin), # same mnu_town is used for towns and castles
		(party_slot_eq,":c_town",slot_party_type, spt_town),
			(try_begin),
				(eq, ":c_town", "p_town_9"),				#Mon Cal
				(set_rain,1,100),
			(else_try),
				(eq, ":c_town", "p_town_10"),				#Kashyyyk
				(set_fog_distance, 20, 0xFF736252),
			(else_try),
				(eq, ":c_town", "p_town_11"),				#Hoth
				(set_rain,2,100),
			(try_end),
		(try_end),
	  ]
	),


Snow and Rain seem to work fine, but I can't get the Fog to work for me....  I was actually trying to disable the fog by doing something like this, but it doesn't do anything.......

Code:
(set_fog_distance,100000000),
 
("field_1",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000033a059a5a0009525600002005000060e300001175",
    [],[],"outer_terrain_plain"),
now my question would be where do i use set_rain and set_fog_distance?
and lets say sf_force_skybox... where would you put these functions in the code?
 
set_fog and set_rain can be put into mission_templates, like

(ti_before_mission_start,0,0,[
          (set_rain,1,100),
          ],[]),

HokieBT said:
(set_fog_distance,100000000),
Try
(set_fog_distance, distance_in_meters, fog_color),
fog_color = 0xFFRGB

MISHO said:
and lets say sf_force_skybox... where would you put these functions in the code?

("field_1",sf_generate|sf_force_skybox,"none", "none", (0,0),(100,100),-100,"0x000000033a059a5a0009525600002005000060e300001175",
    [],[],"outer_terrain_plain"),
and it's not a function - it's a scene flag = sf

 
yeah, I knew about the fog color, but that didn't seem to make a difference either.  However, I just tested it again and found out something interesting.

set_fog_distance only seems to work with ti_once in a MT
set_rain only seems to work with ti_before_mission_start in a MT

so the set_fog_distance didn't work for me since I had it in the before_mission_start, but once I switched it then it worked fine.  woohoo!
 

that's very good to know.... haven't gotten to the point where i'm fooling with rain and fog yet, but it won't be long.
  thanks for sharing that very useful snippet of info.

regards,
ta
 
Back
Top Bottom