Paralax doesn't work

Status
Not open for further replies.

Naegra

Villager
Member
Joined
Dec 29, 2013
Messages
5
Reaction score
1
First Language
German
Primarily Uses
Hey guys,

i got a big problem,

i created my Map with this Paralax way and when i'm testing the game all is working fine.

But when i compress my Game, place it somewhere else and execute the compressed file the game is starting without the paralax files =/

So my Areas are empty, the sun / night isn't working and so on.

So i checked the extracted Files and didn't found my Paralax files, not even the Overlay folder.

Someone can tell me what i have to do ?

//Edit

My Files (in the Editor, not the compressed) "light1-1.jpg", "light1-2.jpg", "shadow1-1.jpg", "shadow1-2.jpg",  "ground1-1.png" and "par1-1.png" are in the Folder  "RPGMaker / GAMENAME / Graphics / Overlay"

did i something wrong there ?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Provide a link to the script you're using please. I know which one it is, only because someone asked the exact same question not long ago (which also means, if you'd done a search you would have found the answer already). But if I didn't remember that, I wouldn't even be able to search for it, because you didn't even say which script it was.


You will not be able to find your graphics folders after compressing your game, because they're compressed.


Without searching myself for the other thread, my guess is that you've not customized the script - you have to tell it what switches and variables to use, and you probably haven't, which means it's using the default ones, which you've probably used for something else. You need to create and name switches and variables just for the script and then edit the script and tell it what switch and variable numbers you created.


I bet somewhere in your game startup, you've changed variable 1 or 2 and set its value to a number other than 1 or 2.
 
Last edited by a moderator:

Dark_Metamorphosis

