Zerbu 40 Posted January 6, 2012 Change or Randomize Game Over Graphic Introduction This script allows you to change the game over graphic in-game, and/or randomize between more than one graphic. Instructions To change the game over graphic in the game: ze_chrgameover(:graphics, ["NewGameover"]) To change to a list of random graphics: ze_chrgameover(:graphics, ["Image1", "Image2", "etc"]) Script #============================================================================ # Zerbu Engine - Change or Randomize Game Over Graphic #---------------------------------------------------------------------------- # This script allows you to change the game over graphic in-game, and/or # randomize between more than one graphic. #---------------------------------------------------------------------------- # To change the game over graphic in the game: # ze_chrgameover(:graphics, ["NewGameover"]) #---------------------------------------------------------------------------- # To change to a list of random graphics: # ze_chrgameover(:graphics, ["Image1", "Image2", "etc"]) #============================================================================ #============================================================================ # ZE_Change_Randomize_Game_Over #============================================================================ class ZE_Change_Randomize_Game_Over #-------------------------------------------------------------------------- # new method: initialize #-------------------------------------------------------------------------- def initialize #--- @data = { #---------------------------------------------------------------------- # Options #---------------------------------------------------------------------- # This option will enable or disable the system. When it is disabled, # the usual game over graphic will be used. #---------------------------------------------------------------------- :ENABLED => true, #---------------------------------------------------------------------- # This is a list of the possible graphics that can be used as the # game over screen. #---------------------------------------------------------------------- :GRAPHICS => ["Gameover"] } #--- end #-------------------------------------------------------------------------- # new method: [] #-------------------------------------------------------------------------- def [](setting) #--- @data[setting] || false #--- end #-------------------------------------------------------------------------- # new method: []= #-------------------------------------------------------------------------- def []=(setting, value) #--- @data[setting] = value #--- end end #============================================================================ # DataManager #============================================================================ module DataManager class << self #------------------------------------------------------------------------ # alias method: create_game_objects #------------------------------------------------------------------------ alias ze_chrgameover_create_game_objects create_game_objects def create_game_objects #--- ze_chrgameover_create_game_objects $ze_chrgameover = ZE_Change_Randomize_Game_Over.new #--- end #------------------------------------------------------------------------ # alias method: make_save_contents #------------------------------------------------------------------------ alias ze_chrgameover_make_save_contents make_save_contents def make_save_contents #--- contents = ze_chrgameover_make_save_contents contents[:ze_chrgameover] = $ze_chrgameover contents #--- end #------------------------------------------------------------------------ # alias method: extract_save_contents #------------------------------------------------------------------------ alias ze_chrgameover_extract_save_contents extract_save_contents def extract_save_contents(contents) #--- ze_chrgameover_extract_save_contents(contents) $ze_chrgameover = contents[:ze_chrgameover] ? contents[:ze_chrgameover] : ze_chrgameover.new #--- end end end #============================================================================ # Scene_Gameover #============================================================================ class Scene_Gameover < Scene_Base #-------------------------------------------------------------------------- # alias method: create_background #-------------------------------------------------------------------------- alias ze_chrgameover_create_background create_background def create_background #--- if $ze_chrgameover[:ENABLED] @sprite = Sprite.new @sprite.bitmap = Cache.system($ze_chrgameover[:GRAPHICS][rand($ze_chrgameover[:GRAPHICS].size)]) else ze_chrgameover_create_background end #--- end end #============================================================================ # Game_Interpreter #============================================================================ class Game_Interpreter #-------------------------------------------------------------------------- # new method: ze_chrgameover #-------------------------------------------------------------------------- def ze_chrgameover(setting, value) #--- $ze_chrgameover[setting.upcase] = value #--- end end 1 CT Bolt reacted to this Share this post Link to post Share on other sites
Naku Sinn 0 Posted September 3, 2012 This and random title BGM look great, but I have no idea where to place them, I'm not good with scripts... Share this post Link to post Share on other sites
sirfrivixx028 2 Posted January 20, 2013 For some reason I can't view the script..I'm having trouble with that SPOILER button in this site. Share this post Link to post Share on other sites