Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modyfying the weather on the fly #813

Closed
sunrrrise opened this issue Apr 22, 2015 · 25 comments
Closed

Modyfying the weather on the fly #813

sunrrrise opened this issue Apr 22, 2015 · 25 comments
Assignees
Labels
kind/feature Release Notes: **ADDED:**
Milestone

Comments

@sunrrrise
Copy link

Hi,
as Ulteq suggested I raised this issue. Currently ArmA offers a possibility to change weather on-the-fly. It can be done via Zeus or MCC. It is extremelly nice feature for any mission creator. Unfortunatelly current system developed by ACE team is not compatible with Zeus/MCC on this field. To be frank I do not understand how the weather is or should be synced but I have two suggestions:
1.) leave the option to choose beetwen ACE and vanilla system
2.) create something like "sync" button. I mean once the mission is created (via MCC or Zeus) the mission maker force the current weather state through ace_weather module to the clients.

Would you consider that? At least the first option?

@kymckay
Copy link
Member

kymckay commented Apr 22, 2015

It's possible to make the BIS module compatible, though a little contrived compared to how the projectile module was done for #747. Here are the steps that would be necessary:

  1. BIS_fnc_moduleWeather must be duplicated to a new function and altered to work with the ACE weather system.
  2. The "function" entry should be replaced in the ModuleWeather_F config to use the new function (since BIS functions can no longer be overwritten).
  3. The RscAttributeOvercast and RscAttributeFog curator dialog entity configs must have their "onSetFocus" overwritten to use new CfgScriptPaths files and path (this is part of the undocumented curator display framework - can expand on this if necessary).
  4. The entity initialization/processing files previously used must be duplicated to the script paths from the previous step and altered to work with the ACE weather system.
  5. Part of that includes creating replacements for other BIS functions to be used in those scripts (bis_fnc_setovercast and bis_fnc_setfog). I haven't looked at the ACE weather system in detail yet so this could be trivial depending on how it's set up.

@kymckay
Copy link
Member

kymckay commented Apr 22, 2015

It's a pity BIS functions can't be overwritten anymore, would be a nice catchall solution to just alter BIS_fnc_moduleWeather, BIS_fnc_setFog and BIS_fnc_setOvercast.

@ulteq ulteq added kind/enhancement Release Notes: **IMPROVED:** status/discussion labels Apr 22, 2015
@ulteq ulteq added this to the 3.1.0 milestone Apr 22, 2015
@ulteq ulteq self-assigned this Apr 22, 2015
@PapaReap
Copy link

With the ace_weather.pbo installed, I can't produce any rain at all.
Even setting 0 setRain 1 in the console, then it instantly falls to 0 after a few rain drops.

Also, will setting weather by PramsArray be possible?

@sunrrrise
Copy link
Author

