Jump to content
code34

Real Weather - dynamic weather for MP games

Recommended Posts

v01qcU.jpg

Real weather is a simple and efficient script that creates dynamic weather/time environnement and synchronize weather on local & MP GAMES.

Real Weather:

- create a random rain, wind, fog, and sync time on MP game

- fast time to play night & day

Requirements

You have to put all your weather settings in BIS mission editor on "Manual"

Usage:
	1) Turn on "manual" all weather parameters in the mission editor.
2) add real_weather.sqf in your mission directory and add this line in your init.sqf:
[] execVM "real_weather.sqf";

Information:

Jip players are not automatically synchronized when they arrive in game, they must wait at least 1 minute before to be sync.

There is a very low cpu usage on server / client side

Download:

https://www.dropbox.com/s/y53xntsunos9aa9/real_weather_mission_1.4.altis.zip?dl=0

Licence:

Under Gpl, you can share, modify, distribute this script but don't remove the licence and the name of the original author

Git:

https://github.com/code34/real_weather_mission.Altis

Edited by code34
  • Like 2

Share this post


Link to post
Share on other sites

Release 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

Is the weather set for the Mission or does it change randomly over time?

Share this post


Link to post
Share on other sites
Is the weather set for the Mission or does it change randomly over time?

it s dynamic weather that change randomly over time

Share this post


Link to post
Share on other sites

Once weather is initially synced with other players, how often does the script make sure that it is still in sync? For instance can it still be raining on one person and the rain have cleared on another ?

Share this post


Link to post
Share on other sites

...and just how often does it change? Your sleep is set to 10 minutes. Real-world weather should be slow.

Just wondering. Looking for realistic random weather but slow changing and always in-sync. Been playing

with the in-game Editor Weather Module; but it appears only the Fog option works right now. Not trying

to criticize, better than what I could do. Just hoping and tinkering with ideas. Not tested yours yet.

Real world weather should be mostly clear to partly sunny. Can you expand on the probability of the others?

When testing and playing other systems, it would be changing too much and too fast; so it always seemed

to be an "average" of rain and overcast off and on and off and on since it jumped around a lot. Would like

to see a system of 75% mostly sunny set at start then a small 10% chance of change over two plus hours.

Did that make sense? Most of the time there would be NO change of weather. What is set at start would

be the weather for the entire mission. Writing a good weather script has to be very difficult. Looking forward

to trying this out this weekend. Hope BIS finishes their Module; until then keep up the good work. ;)

Share this post


Link to post
Share on other sites
...and just how often does it change? Your sleep is set to 10 minutes. Real-world weather should be slow.

Just wondering. Looking for realistic random weather but slow changing and always in-sync. Been playing

with the in-game Editor Weather Module; but it appears only the Fog option works right now. Not trying

to criticize, better than what I could do. Just hoping and tinkering with ideas. Not tested yours yet.

Real world weather should be mostly clear to partly sunny. Can you expand on the probability of the others?

When testing and playing other systems, it would be changing too much and too fast; so it always seemed

to be an "average" of rain and overcast off and on and off and on since it jumped around a lot. Would like

to see a system of 75% mostly sunny set at start then a small 10% chance of change over two plus hours.

Did that make sense? Most of the time there would be NO change of weather. What is set at start would

be the weather for the entire mission. Writing a good weather script has to be very difficult. Looking forward

to trying this out this weekend. Hope BIS finishes their Module; until then keep up the good work. ;)

Real world weather slow? We're I live we have a saying, "if you don't like the weather, wait five minutes!" Weather can change very fast in some places around the world. Geology is a major factor.

You should do some research on the types of weather Lemnos and Agios Efstratios have, it would give you better and more realistic weather.

Edited by ProGamer

Share this post


Link to post
Share on other sites

Geology? I think you mean geography? :-) cantvwaitvto try this script out! So if ur sleep is 10mins does that mean there is potential for a JIP player to have to wait for up to 10mins on default weather before being synced to the weather others are seeing? What would be the impact of reducing it to say 1min?

Share this post


Link to post
Share on other sites

hi guys,

You have to know that there is an issue with weather commands of BIS since the release of arma3. Weather can not be apply as we did before with A2. A feedtracker has been opened a while, and BIS don't give a real answer about the parameters bug. You can vote at this place:

http://feedback.arma3.com/view.php?id=3567

This script uses a workaround wich is to accelerate time each 10 seconds by 0.01 of hours.

By default the script waits 600 seconds before generates a new weather forecast.

So, you can check this with this method

the weather forecast change all the 36 minutes on clock game for 10 minutes on real clock, the weather takes few minutes to change and never arrive to real forecast target. Duing to new weather system the weather can not change from an extreme to an other, the settings go step by step from a point to another (except for the fog parameter wich working as expected). It explains why Jip are desync with other players and why it takes time to sync players.

