The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: exhydra on September 09, 2013, 03:19:06 AM

Title: [VXA; Critique|Feedback] Forecast - Weather Layering System
Post by: exhydra on September 09, 2013, 03:19:06 AM
Forecast - Weather Layering System

[ Author Note ]

What simply started out as tinkering rapidly became a colossal script. Or, at least, the most complex script I have written, so far. Although, that is not saying much.

While I have certainly learned more while writing this script, I consider myself rather green when it comes to coding. So, I figured that I would post here. I would very much appreciate anyone glancing over the code and offering suggestions for optimization, features or simply offering some neat coding tricks.

The primary feature of layering and the standard rain, storm, and snow weather work fine, as well as the added hail and petal effects (ported from CCoa's weather script). Issues may arise if the filter system is used, however.



[ Introduction ]

In the beginning, I simply wanted to dynamically resize and affix the second viewport to the map, as well as change the z-coordinate value (much like parallax mapping, but with weather effects). However, as I remembered that pictures also use the second viewport, I shifted my focus to creating my own separate weather layer. Then I figured that I may as well aim for the function to create multiple weather layers to allow for mixing and matching. After that, I figured I may as well introduce the ability to change the color, tone and other settings for both the viewport and sprites on the screen. And on the script goes ...


To give an example of usage, let us say that an author of a game has rain active outside of a house. When the player enters the house, the author is forced to clear the weather, as rain inside of a house does not make much sense. However, if the author had the ability to shift the z-coordinate, he/she could place the weather beneath the tileset or parallax map. Therefore, if there were a window within the house, the weather could still be visible to the player, along with any flashing (lightning, etc) or effects that may occur. The rect of the layer could be altered as well, so that the weather was contained within a smaller region (negate spill-over from behind the tileset, or images).

Or, in another example, if the current map was configured for a semi-side scrolling state, there could be weather in the foreground (zoomed in, and blurred to denote closeness to the 'camera') as well as weather in the background (zoomed out).



[ Completed Features ]
[ Buggy Features ]
[ Planned Features ]

Download Script (https://www.dropbox.com/s/pa167rasxq9reja/ns-forecast-0_3.txt)

Title: Re: [VXA; Critique|Feedback] Forecast - Weather Layering System
Post by: modern algebra on October 05, 2013, 01:30:28 PM
Sorry I've been MIA, but I will take a look at this if you're still interested in feedback! Of course, I probably won't have anything particular wise to impart.
Title: Re: [VXA; Critique|Feedback] Forecast - Weather Layering System
Post by: exhydra on October 05, 2013, 07:07:06 PM
The script has changed quite a bit since the original post, but is currently in a semi-working state after I reworked most of the code to be more streamlined (or so I hope). If you would like to take a look, here is a sample project :

Forecast 0.5 Sample Project (https://www.dropbox.com/s/y18c0i89b0wreus/Forecast%2005.exe)

The code is not ridiculously messy or anything, but I simply have not had the time to finish the script and iron out the wrinkles. The sample project should show what I am aiming for and the code is neat enough to read, although lacking in-depth comments.

The instructions in the header are fairly incorrect in the current version, and some of the presets do not work because I have no had the time to go back and enter in new variables.