Modding Help Help adding multiple status effects

Discussion in 'Starbound Modding' started by TWT_OFFICIAL, Nov 17, 2017.

  1. TWT_OFFICIAL

    TWT_OFFICIAL Intergalactic Tourist

    aight, so im tryin to make a potion that has like three status effects on it, but when I can't figure out how to add more status effects. every time I do it crashes.
    Code:
    {
      "itemName" : "mojojuice",
      "price" : 25,
      "rarity" : "Common",
      "category" : "medicine",
      "inventoryIcon" : "mojojuice.png",
      "description" : "The power of this concoction is quite gross, but effective.",
      "shortdescription" : "Mojo Juice",
      "maxStack" : 99,
      "effects" : [ [
        {     
          "effect" : "rage",
          "duration" : 30
        }
      ] ],
      "blockingEffects" : [
        "healingwater"
      ],
      "emote" : "",
      "emitters" : [ "drinkinghealing" ]
    }
    
    See on the "effect" : "rage", line I can exchange the rage for any effect in the game
    works fine
    but when I try to duplicate it like this:
    Code:
    {
      "itemName" : "mojojuice",
      "price" : 25,
      "rarity" : "Common",
      "category" : "medicine",
      "inventoryIcon" : "mojojuice.png",
      "description" : "The power of this concoction is quite gross, but effective.",
      "shortdescription" : "Mojo Juice",
      "maxStack" : 99,
      "effects" : [ [
        {     
          "effect" : "rage",
          "duration" : 30
        }
        {
          "effect" : "redstim",
          "duration" : 30,
        }
      ] ],
      "blockingEffects" : [
        "healingwater"
      ],
      "emote" : "",
      "emitters" : [ "drinkinghealing" ]
    }
    
    It doesn't work. The game crashes on startup. but then I try this:
    Code:
    {
      "itemName" : "mojojuice",
      "price" : 25,
      "rarity" : "Common",
      "category" : "medicine",
      "inventoryIcon" : "mojojuice.png",
      "description" : "The power of this concoction is quite gross, but effective.",
      "shortdescription" : "Mojo Juice",
      "maxStack" : 99,
      "effects" : [ [
        {
          "effect" : "redstim",
          "duration" : 30,
        }
      ] ],
      "blockingEffects" : [
        "healingwater"
      ],
      "emote" : "",
      "emitters" : [ "drinkinghealing" ]
    }
    
    and it works. I just don't get how to add more than one effect (or if thats even possible)
     
  2. bk3k

    bk3k Oxygen Tank

    Your second example is missing a comma, thus a JSON syntax error.
    Code:
    {
      "itemName" : "mojojuice",
      "price" : 25,
      "rarity" : "Common",
      "category" : "medicine",
      "inventoryIcon" : "mojojuice.png",
      "description" : "The power of this concoction is quite gross, but effective.",
      "shortdescription" : "Mojo Juice",
      "maxStack" : 99,
      "effects" : [ [
        {   
          "effect" : "rage",
          "duration" : 30
        },  //here
        {
          "effect" : "redstim",
          "duration" : 30,
        }
      ] ],
      "blockingEffects" : [
        "healingwater"
      ],
      "emote" : "",
      "emitters" : [ "drinkinghealing" ]
    }
    
     
  3. TWT_OFFICIAL

    TWT_OFFICIAL Intergalactic Tourist

    tried what you said. still crashes on startup.
     
  4. bk3k

    bk3k Oxygen Tank

    Oh Didn't notice you have an extra comma after "duration". The log actually tells you where your errors are, or you can use a JSON lint website.
     
  5. TWT_OFFICIAL

    TWT_OFFICIAL Intergalactic Tourist

    oh, thank you didn't notice either
     

Share This Page