What a horrible night to have a curse.
Veteran
Joined
Nov 23, 2012
Messages
2,192
Reaction score
382
First Language
Swedish
Primarily Uses
Yes Shaz, it was me that had the same problem hehe. What I did was to download the newest version of the script, since that one included a fix for compressed projects (which didn't work before). I had the exact same problem with my parallaxes, so Im fairly sure that's the issue here. I would suggest you to share a link to the script as Shaz said as well, since everyone would not be familar with it.

Anyway Google Yami -> Search for script  -> Find newest version -> Download.

Pretty sure that will fix your problem.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
oh, that's right - because it did the File.exist? check or some other File related command. I might have also had in mind someone's issue where two of the images wouldn't display even while testing - THAT was the switch/variable issue.
 
Last edited by a moderator:

Naegra

Villager
Member
Joined
Dec 29, 2013
Messages
5
Reaction score
1
First Language
German
Primarily Uses
Oh yeah, i'm sorry for posting it into the wrong section .. didn't knew where to place it =/

And sorry that i forgot to post the script.

I followed an Tutorial for Overlay Mapping, so i used the Script written in there...

here the script:

#==============================================================================
#
# ¥ Yami Script Ace - Overlay Mapping
# -- Last Updated: 2011.12.29
# -- Level: Easy
# -- Requires: n/a
# -- Credit: Hanzo Kimura for Original Script
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YSA-OverlayMapping"] = true

#==============================================================================
# ¥ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.29 - Bugfix for transfer.
# 2011.12.10 - Started and Finished Script.
#
#==============================================================================
# ¥ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script based on Hanzo Kimura's idea. This will automatically load map's
# overlay by map ID, and a map can have more than one image per layer, so you
# don't have to create two or more map just for day/night or when an event occur.
#
#==============================================================================
# ¥ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Create a folder in Graphics and name it Overlay.
# Put all of your overlay into Graphics/Overlay.
# Your overlay file will have the name: "Filename Prefix" + Map-ID + "-" + Number
# which "Filename Prefix" is the one you will config below
# Map-ID is your map's ID
# Number is 1, 2, 3, ... using for Overlay Variables.
#
# Example: Graphics/Overlay/ground2-1.png
# Which means this will be ground layer, for map 2, variable = 1
#
# Light/Shadow must be .jpg
# Parallax/Ground must be .png
#
#==============================================================================

module YSA
module OVERLAY
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Overlay Switches -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These are switches which are enable overlay layers. Turn them on to show
# them in your maps.
#--------------------------------------------------------------------------
# Default: ON
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
LIGHT_SWITCH = 1 # Turn on/off light layer
SHADOW_SWITCH = 2 # Turn on/off shadow layer
PARALLAX_SWITCH = 3 # Turn on/off parallax layer
GROUND_SWITCH = 4 # Turn on/off ground layer

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Overlay Variables -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# A map can have more than one image per layer, that means you can have a
# different light/shadow for day and night, or have a different ground when
# an event occured.
#--------------------------------------------------------------------------
# Default: 1
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
LIGHT_VARIABLE = 2 # Switch to another light
SHADOW_VARIABLE = 2 # Switch to another shadow
PARALLAX_VARIABLE = 1 # Switch to another parallax
GROUND_VARIABLE = 1 # Switch to another ground

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Filename Prefix -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This will make this script automatic, it will check if there are layers in
# overlay folder
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
LIGHT = "light" # Light layer's filename prefix
SHADOW = "shadow" # Shadow layer's filename prefix
PARALLAX = "par" # Parallax layer's filename prefix
GROUND = "ground" # Ground layer's filename prefix

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Overlay Opacity -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This will make this script automatic, it will check if there are layers in
# overlay folder
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
GROUND_OPACITY = 255
PARALLAX_OPACITY = 255
LIGHT_OPACITY = 128
SHADOW_OPACITY = 96
end #OVERLAY
end # YSA

#==============================================================================
# ¥ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ¡ Cache
#==============================================================================

module Cache

#--------------------------------------------------------------------------
# new method: overlay
#--------------------------------------------------------------------------
def self.overlay(filename)
load_bitmap("Graphics/Overlay/", filename)
end

end # Cache

#==============================================================================
# ¡ DataManager
#==============================================================================

module DataManager

#--------------------------------------------------------------------------
# alias method: setup_new_game
#--------------------------------------------------------------------------
class < def self.setup_new_game
ovm_setup_new_game
setup_overlay_mapping
end

#--------------------------------------------------------------------------
# new method: setup_overlay_mapping
#--------------------------------------------------------------------------
def self.setup_overlay_mapping
# Control switches
$game_switches[YSA::oVERLAY::LIGHT_SWITCH] = true
$game_switches[YSA::oVERLAY::SHADOW_SWITCH] = true
$game_switches[YSA::oVERLAY::GROUND_SWITCH] = true
$game_switches[YSA::oVERLAY::pARALLAX_SWITCH] = true

# Control variables
$game_variables[YSA::oVERLAY::LIGHT_VARIABLE] = 1
$game_variables[YSA::oVERLAY::SHADOW_VARIABLE] = 1
$game_variables[YSA::oVERLAY::GROUND_VARIABLE] = 1
$game_variables[YSA::oVERLAY::pARALLAX_VARIABLE] = 1
end

end # DataManager

#==============================================================================
# ¡ Spriteset_Map
#==============================================================================

class Spriteset_Map

#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias overlay_initialize initialize
def initialize
overlay_initialize
create_overlay_map
update
end

#--------------------------------------------------------------------------
# new method: check_file
#--------------------------------------------------------------------------
def check_file(type)
filename = "Graphics/Overlay/"
filename += YSA::oVERLAY::GROUND if type == "ground"
filename += YSA::oVERLAY::LIGHT if type == "light"
filename += YSA::oVERLAY::SHADOW if type == "shadow"
filename += YSA::oVERLAY::pARALLAX if type == "par"
filename += $game_map.map_id.to_s
filename += "-" + $game_variables[YSA::oVERLAY::GROUND_VARIABLE].to_s if type == "ground"
filename += "-" + $game_variables[YSA::oVERLAY::LIGHT_VARIABLE].to_s if type == "light"
filename += "-" + $game_variables[YSA::oVERLAY::SHADOW_VARIABLE].to_s if type == "shadow"
filename += "-" + $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE].to_s if type == "par"
filename += ".jpg" if type == "light" || type == "shadow"
filename += ".png" if type == "par" || type == "ground"
return FileTest.exist?(filename)
end

#--------------------------------------------------------------------------
# new method: create_overlay_map
#--------------------------------------------------------------------------
def create_overlay_map
w = Graphics.width
h = Graphics.height
@current_light = 0
@current_shadow = 0
@current_par = 0
@current_ground = 0
# Ground Layer
@ground = Sprite.new(@viewport1)
@ground.z = 1
@ground.opacity = YSA::oVERLAY::GROUND_OPACITY
# Light Layer
@light_viewport = Viewport.new(0, 0, w, h)
@light_viewport.z = 10
@light = Sprite.new(@light_viewport)
@light.opacity = YSA::oVERLAY::LIGHT_OPACITY
@light.blend_type = 1
# Shadow Layer
@shadow_viewport = Viewport.new(0, 0, w, h)
@shadow_viewport.z = 9
@shadow = Sprite.new(@shadow_viewport)
@shadow.opacity = YSA::oVERLAY::SHADOW_OPACITY
@shadow.blend_type = 2
# Parallax Layer
@par_viewport = Viewport.new(0, 0, w, h)
@par_viewport.z = 8
@par = Sprite.new(@par_viewport)
@par.opacity = YSA::oVERLAY::pARALLAX_OPACITY
end

