Modding Help Help with proper patching syntax.

Discussion in 'Starbound Modding' started by Uacher, May 11, 2017.

  1. Uacher

    Uacher Scruffy Nerf-Herder

    I've been trying to get a .patch file that changes attributes of the base.npctype file to work but I just can't figure this problem out.

    The code that I'm trying to change is this one:

    "stats" : {
    "maxHealth" : {
    "baseValue" : 100.0
    },
    "maxEnergy" : {
    "baseValue" : 10.0
    }

    The value that I want to change is the one from "maxEnergy" to 100, yet, I can't figure the proper structure of the code when on the .patch.

    Any help will be greatly appreciated. Thanks.
     
  2. lazarus78

    lazarus78 The Waste of Time

    projectmayhem and bk3k like this.
  3. The | Suit

    The | Suit Agent S. Forum Moderator

    bk3k likes this.
  4. Uacher

    Uacher Scruffy Nerf-Herder

  5. lazarus78

    lazarus78 The Waste of Time

    Was this your patch?

    Code:
    [
      {
        "op": "replace",
        "path": "/statusControllerSettings/stats/maxEnergy/baseValue",
        "value": 10
      }
    ]
    
    If that doesnt work, does it error out, or just has no effect? If no effect, then it is likely the file you are patching is not really used, or its values get overwritten somewhere, rendering your patch useless.
     
    Uacher likes this.
  6. Uacher

    Uacher Scruffy Nerf-Herder

    THAT is what the problem was! I had completely forgotten about the satus controller settings part. Darn, now I feel silly. Oh well.

    Thanks both much for the help!
     
  7. projectmayhem

    projectmayhem Spaceman Spiff


    Jesus that website is helpful, I been trying to patch monster drops all week. Using that I did it in under 2 mins. I wasn't adding the word "pool" where it was suppose to go. Thanks for that link!
     

Share This Page