Modding Help Help with patching monster.treasurepools

Discussion in 'Starbound Modding' started by Crazy8Rex, Aug 7, 2016.

  1. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    Hello,

    I am trying to add a pool to drop between all the generated monsters. I have a feeling I need to add a patch to the monster.treasurepools and create my own treasure pool. Does anyone know a fix to this?

    This is the error I get:
    http://pastebin.com/pCq3fvQT

    Code:
    [14:16:54.448] [Error] Could not apply patch from source: ..\mods\Dragon_Bound_Z_05.  Caused by: (JsonPatchException) Could not apply patch to base. (JsonPatchException) Could not apply operation to base. (ParsingException) Missing leading '/' in Json pointer "basicMonsterTreasure"
    This is what my custom treasure pool look like:

    Code:
    {
        "kienergydrop" : [
            [0, {
            "poolRounds" : [[0.65, 1], [0.3, 2], [0.05, 3]],
            "pool" : [
                {"weight" : 0.2, "item" : ["weakkienergy", 5]},
                {"weight" : 0.6, "item" : ["weakkienergy", 10]},
                {"weight" : 0.2, "item" : ["weakkienergy", 25]}
            ]
        }]
        ]
    }
    This is my patch to the monster.treasurepool:

    Code:
    [
        {
            "op" : "add",
            "path" : "basicMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ]
                        }
                    ]
                ]   
            ]
        },
       
        {
            "op" : "add",
            "path" : "flyingMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ]
                        }
                    ]
                ]   
            ]
        },
       
        {
            "op" : "add",
            "path" : "noMeatMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ]
                        }
                    ]
                ]   
            ]
        },
       
        {
            "op" : "add",
            "path" : "weaklingMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ]
                        }
                    ]
                ]   
            ]
        },
       
        {
            "op" : "add",
            "path" : "generatedGroundMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ],
                           
                            "poolRounds" : [
                            [1.0, 1]
                            ],
                           
                            "allowDuplication" : false
                        }
                    ]
                ]   
            ]
        },
       
        {
            "op" : "add",
            "path" : "generatedFlyingMonsterTreasure",
            "value" : [
                [
                    1,
                    [
                        {
                            "pool":[
                            { "weight" : 1.0, "pool" : "kienergydrop" }
                            ],
                           
                            "poolRounds" : [
                            [1.0, 1]
                            ],
                           
                            "allowDuplication" : false
                        }
                    ]
                ]   
            ]
        }
       
       
       
    ]
     

Share This Page