Modding Help Working on a Boss Drop Mod

Discussion in 'Starbound Modding' started by LazerRay, Feb 6, 2017.

  1. LazerRay

    LazerRay Cosmic Narwhal

    I'm currently working on a mod that hopefully increases the drop rate of the rare items from bosses and mission specific mobs, I'm wondering if I got the patch files set up right to both have the mod work as intended and to be compatible with other mods that use the "monster.treasurepools" file.

    Here are a few sections of my WIP mod, hopefully the whole thing can be tested soon:

    Code:
        {
            "op": "replace",
            "path": "/ixolingTreasure/poolRounds/",
            "value" : [0.85, 0], [0.15, 1]
        },
    
        {
            "op": "replace",
            "path": "/kluexsentryTreasure/pool/2",
            "value" : {"weight" : 0.2, "item" : "kluexsentryaf"}
        },
       
        {
            "op": "replace",
            "path": "/dreadwingDrop/pool/1",
            "value" : {"weight" : 0.25, "item" : "dreadwingaf"}
        },
       
        {
            "op": "replace",
            "path": "/shockhopperDrop/pool/1",
            "value" : {"weight" : 0.25, "item" : "shockhoppermkiaf"}
        },
       
        {
            "op": "replace",
            "path": "/erchiushorrorTreasure/pool/1",
            "value" : {"weight" : 0.25, "item" : "erchiushorroraf"}
        },
       
        {
            "op": "replace",
            "path": "/erchiushorrorTreasure/pool/2",
            "value" : {"weight" : 0.25, "item" : "erchiuseye"}
        },
    What I'm going for is upping the drop rate of the action figures and boss weapons between 15% to 25% success based on the mob or boss and the item.

    Any tips or suggestions will greatly appreciated since this mod is a little more complicated than my previous two.
     
  2. IHart

    IHart Scruffy Nerf-Herder

    With json, as long as you are patching you are good on compatibility. If you are really dedicated you could use the test function to make sure the values you are changing havent already been edited by another mod.
    In terms of working right that is really up to you. What effect do you want. Does it do that.
     
  3. LazerRay

    LazerRay Cosmic Narwhal

    The code I posted is from my massive patch file, I only listed up to one of the main bosses since its basically the same thing for all the others.

    I looked at one of the help threads here about using the number listings when changing existing entries in Json file, I was wondering if what I have here is set up correctly to hit only those areas.
     
  4. IHart

    IHart Scruffy Nerf-Herder

    wow you did this by hand? That is impressive, and must have taken a while, but it is wrong.
    the path "ixolingTreasure/poolRounds" would target this:
    Code:
      "ixolingTreasure" : {"poolRounds" : "value" }
    But the key you are trying to target is actually located:
    Code:
     "ixolingTreasure" : [ [ "...", { "poolRounds" : "value" } ] ] 
    The protocol for targeting members of arrays would yield this target path "ixolingTreasure/0/1/poolRounds"

    If you are eager to get your mod working its easier to use a json patch generator rather than worry about mastering the pathing first.
     
    Cyel likes this.
  5. LazerRay

    LazerRay Cosmic Narwhal

    I dug through the thread I mention earlier and found the patch generator, I bookmarked it for later use and made my new patch with the web page (Now to test it out when I get the chance).
     
    IHart likes this.
  6. Ultimate sandvich

    Ultimate sandvich Scruffy Nerf-Herder

Share This Page