#--------------------------------------------------------------------------
# alias method: dispose_parallax
#--------------------------------------------------------------------------
alias overlay_dispose_parallax dispose_parallax
def dispose_parallax
overlay_dispose_parallax
dispose_overlay_map
end

#--------------------------------------------------------------------------
# new method: dispose_overlay_map
#--------------------------------------------------------------------------
def dispose_overlay_map
@ground.dispose
@shadow_viewport.dispose
@light_viewport.dispose
@light.dispose
@shadow.dispose
@par_viewport.dispose
@par.dispose
end

#--------------------------------------------------------------------------
# alias method: update_parallax
#--------------------------------------------------------------------------
alias overlay_update_parallax update_parallax
def update_parallax
overlay_update_parallax
# Parallax
if @ground != nil
if check_file("ground")
@ground.visible = $game_switches[YSA::oVERLAY::GROUND_SWITCH] if @ground.visible != $game_switches[YSA::oVERLAY::GROUND_SWITCH]
@ground.ox = $game_map.display_x * 32 if @ground.ox != $game_map.display_x * 32
@ground.oy = $game_map.display_y * 32 if @ground.oy != $game_map.display_y * 32
@ground.tone = $game_map.screen.tone
if @current_ground != $game_variables[YSA::oVERLAY::GROUND_VARIABLE]
filename = YSA::oVERLAY::GROUND
filename += $game_map.map_id.to_s
filename += "-" + $game_variables[YSA::oVERLAY::GROUND_VARIABLE].to_s
@ground.bitmap = Cache.overlay(filename)
@current_ground = $game_variables[YSA::oVERLAY::GROUND_VARIABLE]
end
else
@ground.visible = false
end
end
# Light
if @light != nil && @light_viewport != nil
if check_file("light")
@light.visible = $game_switches[YSA::oVERLAY::LIGHT_SWITCH] if @light.visible != $game_switches[YSA::oVERLAY::LIGHT_SWITCH]
@light.ox = $game_map.display_x * 32 if @light.ox != $game_map.display_x * 32
@light.oy = $game_map.display_y * 32 if @light.oy != $game_map.display_y * 32
@light.tone = $game_map.screen.tone
@light_viewport.ox = $game_map.screen.shake
@light_viewport.color = $game_map.screen.flash_color
if @current_light != $game_variables[YSA::oVERLAY::LIGHT_VARIABLE]
filename = YSA::oVERLAY::LIGHT
filename += $game_map.map_id.to_s
filename += "-" + $game_variables[YSA::oVERLAY::LIGHT_VARIABLE].to_s
@light.bitmap = Cache.overlay(filename)
@current_light = $game_variables[YSA::oVERLAY::LIGHT_VARIABLE]
end
else
@light.visible = false
end
end
# Shadow
if @shadow != nil && @shadow_viewport != nil
if check_file("shadow")
@shadow.visible = $game_switches[YSA::oVERLAY::SHADOW_SWITCH] if @shadow.visible != $game_switches[YSA::oVERLAY::SHADOW_SWITCH]
@shadow.ox = $game_map.display_x * 32 if @shadow.ox != $game_map.display_x * 32
@shadow.oy = $game_map.display_y * 32 if @shadow.oy != $game_map.display_y * 32
@shadow.tone = $game_map.screen.tone
@shadow_viewport.ox = $game_map.screen.shake
@shadow_viewport.color = $game_map.screen.flash_color
if @current_shadow != $game_variables[YSA::oVERLAY::SHADOW_VARIABLE]
filename = YSA::oVERLAY::SHADOW
filename += $game_map.map_id.to_s
filename += "-" + $game_variables[YSA::oVERLAY::SHADOW_VARIABLE].to_s
@shadow.bitmap = Cache.overlay(filename)
@current_shadow = $game_variables[YSA::oVERLAY::SHADOW_VARIABLE]
end
else
@shadow.visible = false
end
end
# Parallax
if @par != nil && @par_viewport != nil
if check_file("par")
@par.visible = $game_switches[YSA::oVERLAY::pARALLAX_SWITCH] if @par.visible != $game_switches[YSA::oVERLAY::pARALLAX_SWITCH]
@par.ox = $game_map.display_x * 32 if @par.ox != $game_map.display_x * 32
@par.oy = $game_map.display_y * 32 if @par.oy != $game_map.display_y * 32
@par.tone = $game_map.screen.tone
@par_viewport.ox = $game_map.screen.shake
@par_viewport.color = $game_map.screen.flash_color
if @current_par != $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE]
filename = YSA::oVERLAY::pARALLAX
filename += $game_map.map_id.to_s
filename += "-" + $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE].to_s
@par.bitmap = Cache.overlay(filename)
@current_par = $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE]
end
else
@par.visible = false
end
end
end

