Jump to content
Sign in to follow this  
tortuosit

Dynamic weather script and addon: tort_DynamicWeather

Recommended Posts

Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
Any plans on making this multiplayer compatible? Or can anybody confirm it is compatible?

It has already been used in Escape missions. But I have made quite some changes since... There are 2 files in "scripts\mp code\" folder, which may help you. I must say the exposed settings are not perfect...

You may for instance de-pbo the "Escape Altis" or "Escape Roy" community missions.

BTW guys, there's an undocumented setting for mod version, if you add

islandTemplates = 1;

to the userconfig then it adds an additional menu entry to the support menu. With templates especially for specific islands. I could also make the mod auto load those. But currently only less time to maintain them. I know there are many islands...

Altis e.g. goes like this:

[[-0.4,0.02,0.2,0],"pBetter",[0.1,0.1,[0.7,1,0.05,0.1,0.5,1],[0.55,0.55,0,0,0.8,1]],[0.15,0.25,30],[0,0.4,0,0.15,0,0.5,0,1],_debug,_seed] execVM "\tort_DynamicWeather\tort_DynamicWeather.sqf";

-> Good weather overall, slight wind, on average 30 minutes out of 5 hrs. bad weather w. rain or clouds with more wind. Likely to return to good weather.

Edited by tortuosit

Share this post


Link to post
Share on other sites

Version 1.3

- Bug fixes and slight reorg to Addon menu (which is in the support menu. 0-8)

- own wind and rain thread. Its experimental, needs some work, also because main script does still handle wind as well which is obsolete, but I have not much time. But should be no problem, also for performance.

- Island templates, i.e. full weather definition can be applied (happens at mission start) per Island/World. Enable it in config file and copy island definitions to user config, as described below.

Please check your config files in Steam\SteamApps\common\Arma 3\userconfig\tort_DynamicWeather\, at best, overwrite them with the newly distributed ones.

Island weather definitions are in: userconfig\tort_DynamicWeather\tort_islands.sqf

To enable them, you need to set "islandTemplates = 1;" in tort_DynamicWeather_config.hpp

\Steam\SteamApps\common\Arma 3\userconfig\tort_DynamicWeather\tort_islands.sqf

MUST BE AVAILABLE FOR THE MOD TO WORK

I HOPE ITS not a problem for withSIX

Edited by tortuosit

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

I made a new version with some fixes, e.g. "oscillate" trend was flawed, also you can now add island sections to the island config files and restart weather while in mission, and it would be used.

But now I'm mildly shocked because the whole cloud concept turned out to be flawed under the setovercast command circumstances. setovercast does not work as expected by me.

I observed output of the overcast function for a longer time.

As you may know the script changes weather step by step like this example:

30 setovercast 0.6

..where 30 is number of seconds and 0.6 is a more or less slight change from the prior overcast value. What I observed is, if you slice the behaviour like I do, the cloud coverage does BY FAR not catch up.

Example. Lets assume overcast is currently 1, "0 setovercast 0" would take 2 hours until overcast is actually 0. If now, like I do, I slice the process into 10 steps with "720 setovercast (current - 0.1)" each (which takes 2 hrs as well), cloud coverage will not be 0 in the end... would take like 5 hours. Its like the "0 setovercast" speeds things up.

(Note that "0 setovercast n" does actually not force an abrupt change in the view unless you do not use related commands like forceweatherchange...)

So it seems like I have to make some massive changes... I must say I'm on the dev branch but I think there weren't changes to the weather commands...

That weather, I hate it sometimes.

Share this post


Link to post
Share on other sites

ArmAs setovercast calculations seem to be broken. I tested and measured the return values of the "overcast" command.

Start at full overcast level, then apply "0 setovercast 0", to see what speed is possible:

0 setovercast 1;  forceweatherchange;  //set overcast level to 1
0 setovercast 0;

Result: Overcast consistently goes down. Good. It has reached the level of 0.9 in ~280 seconds.

Now lets try to tell setovercast exactly what was measured above:

0 setovercast 1; forceweatherchange; //set overcast level to 1
280 setovercast 0.9;

Result: After 17 Minutes the overcast level is only at 0.96. But I expected it to be on 0.9 level after 280 seconds/4:40 minutes. WTF?!?! The process would take ages.

EDIT: I reported it in http://feedback.arma3.com/view.php?id=3567#c83167

