Version: 0.8Author: The Staff of RGSS2Dai PageTranslation: SuperMegaIntroductionThis is a translation of a fantastic script from
Dai Page. I AM NOT the creator of this script, so I don't deserve full credit. I only translated the script, in order to share it with the English community. The primary functions of the script are translated, but not everything is. If anyone would like everything to be translated, please let me know. Let me also mention I can only help with basic problems, and not ones that involve the script.
Features-Stacks a map ontop of another map, making a map appear higher up than the other (Basically, making the lower map like a parallax)
-EVENTS CANNOT BE PLACED ON A MAP THAT IS UNDER A MAP
-Maps must be the same size in order for this to work
-You can change the scrolling speed of the distance, you see (Don't Make the
player dizzy!)
ScriptCODE
=begin
#-------------------------------------------------------------------------------
Display Maps Under Maps
Version: 0.8
Original Japanese Version From: RGSS2 DAIpage
English Translation By: SuperMega
#-------------------------------------------------------------------------------
Script Features and Use:
€€-Stacks a map ontop of another map, making a map appear higher up than the other
-EVENTS CANNOT BE PLACED ON A MAP THAT IS UNDER A MAP
-Maps must be the same size in order for this to work
-You can change the scrolling speed of the distance, you see (Don't Make the
player dizzy!)
This Script Redifines:
Spriteset_Map
€€ Changing this script may result in compatability errors, so do so at your own
risk...
Update Log:
08/12/16 šScript Released
09/9/7 : Script Translated!
=end
#============================================================================
# Begin Customization
#============================================================================
module DAI_tile_parallax
#MapID => [map distance, X scroll speed, Y scroll speed]
P = {
# Map 1, with Map 2 shown in the distance. Both horizontal and vertical scroll at 1 speed.
1 => [2, 1.4, 1.4],
} #DON'T ERASE!
end
#============================================================================
# End Customization
#============================================================================
#==============================================================================
# – Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# — ƒ“ƒƒƒƒƒˆのœˆ
#--------------------------------------------------------------------------
alias dai_tile_parallax_create_viewports create_viewports
def create_viewports
dai_tile_parallax_create_viewports
create_tile_parallax
end
#--------------------------------------------------------------------------
# — 解”
#--------------------------------------------------------------------------
alias dai_tile_parallax_dispose dispose
def dispose
@tile_parallax.dispose if @tile_parallax != nil
dai_tile_parallax_dispose
end
#--------------------------------------------------------------------------
# — ƒ•ƒƒƒ›–
#--------------------------------------------------------------------------
alias dai_tile_parallax_update update
def update
update_tile_parallax if @tile_parallax != nil
dai_tile_parallax_update
end
#--------------------------------------------------------------------------
# — ‚‚ƒƒžƒƒƒ—遠™IDの–—
#--------------------------------------------------------------------------
def tile_parallax_id
if DAI_tile_parallax::P.include?($game_map.map_id)
return DAI_tile_parallax::P[$game_map.map_id][0]
else
return 0
end
end
#--------------------------------------------------------------------------
# — ‚‚ƒƒžƒƒƒ—遠™のœˆ
#--------------------------------------------------------------------------
def create_tile_parallax
if tile_parallax_id == 0
@tile_parallax = nil
return
end
a = Tile_Parallax.new
a.setup(tile_parallax_id)
@tile_parallax = Tilemap.new(@viewport1)
@tile_parallax.bitmaps[0] = Cache.system("TileA1")
@tile_parallax.bitmaps[1] = Cache.system("TileA2")
@tile_parallax.bitmaps[2] = Cache.system("TileA3")
@tile_parallax.bitmaps[3] = Cache.system("TileA4")
@tile_parallax.bitmaps[4] = Cache.system("TileA5")
@tile_parallax.bitmaps[5] = Cache.system("TileB")
@tile_parallax.bitmaps[6] = Cache.system("TileC")
@tile_parallax.bitmaps[7] = Cache.system("TileD")
@tile_parallax.bitmaps[8] = Cache.system("TileE")
@tile_parallax.map_data = a.data
end
#--------------------------------------------------------------------------
# — ‚‚ƒƒžƒƒƒ—の›–
#--------------------------------------------------------------------------
def update_tile_parallax
a = DAI_tile_parallax::P[$game_map.map_id]
@tile_parallax.ox = $game_map.display_x / 8 * a[1]
@tile_parallax.oy = $game_map.display_y / 8 * a[2]
@tile_parallax.update
end
end
#==============================================================================
# – Tile_Parallax
#==============================================================================
class Tile_Parallax
#--------------------------------------------------------------------------
# — ‚ƒ–‚‚‚ƒˆˆœŸŒ–
#--------------------------------------------------------------------------
def initialize
@map_id = 0
end
#--------------------------------------------------------------------------
# — ‚ƒƒƒˆ‚ƒƒƒ—
#--------------------------------------------------------------------------
def setup(map_id)
@map_id = map_id
@map = load_data(sprintf("Data/Map%03d.rvdata", @map_id))
end
#--------------------------------------------------------------------------
# — ƒžƒƒƒ—ƒ‡ƒ‚の–—
#--------------------------------------------------------------------------
def data
return @map.data
end
end
CompatibilityUntested with other scripts. Should work fine, with the exception of things such as Mode 7 (Though, that might actually work).
Screenshot
DEMOI highly recommend playing the demo to get a good idea of how it can work.
DemoInstallationAdd the map ID's you wish to use this script for, with the scroll speed "X" and "Y."
FAQQ.Help!!! This script is giving me an error!
A.Sadly, I can't help with that. I merely translated this script, and have a weak scripting ability. You may want to contact the script makers, to see what you can do to get it to work properly. If there's something you don't understand about the script, then those kind of questions are ones I can answer.
CreditsRGSS2DaiPage Staff-The script
SuperMega-Translation
(Please credit both! Don't leave RGSS2Daipage Staff out of your credits! You know they did a great job!)