Modding Help Adding multiple particle effects to an object/object help

Discussion in 'Starbound Modding' started by AmazonValkyrie, Sep 16, 2016.

  1. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    I'm trying to construct an object that emits several particles, some of which behave differently. So far, I've only been able to get a single particle type with one variance to function, but I need more than that. I want the particles to emit from many areas of the object. I wanted to reuse the same particle type, for the most part (ember in this case), but I also wanted to add a sparkle that would behave differently. Currently, my object file is setup this way:
    Code:
    {
      "objectName" : "magicitevillageteleporter",
      "colonyTags" : ["misc"],
      "objectType" : "teleporter",
      "rarity" : "Legendary",
      "description" : "A large, blue magickal crystal, capable of transporting you to faraway places.",
      "shortdescription" : "Magicite Village Teleporter",
      "price" : 3000,
      "printable" : false,
    
      "apexDescription" : "An extravagant way to travel. Perhaps too extravagant.",
      "avianDescription" : "I love the whoosh of my feathers when I teleport!",
      "floranDescription" : "Crysssstal take me placessss!",
      "glitchDescription" : "Entranced. This object emanates with tremendous energy.",
      "humanDescription" : "Now this is travelling in style.",
      "hylotlDescription" : "A large, crystal, giving off such gentle energy.",
      "novakidDescription" : "As teleporters go, this sure is fancy lookin'!",
      "vieraDescription" : "This magicite can take me to faraway lands.",
    
      "category" : "teleporter",
      "lightColor" : [198, 255, 255],
      "lightPosition" : [-0.5, 7],
      "flickerPosition" : [-16, 16],
      "flickerDistance" : 0,
      "flickerStrength" : 0.01,
      "flickerTiming" : 1,
    
      "particleEmitter" : {
        "emissionRate" : 6,
        "emissionVariance" : 0.5,
    
        "particle" : {
          "type" : "ember",
          "position" : [1.75, 12],
          "size" : 1.75,
          "color" : [92, 255, 255],
          "light" : [198, 255, 255, 85],
          "fade" : 0.9,
          "destructionAction" : "shrink",
          "destructionTime" : 0.5,
          "initialVelocity" : [0.0, 5],
          "finalVelocity" : [0.0, 1],
          "approach" : [0, 1],
          "timeToLive" : 1.5,
          "layer" : "middle"
        },
    
        "particleVariance" : {
          "initialVelocity" : [0, 5],
          "finalVelocity" : [0, 1],
          "position" : [1.125, 0],
          "size" : 0.5
        }
      },
    
      "interactAction" : "OpenTeleportDialog",
      "interactData" : "/interface/warping/remoteteleporter.config",
    
      "inventoryIcon" : "magicitevillageteleportericon.png",
      "orientations" : [
        {
          "imageLayers" : [ { "image" : "magicitevillageteleporter.png:<color>", "fullbright" : true }, { "image" : "magicitevillageteleporterlit.png:<color>" } ],
    
          "imagePosition" : [-24, 0],
          "frames" : 1,
          "animationCycle" : 0.5,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
        }
      ],
    
      "health" : 10,
    
      "teleporterFootPosition" : [0, 1],
    
      "scripts" : [ "/scripts/npcToyObject.lua"],
      "npcToy" : {
        "influence" : [
          "teleporter",
          "teleporterComplete"
        ],
        "defaultReactions" : {
          "teleporter" : [
            [1.0, "beamaway"]
          ],
          "teleporterComplete" : [
            [1.0, "smile"]
          ]
        },
        "preciseStandPositionLeft" : [0, 0.0],
        "preciseStandPositionRight" : [0, 0.0],
        "maxNpcs" : 2,
        "sitPosition" : [7, 22]
      }
    }
    
    I couldn't find an example of an object that uses multiple particle effects in it's setup, so I'm hoping it's possible, as I'm uncertain how to set multiple particles up to function this way.
    Any and all help is greatly appreciated ^_^

    -EDIT I-
    I've used an effect source before in my mod work, and kind of have an inkling it might be the solution, as it does combine multiple particles into it's effects. I'll explore that route and report my findings.

    -EDIT II-
    I also can't seem to adjust or remove the flicker. I tried removing the four lines that reference "flicker" in the above file, but the object still flickers O_O Oh, the struggle....

    -EDIT III-
    Ok, so what I thought was the flicker was an effect from light being cast from the particles the object emitted >_< This was discovered when I fiddled with the variables for "emissionRate." Now back to the original problem with adding multiple particles
     
    Last edited: Sep 16, 2016

Share This Page