Modding Help Assistance with Adding Liquids

Discussion in 'Starbound Modding' started by KingJigglypuff, Sep 24, 2015.

  1. KingJigglypuff

    KingJigglypuff Scruffy Nerf-Herder

    I'm in the process of making my first mod, and I need some assistance in adding "new" liquids. ("New" in quotations because I'm adding liquid coffee and alien juice into this mod)

    I'm able to add a single new liquid in just fine, but even attempting to add a second liquid, I get the "entry with key already present" error.

    Here's an image with the coding I have. Could anyone see what exactly I'm doing wrong please?
    [​IMG]


    Any sort of assistance would be appreciated.
     
  2. C0bra5

    C0bra5 Oxygen Tank

    hello there!

    i can't see why your code would not work, but i can probably help you trouble shoot your problem and make you discover an awesome functionality of the forum

    first the functionality that is awesome, mostly for code
    you can enter code in the forum using the code element, it will format it and place it in the forum with proper indenting. to do so you will need to use a code element, to use it you have tow choices:

    the manual way
    simply write [-code]remove the - sings in the brackets for it to actually work[-/code]

    so if i remove all the - sings inside the code tags, i get that:

    Code:
    i removed the - sings
    the graphical way:
    open that menu and select code in the menu:
    upload_2015-9-25_12-4-9.png
    enter the code in the window and click done when your pasted the code.

    now the trouble shooting thingy

    first, a member of the forum called kawa has created a website where you can test all your code, go try your patch file in the patcher tab
    link: http://helmet.kafuka.org/sbmods/json/

    second, are you using any mods? a mod might be using the spot you are trying to add.

    third have you tried to use replace instead of add, it will remove the problematic invisible code and replace it by your own, but you should try to find a way to add it in the end.

    fourth you could probably try to make your changes in separate group, what i mean by this is that you can add square brackets around a group of patches to group them,
    it would look a bit like that
    Code:
    [
        [
            {
                "op": "add",
                "path": "/liquids/4",
                "value": {
                    "name": "corelava",
                    "description": "An ocean of deadly lava.",
                    "tickDelta": 30,
                    "color": [
                        255,
                        150,
                        0,
                        205
                    ],
                    "radiantLight": [
                        189,
                        26,
                        0
                    ],
                    "statusEffects": [
                        "melting"
                    ],
                    "texture": "/liquids/lavatex.png",
                    "bottomLightMix": [
                        255,
                        70,
                        0
                    ],
                    "textureMovementFactor": 2.6
                }
            }
        ],
        [
            {
                "op": "add",
                "path": "/liquids/9",
                "value": {i am meaning full data}
            }
        ]
    ]
    
    other than that i'm out of ideas, i hope it helps!

    edit: you could also try to set the values of the liquids to 100 or something higher to see if it is because the values you are using are too high
     
  3. KingJigglypuff

    KingJigglypuff Scruffy Nerf-Herder

    Like you said, there was nothing wrong with my coding, but it seems like I already had a mod that added one of the liquids I was already trying to add in. :x

    Thanks for all the tips. I'll be sure to bookmark that site.
     

Share This Page