07-27-2013, 10:20 PM
As always this is an entirely too useful script; I've used it to load the entire Scripts.rxdat into my irb session. As a monument to the eternity of the internet here is the script:
Something along these lines must be embedded into the RGSS dll or Game.exe; This is what starts the actual Ruby Game Process.
Code:
require 'zlib'
def save_data(obj, filename)
File.open(filename, "wb") { |f|
Marshal.dump(obj, f)
}
end
def load_data(filename)
File.open(filename, "rb") { |f|
obj = Marshal.load(f)
}
end
script = load_data("Data/Scripts.rxdata")
script.each {|s| TOPLEVEL_BINDING.eval(Zlib::Inflate.inflate(s.at(2))) }