Improved Weather FX Plugin

This time I looked through the forums before posting this and didn't find anything terribly similar (unlike that controller plugin... XD).

After some exploring RPG Maker, I'm really liking a lot of these systems and how generic/flexible it can be. But one area IMHO it kinda sucks at is the weather effects.

So, here's a plugin I'm working on which drastically improves the stock weather effect system. It exposes a bunch of parameters which were previously hardcoded, like angle, speed, opacity, etc. It also adds new behavior to the Snow weather type, which adds configurable horizontal wobble to snowflakes.

Here's a screenshot of some parameters in the plugin as it is now:

[IMG]https://dl.dropboxusercontent.com/u/99106620/ImprovedWeatherPluginScreenshot.png[/IMG]

And here's a video showing the difference between the stock rain effect and some parameters I've provided to the plugin:
I've just added a couple of features to my plugin.

Now, you can modify max particles per weather effect (which is multiplied by Power). This way you can control how many or few particles are onscreen.

Additionally, I've improved the particle spawning behavior. By default, the system will call an addSprite function in a while loop until the maximum number of particles is reached. addSprite sets the new sprite's opacity to 0. The end result is that when you first start a weather effect, it detects all sprites' opacity as 0 and respawns all of them at once.

However, I've now changed it so that addSprite sets each one to start at a random value between 0 and the appropriate [ Rain/Storm/Snow ]StartOpacityBase parameter. This avoids particles spawning in "spurts", which was happening on snow when I made the snow particles last longer (by reducing the SnowOpacityReduce value).

Here's a demo where I tweak the snow effect with my new plugin:
Would be cool if those parameters can be changed with plugin commands too, for example when the player goes to a snow mountain, the snow effect becomes bigger, faster, and the angle is different. However if you go to a snow town, the snow falls slower and horizontally.

 

Great plugin by the way, I will look forward it's final release.

PS: Will you allow use it on commercial projects?
Cool, I've seen one weather effect like this one with lots of choices. Great to see another variation
Would be cool if those parameters can be changed with plugin commands too, for example when the player goes to a snow mountain, the snow effect becomes bigger, faster, and the angle is different. However if you go to a snow town, the snow falls slower and horizontally.

 

Great plugin by the way, I will look forward it's final release.

PS: Will you allow use it on commercial projects?
Hm, yeah, I'll give that some thought. Could use plugin commands for this, I think.

EDIT: Yeah, I'll be allowing use freely for both commercial and non-commercial.

EDIT 2: It also occurs to me that it might be possible to add a plugin command to replace the particle images. For example you could issue a command which replaces snow with leaves... 🙂
I've now got commands for changing rain, storm, and snow properties. I'm going to work on the syntax because at the moment it's not terribly user-friendly, but at least the functionality is there. At the moment the commands are something like this (using rain as an example):

ImprovedWeather_SetRainProperties [particle speed] [opacity reduce] [opacity base] [opacity var] [angle] [particle num]

I'm thinking of switching it over to key-value pairs though, that way you can just change which values you need. For example:

ImprovedWeather_SetRainProperties rainSpeed 25 rainOpacityReduce 10

Or something like that.
I'm thinking of switching it over to key-value pairs though, that way you can just change which values you need. For example:

ImprovedWeather_SetRainProperties rainSpeed 25 rainOpacityReduce 10

Or something like that.
Yes, that way is more friendly, also other things not written for example if you write only opacity and speed, other things like variance, angle, etc would remain the same, and for reset to default you can do a command, something like ImprovedWeather_SetRainProperties default, which default can be the parameters specified inside the plugin manager.

Once you release the plugin to public please notify me via PM 🙂
OK, so new updates to the development of this plugin.

- Instead of separate Set[Rain,Storm,Snow]Properties calls, it's now just one single call: ImprovedWeather_SetSystemProperties. To this, you pass key/value pairs. For example:

ImprovedWeather_SetSystemProperties rainSpeed 8- Added Reset[Rain,Storm,Snow]Properties calls. If you modify any system properties as above, you can restore rain, snow, and storm properties back to the values you define in the plugin properties. For example:

ImprovedWeather_ResetRainProperties- Spent a while idiot/typo proofing things. Providing invalid formatting for values in the plugin properties now causes it to emit a warning to the console and fall back to RPG Maker defaults for those values. Providing keys that don't exist in calls to ImprovedWeather_SetSystemProperties will cause it to log a warning to the console that the key is unknown. Providing invalid values to the same command will cause it to log an invalid format message to the console and continue using whatever the previous value for that property was. Argument lengths which are not multiples of two will also cause a warning to be logged to the console (since, if it isn't a multiple of two, that means a key or value is missing somewhere). Basically trying to prevent typos or other mistakes from crashing the game or other odd/undefined behavior 😉

Still remaining on the todo list is to allow users to load custom images for rain, storm, and snow systems, as well as revert back to default images.

EDIT: Oooh, I just realized I could have SetSystemProperties check and see if the value you provide for a key is "default", and if so use the default value for that specific parameter. So then it would be possible to revert specific properties as well... 😀

EDIT 2: Done. Now you can do this as well!

ImprovedWeather_SetSystemProperties rainSpeed defaultEDIT 3: Preliminary image loading support. I made it rain faces, because raining faces is a thing it can do now.

[IMG]https://dl.dropboxusercontent.com/u/99106620/RMMV/SnowingFaces.png[/IMG]

ImprovedWeather_SetRainBitmap TestImageAnd to reset it back to the default:

ImprovedWeather_ResetRainBitmapOne limitation is that the bitmap path can't contain spaces because plugin arguments are split on spaces. Not too big an issue IMHO, just ensure you don't have folders or filenames with spaces in them (I always use underscores anyway, probably because I'm so used to naming things in programming).

Going to extend support to all systems (storm and snow), and add properties to the plugin interface as well (if you leave the fields blank, it simply uses the default ones - otherwise, it will load your custom images). Then, I dunno, I think this might be pretty damn close to release.
Interesting!

I am looking forward to the finished plugin!

Keep up the good work ^^

Original thread: https://forums.rpgmakerweb.com/threads/improved-weather-fx-plugin.52044/