Tutorial Basic Patching Now With Path Guide [v1.9]

Discussion in 'Starbound Modding' started by The | Suit, Sep 19, 2014.

  1. Yanazake

    Yanazake Space Kumquat

    Right, I tried the JSON testing thing and got a result [after removing a ton of comments the program wasn't able to recognize]

    Thing is, while the patching WORKED, meaning I used the right codes in the right places, I noticed some things.

    1: The result didn't add what I wanted, but REPLACED the whole list with only what I wanted, even if I used the ADD operation
    Code:
    [
    {"op":"add","path":"/learnBlueprintsOnPickup","value":{"item":"themed:fu.controller"}}
    ]
    resulted in this list
    Code:
      "learnBlueprintsOnPickup" : [
      "startech:storagenet.terminal",
      "startech:storagenet.storagebus",
      "startech:storagenet.drivebay"
      ]
    turning into this list
    Code:
    "learnBlueprintsOnPickup" : {
      "item" : "themed:fu.controller"
    }
    
    and 2: As you may have noticed, I'm working with startech and trying to modify startech themed, and it has this weird path thing I'm not sure I understand. The whole : and . structure like "startech:storagenet.terminal"
    Are these really folders? Because I'll have to deal with a ton of folders and patching
     
  2. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    Code:
    [
    {"op":"add","path":"/learnBlueprintsOnPickup/-","value":{"item":"themed:fu.controller"}} <--- if you are adding to a list, use /# to add in position # (starting at 0) or /- to add at the end
    ]
     
    Yanazake likes this.
  3. Yanazake

    Yanazake Space Kumquat

    Alright, I found out why the actual hecc the names look like file structures. It's because the creator of StarTech thought it would be easier to organize. :lod:

    Now that I figured that out, I still have the problem of WHY IT'S STILL NOT PATCHING?!

    I altered the code, the JSON patcher recognized it, I'm using the proper item name... And since I'm not trying to patch the player, but an object, I have to put said patch in the same folder structure as the original file, right? The only issue I'm seeing here is that there are multiple files with the same name (controller.recipe) but in different folder paths. Could that be a problem? I have no idea anymore why this isn't working in-game... I just really want to teach new items to the player.
     
  4. davoker

    davoker Cosmic Narwhal

    The Online Comment Stripper is offline, could this be restored? I use it a lot for my translation.
     
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    Old site probably be down for good, here is an alternative
    https://www.skewsme.com/remove.html
     
    davoker likes this.
  6. davoker

    davoker Cosmic Narwhal

  7. The | Suit

    The | Suit Agent S. Forum Moderator

    Considering most of JS is related to online sites, I doubt anyone ever made a desktop variant.
     
    davoker likes this.
  8. davoker

    davoker Cosmic Narwhal

    Ok no problem, thanks!
     
  9. davoker

    davoker Cosmic Narwhal

    Hello, I am sorry to disturb, this online application has stopped working, the page opens but does not delete comments, pressing the button does nothing, a long time ago, if I was using it and there were no problems, is there another alternative that I can use? I need it to update the translation from 1.3.4 to bounty hunter.

    Edit: In google chrome it does nothing, in microsoft edge it directly deletes all the text xD Any idea what it could be? or alternative?

    Thank you!
     
    Last edited: Mar 19, 2020
  10. The | Suit

    The | Suit Agent S. Forum Moderator

    https://html-cleaner.com/js/

    Press the Comments button on the bottom to remove comments ( its not a toggle )
     
    davoker likes this.
  11. davoker

    davoker Cosmic Narwhal

    Thank you very much, in the end while I was waiting for an answer I learned to use Visual Studio Code and with the remove comments module I could do it quickly hehe

    But thanks!
     
    The | Suit likes this.
  12. The | Suit

    The | Suit Agent S. Forum Moderator

    VSC is pretty nice App
    I use Atom.io my self
     
    davoker likes this.
  13. davoker

    davoker Cosmic Narwhal

    Well, I'm just learning, and I have a lot ahead of me, hehe, I have many ideas for SB mods, but I can't develop them, I want to solve that xD
     
  14. The | Suit

    The | Suit Agent S. Forum Moderator

    davoker likes this.
  15. davoker

    davoker Cosmic Narwhal

  16. matthew57778

    matthew57778 Phantasmal Quasar

    Can you test and patch multiple lines for instance:

    [
    [{ "op": "test", "path": "/speciesShips/orcs"},
    {"op":"replace","path":"/speciesShips/orcs/0",
    "value": ["/ships/protectorate/protectorateT0.structure",
    "/ships/protectorate/protectorateT1.structure",
    "/ships/protectorate/protectorateT2.structure",
    "/ships/protectorate/protectorateT3.structure",
    "/ships/protectorate/protectorateT4.structure",
    "/ships/protectorate/protectorateT5.structure",
    "/ships/protectorate/protectorateT6.structure",
    "/ships/protectorate/protectorateT7.structure",
    "/ships/protectorate/protectorateT8.structure"}]
    ]
    ]
     
  17. bk3k

    bk3k Oxygen Tank

    Starbound supports batching things. For a very relevant example...
    Code:
    [
      [
        {
          "op" : "test",
          "path" : "/speciesShips/viera",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/viera",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/viera",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/familiar",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/familiar",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/familiar",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/kemono",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/kemono",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/kemono",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/kazdra",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/kazdra",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/kazdra",
          "value" : [
            "/ships/avian/sr_T0.structure",
            "/ships/avian/sr_T1.structure",
            "/ships/avian/sr_T2.structure",
            "/ships/avian/sr_T3.structure",
            "/ships/avian/sr_T4.structure",
            "/ships/avian/sr_T5.structure",
            "/ships/avian/sr_T6.structure",
            "/ships/avian/sr_T7.structure",
            "/ships/avian/sr_T8.structure",
            "/ships/avian/sr_T9.structure",
            "/ships/avian/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/slimeperson",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/slimeperson",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/slimeperson",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/Hathee",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/Hathee",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/Hathee",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/GoatPerson",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/GoatPerson",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/GoatPerson",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/gardevan",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/gardevan",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/gardevan",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/Umbreon",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/Umbreon",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/Umbreon",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/bunnykin",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/bunnykin",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/bunnykin",
          "value" : [
            "/ships/floran/sr_T0.structure",
            "/ships/floran/sr_T1.structure",
            "/ships/floran/sr_T2.structure",
            "/ships/floran/sr_T3.structure",
            "/ships/floran/sr_T4.structure",
            "/ships/floran/sr_T5.structure",
            "/ships/floran/sr_T6.structure",
            "/ships/floran/sr_T7.structure",
            "/ships/floran/sr_T8.structure",
            "/ships/floran/sr_T9.structure",
            "/ships/floran/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/ningen",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/ningen",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/ningen",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/troll",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/troll",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/troll",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/cat",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/cat",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/cat",
          "value" : [
            "/ships/hylotl/sr_T0.structure",
            "/ships/hylotl/sr_T1.structure",
            "/ships/hylotl/sr_T2.structure",
            "/ships/hylotl/sr_T3.structure",
            "/ships/hylotl/sr_T4.structure",
            "/ships/hylotl/sr_T5.structure",
            "/ships/hylotl/sr_T6.structure",
            "/ships/hylotl/sr_T7.structure",
            "/ships/hylotl/sr_T8.structure",
            "/ships/hylotl/sr_T9.structure",
            "/ships/hylotl/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/ferengi",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/ferengi",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/ferengi",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/trill",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/trill",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/trill",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/klingon",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/klingon",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/klingon",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/vulcan",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/vulcan",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/vulcan",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/borg",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/borg",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/borg",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/arachne",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/arachne",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/arachne",
          "value" : [
            "/ships/glitch/sr_T0.structure",
            "/ships/glitch/sr_T1.structure",
            "/ships/glitch/sr_T2.structure",
            "/ships/glitch/sr_T3.structure",
            "/ships/glitch/sr_T4.structure",
            "/ships/glitch/sr_T5.structure",
            "/ships/glitch/sr_T6.structure",
            "/ships/glitch/sr_T7.structure",
            "/ships/glitch/sr_T8.structure",
            "/ships/glitch/sr_T9.structure",
            "/ships/glitch/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/inkling",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/inkling",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/inkling",
          "value" : [
            "/ships/hylotl/sr_T0.structure",
            "/ships/hylotl/sr_T1.structure",
            "/ships/hylotl/sr_T2.structure",
            "/ships/hylotl/sr_T3.structure",
            "/ships/hylotl/sr_T4.structure",
            "/ships/hylotl/sr_T5.structure",
            "/ships/hylotl/sr_T6.structure",
            "/ships/hylotl/sr_T7.structure",
            "/ships/hylotl/sr_T8.structure",
            "/ships/hylotl/sr_T9.structure",
            "/ships/hylotl/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/zombie",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/zombie",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/zombie",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/cherub",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/cherub",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/cherub",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/centauri",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/centauri",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/centauri",
          "value" : [
            "/ships/avian/sr_T0.structure",
            "/ships/avian/sr_T1.structure",
            "/ships/avian/sr_T2.structure",
            "/ships/avian/sr_T3.structure",
            "/ships/avian/sr_T4.structure",
            "/ships/avian/sr_T5.structure",
            "/ships/avian/sr_T6.structure",
            "/ships/avian/sr_T7.structure",
            "/ships/avian/sr_T8.structure",
            "/ships/avian/sr_T9.structure",
            "/ships/avian/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/minbari",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/minbari",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/minbari",
          "value" : [
            "/ships/apex/sr_T0.structure",
            "/ships/apex/sr_T1.structure",
            "/ships/apex/sr_T2.structure",
            "/ships/apex/sr_T3.structure",
            "/ships/apex/sr_T4.structure",
            "/ships/apex/sr_T5.structure",
            "/ships/apex/sr_T6.structure",
            "/ships/apex/sr_T7.structure",
            "/ships/apex/sr_T8.structure",
            "/ships/apex/sr_T9.structure",
            "/ships/apex/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/narn",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/narn",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/narn",
          "value" : [
            "/ships/floran/sr_T0.structure",
            "/ships/floran/sr_T1.structure",
            "/ships/floran/sr_T2.structure",
            "/ships/floran/sr_T3.structure",
            "/ships/floran/sr_T4.structure",
            "/ships/floran/sr_T5.structure",
            "/ships/floran/sr_T6.structure",
            "/ships/floran/sr_T7.structure",
            "/ships/floran/sr_T8.structure",
            "/ships/floran/sr_T9.structure",
            "/ships/floran/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/Boss Monster",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/Boss Monster",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/Boss Monster",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/sktest",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/sktest",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/sktest",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ],
    
      [
        {
          "op" : "test",
          "path" : "/speciesShips/crysilon",
          "inverse" : true
        },
        {
          "op" : "add",
          "path" : "/speciesShips/crysilon",
          "value" : {}
        }
      ],
      [
        {
          "op" : "replace",
          "path" : "/speciesShips/crysilon",
          "value" : [
            "/ships/human/sr_T0.structure",
            "/ships/human/sr_T1.structure",
            "/ships/human/sr_T2.structure",
            "/ships/human/sr_T3.structure",
            "/ships/human/sr_T4.structure",
            "/ships/human/sr_T5.structure",
            "/ships/human/sr_T6.structure",
            "/ships/human/sr_T7.structure",
            "/ships/human/sr_T8.structure",
            "/ships/human/sr_T9.structure",
            "/ships/human/sr_T9.structure"
          ]
        }
      ]
    ]
    

    Basically....

    You'd basically take this
    Code:
    [
      {
        //patch here
      }
    ]
    
    and nest it within an extra set of [] like this
    Code:
    [
      [  //batch start
        {
          //patch here
        }
      ],  //batch end
      [  //batch start
        {
          //another patch here
        }
      ]  //batch end
    ]
    
    The first batch could be applied - or it could be aborted because of a failed test condition - and that would have no bearing on the second batch either way. It will apply or not apply according to its own test conditions. If a batch has no test condition, then that batch is unconditional. So the batches are independent of other batches, but apply sequentially. This is useful in a large variety of circumstances where you are dealing with an unknown selection of mods.

    Now do remember to control load order in _metadata if you are patching for a particular species that may or may not be present. If you don't know how to do that, just let me know.

    edit: Your example though isn't quite right.
    Code:
    [
    [{ "op": "test", "path": "/speciesShips/orcs" },
    { "op": "replace", "path": "/speciesShips/orcs",
    "value": [ "/ships/protectorate/protectorateT0.structure",
    "/ships/protectorate/protectorateT1.structure",
    "/ships/protectorate/protectorateT2.structure",
    "/ships/protectorate/protectorateT3.structure",
    "/ships/protectorate/protectorateT4.structure",
    "/ships/protectorate/protectorateT5.structure",
    "/ships/protectorate/protectorateT6.structure",
    "/ships/protectorate/protectorateT7.structure",
    "/ships/protectorate/protectorateT8.structure" ]
    }]
    ]
    
     
    Last edited: Jul 25, 2020
  18. matthew57778

    matthew57778 Phantasmal Quasar

    Thanks i managed to run into this.
     
  19. thebunnyrules

    thebunnyrules Space Hobo

    Hi everyone, I downloaded a player.config.patch file from a mod posting in the forum but it doesn't say where the file goes. Can anyone tell me?
     
  20. VampERRus

    VampERRus Scruffy Nerf-Herder

    So I am working on an UI change and I need to add a thing. In the interface.config file there's a line "hungerIcon" : "/interface/messages/hungericon.png", - and it's at the core of the file. Not in /tooltip, not in /message, etc. It's at the core. How do I write the path to add something on the same level and not create extra folders as shown in the guide?
    P.s. just removing the "path" line breaks the entire player.config file which is quite fun to read in the log as all of your recipes and craftings just fail to load. Gets boring after two times though
     

Share This Page