end # Spriteset_Map

#==============================================================================
# ¡ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base

#--------------------------------------------------------------------------
# alias method: post_transfer
#--------------------------------------------------------------------------
alias overlay_post_transfer post_transfer
def post_transfer
@spriteset.dispose_overlay_map
@spriteset.create_overlay_map
@spriteset.update
overlay_post_transfer
end

end # Scene_Map

#==============================================================================
#
# ¥ End of File
#
#==============================================================================;>
And thanks Dark_Metamorphosis, i will try it.

//Edit

I found the Script which you told me http://yamiworld.wordpress.com/yami-engine/image-display/overlay-mapping/   this one i guess ?

Took the Basic Module and the Overlay Mapping, also deleted the old one.

But now i am not able to walk anymore =/

In one Area i am able to walk (in my Forest) but in my Village and in the House i am not able to walk anymore.

Why ? =/

//Edit2

When i'm using the same Tileset which i used for in my Forest i am able to walk.

But why can't i use the Tileset for the Village/House anymore ?

I didn't changed anything, and when i check the Tileset settings, it still shows me that it is a passable area.

//Edit3

When i copy the Tileset which i used for the Forest and change the Parts to make it appear same as my Village Tileset i am able to walk..

But first i was able to walk over everything ( water, house, fence etc) but after i while i wasn't anymore ..

I am confused =/
 
Last edited by a moderator:

Dark_Metamorphosis

What a horrible night to have a curse.
Veteran
Joined
Nov 23, 2012
Messages
2,192
Reaction score
382
First Language
Swedish
Primarily Uses
Yes that's the script I was talking about. As you can see in the updates, it has a fix for encrypted projects.

I'm not sure what you mean about not being able to walk anymore? Were you able to walk in those areas before adding the scripts? Try copy and paste those 2 scripts somewhere, and then run the project again without them and see if it changes anything. The script in question should have nothing to do with any passability, so it can be tons of reasons why you cant move on that map.

Will the game freeze completely when you enter the map?, or can you turn the character when you press the arrow keys?

Have you customized the overlay script again and changed the switches and variables for the different overlays?

It's really hard to say what is causing the problem without any information, so try and remove the scripts again and see if the problem still occurs. Then we will now if it has something to do with the script, or not.

Also, did it solve your first problem? (will the overlay be visible after you compress the game now?) If so, I suggest you to start a new topic on this same forum category with the new problem.

Edit: Also in your village/house tileset. Make sure that the topleft tile in the TILE B set is set to a * (star). It can usually complicate passage settings if that tile is set to anything else than a star.
 
Last edited by a moderator:

Naegra

Villager
Member
Joined
Dec 29, 2013
Messages
5
Reaction score
1
First Language
German
Primarily Uses
Ye, that was the problem ^^

Didn't knew that the top left in TILE B has to be a * (star) ^^

Thanks for the help.
 

Dark_Metamorphosis

What a horrible night to have a curse.
Veteran
Joined
Nov 23, 2012
Messages
2,192
Reaction score
382
First Language
Swedish
Primarily Uses
Ye, that was the problem ^^

Didn't knew that the top left in TILE B has to be a * (star) ^^

Thanks for the help.
Glad it was an easy fix! I learned that from trial and error myself, and I found it a bit weird that one single tile can mess up the entire tileset hehe.

So is your initial problem fixed? Will the parallax appear after you have compressed the game now, and after installing the new updated version of the script?
 

Naegra

Villager
Member
Joined
Dec 29, 2013
Messages
5
Reaction score
1
First Language
German
Primarily Uses
Yeah, it's all working now =)

Thanks again for the help guys =)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
When you refer to a script, provide a link to it, don't paste the actual script. Many scripters don't want their scripts pasted all over the place, because they have no control over versioning then, and we end up with exactly what you've got - people downloading old versions and not being aware that there are bugs and that a fixed version is available.


When there IS no link and you HAVE to include the code, wrap it in code tags to preserve the formatting and make it easier to read.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top