LEGO® Universe Newly Imagined
Menu
  • Home
  • Download
    • Music
    • Server Progress
  • Forums
  • Info
    • People
    • World
    • FAQ
    • Objects
  • Tutorial
    • Compile in Visual Studio
    • Server 0.3
    • Server 0.4 (Pre-2)
    • Server 0.5.1
  • Home
  • Download
    • Music
    • Server Progress
  • Forums
  • Info
    • People
    • World
    • FAQ
    • Objects
  • Tutorial
    • Compile in Visual Studio
    • Server 0.3
    • Server 0.4 (Pre-2)
    • Server 0.5.1

Reply To: How to edit world_2a.bin?


Home › Forums › Help and Support › How to edit world_2a.bin? › Reply To: How to edit world_2a.bin?

July 19, 2016 at 1:48 pm #6370
Timtech
Keymaster

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 9 years, 10 months ago by Timtech. Reason: changed the link

Comments are currently closed.

Preferred Language


  • English (en) English (en)
  • Deutsch (de) Deutsch (de)
  • Español (es) Español (es)

Search the Forums


Recent Topics


  • Happy New Year
  • FORUMS CLOSED

Forums

  • General Discussion

Important Sites

  • LU Server Projects Github online
  • Community Discord online
  • Search the LUNIverse

    Please Note

    The LEGO Group has not endorsed or authorized the operation of this game and is not liable for any safety issues in relation to the operation of this game.

    Copyright © 2015-2021 LUNI™ Server Project

    Hosted by TimTech Software