Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
First off, let me state that this is a modification, albeit a heavy one, of Ccoa's Advanced Weather System. If you use Ccoa's script, and have other scripts that are dependent on it, this script can still replace it with only some very minor edits.
Although I love the original script (a great staple for any game), I found that there was room for many improvements in basic data handling, configurability, and the simple overview of it. Then came the MAWS script by Agckuu Coceg. I loved the idea (it's what inspired this script), but it only further added to the number of redundancies that bugged me.I didn't see the point in caching 50+ different bitmaps, when there are essentially less than 30 types of weather, and the rest are just color variations. For example, Rain, Blood Rain, Acid Rain, Sepia Rain, Golden Rain, and Oil Rain all use the exact same image, just with different color, so why cache all of them separately?
So, here it is, with totally over-hauled coding. You no longer have to remember 60+ different numbers for weather types. If it is rain, the type will always be 1, but with an added number at the end of the script call, it can quickly become any color variation of rain (see instructions). It's easier than ever to add your own custom color schemes to the weather, I added some extra configurable values, and the coding has been improved immensely. To give you an idea of how many redundant lines of code there were, before I added some of my new custom weather effects, the code was over 1000 lines shorter than the MAWS script. Even now, if you include all the various color schemes, this script offers 95 different weather patterns, compared to the 54 offered by MAWS, and it is still shorter!
Features
New weather effects include, butterflies, birds, falling rocks, and arrows.
Including color variations, offers 95 different weather patterns.
Easy to quickly add more or alter existing weather patterns.
Configurable switch that will be ON during bad weather (Good for event conditions)
Configurable in-game variable that will be equal to the weather type.
Realistic thunder with random volume and pitch.
Easily configure how constant the over-all thunder/lightning is.
Fixed an error from the original script with the snow bitmap. It looks better now.
# This will set the weather pattern to rain, but with the added 1 at the end,
# it will now be Blood Rain.
$game_screen.weather(1, 25, 40, 1) # 2 for the style would be Oil Rain, etc., etc.
The usual script call will still work just fine.
If the 'style' is left off, it will be assumed to be 0 and the default weather pattern will be used.
That means you can you can use either one of the following to make it snow normally:
Code:
$game_screen.weather(3, 25, 0)
...or...
Code:
$game_screen.weather(3, 25, 0, 0)
They both do the exact same thing, so this should help with compatibility in other scripts that make script
calls to alter the weather.
More instructions, if needed, are in the script and demo.
Author's Notes
Please report any bugs/issues so that they can be resolved. Enjoy!
to Share - to copy, distribute and transmit the work
to Remix - to adapt the work
Under the following conditions:
Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
Noncommercial. You may not use this work for commercial purposes.
Share alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
- For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
- Any of the above conditions can be waived if you get permission from the copyright holder.
- Nothing in this license impairs or restricts the author's moral rights.