Modding Help Patch won't load [Solved]

Discussion in 'Starbound Modding' started by Tracey, Jun 9, 2019.

  1. Tracey

    Tracey Aquatic Astronaut

    So I've been trying to patch stuff in the matter manipulator for quite some time now but for some reason it doesn't want to apply any of the patches ingame. (mmupgradegui.config)

    The patch file:

    [
    {
    "op": "add",
    "path": "/gui/btnResetTools",
    "value": {
    "type": "button",
    "base": "/interface/scripted/mmupgrade/resetbutton.png",
    "pressedOffset": [0, -1],
    "position": [10, 22],
    "callback": "resetTools"
    }
    },
    {
    "op": "replace",
    "path": "/gui/windowtitle/title",
    "value": "test"
    },
    {
    "op": "replace",
    "path": "/gui/btnSize3/position/0",
    "value": 21
    },
    {
    "op": "replace",
    "path": "/upgrades/power1/moduleCost",
    "value": 5000
    },
    {
    "op": "replace",
    "path": "/upgrades/power1/description",
    "value": "Increase matter deconstruction rate to 9999%"
    }
    ]

    My log:
    https://pastebin.com/mgXWYNry I think it's easier to read on pastebin.

    So I'm aware of the error thats close to the end of the log file but I'm unsure what exactly the error is.
    [05:52:56.400] [Error] Could not apply patch from file /interface/scripted/mmupgrade/mmupgradegui.config.patch in source: ..\mods\MoreMMUpgrades. Caused by: (JsonPatchException) Could not apply patch to base. (JsonPatchException) Could not apply operation to base. (TraversalException) No such key 'windowtitle' in pathApply("/gui/windowtitle/title")

    I also looked at the tutorial in the forum that helps with patching stuff and their paths and I'm pretty sure I used it right.

    The original file I try to patch:

    I have alot of mods installed so that might be the problem but I looked at all the mods and none of them seem to edit/patch the file I want to edit. I also set my mod priority to 1 in hopes it would load first if some other mod really patches the same file.

    Just to test it I also patched the file (shipupgrades.config) and tried to replace the maxFuel value but not even that seems to get applied in game but this time without an error in the logs.

    Patch&Original:

    Patch:
    {
    {"op": "replace", "path": "/maxFuel", "value": 9999}
    }

    -----

    Original:
    {
    // Default ship upgrade values for all species ships
    // These should not be overriden by .structure ship upgrades
    "maxFuel" : 1000,
    "fuelEfficiency" : 0.0,
    "shipSpeed" : 15.0
    }

    So yeah I'm really thankful for every help because I've been on that for quite some time now and just can't figure out why it's not working. :c
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Best solution when making a mod is use a clean installation.
    So copy the Starbound directory to another location outside of steam folder and put only your mod inside.
    Run starbound.exe directly

    Then you will only be running your mod over the vanilla client and you can more easily determine what is going wrong.

    Edit:
    Keep in mind certain items like ships need a new character to get applied to.
    Since the base values are stored in the save file which are used.
     
  3. Tracey

    Tracey Aquatic Astronaut

    Thank you very much! I didn't know it was possible to just move starbound into a new directory to prevent it from using the steammods so I didn't want to try if it works when all mods were removed but now it works! Thanks alot again.
     
  4. projectmayhem

    projectmayhem Spaceman Spiff

    Patch files looks ok... Im wondering if you have any mods installed that already change the MM file? If one mods removes that path, then yours wont be able to patch that path

    and have you tried getting rid of the change to the window title, and seeing if that patch works with out it?
     
  5. Tracey

    Tracey Aquatic Astronaut

    The windowtitle replace was the last one I added if I remove that it just shows the next patch in line as an error. I think "Quickbar Mini" or "Stardustlib" change the path but not sure.
     

Share This Page