RPGMaker VX parallax?

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Hey this is my first post and I'm terribly sorry if this isn't the right place but... I really want to make a horror game! I feel as though I could best create a creepy, well put together atmosphere if I could make parallax maps. I currently have Hanzo Kimura's ultimate parallax mapping script, but I'm having problems with it. I need to be able to tint the screen to make rooms darker, but the parallax layer won't change color! As in, for example, when I tint a room to look like it's night-time, the objects in the parallax layer (things my character should pass under) stay their normal color... Can anyone help me fix this, or maybe send/post a better parallax script for RPGMaker VX at me? It's for a non-commerical game (I won't be selling it).
EDIT: Just so that everyone can see it right away and not have to read through the whole thread, this is my problem; the bottom part of the pink bed is so much brighter pink than the rest because it's on the "parallax layer" of my map layers! My parallax layers won't tint/darken with the rest of the layers in my map!
parallax layer example.png
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,517
Reaction score
14,244
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 
Last edited:

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
[move]RGSSx Script Requests[/move]
Sorry! I wasn't sure if this was 100% a script request since I also asked if someone could help me "fix" the one I have... I'll be sure to try and get the right forum next time.
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
Try taking the parallax image and changing the color in a graphic program. I use GIMP, because it is free.

EDIT: @bgillisp Wouldn't this be more like script support than script request?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,517
Reaction score
14,244
First Language
English
Primarily Uses
RMVXA
Sorry, I mistyped that actually, as it ended up going into script support, so that we can try to make the current one work. If you decide it won't just let us know and we will move it to script requests for VX.

Edit: Went and fixed my first one, so that others who see it are not utterly confused.
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
Sorry, I mistyped that actually, as it ended up going into script support, so that we can try to make the current one work. If you decide it won't just let us know and we will move it to script requests for VX.

Edit: Went and fixed my first one, so that others who see it are not utterly confused.
I see :LZYgrin:
 

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Try taking the parallax image and changing the color in a graphic program. I use GIMP, because it is free.

EDIT: @bgillisp Wouldn't this be more like script support than script request?
I've tried that and I can't get the colors exactly the same... the "tint screen" in VX works a bit differently from the color-change tools in gimp. :/ Any other suggestions, or perhaps a way to make the script work? Because in the VX "demo game" for the script, Hanzo's overylays tint perfectly!! Mine just won't for some reason, even though I copied the script to my own game properly and everything...
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,239
Reaction score
1,232
First Language
Spanish
Primarily Uses
RMVXA
tint screen should also tint parallaxes, since parallaxes are way in the back (layering wise), and the tint is applied to the top layer.
are you sure the script you're using is not overwriting that?
 

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
tint screen should also tint parallaxes, since parallaxes are way in the back (layering wise), and the tint is applied to the top layer.
are you sure the script you're using is not overwriting that?
If what you mean is a parallax background (for ex. the parallax background of the night sky), then that is not what I mean. ^__^; I'm trying to make the layer my character should pass under tint with the rest of the layers, but they will not! Here is a picture (please keep in mind I made this as an example, it's not a full-on map):

Do you see how the bottom of the bed is a lighter pink than the rest of it? It's because it is on the "parallax" layer of the parallax mapping script by Hanzo Kimura that I have. Meanwhile, all the rest of the objects that are correctly tinted are on the "ground" layer. In HK's demo, all parts of his layers tint properly, but for some reason mine won't! Any ideas?
 

Attachments

Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,295
Reaction score
11,710
First Language
English
Primarily Uses
RMVXA
@KiraK320 Can you provide a link to that script? As it is written in RGSS2, and not the RGSS3 which Ace uses, people are going to be much less familiar with it. If there is no longer a live web page you can link to, please copy paste it here. Note, to paste it without the forum software turning parts of it into smileys, you must use the 'Code' option from the 'Insert' icon in the tool bar of your post. Also, put it inside a spoiler.

Thanks.
 

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
@KiraK320 Can you provide a link to that script? As it is written in RGSS2, and not the RGSS3 which Ace uses, people are going to be much less familiar with it. If there is no longer a live web page you can link to, please copy paste it here. Note, to paste it without the forum software turning parts of it into smileys, you must use the 'Code' option from the 'Insert' icon in the tool bar of your post. Also, put it inside a spoiler.

