Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # ☆ $D13x - Scene Backgrounds
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Scene_BGs]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 26/o3/2o13 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script allows unlimited graphics/parallaxx's to be displayed on almost
- # EVERY default scene, such as the Scene_Status or Scene_Equip, Scene_Load ect..
- # You can also scroll each image like a parallaxx, change the hue of each image,
- # set the inital position for each image, the importance and even how long
- # it takes for each graphic to reach full visibility :)
- #
- # NOTE: This DOES NOT !! modify Scene_Title, the reason for this is simple,
- # There are other title screen scripts that offer more control over command
- # graphics and such(including my own $D13x Title Screen).
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # Remember to put your graphics into the new folder (defined below)
- #
- #===============================================================================
- module Scene_Backgrounds
- #===============================================================================
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ General Settings
- #-----------------------------------------------------------------------------
- # This is where you set the folder, that Graphics should be palced in.
- Folder = "Graphics/$D13x BGs/"
- # Scene Transition speed.
- Transition_Speed = 20
- #-----------------------------------------------------------------------------
- BGs={:default=>nil,# << KEEP
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Background Settings
- #-----------------------------------------------------------------------------
- # This is how you add an image into a scene...
- # :scene =>[ << Always needed.
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- # ], # << Always needed.
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_menu =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_item =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_skill =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_equip =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_status =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_save =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_load =>[
- ['StarSky_Red' , 0, 0, 1, -1, 0, 0, 254, 255],
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ['Fog_By_hyde' , 100, 100, 2, -2, 0, 0, 74, 75],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_end =>[
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0,1, 0, 5, 255],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ['$D13x By rgangsta',0,100, 0, 0,1, 0, 105, 155],
- ['Fog_By_hyde' , 50, 50, 0, -1,1,180, 104, 105],
- ['Cloud1_By_Hyde',100,100, 1, -1, 101, 0, 104, 105],
- # ['Fog_By_hyde' , 100, 100, 2, -2,101, 0, 74, 75],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_shop =>[
- ['Fog_By_hyde' , 50, 50, 1, -2, 0, 0, 74, 75],
- ['Fog_By_hyde' , 100, 100, 2, -2, 0, 0, 74, 75],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_name =>[
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_gameover =>[
- ['SkullBlue',0,0,0,0, 1,0, 255, 255],
- ['Sunbeam_Overlay_by ShinGamix',0,0, 0, 0, 1, 0, 105, 155],
- ['ShinGamox_by ShinGamix',0,0, 0, 0, 1, 0, 105, 145],
- ['Cloud1_By_Hyde',100,100, 2, -2, 1, 0, 104, 105],
- # ['Cdasdaud1_By_Hyde',100,100, 2, -2, 1, 0, 104, 105],
- ],# << end
- #-----------------------------------------------------------------------------
- # ['NAME' , x, y, x scroll, y scroll, z, hue, init opac, max opac],
- :scene_debug =>[
- ['StarSky_Red' , 0, 0, 1, -1, 1, 0, 254, 255],
- ['Fog_By_hyde' , 50, 50, 1, -2, 1, 0, 74, 75],
- ['Fog_By_hyde' , 100, 100, 2, -2, 1, 0, 74, 75],
- ],# << end
- #-----------------------------------------------------------------------------
- }# << END ALL Backgrounds, #####################
- # MUST Be Kept! # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- module Cache
- #===============================================================================
- #--------------------------------------------------------------------------
- # Get Windowskin
- #--------------------------------------------------------------------------
- def self.bgs(name, hue=0)
- load_bitmap(Scene_Backgrounds::Folder, name, hue) rescue bg_rescue(name)
- end
- #--------------------------------------------------------------------------
- # Error Message For Missing Images
- #--------------------------------------------------------------------------
- def self.bg_rescue(filename)
- text = "The Image '#{filename}' Was NOT Found.\n"
- text += "Please Put This Image Into The Following Folder\n'"
- text += "'#{Scene_Backgrounds::Folder}'\n"
- text += "If You Do Not Have The File, Fix The Customisation \n"
- text += "Within The '$D13x Scene Backgrounds' Script\n"
- msgbox(text)
- end
- end
- #===============================================================================
- class Scene_BGs < Plane
- #===============================================================================
- #--------------------------------------------------------------------------
- # Initialize
- #--------------------------------------------------------------------------
- def initialize(bg, id, hue = 0)
- super(nil)
- @de_bg = bg
- self.bitmap = Cache.bgs(bg[0], bg[6])
- @x_pos = bg[1]
- @y_pos = bg[2]
- @x_move = bg[3]
- @y_move = bg[4]
- self.z = bg[5]
- self.opacity = bg[7]
- self.ox = @x_pos
- self.oy = @y_pos
- end
- #--------------------------------------------------------------------------
- # Dispose
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # Update
- #--------------------------------------------------------------------------
- def update
- @x_pos += (@x_move / 4.0) if @x_move != 0
- @y_pos += (@y_move / 4.0) if @y_move != 0
- self.ox = @x_pos
- self.oy = @y_pos
- if self.opacity < @de_bg[8]
- self.opacity += 1
- end
- end
- end
- #===============================================================================
- class Scene_Base
- #===============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :start_scene_bg :start
- alias :disaliass :dispose_main_viewport
- alias :update_scene_bg :update
- #--------------------------------------------------------------------------
- # Start Processing
- #--------------------------------------------------------------------------
- def start
- start_scene_bg
- get_all_bgs
- create_all_bgs
- end
- #--------------------------------------------------------------------------
- # Termination Processing
- #--------------------------------------------------------------------------
- def dispose_main_viewport
- terminate_all_bgs
- disaliass
- end
- #--------------------------------------------------------------------------
- # Update
- #--------------------------------------------------------------------------
- def update
- upadte_backgrounds
- update_scene_bg
- end
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:default]
- end
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def create_all_bgs
- return if self.class == Scene_Title
- return if @bg_set == nil
- @bgs = []
- @bg_set.each do |bg|
- id = @bgs.size
- @bgs[id] = Scene_BGs.new(bg,id,bg[5])
- end
- end
- #--------------------------------------------------------------------------
- # Terminate BGs
- #--------------------------------------------------------------------------
- def terminate_all_bgs
- return unless @bgs
- @bgs.each { |bg| bg.dispose }
- end
- #--------------------------------------------------------------------------
- # Update Backgrounds
- #--------------------------------------------------------------------------
- def upadte_backgrounds
- return unless @bgs
- return if self.class == Scene_Title
- @bgs.each { |bg| bg.update }
- end
- #--------------------------------------------------------------------------
- # Get Transition Speed ( overwrite )
- #--------------------------------------------------------------------------
- def transition_speed
- return Scene_Backgrounds::Transition_Speed
- end
- end
- #===============================================================================
- class Scene_Menu < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_menu]
- end
- end
- #===============================================================================
- class Scene_Item < Scene_ItemBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_item]
- end
- end
- #===============================================================================
- class Scene_Skill < Scene_ItemBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_skill]
- end
- end
- #===============================================================================
- class Scene_Equip < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_equip]
- end
- end
- #===============================================================================
- class Scene_Status < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_status]
- end
- end
- #===============================================================================
- class Scene_File < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :csv_scene_BGs :create_savefile_viewport
- #--------------------------------------------------------------------------
- # Create Save File Viewport
- #--------------------------------------------------------------------------
- def create_savefile_viewport
- csv_scene_BGs
- @savefile_viewport.z = 100
- end
- end
- #===============================================================================
- class Scene_Save < Scene_File
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_save]
- end
- end
- #===============================================================================
- class Scene_Load < Scene_File
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_load]
- end
- end
- #===============================================================================
- class Scene_End < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_end]
- end
- end
- #===============================================================================
- class Scene_Shop < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_shop]
- end
- end
- #===============================================================================
- class Scene_Name < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_name]
- end
- end
- #===============================================================================
- class Scene_Debug < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_debug]
- end
- end
- #===============================================================================
- class Scene_Gameover < Scene_Base
- #===============================================================================
- #--------------------------------------------------------------------------
- # Create Backgrounds
- #--------------------------------------------------------------------------
- def get_all_bgs
- @bg_set = Scene_Backgrounds::BGs[:scene_gameover]
- end
- #--------------------------------------------------------------------------
- # Get Fade In Speed
- #--------------------------------------------------------------------------
- def fadein_speed
- return 0
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement