Modding Help New Drop Table

Discussion in 'Starbound Modding' started by Campaigner, Feb 11, 2015.

  1. Campaigner

    Campaigner Giant Laser Beams

    I'm trying to make a new weapon that has its own unique drops, like the bows and crossbows always drop meat and leather or the brain gun always drops brains. Thing is, I can't figure out where this is referenced at all. I've looked in the projectile files, and it leads to "damage", which is in the damage folder. For example;

    Brain Extractor
    Code:
    {
      "itemName" : "brainextractor",
      "inventoryIcon" : "brainextractoricon.png",
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 1,
      "rarity" : "Rare",
      "description" : "Terminating a common monster with this gun will extract its brain.",
      "shortdescription" : "Brain Extractor",
      "image" : "brainextractor.png",
      "handPosition" : [-3.5, -3],
      "firePosition" : [20, 1.5],
    
      "fireTime" : 1,
      "twoHanded" : true,
      "level" : 1,
    
      "projectileType" : "brainshock",
      "projectile" : { "speed" : 2,
        "power" : 12,
        "color" : [10, 255, 10]
      }
    }
    


    Brain Extractor's projectile;
    Code:
    {
      "projectileName" : "brainshock",
      "frames" : "brainshock.png",
      "animationCycle" : 0.2,
      "damageKindImage" : "icon.png",
      "frameNumber" : 4,
      "power" : 50,
      "speed" : 70,
      "timeToLive" : 0.2,
      "bounces" : 1,
      "piercing" : false,
      "damagePoly" : [ [0, -8], [16, -8], [16, 8], [0, 8] ],
      "damageKind" : "brain"
    }
    


    Brain Extractor's damageKind:

    Code:
    {
      "kind" : "brain",
      "effects" : {
        "organic" : {
          "hit" : {
            "sounds" : [ "/sfx/gun/brainextractor_hit.wav" ],
            "particles" : [
              [
    
                {
                  "type" : "animated",
                  "animation" : "/animations/1hswordhitspark/1hswordhitspark.animation",
                  "size" : 1,
                  "angularVelocity" : 0,
                  "fade" : 1,
                  "destructionTime" : 7,
                  "position" : [0, 0],
                  "initialVelocity" : [0, 0],
                  "finalVelocity" : [0, 0],
                  "approach" : [1, 0],
                  "timeToLive" : 0.3,
                  "layer" : "middle"
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [208, 100, 87, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [208, 100, 87, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [208, 100, 87, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                }
              ]
            ]
          },
          "kill" : {
            "sounds" : [ "/sfx/gun/brainextractor_kill.wav" ],
            "particles" : [
              [
    
                {
                  "type" : "animated",
                  "animation" : "/animations/1hswordhitspark/1hswordhitspark.animation",
                  "size" : 1,
                  "angularVelocity" : 0,
                  "fade" : 1,
                  "destructionTime" : 7,
                  "position" : [0, 0],
                  "initialVelocity" : [0, 0],
                  "finalVelocity" : [0, 0],
                  "approach" : [1, 0],
                  "timeToLive" : 0.3,
                  "layer" : "middle"
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [219, 139, 123, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                }
              ]
            ]
          }
        },
        "robotic" : {
          "hit" : {
            "sounds" : [ "/sfx/gun/brainextractor_hit.wav" ],
            "particles" : [
              [
    
                {
                  "type" : "animated",
                  "animation" : "/animations/1hswordhitspark/1hswordhitspark.animation",
                  "size" : 1,
                  "angularVelocity" : 0,
                  "fade" : 1,
                  "destructionTime" : 7,
                  "position" : [0, 0],
                  "initialVelocity" : [0, 0],
                  "finalVelocity" : [0, 0],
                  "approach" : [1, 0],
                  "timeToLive" : 0.3,
                  "layer" : "middle"
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1,
                    "size" : 0.5
                  }
                }
              ]
            ]
          },
          "kill" : {
            "sounds" : [ "/sfx/melee/kill_robotic1.wav", "/sfx/melee/kill_robotic2.wav" ],
            "particles" : [
              [
    
                {
                  "type" : "animated",
                  "animation" : "/animations/1hswordhitspark/1hswordhitspark.animation",
                  "size" : 1,
                  "angularVelocity" : 0,
                  "fade" : 1,
                  "destructionTime" : 7,
                  "position" : [0, 0],
                  "initialVelocity" : [0, 0],
                  "finalVelocity" : [0, 0],
                  "approach" : [1, 0],
                  "timeToLive" : 0.3,
                  "layer" : "middle"
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [7, 6.0],
                  "finalVelocity" : [7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [6, 8.0],
                  "finalVelocity" : [6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [3, 7.0],
                  "finalVelocity" : [3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-7, 6.0],
                  "finalVelocity" : [-7, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.45,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-6, 8.0],
                  "finalVelocity" : [-6, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                },
    
                {
                  "type" : "ember",
                  "size" : 1.0,
                  "color" : [255, 200, 0, 255],
                  "fade" : 0.9,
                  "initialVelocity" : [-3, 7.0],
                  "finalVelocity" : [-3, -9.0],
                  "approach" : [1, 14],
                  "timeToLive" : 0.65,
                  "layer" : "front",
                  "variance" : {
                    "initialVelocity" : [3, 3],
                    "timeToLive" : 1
                  }
                }
              ]
            ]
          }
        }
      }
    }
    


    This is as far as the chain goes. I can't figure out how to make my own version of this that has unique drops. Nothing references brain.treasurepool, which is where the drop table for this gun is. I don't know of any pre-existing mod that does this either, so I can't just look into it.

    How would I go about making my own drop table show up ingame? I know how to make a treasurepool, but I can't figure out how to make it show for a gun's drops.
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Best Answer
    ....
    Code:
    [
      {
      "op":"add",
      "path":"/dropPools/0/newbraindamage",
      "value": "newbraintreasure"
      }
    ]
     
    Last edited: Feb 12, 2015
  3. The | Suit

    The | Suit Agent S. Forum Moderator

    you need to also create custom damage file
     
  4. Campaigner

    Campaigner Giant Laser Beams

    I did that, or at least I thought I did. They're the same as the Brain Extractor's files, just with different names.

    1. Gun = newbraingun.gun
    2. Projectile = newbraingunproj.projectile
    3. Damage = newbraindamage.damage
    4. Treasure = newbraintreasure.treasurepool

    The gun references the projectile. The projectile references the damage. There's nothing to reference the treasure in any of the first three files though, which is my problem.

    EDIT: Of course the files each have the proper name inside too, not just their filename.
     
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    The *.monstertype references the damage.

    Code:
      "dropPools" : [
        {
          "default" : "basicMonsterTreasure",
          "bow" : "huntingquadruped",
          "brain" : "brain"
        }
      ],
     
  6. Campaigner

    Campaigner Giant Laser Beams

    Oh, well that explains why I couldn't find it anywhere in the item files. Thanks! Now to just make a patch that works, which is not my forte.
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    Easiest way to find it is just notepad++ search all files for all references to that word.
    So you can easily recreate an associative map.

    On a powerful machine on a SSD drive - should take around 25 - 45 seconds per word,
     
  8. Campaigner

    Campaigner Giant Laser Beams

    That's a lot of files to search, but I didn't think Notepad++ did that. Good to know for future reference.

    As for the patch, I can't seem to get it to work. I made a patch for smallbiped.monstertype, and have this;

    [ {"op":"add","path":"dropPools","value":{" "newbraindamage" : "newbraintreasure" "} } ]

    The monstertype file;
    Code:
    {
      "type" : "smallbiped",
    
      "categories" : [ "smallbiped" ],
      "parts" : [ "arms", "chest", "tail", "head" ],
      "partParameters" : "smallbiped.partparams",
    
      "animation" : "smallbiped.animation",
      "colors" : "/monsters/colors.config",
      "reversed" : true,
    
      "dropPools" : [
        {
          "default" : "basicMonsterTreasure",
          "bow" : "hunting",
          "brain" : "brain"
        }
      ],
    
      "baseParameters" : {
        "scripts" : [
          "/monsters/capturepod.lua",
          "/monsters/ground/groundMonster.lua",
          "/scripts/stateMachine.lua",
          "/scripts/util.lua",
          "/scripts/vec2.lua",
    
          "/monsters/ground/aggroHopState.lua",
          "/monsters/ground/approachState.lua",
          "/monsters/ground/fleeState.lua",
          "/monsters/ground/captiveState.lua",
          "/monsters/ground/stunState.lua",
          "/monsters/ground/socializeState.lua",
          "/monsters/ground/wanderState.lua",
    
          "/monsters/ground/skills/createGroundRangedAttack.lua"
        ],
    
        "territoryDistance" : 40.0,
        "territorialTargetRadius" : 20.0,
        "minimalTargetRadius" : 6.0,
        "targetSearchTime" : 0.5,
        "targetHoldTime" : 5,
    
        "closeDistance" : 1.5,
    
        "wanderTime" : [4.0, 6.0],
        "wanderMovementTime" : [2.0, 3.0],
        "wanderJumpProbability" : 0.1,
    
        "jumpTargetDistance" : 4,
        "jumpTime" : [0.4, 0.7],
    
        "approachTime" : 10,
    
        "knockoutTime" : 0.5,
        "knockoutEffect" : "blink",
        "knockoutAnimationStates" : {
          "movement" : "knockout",
          "attack" : "idle"
        },
        "deathParticles" : "deathPoof",
        "captureParticles" : "captureParticles",
        "levelUpParticles" : "levelUp",
    
        "exhaustionTimer" : 3.0,
        "exhaustionTimeout" : 3.0,
        "exhaustionDistanceLimit" : 1.0,
    
        "captureHealthFraction" : 0.5,
        "killsPerLevel" : 20
      },
    
      "familyParameters" : [
        [
          {
            "baseSkills" : [ "meleeAttack" ],
            "specialSkills" : [ "chargeAttack" ]
          },
          {
            "baseSkills" : [ "meleeAttack" ],
            "specialSkills" : [ "pounceAttack" ]
          }
        ]
      ],
    
      "variantParameters" : [
        [
          [1.0, {
              "scale" : 1.0,
    
              "movementSettings" : {
                "collisionPoly" : [ [-1, -2.6], [1, -2.6], [1, 0], [-1, 0] ],
                "mass" : 1.2,
                "walkSpeed" : 2.5,
                "runSpeed" : 6.5
              },
    
              "metaBoundBox" : [-2.5, -2.5, 2.5, 2.5],
    
              "blockedSensors" : [ [1.5, -1.5], [1.5, -1.0], [1.5, -0.2], [1.5, 0.6] ],
              "fallSensors" : [ [0.5, -2.5], [0.5, -3.5], [0.5, -4.5], [2.0, -2.5], [2.0, -3.5], [2.0, -4.5] ],
    
              "touchDamage" : {
                "poly" : [ [-1, -2.6], [1, -2.6], [1, 0], [-1, 0] ],
                "damage" : 12,
    
                "teamType" : "enemy",
                "damageSourceKind" : "slash",
                "statusEffects" : [ ]
              },
    
              "statusSettings" : {
                "statusProperties" : {
                  "targetMaterialKind" : "organic"
                },
    
                "appliesEnvironmentStatusEffects" : false,
                "minimumLiquidStatusEffectPercentage" : 0.1,
    
                "primaryScriptSources" : [
                  "/stats/monster_primary.lua"
                ],
                "primaryScriptDelta" : 5,
    
                "stats" : {
                  "maxHealth" : {
                    "baseValue" : 48
                  },
                  "protection" : {
                    "baseValue" : 0.0
                  },
                  "healthRegen" : {
                    "baseValue" : 0.0
                  }
                },
    
                "resources" : {
                  "health" : {
                    "maxStat" : "maxHealth",
                    "deltaStat" : "healthRegen",
                    "defaultPercentage" : 100
                  }
                }
              },
    
              "mouthOffset" : [0.5, 0],
              "feetOffset" : [0, -21]
            } ]
        ]
      ]
    }
    


    Obviously I want the patch to make it say;

    Code:
      "dropPools" : [
        {
          "default" : "basicMonsterTreasure",
          "bow" : "hunting",
          "brain" : "brain",
          "newbraindamage" : "newbraintreasure"
        }
      ],
    I just can't get the patch to work.
     
  9. SleepySquidd

    SleepySquidd Tragically Magic Hands

    Try
    Code:
    "path" : "/dropPools/-"
    
    Maybe not a slash in front, not sure on it.
     
  10. The | Suit

    The | Suit Agent S. Forum Moderator

    Best Answer
    ....
    Code:
    [
      {
      "op":"add",
      "path":"/dropPools/0/newbraindamage",
      "value": "newbraintreasure"
      }
    ]
     
    Last edited: Feb 12, 2015
  11. Campaigner

    Campaigner Giant Laser Beams

    Nope. I get this error;

    [14:38:13.439] Error: Exception caught loading asset: /monsters/ground/smallbiped/smallbiped.monstertype, (AssetException) Could not read variant asset /monsters/ground/smallbiped/smallbiped.monstertype

    Caused by: (JsonParsingException) Cannot parse json file: /monsters/ground/smallbiped/smallbiped.monstertype

    Caused by: (JsonParsingException) Error parsing json: bad object, should be ':' at 1:49
    0000000005ECE710
    0000000005ECE820

    EDIT: Just tried xxswatelitexx's suggestion, game loaded fine, and it worked! Thank you!
     
  12. The | Suit

    The | Suit Agent S. Forum Moderator

    You did rename it
    smallbiped.monstertype.patch right?
     
  13. Campaigner

    Campaigner Giant Laser Beams

    Yeah, I did rename it. I just didn't see your post until after I was trying out FlyingAnonymoose's suggestion.

    I got it to work now though, thanks to all the help! Coding really isn't my forte, and something like this felt insanely complicated to me.
     
    SleepySquidd and The | Suit like this.
  14. The | Suit

    The | Suit Agent S. Forum Moderator

    writing a patch has really nothing much to do with programming.
    Its just a matter of learning how to interpret the table structure.

    For example
    Drop pools is in the root
    so /drop
    the 0 is because there is an array inside the drop pools you willl notice its drop pools ; [ { something } ]
    that { something } is the first array inside drop pools so 0
    Next we want to add in a new value so we added in new brain damage.
    We want to assign a value to new brain damage.

    And tada.
     
  15. Campaigner

    Campaigner Giant Laser Beams

    Ah, I see. I guess I was trying to look at it like something it wasn't. Thanks for clearing that up, as well as all the help in making the mod I'm working on work! You've been a big help for this dumb guy!
     
    The | Suit likes this.
  16. SleepySquidd

    SleepySquidd Tragically Magic Hands

    I rushed my code and I'm on a phone (also forgot to mention I was just talking about the path, not whole file, haha). Glad you got it working, though!
     

Share This Page