Thanks.
I'll do my best! I don't think there is a webpage... so I'll just post it here?:
Code:
#==============================================================================
#              U L T I M A T E    O V E R L A Y    M A P P I N G
#                           Script By: Hanzo Kimura
#                            Date Created: 08/11/10
#==============================================================================
module HK_UOM
 
#=================================== SET UP ===================================#
# SCREEN SETUP
  Width   = 544           # The Size of Resolution (Screen's Width)  544/640
  Height  = 416           # The Size of Resolution (Screen's Height) 416/480
# SWITCHES
  LightSwitch = 1         #Switch to Activate Light Overlays
  ShadowSwitch = 2        #Switch to Activate Shadow Overlays
  ParSwitch = 1           #Switch to Activate Parallax Overlays
  GroundSwitch = 1        #Switch to Activate Ground Overlays
# FILENAMES
  LightMap = "Light"      #The name of the file for Light Overlays
  ShadowMap = "Shadow"    #The name of the file for Shadow Overlays
  ParMap = "Par"          #The name of the file for Parallax Overlays
  GroundMap = "Ground"    #The name of the file for Ground Overlays

#================================ END OF SET UP ===============================#
end


# OVERLAY SCRIPT STARTS HERE #
module Cache
  def self.overlay(filename)
    load_bitmap("Overlays/", filename)
  end
end
class Spriteset_Map
  include HK_UOM
  alias hk_uom_initialize initialize
  def initialize
    @GroundON = FileTest.exist?("Overlays/" + "ground" + $game_map.map_id.to_s + ".png")
    hk_uom_initialize
    update
  end
  alias hk_uom_create_parallax create_parallax
  def create_parallax
    if @GroundON
      @ground = Sprite.new(@viewport1)
      @ground.z = 1
      @ground.bitmap = Cache.overlay("ground" + $game_map.map_id.to_s)
    end
    hk_uom_create_parallax
  end
  alias hk_uom_dispose_parallax dispose_parallax
  def dispose_parallax
    if @ground != nil
     @ground.dispose
   end
    hk_uom_dispose_parallax
 end
   alias hk_uom_update_parallax update_parallax
   def update_parallax
    if @ground != nil
        @ground.visible = $game_switches[GroundSwitch]
    end
    if @ground != nil
        @ground.tone = $game_map.screen.tone
        @viewport1.ox = $game_map.screen.shake  #update shake screen
        @viewport1.color = $game_map.screen.flash_color #update flash screen
        if @ground.ox != -$game_map.display_x / 256 or @ground.oy != -$game_map.display_y / 256 or @ground.ox == 0 or @ground.oy == 0
          @ground.ox = $game_map.display_x / 8
          @ground.oy = $game_map.display_y / 8
        end
      end
    hk_uom_update_parallax
    end
end
#==============================================================================
# Scene Map
#==============================================================================
class Scene_Map < Scene_Base
  alias hk_uom_start start
  def start
    hk_uom_start
    $OverlayMap = Overlay_Map.new
  end
  def terminate
    super
    if $scene.is_a?(Scene_Battle)
      @spriteset.dispose_characters
    end
    snapshot_for_background
    @spriteset.dispose
    @message_window.dispose
    $OverlayMap.dispose
    if $scene.is_a?(Scene_Battle)
      perform_battle_transition
    end
  end
  def update
    super
    $game_map.interpreter.update
    $game_map.update
    $game_player.update
    $game_system.update
    @spriteset.update
    @message_window.update
    $OverlayMap.update
    unless $game_message.visible
      update_transfer_player
      update_encounter
      update_call_menu
      update_call_debug
      update_scene_change
    end
  end
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose
    $game_player.perform_transfer
    $game_map.autoplay
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new
    $OverlayMap.dispose
    $OverlayMap = Overlay_Map.new
    fadein(30) if fade
    Input.update
  end
