.ent file reader/writer

    Joined
    Jun 25, 2013
    Messages
    403
    Reaction score
    11
    • Legacy Citizen 2
    • Legacy Citizen
    Hey folks, first draft of a utility to read/write .ent files posted here.

    Write is largely broken, but it's a start. "Read Me" file below.

    Jo





    Code:
    STARMADE UTILS
    ~~~~~~~~~~~~~~
    
    These tools are for doing basic manipulations to StarMade files. Unzip this file into the
    directory where StarMade.jar is. You can run them with sm_jo.cmd (Windows) or sm_jo.sh
    (Linux/Mac). The first argument is the desired operation. The remaining arguments depend
    on the operation.
    
    Current operations are:
    
    DUMP
      This will dump files in Entity format in XML to the console. Optionally, a starting point
    may be given and the tree will be dumped from there. A starting point ident is a slash
    delimited path using the tag names to the element.
      Examples:
     
      sm_jo.sh dump ENTITY_PLAYERSTATE_jjaquinta.ent
      sm_jo.sh dump ENTITY_PLAYERSTATE_jjaquinta.ent PlayerState/credits
    
    EDIT
      This will edit tags in the given entity file. The first argument is the name of the entity
    file. Following are sets of three arguments. The first is the path to the tag you want to
    change. (Same format as for dump.) The second is the operation to be performed. (=, +=,
    or -=). The third is the value to be applied.
      Not all operations are supported on all types.
      WARNING: this does not work well right now. There is a high chance it will corrupt the
    file given. Always back up your file first.
      Examples:
     
      sm_jo.sh edit ENTITY_PLAYERSTATE_jjaquinta.ent PlayerState/credits += 1000000
    
    DISCLAIMER
    These tools are crude, prone to errors, and unreliable. You may corrupt or render inoperable
    any files you touch with them. StarMade has chosen to obfusticate their code which means much
    of the analysis done to get this going is guess work. If you feel that producing clear source
    will benefit both the community and the StarMade developers, please contribute to this thread:
    
    http://star-made.org/content/obfustication-why
    
    And, yes, I practice what I preach. The source code for these utilities can be found within
    the jar file.
    
    DISTRIBUTION
    This set of utilities is distributed as "begware". If you use and like them, I would ask that
    you go and download my audiobook "The Raider's Lament":
      http://podiobooks.com/title/the-reaiders-lament
    It's a light hearted Sci-Fi novel that's a fun waste of time. You dont have to actually listen
    to it. Clocking up the downloads is appreciated.
    If you *really* like these tools (or the story), there is a Donate button on the audiobook page.
    All proceeds will go towards buying my daughter the Minecraft Lego kit.