Jump to content
Sign in to follow this  
rübe

RUBE Weather Module

Recommended Posts

Thanks for update, seems to be going fine at the moment... just a question on the addon version.

When you put the game logic "Rube Weather" in the editor, do you also need the "Rube Library" down too? so they both work together or what?

Thanks

Share this post


Link to post
Share on other sites
When you put the game logic "Rube Weather" in the editor, do you also need the "Rube Library" down too? so they both work together or what?

No, you don't need to put down the "RUBE library" first.

Sure, the weather module will need it, but it will load the RUBE library by itself, if it isn't loaded already.

Or in other words: yes, once you've put down the weather module, you can also use all the stuff in the RUBE library.

Share this post


Link to post
Share on other sites
No, you don't need to put down the "RUBE library" first.

Sure, the weather module will need it, but it will load the RUBE library by itself, if it isn't loaded already.

Or in other words: yes, once you've put down the weather module, you can also use all the stuff in the RUBE library.

Thanks mate :)

Share this post


Link to post
Share on other sites

Hi, I have implemented the weather module in a couple of my missions, and users are reporting a problem where their screen, when not using NVGs, is pitch black. with NVGs on, everything is fine, but without, they cant see, even in midday.

Nothing else in the mission code effects the player's view, so I will probably try to give them the option to disable the weather module, but was wondering if RUBE has any ideas on what could be causing this. I use the preset weather configs for each island that I support BTW.

Oh and will calling

"ColorCorrections" ppEffectEnable false

set the view back to normal as a quick fix?

Edited by markb50k

Share this post


Link to post
Share on other sites

@markb50k: Can you reproduce the problem? And why are you so sure it's a problem with the weather module (not implying that it isn't... hehe)?

From reading the thread about your Lost mission (looks great btw.) I've learned that you've been using the weather module for some time already, yet that problem occured not until lately? Did one of the recent betas change anything?

As for the color corrections; you can easily turn them off by setting "enable-color-filter" to false on the weather module prior to launching it (in case they cause some sort of problem, bad performance or if you simply dont like these alterations...). Maybe you could try that and see if the problem persists.

I haven't been playing/scripting for weeks, so I missed the latest betas...

But I will catch up soon and we'll see what I can do.

Btw.: since you've been using the weather module for some time now... How satisfied are you by it? Is the weather appropriate (by season model) and interesting? Are the forecast reports worth their money? Anything else? Need new season models? ... :)

Share this post


Link to post
Share on other sites

I find the weather module non-obtrusive and seamless, yet immersive. So I think that's pretty much what you wanted with it, huh? I enjoy it very much.

My only supposition that it is related to this issue, is because its the only piece of code in my mod that effects the environmental view from the player's perspective. I have a quick code fix that i will be testing out to give the user the ability to toggle the color mask. If that is what the issue is, users will see an immediate remedy to the problem they are seeing. But yeah, I havent had this issue before, and i cant reproduce it, so it would surprise me either way.

Share this post


Link to post
Share on other sites

Wow, this is quite an amazing piece of work you got here reube! I thought your functions were deep enough as is (I still cant figure out how to work with the convex hull, or the road intersection calculator) but this is something else!

I need a good forecaster for the airport tower in my campaign.

Share this post


Link to post
Share on other sites

cool.

mainstream/science meteo math model would b handy within, IMO :)

[simplified, of course].

also would be warmly encounter various weather "random encounters", such as hail, tunder[easiest one;], lightning, meteors fallout/shower and etc.

mind adding visually-noticeable wind impact on gameplay :)

Share this post


Link to post
Share on other sites

Has anyone had any luck getting the forcast and weather to work in a DEDI server or any MP action?

I have noticed that on a Dedicated server that the weather isnt syncronized for all players. I was seeing snow when my team mates were not . and then it flipfloped i saw nothing and they saw snow.. I have only played one game where the weather had been sorta close for all players..

I also cannot get the forecast to show up in a Dedicated server. using the previously posted script to attach the forecast to a laptop on a folding table only works in SP.. In MP it spawns the table, chair, and notebook but I do not get an action menu option to check forecast.

Edited by Lordprimate

Share this post


Link to post
Share on other sites
My only supposition that it is related to this issue, is because its the only piece of code in my mod that effects the environmental view from the player's perspective. I have a quick code fix that i will be testing out to give the user the ability to toggle the color mask. If that is what the issue is, users will see an immediate remedy to the problem they are seeing. But yeah, I havent had this issue before, and i cant reproduce it, so it would surprise me either way.

