Tinys Super Simple Exception Log
für Audio/Grafik
Info:
Ein kleines Script, das euch dabei hilft fehlende Ressourcen! innerhalb eines Beta-Tests zu sammeln und aufzuzeichnen, ohne das das Spiel dabei abstürzt.
Die gesammelten Ressourcen werden dabei samt Ordner in einer Text-Datei hinterlegt.
Script:
Code
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ Tinys Super Simple Exception Log
- #║ Developers Tool Series
- #║ By TinyMine
- #║
- #║ First Published/Erstveröffentlicht 01.12.2013
- #║
- #║ Visit : http://rpgmaker-vx-ace.de/ for further Information
- #║
- #║ Suggestions? Support? Bugs? Contact me in http://rpgmaker-vx-ace.de/
- #║
- #║ Credits recommended : TinyMine
- #║ Idea by : PandaMaru
- #║
- #║ Commercial : Have fun with it!
- #║ Editable? : Inform me, if you edit the script and don't forget credits.
- #║
- #║ Version : 1.1 // 13.12.2013
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- $imported ||= {}
- $imported[:TINY_SSEL] = true
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ ** FEATURES **
- #║
- #║ Script will create a textfile in your Project directory and will gather
- #║ all Audio and Graphic exceptions in the most simple way. No extra Exceptions -
- #║ only pure Errors which break up the game.
- #║
- #║ You can install/deinstall the script during developing process, whenever you
- #║ need it.
- #║
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- module TINY # Do not touch
- module ERROR_HANDLER # Do not touch
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ █ ** EDITABLE REGION ** Defining General Settings ** EDITABLE REGION **
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- # Name of the textfile, which will catch your graphic/audio errors
- LOG_NAME = 'Log'
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **
- #║ █ ** Dont edit below this line, except... just don't **
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- end # ERROR_HANDLER
- end # TINY
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ █ ** OLD Class Bitmap
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- class Bitmap
- alias_method :initialize_error_catcher_tiny_2776 , :initialize
- def initialize(filename, *args)
- begin
- initialize_error_catcher_tiny_2776(filename, *args)
- rescue
- TINY::ERROR_HANDLER.extract_paths_graphic(filename)
- # Pass an empty Bitmap
- initialize_error_catcher_tiny_2776(32, 32, *args)
- end
- end
- end # Bitmap
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ █ ** OLD Module Audio
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- module Audio
- class << self
- alias_method :bgm_error_catcher_tiny_2134 ,:bgm_play
- alias_method :se_error_catcher_tiny_2884 ,:se_play
- alias_method :bgs_error_catcher_tiny_7252 ,:bgs_play
- alias_method :me_error_catcher_tiny_9112 ,:me_play
- end
- def self.bgm_play(filename, *args, &block)
- begin
- bgm_error_catcher_tiny_2134(filename, *args, &block)
- rescue
- path = filename
- ERROR_HANDLER.extract_paths_audio(path)
- end
- end
- def self.se_play(filename, *args, &block)
- begin
- se_error_catcher_tiny_2884(filename, *args, &block)
- rescue
- path = filename
- TINY::ERROR_HANDLER.extract_paths_audio(path)
- end
- end
- def self.bgs_play(filename, *args, &block)
- begin
- bgs_error_catcher_tiny_7252(filename, *args, &block)
- rescue
- path = filename
- TINY::ERROR_HANDLER.extract_paths_audio(path)
- end
- end
- def self.me_play(filename, *args, &block)
- begin
- me_error_catcher_tiny_9112(filename, *args, &block)
- rescue
- path = filename
- TINY::ERROR_HANDLER.extract_paths_audio(path)
- end
- end
- end # Audio
- #╔═=══════════════════════════════════════════════════════════════════════════=#
- #║ █ ** New Module ERROR_HANDLER
- #╚═=═=════════════════════════════════════════════════════════════════════════=#
- module TINY
- module ERROR_HANDLER
- LOG_FILE = TINY::ERROR_HANDLER::LOG_NAME + '.txt'
- @error_audio = ""
- @error_graphic = ""
- def self.extract_paths_audio(path)
- return if @error_audio.include?(path)
- msgbox_p("Added a missing Audio to the Log-Error : #{path}")
- @error_audio += path + "\n"
- write_log
- end
- def self.extract_paths_graphic(path)
- return if @error_graphic.include?(path)
- msgbox_p("Added a missing Graphic to the Log-Error : #{path}")
- @error_graphic += path + "\n"
- write_log
- end
- def self.write_log
- file = File.open(LOG_FILE, "w")
- file.write("\n---------- MISSING/ERROR GRAPHICS ----------\n\n")
- file.write(@error_graphic)
- file.write("\n---------- MISSING/ERROR AUDIO ----------\n\n")
- file.write(@error_audio)
- file.close
- end
- end # ERROR_HANDLER
- end # TINY
- #╔═=═══════════════════════════════════════════════════════════════════════════╗
- #╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣
- #╚═=═=═════════════════════════════════════════════════════════════════════════╝
Bekannte Fehler :
-
Geplante Features : Bei Bedarf melden
-