02 May 2009

Change Parallax Script

One of many features disabled in RMVX is the ability to change the Parallaxes, which was available in RMXP (and RM2K/3 before that) directly from the Event Commands. Parallaxes are graphics (usually of clouds or distant landscapes) that can scroll behind a map. While it is possible to set the parallax graphic in the map settings only, this "one parallax per map" rule is rather annoying.

As I start learning RGSS, the scripting language used by RMXP and RMVX, and familiarize myself with its nuances, being able to find workarounds and tweaks is half the fun.

A simple but effective (and certainly not perfect) method for changing parallaxes is with a small script.

  • Look in the Game_Map section of the scripts for Scroll Setup and Parallax Background Setup.
  • Place the following between these two sections:
    #----------------------------------------------
    # * Parallax Presetup - Change Parallax
    #----------------------------------------------
    def change_parallax(parallax_name)
        case parallax_name
        when 1
          @parallax_name = "BlueSky"
        when 2
          @parallax_name = "CloudySky"
        when 3
          @parallax_name = "Mountains"
        when 4
          @parallax_name = "Ocean"
        when 5
          @parallax_name = "StarlitSky"
        when 6
          @parallax_name = "Sunset"
        end
      end
    Add any other imported Parallax graphics by adding more "when" commands accordingly. Note: New parallax graphics must be first imported into RMVX under Graphics/Parallaxes.
  • To use an event to change the parallax graphic, use the Script function and place the following:
    $game_map.change_parallax(x)
    where x is the number corresponding to the desired parallax.

Note: With this method, if the Loop Coordinates aren't set directly on the map (via the Map Properties), the parallax will remain static. By changing the Horizontal Loop and/or Vertical Loop settings here it will make the parallax graphic scroll in the background.

Windowskin Generator

There haven't been many updates recently because I've been offline for the past three or so weeks. Our ISP decided to double their monthly fees overnight and without telling us, then demanded that we pay around $400 to reconnect. And they would only accept the full amount before reconnecting. (I wanted to pay them direct at their office with an envelope full of leaves, since "money grows on trees" apparently!)

Anyway, moving on...

I found this awesome and very useful utility. It's a Windowskin Generator for RMVX and it works!

The idea behind this is to make Windowskin creation easy by selecting various parts and applying them to the skin. It even has a preview area where you can see what the resultant image will look like! Once you're done, the finished product can be saved and imported into RMVX for use in your games.

Read a mini-review here or download it directly here, then extract it to the RMVX Projects folder (using WinRar or Winzip) and open it up in the RMVX program.

It can be run directly from RMVX or as a standalone program. If used as standalone, the RGSS2002e.dll may be needed. Information on creating and running standalone games (including downloading the appropriate files) can be found on the RPG RPG Revolution forum.
Related Posts with Thumbnails
Template Design "Perfect World" by SkinCorner