The goal of this script is to vary gameplay with different weather for short mission (less than 4 hours of game). You can turn off the time acceleration and increase the sleep forecast, but it will have the same effect of using a static weather on the editor if you don't use a persistent mission. If you use a persistent game it will be more realistic. Note: day/night cycles are impacted by thoses parameters

Edited by code34

Share this post


Link to post
Share on other sites

New release 1.1

Logs:

- fix MP sync

- tune rain when cloudy

- add time parameters to tune fast time, forecast time, etc.

- add a mission example

https://www.dropbox.com/s/78enbc7oct84i30/real_weather_1.1.zip

Usage:
	1) Turn on "manual" all weather parameters in the mission editor.
2) add real_weather.sqf in your mission directory and add this line in your init.sqf:
[] execVM "real_weather.sqf";

git repository:

https://github.com/code34/real_weather_mission.Altis

Edited by code34

Share this post


Link to post
Share on other sites

Release 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

Thank you, defo gonna try this out.

Been looking for something like this for my missions, it just feels so unessecary to even use weather normaly couse it dosent sync in MP.

Share this post


Link to post
Share on other sites

I downloaded your script and tried it out. I really like it. Good scripting and nice weather changes. I will use it in my mission.

There is only one minor issue with the time syncing.

The part where you sync the time and weather from the server to clients does not use the current server time (date):

// sync server & client weather & time
[_timesync] spawn {
private ["_timesync"];
_timesync = _this select 0;

while { true } do {
	publicVariable "wcweather";
	sleep _timesync;
};
};

The date in the wcweather array is only updated every 5 minutes (with default settings) when the weather is forecasted. So every time the server syncs with the clients it sends an old server date and thus resets the client time to the old server date. To try it out just start a mission using the script and open the watch. You will see the client side time skipping, but every 60 seconds the time is reset.

I use this as a little workaround:

// sync server & client weather & time
[_timesync] spawn {
private ["_timesync"];
_timesync = _this select 0;

while { true } do {
	wcweather set [4, date];
	publicVariable "wcweather";
	sleep _timesync;
};
};

Share this post


Link to post
Share on other sites

hi great script many thanks ,

I wonder can you add a little something >> If player is at height > _x it will snow where _x is defineable by mission maker

that would be greatly appreciated if possible

cheers

Share this post


Link to post
Share on other sites

The date in the wcweather array is only updated every 5 minutes (with default settings) when the weather is forecasted. So every time the server syncs with the clients it sends an old server date and thus resets the client time to the old server date. To try it out just start a mission using the script and open the watch. You will see the client side time skipping, but every 60 seconds the time is reset.

Thks, I just push your fix to the git ;)

---------- Post added at 19:40 ---------- Previous post was at 19:39 ----------

hi great script many thanks ,

I wonder can you add a little something >> If player is at height > _x it will snow where _x is defineable by mission maker

that would be greatly appreciated if possible

cheers

hi, i don't think that snow is an avalaible BIS feature at the moment ;)

Edited by code34

Share this post


Link to post
Share on other sites
hi, i don't think that snow is an avalaible BIS feature at the moment

No not for BIS but can be made with Particle effect ;) , let me know i can help with that if the Height thing and sync is possible.

Share this post


Link to post
Share on other sites
No not for BIS but can be made with Particle effect ;) , let me know i can help with that if the Height thing and sync is possible.

yes it's possible, we can try it

Share this post


Link to post
Share on other sites

script works awesome, i have one request/suggestion, since you are required to put all controls on manual the settings always go into overcast with rain automaticly. and then you wait for your scripts first change.

and i want to have the changes only every hour. so first our of mission always rain.

Would be great if you had a paramter to edit the "starting weather".

Thanks for a great script

Share this post


Link to post
Share on other sites
script works awesome, i have one request/suggestion, since you are required to put all controls on manual the settings always go into overcast with rain automaticly. and then you wait for your scripts first change.

and i want to have the changes only every hour. so first our of mission always rain.

Would be great if you had a paramter to edit the "starting weather".

Thanks for a great script

normaly, you can set the starting weather directly through the editor ? (like example mission)

Share this post


Link to post
Share on other sites

Hey. Nice addon and for me it is a necessary addoon. But now the big BUT comes:

I have some problems with your sync. We know that it takes some time at the beginning to sny the players with the mission weather attitude, which isn´t bad for me. BUT a friend is playing on my server and his time (on his watch) jumps after 60 seconds 1 min back. So it will be a bit brighter, after 60 sec darker. It sees like an array which jumps always to the beginning. So his weather can´t generate right. But my time is correct and my weather is correctly changing.

the attitude of the script is: realtime, 1 sec = 1 sec real time, every 60 sec sync and changing between 300-1200 sec.

Maybe you could help me. I don´t know, what is wrong.

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

×