If I haven't been dreaming (or away for too long?)... uhm, there should be an option on the weather module to explicitly disable any color-effects. Just set it to false prior to starting the module. And yeah, I can easily imagine that this can clash with some other mod or what not.

I need a good forecaster for the airport tower in my campaign.

Has that campaign been finished in the meantime?

And did you end up using the weather module? :o

"random encounters", such as hail, tunder[easiest one;], lightning, meteors fallout/shower and etc.

mind adding visually-noticeable wind impact on gameplay :)

Uhm, I doubt I'd ever adding such things. Sounds more like something for the mod-departement (I'm only here by accident; scripting-subforum is my home, hehe). But if you insist on such things, you could look for (or come up with) such things on their own, say a little mod which adds a few new particles and sounds and what not or simply a clever script.. then you could easily couple that to the weather module (e.g. by querying if a certain phenomen is allowed to occur or what not...). But aren't such things usually scripted? Because we actually want to script them; you want such things to occur exactly when the mission demands it, no (as in storytelling, dramaturgy and what not...)?

Has anyone had any luck [...] in a DEDI server or any MP action?

F.A.Q. - Point number one (see first post):

Does this work for multiplayer missions too? And if not, are you going to do something about it?

No, the RUBE weather module will not work for your multiplayer missions. And there are no plans to do that.

But feel free to write your own client variant of a weather engine, that is multiplayer-proof. Let the server generate the forecast, and then come up with some client version of the weather engine.

This module has been designed for singleplayer useage only - to be more precise; with long-term, continuous/ongoing (consistent world bla..) singeplayer-missions (or rather a campaigns) in mind. The weather data would be saved/loaded (as needed) and "advanced" each day, while the forecast would be made available by any means the mission-designer thinks are suitable (newspapers, laptops, ...). For example think of a campaign structure that pretty much consists of a single mission and loops to that single mission - no matte what outcome. The "progression" would be handled by that single mission, where in its initialization phase the "state of the world" would be loaded... including the weather data..

At least that was one of my original design goals. I'm afraid, multiplayer was not one of them.

Share this post


Link to post
Share on other sites

Been looking for something like this for years now, thanks.

Looks great, but after hours I still cant get it to work.

I followed (or tried following) everything posted about this, and I'm going crazy here, I have a description.ext and init.sqf in my mission folder.

I load up the demo (because I still havent figured out how to use your own objects for your own missions) everything is there, but I use the action command and nothing pops up, nothing happens.

Didn't find this ANYWHERE... Do I put the RUBE folder in my mission folder or do I use it as a mod?

I use the script version.

Can you please explain step by step what to do when using the script version, I'm sure it will help out not only me but a lot of people

this is just too hard to use. this is what I did:

???1/ put RUBE folder in mission folder or as mod??? (both seem to work, only sometimes not and sometimes it does)

2/ add the init.sqf in mission folder

3/ add the description.ext in mission folder

??4/ add init to player??

thx

Share this post


Link to post
Share on other sites
Been looking for something like this for years now, thanks.

Looks great, but after hours I still cant get it to work.

If you use the mod version, you can add the following to your init file to use a dynamic weather.

[] spawn {
// make sure the RUBE function library is loaded
if (isnil "RUBE_fnc_init") then
{
   [] call (compile preprocessFileLineNumbers "RUBE\init.sqf");
};
waitUntil{!(isnil "RUBE_fnc_init")};

// init weather module
_this execVM "RUBE\modules\weather\init.sqf";
waitUntil{!(isnil "RUBE_weather")};

private ["_season_model"];
// select season model from:
// - bamiyan (NE afghan mountains), 
// - prague (central europe)
// - kandahar (SE afghan valleys)
// - arauca (Columbian tropical rainforest)
// - kano (Nigerian tropical savannah)
// - oulo (Finnish subartic/taiga climate)
_season_model = "kandahar";
_season_model call (RUBE_weather getVariable "set-season-model");

// set forecast size
RUBE_weather setVariable ["forecast-days", 6, true];

// initialize forecast/weather data
[] call (RUBE_weather getVariable "generate-weather");

// ready? set, go!
[] call (RUBE_weather getVariable "start-weather-engine");

};

Why not try getting the mod version to work first, and, as a second step, see if you can get the scripting version to work?

Enjoy the weather,

