Modding Help monster killing drops

Discussion in 'Starbound Modding' started by amirmiked12, May 25, 2017.

  1. amirmiked12

    amirmiked12 Parsec Taste Tester

    I am posting this thread twice.
    I'm trying to figure out to force weapons to drop a specific item from killing monsters.
    any idea?
     
  2. bk3k

    bk3k Oxygen Tank

    You mean like the hunting items do? Dropping meat, leather, etc?

    If so, that's where you'd start. Unless I misunderstand the question.
     
  3. amirmiked12

    amirmiked12 Parsec Taste Tester

    yes, that's exactly what I meant?
    like bows do
    but for melee weapons
     
  4. Cyel

    Cyel Scruffy Nerf-Herder

    A monster's dropPool is set in it's .monstertype file, for example:
    Code:
      "dropPools" : [ { "default" : "poptopTreasure", "bow" : "poptopHunting" } ],
    The "default" and "bow" thingies refer to the damageKind of the thing that kills them; for example, in a .projectile file:
    Code:
      "damageKind" : "bow"
    (If you want to define your own damageKind, you'll need to make a /damage/<yourdamage>.damage file)
    (I have no idea how to set a melee's damageKind so you'll have to play with that)
    "poptopTreasure" and "poptopHunting refers to their treasurePool, which are defined in /treasure/*.treasurepools. Eg., from "hunting.treasurepools":
    Code:
      "poptopHunting" : [
      [1, {
      "pool" : [
      {"weight" : 0.599, "item" : "alienmeat"},
      {"weight" : 0.400, "item" : "sharpenedclaw"},
      {"weight" : 0.001, "item" : "poptopaf"}
      ]
      } ]
      ],
    
    tl;dr to get a monster to drop something specific when using a weapon, you need to:
    - define that "something specific" into a treasurepools
    - set that weapon's damageKind, and optionally make your own .damage file so that it doesn't collide with other weapons
    - set that treasurepools and damageKind in the .monstertype's dropPool you want
     
    Last edited: May 25, 2017

Share This Page