#=============================================================================== # BASE MODULE, ZEVAS: Zetu Engine V - Affinity Source # by Zetu # --- Created: 08/24/2014 # --- Updated: 12/14/2014 v1.06 #------------------------------------------------------------------------------- # * Note: This script must be above all scripts that require Zetu Engine V. # For any subsiquent scripts with requirements, make sure those are below # any required scripts. #------------------------------------------------------------------------------- # Welcome to Zetu Engine V. I'll come up with a cute name for this one later. (: # This is the base script functionality for this group of scripts. By itself, # this script does nothing, but is required for all ZEV scripts. #=============================================================================== module ZEV # Stores Scripts Used for Capatibility Purposes Imported = {} # Used to Dynamically Store Variables used in save/load GameObjects = {} end puts 'LOAD: Zetu Engine V' module DataManager class << self alias :zev_make_save_contents :make_save_contents def make_save_contents contents = zev_make_save_contents ZEV::GameObjects.each do |key,ary| contents[key] = eval(ary[0]) end contents end alias :zev_extract_save_contents :extract_save_contents def extract_save_contents(contents) zev_extract_save_contents(contents) ZEV::GameObjects.each do |key,ary| eval(ary[0] + " = contents[key]") end end alias :zev_create_game_objects :create_game_objects def create_game_objects zev_create_game_objects ZEV::GameObjects.each do |key,ary| eval(ary[0] + " = " + ary[1] + ".new") end end end end class Array def sum self.inject{|sum,x| sum + x } end end class String def sprintf_special(hash) string = self hash.each do |key, value| string = string.gsub(key, value.to_s) end return string end end class RPG::Event::Page def get_all_comments @list.select do |event_command| event_command.code == 108 || event_command.code == 408 end.collect do |event_command| event_command.parameters[0] end.join("\n") end end class Game_Event < Game_Character def page_comments @page.get_all_comments end def all_page_comments @event.pages.collect do |page| page.get_all_comments end.join("\n") end end class Game_Actor < Game_Battler def all_notes ([actor.note, self.class.note] | equips.compact.collect do |item| item.note end ).join("\n") end end class Window_Base def draw_bitmap(x, y, bitmap) src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) contents.blt(x, y, bitmap, src_rect) return src_rect end end