Wiki

Clone wiki

LorinthsRpgMobs / Loot System

Loot System

The loot system gives you maximum configuration with little hassle. The way the loot tables are setup allow for loot to be added to the existing vanilla system or completely replace it. Additionally you can create multiple loot tables to allow for multiple items to be dropped and the configuration allows you to hook into other plugins that utilize NBT Tags very easily!

Custom Item Creation

In RpgMobs you have the ability to create your own custom drops with full control over appearance/details. Here is an example item with all possible settings configured

#!yaml

Items:
  featherFly:
    Id: FEATHER
    Count: 1
    DisplayName: '&aFlying Feather'
    Lore:
    - '&7This item lets you &efly!'
    Enchantments:
      unbreaking: 1
    ItemFlags:
    - HIDE_ENCHANTS
    NBTTags:
     cmdi:
       command: fly

Utilizing MMO Items drops

If you want to drop mmo items in this loot system the setup is very easy! Essentially just create a record under the Items section in loot.yml with the syntax mmoitem: <type> <id>

#!yaml

Items:
  mmoItemKatana:
    mmoitem: SWORD KATANA

After creating an item, use that id to drop the item just like you would any other custom item. In this example you would just add a chance with the item id "mmoItemKatana"

Loot Tables

Loot tables drive the drops system for RpgMobs. They are configured per level per entity so you have maximum control over 'when' something drops.

Important Note: Each loot table should not exceed 100%, a table results in a single item. If you'd like to drop more than one item, each item should be in its own individual loot table.

#!yaml

Drops:
  ZOMBIE: #Entity Type
    1:    #Level 
      VanillaMultiplier: 1 # Runs vanilla loot table this many times
      LootTable:           # Loot Table Id, not used other than to separate drops
        smellyFlesh: 50.0  # ItemId : % Chance
        ROTTEN_FLESH: 50.0
      LootTable2:
        smellyFlesh: 1.0
        ROTTEN_FLESH: 5.0
        mmoItemSword: 0.1

Updated