end
#==============================================================================
# Overlay
#==============================================================================
class Overlay_Map
include HK_UOM
  def initialize
    check_file
    display_overlay
  end
  def check_file
    @LightON = FileTest.exist?("Overlays/" + LightMap + $game_map.map_id.to_s + ".jpg")
    @ShadowON = FileTest.exist?("Overlays/" + ShadowMap + $game_map.map_id.to_s + ".jpg")
    @ParON = FileTest.exist?("Overlays/" + ParMap + $game_map.map_id.to_s + ".png")
    @GroundON = FileTest.exist?("Overlays/" + GroundMap + $game_map.map_id.to_s + ".png")
  end
 
  # Displaying Overlays SET UP #
  def display_overlay
    if @LightON
      @light_viewport = Viewport.new(0, 0, Width, Height)
      @light_viewport.z = 10
      @light = Sprite.new(@light_viewport)
      @light.bitmap = Cache.overlay(LightMap + $game_map.map_id.to_s)
      @light.z = 10
      @light.opacity = 115
      @light.blend_type = 1
      @light.visible = $game_switches[LightSwitch]
    end
    if @ShadowON
      @shadow_viewport = Viewport.new(0, 0, Width, Height)
      @shadow_viewport.z = 9
      @shadow = Sprite.new(@shadow_viewport)
      @shadow.bitmap = Cache.overlay(ShadowMap + $game_map.map_id.to_s)
      @shadow.z = 9
      @shadow.opacity = 85
      @shadow.blend_type = 2
      @shadow.visible = $game_switches[ShadowSwitch]
      end
    if @ParON
      @par_viewport = Viewport.new(0, 0, Width, Height)
      @par_viewport.z = 8
      @par = Sprite.new(@par_viewport)
      @par.z = 8
      @par.bitmap = Cache.overlay(ParMap + $game_map.map_id.to_s)
      @par.tone = $game_map.screen.tone
      @par.opacity = 255
      @par.blend_type = 0
      @par.visible = $game_switches[ParSwitch]
    end
    update
  end
 
  # Update Overlays SET UP #
  def update
      if @light != nil
        @light.visible = $game_switches[LightSwitch]
      end
      if @shadow != nil
        @shadow.visible = $game_switches[ShadowSwitch]
      end
      if @par != nil
        @par.visible = $game_switches[ParSwitch]
      end
      if @light != nil
        @light.tone = $game_map.screen.tone #update screentone
        @light_viewport.ox = $game_map.screen.shake #update shake screen
        @light_viewport.color = $game_map.screen.flash_color #update flash screen
        if @light.x != $game_map.display_x / 256 or @light.y != $game_map.display_y / 256 or @light.x == 0 or @light.y == 0
          @light.ox = $game_map.display_x / 8
          @light.oy = $game_map.display_y / 8
        end #./
      end #./
      if @shadow != nil
        @shadow.tone = $game_map.screen.tone #update screentone
        @shadow_viewport.ox = $game_map.screen.shake #update shake screen
        @shadow_viewport.color = $game_map.screen.flash_color #update flash screen
        if @shadow.x != $game_map.display_x / 256 or @shadow.y != $game_map.display_y / 256 or @shadow.x == 0 or @shadow.y == 0
          @shadow.ox = $game_map.display_x / 8
          @shadow.oy = $game_map.display_y / 8
        end #./
      end #./
      if @par != nil
        @par.tone = $game_map.screen.tone #update screentone
        @par_viewport.ox = $game_map.screen.shake  #update shake screen
        @par_viewport.color = $game_map.screen.flash_color #update flash screen
        if @par.ox != $game_map.display_x / 256 or @par.oy != $game_map.display_y / 256 or @par.ox == 0 or @par.oy == 0
          @par.ox = $game_map.display_x / 8
          @par.oy = $game_map.display_y / 8
        end #./
      end #./
  end #def end
  def dispose
      if @light != nil
        @light_viewport.dispose
        @light.dispose
      end
      if @shadow != nil
        @shadow_viewport.dispose
        @shadow.dispose
      end
      if @par != nil
        @par_viewport.dispose
        @par.dispose
      end
  end
