Modding Help Increasing default max stack size

Discussion in 'Starbound Modding' started by loopnotdefined, Feb 28, 2016.

  1. loopnotdefined

    loopnotdefined Starship Captain

    This is my first attempt at making a mod, to kind of get the hang of it, just FYI:

    I've created a tiny patch file that increases the defaultMaxStack property in defaultparameters.config, and nothing appears to be happening. I've also changed blueprintPriceFactor to see if maybe the previous property had other code limiting it elsewhere, and still nothing. Any help would be appreciated.

    My test is to simply place a maxed cobblestone stack onto another maxed stack of cobblestone and see if they combine into a stack of 2000. I also try putting 500 on a stack of 1000. I've verified the cobblestone files do not define their own maximum stack size.

    Here's the defaultparameters.config.patch file I made, which I've verified works through the JSON Patch Online site:
    Code:
    [
    {
            "op" : "replace",
            "path" : "/defaultMaxStack",
            "value" : 2000
    }
    ]
    
    Here's my MaxStack.modinfo:
    Code:
    {
      "name" : "MaxStack",
      "version" : "Glad Giraffe",
      "path" : ".",
      "dependencies" : [],
      "metadata" : {
        "author" : "loopnotdefined",
        "version" : "0.1",
        "description" : "Increases maximum item stacking to 2000."
      }
    } 
    
    My file setup is as follows:
    Code:
    Starbound\giraffe_storage\mods\MaxStack\MaxStack.modinfo
    Starbound\giraffe_storage\mods\MaxStack\items\defaultparameters.config.patch
    
    I've also run through the log file each time, and it shows the MaxStack mod is loading, and that no related errors are showing up.
     
  2. Errors4l

    Errors4l Spaceman Spiff

  3. loopnotdefined

    loopnotdefined Starship Captain

    Aww hell, I was hoping that thread wasn't relevant, heh. Thanks for letting me know I'm doing it right, though
     
  4. TheElderScroller

    TheElderScroller Pangalactic Porcupine

    just do it without patch file. I experienced different properties being unchangable by patch files.
    Maybe this will help.
     
    Errors4l and loopnotdefined like this.
  5. loopnotdefined

    loopnotdefined Starship Captain

    Yep. I just made a replacement .config file instead of a .config.patch, and it worked perfectly fine. So there's definitely nothing else interfering with the change...it just isn't affected by .patch files.

    If I had to guess, I'd say the properties in defaultparameters.config are loaded on boot-up before patches are applied, and never called afterwards, rendering all patches for this file useless.
     
    Last edited: Feb 29, 2016
    Errors4l likes this.
  6. KingLazarus

    KingLazarus Void-Bound Voyager

    I see this, however how do you modify the block placement in the defaultparameters to where it actually effects in game?
     
  7. loopnotdefined

    loopnotdefined Starship Captain

    Make a full copy of the original defaultparameters.config in the appropriate folder for your mod, then change blockRadius.

    I made a wiki article that explains the parameters:
    http://starbounder.org/Modding:Items
     
  8. KingLazarus

    KingLazarus Void-Bound Voyager

    Didn't work, any way to do this in 1.3? Or has someone made a mod for it already? I am interested in doing 10 x 10 block placement.
     
  9. Zaflis

    Zaflis Pangalactic Porcupine

    Make a patch file in \YourModFolder\items\defaultParameters.config.patch

    For example this works, i tried:
    Code:
    [{
            "op" : "replace",
            "path" : "/defaultTimeToLive",
            "value" : 900.0
    }]
    We can't have any mods overwriting the whole defaultParameters.config file, so it's essential you let anyone involved know.
     

Share This Page