William

Share this post


Link to post
Share on other sites

Thanks for tuning in and saving the day William!

:D

At least I hope you did. Otherwise - @dematti - feel free to upload your mission/what you have so far somewhere and post it in here, so we can take a look at it. I'm afraid your description of what you did doesn't helpt too much.

Share this post


Link to post
Share on other sites

Hi,

Thanks for your replies.

I found out the problem, it seems that, when I add other scripts into my mission folder, the dialog doesnt show up.

these scripts are mainly .sqf files, one .init file, and one .fsm file.

I thought one of the scripts might be interfering with the weather script, but after testing there is no script interfering with a certain other script.

For the weather script to work, it seems I can add no other sqf's or .fsm files in my mission folder.

seems a bit weird, but its the only way for me to get it to work.

Share this post


Link to post
Share on other sites

There can be only one init.sqf, so I take it you must have overwritten the example(!)-init with the RUBE stuff by some other init.sqf. Hence no working dialogs.

Try to merge them, such that the content of each individual files ends up in one single init.sqf (due to - hopefully - unique name prefixes, there shouldn't be any clashes at all. Otherwise show me that son of a gun that uses my RUBE prefix :eek:).

And maybe try to better understand what you're actually doing.

Scripting by copying and pasting random stuff together won't get you far. ;)

Tweak on!

Share this post


Link to post
Share on other sites

I was also thinking that, but I use one init from missionfolder:RUBE/init.sqf and another one from the mission folder itself.

deleting the original one, leaving just the RUBE/init.sqf folder did not do the trick, thats why its pretty weird.

I going to try to merge the 2 inits and keep you posted.

Thanks!

edit: it is not the init file, it seems that adding to much into mission folder keeps it from working, not one of the files itself

---------- Post added at 02:16 AM ---------- Previous post was at 12:52 AM ----------

If you use the mod version, you can add the following to your init file to use a dynamic weather.

[] spawn {
// make sure the RUBE function library is loaded
if (isnil "RUBE_fnc_init") then
{
   [] call (compile preprocessFileLineNumbers "RUBE\init.sqf");
};
waitUntil{!(isnil "RUBE_fnc_init")};

// init weather module
_this execVM "RUBE\modules\weather\init.sqf";
waitUntil{!(isnil "RUBE_weather")};

private ["_season_model"];
// select season model from:
// - bamiyan (NE afghan mountains), 
// - prague (central europe)
// - kandahar (SE afghan valleys)
// - arauca (Columbian tropical rainforest)
// - kano (Nigerian tropical savannah)
// - oulo (Finnish subartic/taiga climate)
_season_model = "kandahar";
_season_model call (RUBE_weather getVariable "set-season-model");

// set forecast size
RUBE_weather setVariable ["forecast-days", 6, true];

// initialize forecast/weather data
[] call (RUBE_weather getVariable "generate-weather");

// ready? set, go!
[] call (RUBE_weather getVariable "start-weather-engine");

};

Why not try getting the mod version to work first, and, as a second step, see if you can get the scripting version to work?

Enjoy the weather,

William

I tried it with the mod too and doing exactly as above, still the same story...

Edited by dematti

Share this post


Link to post
Share on other sites
but I use one init from missionfolder:RUBE/init.sqf and another one from the mission folder itself.

deleting the original one, leaving just the RUBE/init.sqf folder did not do the trick

Uhm, I think we've got something mixed up here (and it's most likely my bad, sorry - haven't been messing with arma/sqf for a while... :rolleyes:).

If the dialogs don't show up, it's most likely that you're missing the description.ext (see initial post), which set's up all that stuff (and that's the file you would need to "merge" in case other scripts need also to define some resources...).

And forget that "only one init.sqf"-drivel by me. The file RUBE/inif.sqf could be named anything and has absolutely nothing to do with the - by convention named - init.sqf file in your missions root folder (from where you'll most likely start up the weather stuff).

So, given your missions root directory you should have:

  • some mission.sqm, obviously.
  • an init.sqf (where you put the code to init and start up the weather engine)
  • a description.ext file (this is where you might have to put other definitions too, besides the RUBE resources...)
  • the RUBE directory with its stuff - assuming you're not using the mod.

I hope things should be more clear now.

:o

Edited by ruebe

Share this post


Link to post
Share on other sites

For those who had or are having problems running the script version, this might help:

1) Disregard the instructions found both in the first post and the linked homepage. They're outdated as of now.

2) Place this in your description.ext (as noted in a previous post):

#include <RUBE\core.hpp>
#include <RUBE\x-core-IDC.hpp>
#include <RUBE\common.hpp>

class RscTitles
{
#include <RUBE\rsctitles.hpp>
};

class CfgSounds
{
#include <RUBE\sounds.hpp>	
};

3) Go to the RUBE directory, open the init.sqf file found there (so, in RUBE\init.sqf), and change this (at line 11):

