Tool WIP: sb-massive-patch, a tool for generating massive patches!

Discussion in 'Starbound Modding' started by SV7nBk3, Aug 16, 2016.

  1. SV7nBk3

    SV7nBk3 Aquatic Astronaut

    Hey if you'd like to make massive sweeping changes to Starbound files I've written a small tool that may help you. Now it isn't complete and would currently require some slight modification for ever patch type you want to generate but shouldn't be too hard for anyone who knows even a little C++.

    sb-massive-patch <unpacked-root> <patch-root>

    (Only tested with Windows/VS2015 Update 3 for now, will play with Clang tomorrow)

    This project enumerates all files in the <unpacked-root> directory and looks for files matching the extension (see utf8_main.cpp:95). Those files are then opened as JSON, the root level is searched for the key "printable" (line 110), if that key is found I generate the patch path (using <patch-root>), modify the value to true (line 143), and then write out the patch to the path I generated.

    With this I generated the non-pak version of gpt_everything_printable in about 5 minutes.

    Apologies if this is too complicated but hopefully someone will get a kick out of it and this program also demonstrates how to automate generation of .patch files by diffing JSON instead of manually writing the patch.
    The | Suit likes this.

Share This Page