Weather module usage (Solved)

  1. 7 years ago
    Edited 7 years ago by HeroesandvillainsOS

    So I'm wondering the proper way to use the weather module and how it's intended to be used with the Intel weather settings in the editor.

    So let's say I want there to be a 40% chance of rain. What I'm doing is setting that percentage in the Intel tab and increasing the cloud coverage to a similar %.

    How is the weather module designed to be used alongside this? Or is it even supposed to be? Am I then supposed to set the climate to Mediterranean and make sure I pick a winter month? Or am I supposed to disable the Intel weather and let the module override it?

    My own personal crack at figuring this out has been a failure. I currently have it sunny, with a rainbow, and rain falling all at the same time. :( It's like someone threw-up a 7-course meal of all kinds of weather all over my mission and it's not pretty.

    I basically just want it to maybe rain; maybe not. Maybe have clouds; maybe not. All randomized based on the terrain and time of year. What am I supposed to do?

  2. The wiki does a decent job of describing the module:
    http://alivemod.com/wiki/index.php/Weather

    Basically you can set the starting weather in the module then determine the overall conditions based on climate and seasons. The game engine sets a minimum of 1800 seconds before the weather cycle begins - meaning you wont see any changes for the first 30 minutes. Use the module if you want more of a 'random' feel to the weather.

    If you want there to be a 40% chance of rain your best bet is to set it in the Intel section and not use the weather module.

  3. Ok. Been messing with this a bit and it still feels like the two (Intel versus the module) are conflicting. Let's forget the 40% thing. I just want totally random Mediterranean weather. I think I have that set up right in the module, but what do I need to do in the Intel section?

    Right now it's always dark clouds and rain on mission start. I want there to be a chance the mission starts out sunny. There's cloud coverage, fog, and a rain override that (I have rain unchecked). What do I do in those sections? Fog and clouds just have a slider.

  4. IIRC there shouldn't be anything you need to do under the Intel section.. to be honest it's been a while since I've used that module so perhaps things have changed a bit. Let me see what I can dig up.

  5. I'm using ALiVE's Ambient Dynamic Weather module with random Weather Climate and 0.2 Cycle Variance
    Not much else to set is there.

    I never even open the Environment (aka. "Intel") settings so to be certain that I don't change any of the settings from their defaults.

    In addition I'm using this code in init.sqf to get variance for the time of the day with mostly daytime

    // "Random start time"
    if (isServer) then {
    	if (random 1 <= 0.90) then {
    		randomTime = 5.5 + random 13; // day
    	} else {
    		if (random 1 <= 0.66) then {
    			randomTime = random 5.5; // night 
    		} else {
    			randomTime = 18.5 + random 5.5; // evening
    		};
    	};
    	publicVariable "randomTime";
    };	
    waitUntil{not isNil "randomTime"};
    skipTime randomTime;

    by champ-1 https://forums.bistudio.com/topic/163061-random-start-time-but-mostly-day-missions/?p=2553003

    So far I've been happy with the results. The weather can be anything from thick fog with our without rain, sunny, thunder, you name it.

    But I guess this method will not solve how to get such weather that would be somewhat dependent on time of year. Do you really need one? If you just set the weather module to random and be happy what it offers?

  6. Yeah I probably just messed up something in the Intel section. I'll see what happens when I put that all back to the default and just rely on the module instead.

  7. Edited 7 years ago by PillowTalk

    Honestly, I just set the weather module with an appropriate weather scheme (Arid, Mediterranean, etc), leave the delay and set the variance to 0.33 and it's always appropriate for the map with enough changes in it to give you a taste of every type of weather the game can produce (except on Arid, which just keeps it sunny and dry lol).

  8. Edited 7 years ago by HeroesandvillainsOS

    @PillowTalk Honestly, I just set the weather module with an appropriate weather scheme (Arid, Mediterranean, etc), leave the delay and set the variance to 0.33 and it's always appropriate for the map with enough changes in it to give you a taste of every type of weather the game can produce (except on Arid, which just keeps it sunny and dry lol).

    Yeah I ended up song this last night (aside from the variance. Had no idea what it did but that makes sense) and it worlds perfectly. Not sure what compelled me to open the Intel tab. Thanks guys.

  9. Edited 7 years ago by HeroesandvillainsOS

    Is there any way to put a cap on how much fog can be used with the dynamic weather module? Perhaps a code I can put in the module's init? I'm not sure if this module needs a re-write but it wouldn't surprise me with the weather changes made in Apex.

    One time I spawned in and the fog was so so thick within 3 or so KM of the ocean on Chernarus, I literally couldn't see beyond 25 meters.

    I don't remember ever seeing this prior to Apex. And this wasn't like cool misty looking fog. It made the game literally unplayable so I'm assuming there must be a bug in the Arma engine somewhere?

    If there's no way to cap out the fog, is it possible there's a cheat to cycle the weather maybe via a console command or add action I can place on the map somewhere?

  10. Came up with this to combat too heavy fog buildup:

    params ["_period", "_fogLimit"];
    
    while {true} do
    {
    	private ["_fog", "_decay", "_base"];
    
    	if (fog > _fogLimit) then
    	{
    		_fog	= (random _fogLimit);
    		_base	= (4 + (random 46));
    		_decay	= (_fog / (_base / 6));
    
    		(_period * 2) setFog [_fog, _decay, _base];
    	};
    
    	sleep (_period);
    };

    execVM from initServer with [900, 0.2]. Check every 900 sec. and max. fog 0.2. Might want to run a different _period depending on the cycle period set in the weather module. I think ours is set at 2700.

  11. Edited 7 years ago by HeroesandvillainsOS

    @Whigital thanks! Can you talk to me like I'm stupid (hint: I am) and tell me exactly where the code goes? I'm assuming I name the script something like "weather.sqf" and place it in my mission root. And then in the initServer.sqf I execute it with:

    [] execVM "weather.sqf";

    Does this look ok?

    Edit: I'm sure that's not right because I can't tell in the script where I would set the 900 sec check with max fog at 0.2

    Sorry for asking you to hold my hand on this. If you could show me a functioning example that would be really helpful.

  12. As you said, but with [900, 0.2] as parameters.

    [900, 0.2] execVM "weather.sqf";

    Might want to change the 0.2 (foglimit) to your liking, but 0.2-0.25 seems to be a good value for us.

  13. Edited 7 years ago by HeroesandvillainsOS

    Lovely. This will definitely get me started! I'll have to mess around a bit and figure out what value causes the monster movie fog, and then just drop it a bit from there. I really like it when it's dense every now and then because it's super atmospheric, but that swamp-thing fog was totally nuts. I'd never seen anything like it. :)

    Thanks a bunch for the help!

  14. @Whigital The script works brilliantly. Perhaps we could get it added to the wiki?

  15. Check out what was happening on our ALiVE server last night...the weather started yesterday around noon central US (real time) and got gradually worse until around midnight when I logged in as Zeus and adjusted the fog limits in the game. I couldn't get the wind to die down but we were experiencing a full 88.4 M/s (196mph) wind value which seriously effected shooting and flying.

    http://images.akamai.steamusercontent.com/ugc/428232947404793421/6BA22E156DE685EDBEB9173B5F3BBB9BBA4168B6/

  16. Wow I've never seen weather this bad in Arma!!

  17. Not nearly as exciting but I had someone tell me they're getting rain using the arid setting in one of my missions. I've never personally seen rain when using that option so it's nice we're getting good variety and surprises along the way!

  18. Disable ACE weather to fix wind

  19. Thanks Spyder...just want to make sure that there are no problems with the ACE ballistics being effected by removing the weather.

 

or Sign Up to reply!