Resource icon

    Template Shredder version beta 1.2.1

    This is a beta version, so don't rely on it working as intended. You use this software at your own risk!

    The zip-file contains the "Shred.exe" for Windows and the "shredder" executable for Linux.

    Windows version:
    1. Put the "Shred.exe" in the StarMade/templates folder. You can also put it elsewhere, but then you have to have two windows open.
    2. Double click it, a config text file (shred.txt) with the following default values will be created:
      1. Path to your templates folder, leave unchanged.
      2. Target size, change this to the build size limit of the server you're playing on.
      3. Either 0 or 1, set to 1 for shrink mode, to 0 otherwise.
      4. Either 0 or 1, set to 1 for core mode, to 0 otherwise.
    3. Save changes, close file.
    4. Drag and drop a template file onto the Shred.exe, one or more new template files should be created.
    5. Load these templates in advanced build mode and paste them in one after another. The first file will have "_0_0_0" attached to its name, paste this one last! Attach all templates to the same spot (where you would also paste a single big template) and all blocks will be in the right place.
    6. Check if everything is as it should be, please report if not, upload the respective template. Note that both items in storages and docked entities generally aren't saved in templates. Also, if two originally connected blocks end up in different template files, that connection will be severed.
    Linux version (warning: I'm a Linux noob):
    1. Put the "shredder" file in your "bin" folder, you might have to set the executable flag.
    2. Run "shredder" once to create the "shred.txt" config file with the following default values:
      1. Path to your templates folder, set this accordingly.
      2. Target size, change this to the build size limit of the server you're playing on.
      3. Either 0 or 1, set to 1 for shrink mode, to 0 otherwise.
      4. Either 0 or 1, set to 1 for core mode, to 0 otherwise.
    3. Save changes, close file.
    4. Open the console, type
      Code:
      shredder -h
      for a list of parameters. See below for more information on command line mode. Note that you have to type "shredder" instead of "shred", since the latter is a file deleting program.
    5. Load the newly generated templates in advanced build mode and paste them in one after another. The first file will have "_0_0_0" attached to its name, paste this one last! Attach all templates to the same spot (where you would also paste a single big template) and all blocks will be in the right place.
    6. Check if everything is as it should be, please report if not, upload the respective template. Note that both items in storages and docked entities generally aren't saved in templates. Also, if two originally connected blocks end up in different template files, that connection will be severed.
    Core Mode
    If you've built your ship in the wrong direction, you have to rotate the entire ship, since you can't rotate the core. To do this, copy and save the ship (the template must include the core), remove all blocks except the core (or place a new core) and use this tool with active core mode. Then load the resulting template, point the cursor on the top side of your core, rotate the template with the mouse wheel and place it.


    Shrink/Core only mode
    If you want to remove excess space or use core mode without shredding, just set the target size to a value of at least the size of your source template or to 0 or less. One file will still be created as the source file will never be overwritten.


    Command line mode
    You can also use the Template Shredder via command line. You only have to pass the parameters, that aren't already saved in the config file. Type
    Code:
    shred -h
    for a list of parameters. First you should save the path to your template folder, if the executable is in a different place. Type for example:

    Code:
    shred -ds C:/StarMade/templates
    If you want to shred a template named "MyTemplate.smtpl" with a target size of 15, write:
    Code:
    shred -f MyTemplate -s 15
    Adding
    Code:
    >blah.txt
    like a parameter will save the text messages in the file "blah.txt".


    Tips

    • If you shred, for example, a 100x100x100 template with a target size of 10 you'll end up with up to 1000 files! If a template file would be empty it won't be created, though.
    • If you want to rotate the copied object, rotate the original object before saving it. Then it will be saved in the rotated position.
    • Core mode is also useful in combination with "Create Docking". You can quickly create docked cores and paste a turret onto them. This mimics the planned "Create Docking from File"-feature.
    Author
    Malacodor
    Downloads
    975
    Views
    975
    First release
    Last update
    Rating
    5.00 star(s) 1 ratings

    Latest updates

    1. Added Linux version

      The zip-file now also contains the "shredder" Linux executable. You might need to set the...
    2. Hotfix beta 1.2.1

      Fix for core mode (cores weren't detected in beta 1.2)
    3. Beta 1.2

      Should now work with the newer file format, too.

    Latest reviews

    Such tool is incredibly useful! I was just thinking last week to manually cut something into cubes to use on MP server with smaller build area - and now there is Shredder. Will await with anticipation for a linux version :)
    Malacodor
    Malacodor
    Linux version is available now. I hope it works.