---------- Post added at 17:21 ---------- Previous post was at 16:56 ----------

Version 1.3.1

- Adresses above setovercast problem.

- "oscillate" trend (jumps permanently from full cloud to zero clouds) was broken by design. Fixed.

- You can now alt-tab to Arma 3\userconfig\tort_DynamicWeather\tort_islands.sqf, edit it, return to your mission and your changes will be applied after mod restart (which is in the 0-8-1 support menu).

As for the setovercast problem, I did a quick and dirty workaround by always using "0 setovercast n", i.e. it does a every overcast transition at universal speed. If process catches up sooner than defined, the script sleeps. Its not so much of a problem, as all weather transitions are split in slices internally. This is definitely better than before, when overcast transitions were way to slow. I think you will not really recognize faster transitions. Untested though. ...I added some more weather definitions for islands btw... Nogova for instance.

I'm not very happy with the use of setwind [_east, _north, true]. "true" has to be taken because of a bug. But this applies wind harshly, and even with small changes this can be seen e.g. in abrupt movements of the grass models.

Edited by tortuosit

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hey man, this mod is really cool and helps creating a new atmosphere everytime a mission is played. But do you have any plans of including island-specific color corrections like the awesome Arma 2 RUBE Weather module?

Share this post


Link to post
Share on other sites
Hey man, this mod is really cool and helps creating a new atmosphere everytime a mission is played. But do you have any plans of including island-specific color corrections like the awesome Arma 2 RUBE Weather module?

Thanks. No plans about this. Can you tell, why did he do color correction, I cannot see the reason... Like "blue colors for a cold feeling"? From my understanding map color correction is something static and bound to a map - a responsibility of the map maker. From the technical side, I have no knowledge about such things at all. Judging from how late some map makers adjust the often too bright lighting it does not seem to be an easy task... or maybe badly documented.

Share this post


Link to post
Share on other sites

The color correction adds a unique feeling to every island and depending on the time of year. If you haven't tried RUBE for Arma 2, you definitly should, it improves the atmosphere a lot. And yes, the color correction is tricky, I've used it as a mission maker myself but very few actually do.

I think it is a nice way to make you feel like "Hey, it actually looks cold in January on this island even if theres no snow falling" and removes the always-the-same-lighting. Also Dusk and Dawn look a lot better, especially on arid maps.

But if this is not planned, its fine, I just wanted to know.

Share this post


Link to post
Share on other sites
And yes, the color correction is tricky, I've used it as a mission maker myself but very few actually do.

Can you provide links with information on color correction? Maybe a mission pbo of yours? I'm not promising anything, want to see how difficult and flexible such things are.

Share this post


Link to post
Share on other sites

yea tortuosit, if you do have arma 2 still installed and have the time. get RUBE weather module and play around with it.. Crack it open and look at how he did it and the values he used, to get a baseline for ARMA 3.. if you so desire. Dar speeks the truth, it really makes a big different in the atmosphere of the island!!

Share this post


Link to post
Share on other sites

Haven't had a look at RUBE yet, but added a post processing thread. Technically, it worked. Don't know yet what color corrections I actually may want to have. Also not yet sure if I want to start pp effects at all (I may open a can of worms then...). OTOH I could add some settings to the island definition files. Will see if it feels any good. I also don't want to interfere with map makers lighting settings. I'm also thinking about ascz map fixes, I think he corrects maps lighting... I don't know if I'd overwrite it then...

BTW, I did a first test with this basic concept, not sure if that is a good idea:

while {tort_pp} do {
  if ((overcast > 0.8) && (fog > 0.4)) then {
     [...]
     "colorCorrections" ppEffectAdjust [_lightness,1,0,[0,0,0,0],[1,1,1,1],[0,0,0,1]];
-->   _lightness = vary a bit and stay between maybe [0.7..1]
     sleep 10;
  };
};

I.e. some possibility of having darker days when there's much fog and lots of clouds. May feel good on Namalsk, which I play a lot.

Edited by tortuosit

Share this post


Link to post
Share on other sites

Version 1.3.3

- Fix: "FreeCycle" trend did not move at all... Some minor bug fixes.

Still needs some work, but currently I am playing a bit more. Lazy with scripting. There's still concurrent wind and rain handling in main script and specific wind/rain scripts, but doesn't hurt too much.