_logic = RUBE_GroupLogic CreateUnit ["FunctionsManager",[0,0,0],[],0,"NONE"];

To this:

if (isnil "BIS_fnc_help") then { _logic = RUBE_GroupLogic CreateUnit ["FunctionsManager",[0,0,0],[],0,"NONE"]};

Now you can use the built-in demo as specified in the first post, by adding this line to the player's init (for instance):

0 = [] execVM "RUBE\modules\weather\scripts\demo.sqf";

Or use the code provided by _William in the post above.

As you can see, the problem I was having with this tool is that I placed a Functions module on the editor, and once RUBE was loaded it created another one, causing some havoc in the process. Following the steps mentioned above RUBE will only create a Functions module if there's none present already.

Apart from this small bug/overlook it's a great tool. Thank you very much, ruebe!

Edited by kenoxite
updated instructions with correct code

Share this post


Link to post
Share on other sites
As you can see, the problem I was having with this tool is that I placed a Functions module on the editor, and once RUBE was loaded it created another one, causing some havoc in the process. Following the steps mentioned above RUBE will only create a Functions module if there's none present already.

Yeah, that's rather sloppy what I did there with the BIS Functions module.

Sorry about that. :o

Thanks for pointing that out (and if I should find some time, I shall correct this; not that other guys will continue to run into the same problem...).

Glad you kept looking into it, instead of giving up that easily. ;)

tweak on!

rübe

Share this post


Link to post
Share on other sites

Talking about sloppiness, turns out that the correction I posted earlier was basically something that I pulled out of my arse and worked for some reason (although it shouldn't have) with my particular test mission.

I've updated the code in my previous post with the proper check. Everything and, particularly, the RUBE demo script (which was the one that sometimes didn't worked properly), seems to work as expected now, wherever you have a functions module pre-placed or not.

Share this post


Link to post
Share on other sites

@kenoxite: oooookay. I've just updated the RUBE library, which now shouldn't try to load the BIS function library a second time (I test for "BIS_fnc_init", not "BIS_fnc_help" though...).

Second, I'm now pretty sure that the Description.ext (in case you're using the script version) should use quotes instead of brackets, without leading/initial slash too (somehow I've always struggled with arma paths and probably will never really learn, bahaha). Hence your Description.ext is supposed to look something like this:

  #include "RUBE\core.hpp"
  #include "RUBE\x-core-IDC.hpp"
  #include "RUBE\common.hpp"

  class RscTitles
  {
  #include "RUBE\rsctitles.hpp"
  };

  class CfgSounds
  {
  #include "RUBE\sounds.hpp"
  };

...or just use the pbo/addon version. :rolleyes:

Does this work with ArmA3 or have an ArmA3 version?

Hell no. :butbut:

Last time I've checked, ArmA3 got some sweet additions to weather, such as the new fog (and what not). On the other hand, other things aren't working yet or final (rain I think? Or was it the clouds?)... Either way, I consider ArmA3 not stable enough yet to work on a new weather module - which would be needed, with all the changes and additions.

Further, I still don't have my copy of ArmA3. While I finally managed to get a box that actually could run it, :yay:, for the time being I still play some lovely ArmAII - now that I can max. settings and what not (I've spent most of my ArmAII-career on a shitty laptop...) :p.

But with some time, I might come up with a new weather thingy for ArmAIII. And for sure, someone else came up with something similar for ArmAIII in the meantime, no? ;)

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

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

You are not registered on Armaholic, or at least not that we are aware of. In the future we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

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

Share this post


Link to post
Share on other sites

New mod available at withSIX. Download now by clicking:

@rube.png

@ ruebe;

Soon you will be able to manage the promo pages of your content on our web platform and publish new content yourself.

To do so, please hit 'this is me' button on the page while logged in and you will get connected to your work.

For now you can send new content or releases our way through withsix.wetransfer.com or add your notification at getsatisfaction.withsix.com.

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  

×