Modding Help [SOLVED]How to patch my own Mod?

Discussion in 'Starbound Modding' started by Omeruin, Mar 24, 2019.

  1. Omeruin

    Omeruin Void-Bound Voyager

    Heya.
    So my Race mod is doing pretty well. Getting help from the modding community always helps!
    ---
    However, someone was wondering if I could release a patch REMOVING the Racial Buffs. I don't want to just remove them from the orig. mod, because a lot of people do like the Buffs.
    How do I go about patching my own files from a separate "mod"?
    I already attempted a few times, but I honestly don't know about patching something that isn't from the original game.

    Here is my angel.species code:
    Code:
    {
      "kind" : "angel",
        "charCreationTooltip" : {
        "title" : "Angel",
        "subTitle" : "02",
        "description" : "Angels were made by the Cultivator to watch over the 'Mortal' Species. Angels refer to the Cultivator as the 'Maker'. They don't understand social norms and simply wander all over the unvierse, protecting 'Mortals', although they do not understand them.."
      },
     
      "statusEffects" : [ "angeleffect1", "angeleffect2", "nofalldamage", "jumpboost" ],
     
      "nameGen" : [ "/species/angelmalenamegen.config:names", "/species/angelfemalenamegen.config:names" ],
      "ouchNoises" : [ "/sfx/humanoid/angelhurt_male1.ogg", "/sfx/humanoid/angelhurt_female1.ogg" ],
      "charGenTextLabels" : [ "Skin colour", "Hair style", "Shirt", "Legwear", "Eye Color", "Hair colour", "Shirt colour", "Legwear colour", "ANGEL", "Personality" ],
      "skull" : "/humanoid/angel/dead.png",
      "effectDirectives" : "?replace=FEFFFFFF=FFFFFFFF?replace=9bd4ffFF=ffea63FF?replace=31a6ffFF=f5bc00FF",
      "defaultBlueprints" : {
        "tier1" : [
       
    // Empty Hands
          { "item" : "flagangel" },
           
    // Anvil
          { "item" : "angeltier1head" },
          { "item" : "angeltier1chest" },
          { "item" : "angeltier1pants" },
          { "item" : "angeltier2head" },
          { "item" : "angeltier2chest" },
          { "item" : "angeltier2pants" },
          { "item" : "angelsword" },
          { "item" : "angelscythesmall" },
          { "item" : "angelshortsword" },
          { "item" : "angeldagger" },
          { "item" : "angelspear" },
          { "item" : "angelaxe" },
          { "item" : "ironshortsword" },
          { "item" : "ironbroadsword" },
          { "item" : "tungstenaxe" },
          { "item" : "tungstenhammer" },
    // Anvil2
          { "item" : "angeltier3head" },
          { "item" : "angeltier3chest" },
          { "item" : "angeltier3pants" },
          { "item" : "angeltier4head" },
          { "item" : "angeltier4chest" },
          { "item" : "angeltier4pants" },
          { "item" : "angelscythelarge" },
          { "item" : "angelscythelarge2" },
          { "item" : "titaniumdagger" },
          { "item" : "titaniumspear" },
          { "item" : "durasteelbroadsword" },
          { "item" : "durasteelshortsword" },
    // Anvil3
          { "item" : "angeltier5ahead" },
          { "item" : "angeltier5achest" },
          { "item" : "angeltier5apants" },
          { "item" : "angeltier6ahead" },
          { "item" : "angeltier6achest" },
          { "item" : "angeltier6apants" },
          { "item" : "angeltier5mhead" },
          { "item" : "angeltier5mchest" },
          { "item" : "angeltier5mpants" },
          { "item" : "angeltier6mhead" },
          { "item" : "angeltier6mchest" },
          { "item" : "angeltier6mpants" },
          { "item" : "angeltier5shead" },
          { "item" : "angeltier5schest" },
          { "item" : "angeltier5spants" },
          { "item" : "angeltier6shead" },
          { "item" : "angeltier6schest" },
          { "item" : "angeltier6spants" },
          { "item" : "aegisaltpistol" },
          { "item" : "aegisaltbow" },
          { "item" : "feroziumwand" },
          { "item" : "feroziumstaff" },
          { "item" : "violiumshortsword" },
          { "item" : "violiumbroadsword" },
         
    // Crafting
          { "item" : "angelworkbench" },
         
    // Furniture
          { "item" : "angelwoodenbed" },
          { "item" : "angelbannerlarge" },
          { "item" : "angelbannersmall" },
          { "item" : "angelwoodchair" },
          { "item" : "angelwoodtable" },
          { "item" : "angelwooddoor" },
          { "item" : "angelwoodchair" },
          { "item" : "angelwoodendesk" },
          { "item" : "angellantern" },
          { "item" : "angelwoodplatform" },
          { "item" : "angelwood" },
          { "item" : "angelornatewood" },
          { "item" : "angelornateflooring" },
          { "item" : "angelcabinroofing" },
          { "item" : "angelchest" },
          { "item" : "angelchest2" },
    
    // Furniture Table 2
          { "item" : "angelstoragelocker" },
          { "item" : "angelshipdoor" },
          { "item" : "angelshiphatch" },
    // Spinning Wheel
          { "item" : "angeloutfit1chest" },
          { "item" : "angeloutfit1legs" },
          { "item" : "angeloutfit2chest" },
          { "item" : "angeloutfit2legs" },
          { "item" : "angeloutfit3chest" },
          { "item" : "angeloutfit3legs" },
          { "item" : "angeloutfit4chest" },
          { "item" : "angeloutfit4legs" }   
          ]
      },
    
      "altOptionAsUndyColor" : true,
      "headOptionAsHairColor" : true,
      "altOptionAsHairColor" : true,
      "hairColorAsBodySubColor" : true,
      "genders" : [
        {
           "name" : "male",
          "image" : "/interface/title/angelmaleico.png",
          "characterImage" : "/interface/title/angelmale.png",
          "hair" : [ "male1", "male2", "male3", "male4", "male5", "male6", "male7", "male8", "male9", "male10", "male11", "male12", "male13", "male14", "male15", "male16", "male17", "male18", "male19", "male21", "male22", "male23", "male24", "male25", "male26", "male27", "male28", "male29", "male30", "male31", "male32", "male33", "male34", "male35", "male36", "male37", "male38", "male39", "male40", "male41", "male42", "male43", "male44", "male45", "male46", "male47", "male48", "male49", "male50", "male51", "male52", "male53", "male54", "male55", "male56", "male57", "male58", "male59", "male60", "male61", "male62", "male63", "male64", "male65" ],
          "shirt" : [ "angeloutfit1chest", "angeloutfit2chest", "angeloutfit3chest", "angeloutfit4chest" ],
          "pants" : [ "angeloutfit1legs", "angeloutfit2legs", "angeloutfit3legs", "angeloutfit4legs" ],
          "facialHairGroup" : "",
          "facialHair" : [ ],
          "facialMaskGroup" : "",
          "facialMask" : [ ]
        },
        {
          "name" : "female",
          "image" : "/interface/title/angelfemico.png",
          "characterImage" : "/interface/title/angelfemale.png",
          "hair" : [ "fem1", "fem2", "fem3", "fem4", "fem5", "fem6", "fem7", "fem8", "fem9", "fem10", "fem11", "fem12", "fem13", "fem14", "fem15", "fem16", "fem17", "fem18", "fem19", "fem20", "fem21", "fem22", "fem23", "fem24", "fem25", "fem26", "fem27", "fem28", "fem29", "fem30", "fem31", "fem32", "fem33", "fem34", "fem35", "fem36", "fem37", "fem38", "fem39", "fem40", "fem41", "fem42", "fem43", "fem44", "fem45", "fem46", "fem47", "fem48", "fem49", "fem50", "fem51", "fem52", "fem53", "fem54", "fem55", "fem56", "fem57", "fem58", "fem59", "fem60", "fem61", "fem62", "fem63", "fem64", "fem65", "fem66", "fem67", "fem68", "fem69", "fem70", "fem71", "fem72", "fem73", "fem74", "fem75" ],
          "shirt" : [ "angeloutfit1chest", "angeloutfit2chest", "angeloutfit3chest", "angeloutfit4chest" ],
          "pants" : [ "angeloutfit1legs", "angeloutfit2legs", "angeloutfit3legs", "angeloutfit4legs" ],
          "facialHairGroup" : "",
          "facialHair" : [ ],
          "facialMaskGroup" : "",
          "facialMask" : [ ]
        }
      ],
      "bodyColor" : [
        { "ffe2c5" : "ab8c77", "ffc181" : "86644a", "d39c6c" : "684431", "c7815b" : "40271d" },
        { "ffe2c5" : "c5ad98", "ffc181" : "a47a59", "d39c6c" : "865d40", "c7815b" : "66412e" },
        { "ffe2c5" : "e1b98d", "ffc181" : "c88959", "d39c6c" : "9e6a4d", "c7815b" : "784930" },
        { "ffe2c5" : "c9b181", "ffc181" : "ac8348", "d39c6c" : "87633f", "c7815b" : "694c31" },
        { "ffe2c5" : "e8cebc", "ffc181" : "cfa97d", "d39c6c" : "ae774b", "c7815b" : "804e34" },
        { "ffe2c5" : "f4e0ba", "ffc181" : "e9b768", "d39c6c" : "c18f54", "c7815b" : "a2683d" },
        { "ffe2c5" : "ffe9d3", "ffc181" : "ffc181", "d39c6c" : "d39c6c", "c7815b" : "b97551" },
        { "ffe2c5" : "fbe1d4", "ffc181" : "f6baa2", "d39c6c" : "cc9582", "c7815b" : "ac7261" },
        { "ffe2c5" : "fff7ec", "ffc181" : "f9d3a9", "d39c6c" : "d3a57c", "c7815b" : "b37c5d" },
        { "ffe2c5" : "fff6f6", "ffc181" : "f7d5d3", "d39c6c" : "d1aaa1", "c7815b" : "a27f70" }
      ],
      "undyColor" : [
        { "f32200" : "ef0000", "dc1f00" : "ae0000" },
        { "f32200" : "f57d00", "dc1f00" : "be6200" },
        { "f32200" : "efea00", "dc1f00" : "b5b200" },
        { "f32200" : "00ef14", "dc1f00" : "00ae0e" },
        { "f32200" : "008df5", "dc1f00" : "0068b3" },
        { "f32200" : "d400ff", "dc1f00" : "b100d6" },
        { "f32200" : "ef00da", "dc1f00" : "c000d1" },
        { "f32200" : "00edef", "dc1f00" : "00acae" },
        { "f32200" : "ef0063", "dc1f00" : "ae0048" },
        { "f32200" : "ffffff", "dc1f00" : "cbcbcb" }
      ],
      "hairColor" : [
        //LIGHT RED
        { "d9c189" : "E86D46", "a38d59" : "D1422E", "735e3a" : "96201B" },
        //RED
        { "d9c189" : "CD1C38", "a38d59" : "982441", "735e3a" : "69243F" },
        //DARK RED
        { "d9c189" : "ad2716", "a38d59" : "8f1f1b", "735e3a" : "731a1a" },
        //RUSTY RED
        { "d9c189" : "BE471B", "a38d59" : "9B2F0C", "735e3a" : "702710" },
        //BROWN
        { "d9c189" : "7d3c1c", "a38d59" : "4d240b", "735e3a" : "2d1606" },
        //LIGHT BROWN
        { "d9c189" : "7f5a39", "a38d59" : "5b3523", "735e3a" : "3b1f15" },
        //DIRTY ORANGE
        { "d9c189" : "a6671d", "a38d59" : "915622", "735e3a" : "743e1d" },
        //ORANGE
        { "d9c189" : "efa838", "a38d59" : "be6d1d", "735e3a" : "834012" },
        //DIRTY BLONDE
        { "d9c189" : "eaa758", "a38d59" : "cd8b3d", "735e3a" : "93682c" },
        //YELLOW
        { "d9c189" : "e6e756", "a38d59" : "c7ac3f", "735e3a" : "a9882f" },
        //BLONDE
        { "d9c189" : "f1d992", "a38d59" : "daba5e", "735e3a" : "b59a4d" },
        //LIGHT YELLOW
        { "d9c189" : "f2eba3", "a38d59" : "dcd28c", "735e3a" : "c2b677" },
        //LIGHT GREEN
        { "d9c189" : "A7D13D", "a38d59" : "83AD22", "735e3a" : "6B880B" },
        //GREEN
        { "d9c189" : "4ece61", "a38d59" : "34ae47", "735e3a" : "228a38" },
        //DARK GREEN
        { "d9c189" : "3b7f44", "a38d59" : "2e6a38", "735e3a" : "1d4b28" },
        //TORQUOISE
        { "d9c189" : "5BD5B6", "a38d59" : "4AA9AD", "735e3a" : "237082" },
        //LIGHT TURQUOISE
        { "d9c189" : "49E193", "a38d59" : "3BA380", "735e3a" : "197C81" },
        //LIGHT BLUE
        { "d9c189" : "61BCDE", "a38d59" : "5381CC", "735e3a" : "2C489E" },
        //BLUE
        { "d9c189" : "5d8bc7", "a38d59" : "4d55b0", "735e3a" : "2e2a73" },
        //DARK BLUE
        { "d9c189" : "425879", "a38d59" : "343965", "735e3a" : "242247" },
        //DARK PURPLE
        { "d9c189" : "7f3b6d", "a38d59" : "6a2e53", "735e3a" : "4b1d30" },
        //PURPLE
        { "d9c189" : "653b7f", "a38d59" : "562e6a", "735e3a" : "3f1d4b" },
        //HOT PINK
        { "d9c189" : "cd72d9", "a38d59" : "ac4da6", "735e3a" : "913b86" },
        //PINK
        { "d9c189" : "D26BA4", "a38d59" : "A54669", "735e3a" : "89334D" },
        //LIGHT PURPLE
        { "d9c189" : "ad68e2", "a38d59" : "8d41b0", "735e3a" : "6a2980" },
        //BROWN GREY
        { "d9c189" : "50422f", "a38d59" : "36261e", "735e3a" : "170f0d" },
        // DARK GREY
        { "d9c189" : "525252", "a38d59" : "363636", "735e3a" : "161616" },
        // GREY
        { "d9c189" : "74726f", "a38d59" : "53504d", "735e3a" : "2a251e" },
        // GREY BLUE
        { "d9c189" : "6f6d85", "a38d59" : "525269", "735e3a" : "3e4352" },
        // LIGHT GREY
        { "d9c189" : "b8b8b8", "a38d59" : "828282", "735e3a" : "555555" },
        // WHITE
        { "d9c189" : "eaeaea", "a38d59" : "b8b8b8", "735e3a" : "828282" }
      ]
    }
    
    The part that needs to be patched:
    "statusEffects" : [ "angeleffect1", "angeleffect2", "nofalldamage", "jumpboost" ],
    How can I patch that to just show this(?):
    "statusEffects" : [ " " ],
    That should remove the Buffs for those that don't like them.
     
  2. DrPvtSkittles

    DrPvtSkittles Master Astronaut

    I'm not the best with patches, but off the top of my head I think:

    In your angel.species.patch file put

    Code:
    [{"op":"replace", "path" : "/statusEffects", "value":""}]
    or

    Code:
    [{"op":"remove", "path" : "/statusEffects"}]
    Remember that your patch needs to have the same file structure as the file it is changing. So your angel.species.patch file will be in a folder called species, in your main mod folder.
     
    bk3k likes this.
  3. bk3k

    bk3k Oxygen Tank

    For replacement, you'd want an empty array rather than an array with "" (which is still is a string, but won't match any real status). Still vanilla species don't have statusEffects so you might as well do this
    Code:
    [{"op":"remove", "path" : "/statusEffects"}]
    The other thing is adding in _metadata
    Code:
    "includes" : [ "Whatever_mod_this_patches" ],
    That makes sure the patch mod loads after the mod you are patching.
     
    DrPvtSkittles likes this.
  4. Omeruin

    Omeruin Void-Bound Voyager

    Thank you, you guys/gals. Now I know what to do next time I want to Patch one of my own files!
    The Patch is up and running for anyone who doesn't want the Racial Buffs. Thanks again!
    ♥Stay awesome!♥
    ------------------------------------------------SOLVED------------------------------------------------
     

Share This Page