Reply To: How to edit world_2a.bin?
Well, here is Jon’s original comment. I think that after you decompress the bin and rename it back to the original, you can use a hex editor (like the HEX-Editor plugin for Notepad++) to edit the values according to the link I put in my first post.
For reference, here is the python script’s source code. All it is doing is decompressing the zlib compression. It’s meant for world_2a.bin, and you run it like
python ZLIBDec.py "path/to/file.bin". All credits go to Jon002.
import zlib import sys from glob import glob def zipstreams(filename): """Return all zip streams and their positions in file.""" with open(filename, 'rb') as fh: data = fh.read() i = 0 while i < len(data): try: zo = zlib.decompressobj() yield i, zo.decompress(data[i:]) i += len(data[i:]) - len(zo.unused_data) except zlib.error: i += 1 for filename in sys.argv: print(filename) for i, data in zipstreams(filename): print(i, len(data)) with open(filename + "-decompressed.bin", 'w') as expanded: expanded.write(data)
Jon’s original link to download the script: http://www.mediafire.com/view/vd9t3qfqg0pff0l/ZLIBDec.py
- This reply was modified 1 year, 1 month ago by Timtech. Reason: changed the link