03-06-2014, 08:38 AM
Heyo!
Been fiddling with this for the sake of the ReGaL engine, and made a bit of what I'd call an improvement to it; instead of one large text file, It now dumps to individual files for each script; my code (thanks for the start Narzew):
Next I'll see about writing a script to reconstitute the individual files into the Scripts.rxdata file
Been fiddling with this for the sake of the ReGaL engine, and made a bit of what I'd call an improvement to it; instead of one large text file, It now dumps to individual files for each script; my code (thanks for the start Narzew):
Code:
def save_script(scriptfile='Data/Scripts.rxdata')
script = load_data(scriptfile)
script.each {|s|
file = File.open(s.at(1), 'wb')
file.write(Zlib::Inflate.inflate(s.at(2)))
file.close
}
end