@PapaReap
Yes, I can confirm that. You can manipulate:

  • fog (partially broken, eg. it's working on Podagorsk but not on Hazar-Kot)
  • rain (working for 1 second)
  • waves (editable but seems to be broken)
  • wind (editable but seems to be broken)
  • overcast (working fine)

@nicolasbadano
Copy link
Contributor

With the current ACE3 system you cannot manually manipulate weather anymore (same as in ACE2). This is by design, cause that commands don't correctly sync accross the network. We might be adding api calls later to do the same in a network friendly way

@nicolasbadano nicolasbadano added kind/feature Release Notes: **ADDED:** and removed status/discussion kind/enhancement Release Notes: **IMPROVED:** labels Apr 23, 2015
@PapaReap
Copy link

By manipulate weather, are you talking about after mission start (not looking to do this)?

How about before mission load by prams. For instance, one day we want to play the same mission sunny, next time, rainy. Is this no longer possible to set?

Guess I don't fully understand, is this pre-decided by time of year and date?

@nicolasbadano
Copy link
Contributor

How about before mission load by prams. For instance, one day we want to play the same mission sunny, next time, rainy. Is this no longer possible to set?

No, sunny/rainy still work exactly like in vanilla (you set overcast plus overcast forecast in the editor as usual). Zeus modules should still work for that too. Same goes for fog.

Wind on the other hand is auto calculated in ACE3, so you can't specify custom wind conditions for a mission or change it on the fly. We may be implementing function calls for this at some point.

Using the wind specified on the mission is not feasable for technical reason, so we just override anything set there.

@PapaReap
Copy link

I have no issues with any of the weather settings, except rain.

mission.sqm
startWeather=1;
startWind=0;
startRain=1;
forecastWeather=1;
forecastWind=0;
forecastWaves=0;
forecastRain=1;
rainForced=1;

image

Not sure what is going on here

@kymckay
Copy link
Member

kymckay commented Apr 23, 2015

@esteldunedain, out of interest, could you expand on the technical reason for not being able to use wind values set in the mission?

(Or link to somewhere it has been discussed previously)

@nicolasbadano
Copy link
Contributor

out of interest, could you expand on the technical reason for not being able to use wind values set in the mission?

In a nutshell and iirc: on the mission you can set wind to random or select a value + forecast. If you choose random, the wind is completely out of sync between clients (inconsistent ballistics, etc). On the other hand, if you choose fixed wind things work better. However the thing is that we don't really have a straightforward way of knowing if wind was set to random or not, so we don't know if we need to force it or not. Hence we are just ignoring what you set on the mission and rolling our own solution.

Besides, this allows as to network synced wind fluctuations (impossible with the vanilla system), change wind intensity and variability according to cloud coverage, etc. The only downside is that you cannot currently set the wind conditions manually, but we may add a function to do that in the future.

@kymckay
Copy link
Member

kymckay commented Apr 23, 2015

Ah, I see. Thanks 👍

@sunrrrise
Copy link
Author

So for now the best workaround for SP player is to remove ace_weather.pbo, am I correct? Can you tell me what other modules/areas would be impacted?

@ulteq
Copy link
Contributor

ulteq commented Apr 24, 2015

Deleting the ace_weather.pbo has several negative side effects (some modules require the weather module).

But you can now dynamically disable parts of the weather module:
ace_weather_syncRain = false;
ace_weather_syncWind = false; // Wind, Gusts, Waves
ace_weather_syncMist = false; // Lightnings, Rainbow, Fog

Reference:

// Control server side weather propagation
GVAR(enableServerController) = true;
// Control client side weather effects
GVAR(syncRain) = true;
GVAR(syncWind) = true; // Wind, Gusts, Waves
GVAR(syncMisc) = true; // Lightnings, Rainbow, Fog

You can also manually update the ace weather parameters by executing the following on the server:
ace_weather_enableServerController = false;

ACE_RAIN_PARAMS = [lastRain, newRain, transitionTime];
publicVariable "ACE_RAIN_PARAMS";

ACE_WIND_PARAMS = [currentDirection, directionChange, currentSpeed, speedChange, transitionTime];
publicVariable "ACE_WIND_PARAMS";

ACE_MISC_PARAMS = [lightnings, rainbow, fogParams, temperatureShift, badWeatherShift, humidityShift];
publicVariable "ACE_MISC_PARAMS";

but we may add a function to do that in the future

^^

@PapaReap
Copy link

@ulteq good info, I'm still wondering exactly what in the weather sync is preventing any rain.
Even on vanilla map with only ace and cba and all weather turned up to highest setting, I still get no rain with the weather.pbo.

@ulteq
Copy link
Contributor

ulteq commented Apr 24, 2015

That bug should be fixed: 062aeae

Feedback is welcome.

@PapaReap
Copy link

Oh, good news. I will give it a whirl in the am. Thank you.

@ulteq
Copy link
Contributor

ulteq commented Apr 24, 2015

You might want to decrease the server update interval for easier testing:
ace_weather_serverUpdateInterval = <timeInSeconds>; // default is 60s

@PapaReap
Copy link

Thanks, good idea. Will do.

Edit. It rains again, thank you. Will do more testing later 👍

@commy2
Copy link
Contributor

commy2 commented Apr 24, 2015

It rains again, thank you.

🍌

@sunrrrise
Copy link
Author

@ulteq

Thank you for your input!:-) I have a probably noob question. Do I have to put this:

ace_weather_syncRain = false;
ace_weather_syncWind = false; // Wind, Gusts, Waves
ace_weather_syncMist = false; // Lightnings, Rainbow, Fog

into iniq.sqf?

@commy2

Which method did you use? The one that starts with:

ace_weather_syncRain = false;...

or

ace_weather_enableServerController = false;...?

@ulteq
Copy link
Contributor

ulteq commented Apr 24, 2015

Just set the overcast to something greater or equal to 0.7 and it'll rain.

For example: 0 setOvercast 1;

ace_weather_syncRain = false;...

You only ever have to disable the sync globals if you want to use 3rd party weather mods together with ACE3.

ace_weather_enableServerController = false;...?

Doing that allows you to broadcast your own ace weather params to the clients

@sunrrrise
Copy link
Author

I am not sure if we are talking about the same ace_weather.pbo build. I have the one from 22.04.15 distributed by one of the guy from BIS forum ACE thread. If it is already "patched" then I have to wait until he publish a new version.

But again, do I have to put those ace_weather_syncRain = false;... into the init.sqf file of the mission?:-)

EDIT: I have written this post while you were editing yours.

@ulteq
Copy link
Contributor

ulteq commented Apr 24, 2015

What we are talking about was added today: https://github.com/acemod/ACE3/commits/master

And please do not modify any ace variables via script unless you know what you are doing.
It may lead to unexpected behaviour.

@KRDucky
Copy link

KRDucky commented Apr 26, 2015

What about the ability to have a full on, Hurricane? I mean with a storm that rises up out of the blue during the mission and gets really hairy out there with very strong winds that gust and bend the trees. Heavy rain and big waves. Then, after a time it calms down and goes to a drizzle to a stop.
I ask because I am trying to get the Breaking Point devs to incorporate ACE3 into Breaking Point (most likely with a fork) and the current weather system in BP is crap. Same with their Day/Night cycles.

@ulteq
Copy link
Contributor

ulteq commented Apr 27, 2015

1.) leave the option to choose beetwen ACE and vanilla system
2.) create something like "sync" button. I mean once the mission is created (via MCC or Zeus) the mission maker force the current weather state through ace_weather module to the clients.

Both is now implemented: 3c91f6a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

No branches or pull requests

8 participants