Modding Help Multiple Particles on an object.

Discussion in 'Starbound Modding' started by Seterwind, Feb 10, 2014.

  1. Seterwind

    Seterwind Scruffy Nerf-Herder

    Hi everybody! I'm kind of stuck making multiple particles emit from an object. I have tried various things but couldn't get this to work.
    Code:
    {
      "objectName" : "magiccauldron",
      "rarity" : "Common",
      "description" : "Exctracts magical essence.",
      "shortdescription" : "Magic Extractor",
      "subtitle" : "Exctracts magical essence.",
      "race" : "generic",
      "category" : "crafting",
      "price" : 500,
      "objectType" : "container",
      "printable" : false,
    
    
      "apexDescription" : "?.",
      "avianDescription" : "?",
      "floranDescription" : "?",
      "glitchDescription" : "?",
      "humanDescription" : "?",
      "hylotlDescription" : "?",
    
      "lightColor" : [204, 189, 173],
      "flickerDistance" : 0.5,
      "flickerStrength" : 0.1,
    
      "particleEmitter" : {
        "emissionRate" : 10.0,
        "emissionVariance" : 0.5,
    
        "particle" : {
          "type" : "ember",
          "size" : 1.0,
          "color" : [255, 100, 0, 255],
          "light" : [150, 50, 50],
        "offset" : [30, 5],
          "fade" : 0.9,
          "initialVelocity" : [0.0, 5.0],
          "finalVelocity" : [0.0, 3.0],
          "approach" : [0, 20],
          "timeToLive" : 2,
          "layer" : "middle"
        },
        "particle2" : {
          "type" : "ember",
          "size" : 20.0,
          "color" : [255, 100, 0, 255],
          "light" : [150, 50, 50],
        "offset" : [30, 5],
          "fade" : 0.9,
          "initialVelocity" : [0.0, 5.0],
          "finalVelocity" : [0.0, 3.0],
          "approach" : [0, 20],
          "timeToLive" : 2,
          "layer" : "middle"
        },
    
        "particleVariance" : {
          "initialVelocity" : [0.5, 2.0]
        }
      },
    
      "inventoryIcon" : "magiccauldronicon.png",
      "orientations" : [
    
        {
          "dualImage" : "magiccauldron.png:<color>.<frame>",
          "imagePosition" : [0, 0],
          "frames" : 12,
          "animationCycle" : 1.5,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
    
        }
      ],
    
      "soundEffect" : "/sfx/objects/campfire.wav",
      "soundEffectRadius" : 50,
    
      "statusEffects" : [
        {
          "kind" : "Warmth",
          "amount" : 70,
          "range" : 8
        }
      ],
    
      "recipeGroup" : "essenceExtracting",
      "openSounds" : [ "/sfx/objects/campfire_use.wav" ],
      "slotCount" : 2,
      "uiConfig" : "/interface/objectcrafting/magicExtracting.config",
      "frameCooldown" : 67,
      "autoCloseCooldown" : 3600
    
    }
    I have tried various way and was wondering if anyone has gotten this to work. I appreciate the help, thank you.
     
  2. HalcyonXIII

    HalcyonXIII Big Damn Hero

    You need "particleEmitters", which is a list of "particleEmitter" objects:
    Code:
    {
      "objectName" : "magiccauldron",
      "rarity" : "Common",
      "description" : "Exctracts magical essence.",
      "shortdescription" : "Magic Extractor",
      "subtitle" : "Exctracts magical essence.",
      "race" : "generic",
      "category" : "crafting",
      "price" : 500,
      "objectType" : "container",
      "printable" : false,
    
      "apexDescription" : "?.",
      "avianDescription" : "?",
      "floranDescription" : "?",
      "glitchDescription" : "?",
      "humanDescription" : "?",
      "hylotlDescription" : "?",
    
      "lightColor" : [204, 189, 173],
      "flickerDistance" : 0.5,
      "flickerStrength" : 0.1,
    
      "particleEmitters" : [
        {
          "emissionRate" : 1.0,
          "emissionVariance" : 0.5,
    
          "particle" : {
            "type" : "ember",
            "size" : 1.0,
            "color" : [255, 100, 0, 255],
            "light" : [150, 50, 50],
            "offset" : [30, 5],
            "fade" : 0.9,
            "initialVelocity" : [0.0, 5.0],
            "finalVelocity" : [0.0, 3.0],
            "approach" : [0, 20],
            "timeToLive" : 2,
            "layer" : "middle"
          },
    
          "particleVariance" : {
            "initialVelocity" : [0.5, 2.0]
          }
        },
        {
          "emissionRate" : 0.75,
          "emissionVariance" : 0.5,
    
          "particle" : {
            "type" : "ember",
            "size" : 20.0,
            "color" : [255, 100, 0, 255],
            "light" : [150, 50, 50],
            "offset" : [30, 5],
            "fade" : 0.9,
            "initialVelocity" : [0.0, 5.0],
            "finalVelocity" : [0.0, 3.0],
            "approach" : [0, 20],
            "timeToLive" : 2,
            "layer" : "middle"
          },
    
          "particleVariance" : {
            "initialVelocity" : [0.5, 2.0]
          }
        }
      ],
    
      "inventoryIcon" : "magiccauldronicon.png",
      "orientations" : [
        {
          "dualImage" : "magiccauldron.png:<color>.<frame>",
          "imagePosition" : [0, 0],
          "frames" : 12,
          "animationCycle" : 1.5,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
        }
      ],
    
      "soundEffect" : "/sfx/objects/campfire.wav",
      "soundEffectRadius" : 50,
    
      "statusEffects" : [
        {
          "kind" : "Warmth",
          "amount" : 70,
          "range" : 8
        }
      ],
    
      "recipeGroup" : "essenceExtracting",
      "openSounds" : [ "/sfx/objects/campfire_use.wav" ],
      "slotCount" : 2,
      "uiConfig" : "/interface/objectcrafting/magicExtracting.config",
      "frameCooldown" : 67,
      "autoCloseCooldown" : 3600
    }
    
     
  3. Seterwind

    Seterwind Scruffy Nerf-Herder

    You sir are my hero :D
     
  4. Lupus Alifer

    Lupus Alifer Void-Bound Voyager

    Thank you HalcyonXIII!!!!
     

Share This Page