end
(Did I do it correctly? Hopefully... I'm not familiar with how to do things here yet! </3)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,295
Reaction score
11,710
First Language
English
Primarily Uses
RMVXA
That is absolutely fine. Thanks.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,239
Reaction score
1,232
First Language
Spanish
Primarily Uses
RMVXA
looks like the pictures *are* tied to the screen tone (although the pictures are Sprite objects and not actual Parallaxes), so they should update as the screen tone changes

do this, for a quick checkup.
find this line
Code:
@par.tone = $game_map.screen.tone
replace as follows
Code:
@par.tone = Tone.new(255,255,255) #$game_map.screen.tone
the overlay should turn completely white
if it doesn't, then something is overwriting that call.
 
Last edited:

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
looks like the pictures *are* tied to the screen tone (although the pictures are Sprite objects and not actual Parallaxes), so they should update as the screen tone changes
The problem is they're not, though and I have no idea why! The colors simply won't change for the parallax layer... only the "ground" layer. But as I said it works perfectly in the demo game showing off the parallax mapping features. Also yes they are sprite objects, but I put the together in gimp as a parallax... I've seen so many other people create their maps that way because it allows for more creativity with furniture placement. Should I just give up and see about requesting new scripts? :(
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,239
Reaction score
1,232
First Language
Spanish
Primarily Uses
RMVXA
read previous
 

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
read previous
Sorry, when I first read it, it had nothing else!
Anyways, it did indeed turn the overlay pure white. So there's nothing overwriting the code I guess? I wonder what's wrong then...
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,153
Reaction score
818
First Language
Hungarian
Primarily Uses
RMVXA
The issue is simple (like with all of the "ultimate" parallax scripts I have seen so far :D).

The "screen tinting" is nothing but a gradual tone change of one single viewport. Whatever is below or at the same level as that viewport (and is made before that viewport if their Z value is the same) will get the color change, but anything above will not get affected.
Another thing the writers of these scripts usually forget is the visuals when 2 or more viewports are tinted (and they are, because the script copies the tone values to all viewports). The colors will get "multi-tinted", since the colors from the tone blend that way. This will result in different colors on different viewports based on their Z levels.

Since the script you use uses multiple viewports with multiple Z values, it's not hard to guess that the layers actually get the "multi-tint" issue. All of the layers get tinted, no problem there, but your ground layer is tinted twice, once from the normal tint and once from the parallax layer (and possibly once more from the default layer too).

You can play with the Z values of the viewports in the script, lower them until they get tinted correctly, but quite honestly, that might never happen due to the structure of viewports.
The easiest solution would be to re-direct the default tint method to use the viewport with the highest Z level from your script for the tinting process, and disable all other tone changes for all viewports below that one.

This script got the same issues as Yami's Overlay script for VX Ace, even the structure of it is the same, which is why I know that it has the same issues.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,239
Reaction score
1,232
First Language
Spanish
Primarily Uses
RMVXA
ground layer is tinted twice, once from the normal tint and once from the parallax layer
that actually makes some sense.
 

KiraK320

Villager
Member
Joined
Aug 6, 2017
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
The issue is simple (like with all of the "ultimate" parallax scripts I have seen so far :D).
You can play with the Z values of the viewports in the script, lower them until they get tinted correctly, but quite honestly, that might never happen due to the structure of viewports.
The easiest solution would be to re-direct the default tint method to use the viewport with the highest Z level from your script for the tinting process, and disable all other tone changes for all viewports below that one.
Thank you so much! But em... I don't know any of this terminology! You say the easiest solution would be to re-direct the default tint method to use the viewport with the highest Z level from your script for the tinting process, and disable all other tone changes for all viewports below that one... but how do I do that? >.> If it's not too much trouble could you give me a tiny walkthrough? I really don't know how to do all this... redirecting, and disabling you're talking about :'( so sorry!
EDIT: I do see where it says viewpoint and such and having "z values" (the one I saw in there specifically for the overlays have a value of 8??) But idk how to change all these things and still have the script work U__U
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,153
Reaction score
818
First Language
Hungarian
Primarily Uses
RMVXA
I don't have VX, so unfortunately, I can't help you with that, because I don't know the class and variable names VX uses.

If there is a Spriteset_Map class or something similar, check for the .tone keyword in it. If you see that, disable that line by puttin a # sign at the start of the line.
You must do this in the default script for this class, not in this parallax mapping script.

After this, in this parallax map script, disable all tone change lines, except the one on the highest viewport, which should be the light viewport, if I remember right.

Doing this should fix your issue.
I may have guessed the class name wrong, in which case you will have to search for it yourself in the default scripts.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts



Made another map, this one even has a cool moving waterfall. I'll have an animated GIF later whenever I'm done adding stuff. :LZSwink:
Back here again?! RPG MAKER, I can't quit you. :kaosigh:
um... why didn't anyone tell how easy it is to add motions to Sideview battlers? I literally copied the last one, changed the name and index, said where it should play, and boom... I've got intro motions.
Lately when I listen to 1970s songs, I always think that the "real world" is still at mid 70s. What we experience now is a futuristic dream. With this point of view, even 80s and 90s looks super futuristic. :D

Forum statistics

Threads
105,539
Messages
1,014,477
Members
137,222
Latest member
kubet88net
Top