I think Island specific weather was a good move :D BTW this is currently in mod version only (init.sqf level). May think about putting it into script...

If some Island weather is missing, let me know, also how you think it should be...

As for island specific color correction, I am currently lazy as well... if it helps i may expose some values of the ppeffectadjust... into the tort_islands.sqf, then it would be applied every time my mod runs. But that wouldn't be season specific then.

maybe like this:

case "altis": {

[...]

t_mapbrightness = 0;

t_map_r = 0;

t_map_g = 0;

...

};

Edited by tortuosit

Share this post


Link to post
Share on other sites

Thanks for the update :)

Would be cool if you could add more presets. I personally like a kind of "postapocalyptic" weather scenery, something like Stormy clouds but without Rain. I dont like rain in the game, i haver a code for it that it instantly stops the rain and blocks it for my time i play.

Share this post


Link to post
Share on other sites
Would be cool if you could add more presets. I personally like a kind of "postapocalyptic" weather scenery, something like Stormy clouds but without Rain. I dont like rain in the game, i haver a code for it that it instantly stops the rain and blocks it for my time i play.

Let me guess. You're permanently doing "n setrain 0"? Or maybe like "0 setrain 0" followed by "9999999 setrain 0"? Or is there a specific command, which would be good...

Because whenever ArmA engine takes control, it produces rain when there's enough clouds.

Initially I didn't support rain because of ArmA permanently doing its own thing, but I am considering to let users full control, if it works. Some user control is already there, but there's still some room for ArmA engine regarding the rain.

Edited by tortuosit

Share this post


Link to post
Share on other sites

I use this code to permanently stop rain over hours when i play

[] spawn 
{
while {true} do
   {
   if (rain > 0) then
       {
       0 setrain 0;
       };
   sleep 1;
   };
};

I dont like too much windnoises too, when wearing headphones then it go on my nerves after a time ^^

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
I use this code to permanently stop rain over hours when i play

Well, I want to avoid creating more and more endless loops with a sleep() within. Not at my gaming rig. I'm curious if "0 setrain 0.2;1000 setrain 0.2" would fix rain at 0.2 level for 1000 seconds...

EDIT: No, does not work, you cannot chain setrain... If you start this with rain=1, then it simply takes 1000 seconds until rain=1. Code behaves like "0 setrain" is overwritten...

But its solvable together with sleep. This way there is precise control:

0 setrain 0; sleep 0.5; // starting with no rain
hint "For 20 seconds no rain";
20 setrain 0; sleep 20;
hint "In 20 seconds full rain";
20 setrain 1; sleep 20;
hint "In 10 seconds no rain";
10 setrain 0; sleep 10;
hint "For 150 seconds no rain";
150 setrain 0; sleep 150;
hint "In 10 seconds full rain";
10 setrain 1; sleep 10;
hint "For 150 seconds full rain";
150 setrain 1; sleep 150;
hint "Over and out";

EDIT: I've changed the rain thread (and stumbled over a nasty bug) and now it's nice, full user control over the rain, it's already working. Will apply same for the wind, but I first have to look at the calculations, because internally I use the setwind vector array.

Edited by tortuosit

Share this post


Link to post
Share on other sites

BTW, to my knowledge, if you have no wind (which is good for your ears :D) you will have no cloud movement. Except maybe if you do something on sound file level, which I do not do.

This is how I do rain now, I keep it simple for a beginning.

while {tort_rainthread} do {
  _duration = 10 + floor(([10] call rainthread_tRandom) + ([10] call rainthread_tRandom) + ([10] call rainthread_tRandom) + ([300 * (1 - windstr)] call rainthread_tRandom));
  _transitiontime = [_duration] call rainthread_tRandom;
  if (overcast > 0.65) then {
     tort_rain = [overcast + rain] call rainthread_tRandom;
     if (tort_rain > _max) then {tort_rain = _max - ([(_max - _min) / 10] call rainthread_tRandom);};
     if (tort_rain < _min) then {tort_rain = _min + ([(_max - _min) / 10] call rainthread_tRandom);};
  } else {
     tort_rain = _min;
  };
  _transitiontime setrain tort_rain; sleep 1;
  (_duration - _transitiontime - 1) setrain tort_rain; sleep (_duration - _transitiontime - 1);
};

Edited by tortuosit

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×