Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Windowskin Changer Scriptlet VX v1.0
- # © 2013, Companion Wulf
- #
- # Version : 1.2
- # Author : Companion Wulf
- # Release Date : 10 May 2013
- # Last Update : 24 May 2013
- # Websites
- # * RPG Maker Times - http://rpgmakertimes.blogspot.com
- # * RMT Companion Blog - http://blog.rpgmakertimes.info
- # * RPG Maker Times Facebook - http://facebook.com/RPGMakerTimes
- # Contact Email: companionwulf@rpgmakertimes.info
- #------------------------------------------------------------------------------
- # The Windowskin Changer scriptlet allows you to change the windowskin in the
- # middle of a game using the script call event command.
- #------------------------------------------------------------------------------
- #
- # Known Compatability Issues:
- # There may only be compatability issues for other scripts that overwrite
- # or modify the Scene_Menu class.
- #
- # Aliased Methods:
- # Game_System - initialize
- # Window_Base - initialize, update
- # Added Methods:
- # change_windowskin, reset_windowskin
- #==============================================================================
- #==============================================================================
- # ** Version History
- #------------------------------------------------------------------------------
- # v1.2 (24-May-2013)
- # * Add: Change windowskin option
- # * Add: Reset windowskin option
- # v1.0 (10-May-2013)
- # * Began scriptlet
- #==============================================================================
- module CWWSC_SETTINGS
- #--------------------------------------------------------------------------
- # These are the settings for the windowskins and to predetermine which
- # windowskins are used in the game.
- #
- # To change the windowskin, use the following:
- #
- # change_skin(windowskin)
- #
- # where "windowskin" corresponds to the number in the WINDOWSKINS hash - NOT
- # the windowskin filename.
- #
- # To reset the windowskin to the system default, use the following:
- #
- # reset_windowskin
- #
- # NOTE: ALL windowskins must be imported into the "Graphics/System" folder.
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- # * Windowskin Settings
- #--------------------------------------------------------------------------
- # The list of useable windowskins in the game. 0 is the default system
- # windowskin. It's best to leave this alone (unless you want to change the
- # system's default windowskin completely).
- WINDOWSKINS ={
- 0 => "Window", # Default system windowskin
- 1 => "CharcoalParchment", # Change to windowskin of your choice
- # Add more windowskins here
- }
- #MULTI_SKINS = true # Not implemented in v1.0
- end
- #------------------------------------------------------------------------------
- # There's no need to edit beyond this point.
- #------------------------------------------------------------------------------
- #==============================================================================
- # ** Game_System
- #==============================================================================
- class Game_System
- include CWWSC_SETTINGS
- #--------------------------------------------------------------------------
- # * Public Instance Variables
- #--------------------------------------------------------------------------
- attr_accessor :default_windowskin
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- alias cwwsc_gmsys_initialize initialize unless $@
- def initialize(*args, &block)
- cwwsc_gmsys_initialize(*args, &block)
- @default_windowskin = WINDOWSKINS[0]
- end
- end
- #==============================================================================
- # ** Window_Base
- #==============================================================================
- class Window_Base < Window
- include CWWSC_SETTINGS
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- alias cwwsc_winbs_initialize initialize unless $@
- def initialize(*args, &block)#(x, y, width, height)
- cwwsc_winbs_initialize(*args, &block)#(x, y, width, height)
- self.windowskin = Cache.system($game_system.default_windowskin)
- end
- end
- #==============================================================================
- # ** Game_Interpreter
- #==============================================================================
- class Game_Interpreter
- include CWWSC_SETTINGS
- #--------------------------------------------------------------------------
- # * Change Windowskin
- #--------------------------------------------------------------------------
- def change_windowskin(ws);
- $game_system.default_windowskin = WINDOWSKINS[ws]
- end
- #--------------------------------------------------------------------------
- # * Reset Windowskin
- #--------------------------------------------------------------------------
- def reset_windowskin()
- $game_system.default_windowskin = WINDOWSKINS[0]
- end
- end
- #==============================================================================
- # COPYRIGHT NOTICE
- #==============================================================================
- # This script is copyrighted to Companion Wulf under the provisions of the
- # Digital Millennium Copyright Act (DMCA).
- #
- # However, permission is granted to use the script in non-commercial projects
- # only, provided that credit (to Companion Wulf) is given somewhere in the game.
- # Beginning or end credits are fine (or even in the game itself!).
- #
- # The script cannot be distributed without my express written permission. It is
- # only allowed for distribution (at present) on the following websites:
- #
- # RPG Maker Times - http://rpgmakertimes.blogspot.com
- # RPG Maker Times Companion - http://blog.rpgmakertimes.info
- #
- # If you would like to share the script on a website or other forum, write to me
- # for permission via RPG Maker Times Companion and the likelihood is I'll grant
- # it and add to the list of approved distribution sites.
- #
- # Not understanding the above conditions, or not understanding English, will not
- # exempt you in any way, shape or form.
- #
- # *For use in commercial projects*, I ask that a nominal fee of $3 for non-
- # exclusive rights be paid. This will then go towards domain costs and
- # additional scripts.
- #
- # Please do NOT use that email address for anything other than asking permission
- # or, of course, letting me know about your project. ~Wulf
- #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement