WildStacker - Loot Tables

May 18, 2019
WildStacker - Loot Tables
  • [​IMG]




    About(top)

    The loot tables system was designed in order to ensure stacked entities will drop the correct amount of items, and won't drop the same amount of drops as single entity.
    You can edit every loot table of every entity, and this system also can be used as a custom drops manager.




    Editing a Loot Table(top)

    In order to edit a loot table, you must have knowledge in json, as the entire loot table system is based on json files. If you don't have the required knowledge, you can use json checks online, such as this one.
    All the loot tables are located under the plugin folder, and have a few sections:


    Loot Table(top)

    This section handles all the pairs of the table, and a few more settings related to the table:
    - "dropEquipment": Boolean, default: false. Should equipment of entities will be dropped?
    - "min": Integer, default: 1. A minimum amount of pairs that will be calculated.
    - "max": Integer, default: 1. A maximum amount of pairs that will be calculated.
    - "exp": Section. All settings related to exp.

    - "min": Integer. A minimum amount of exp to be dropped.
    - "max": Integer. A maximum amount of exp to be dropped.
    - "pairs": List. A list of pairs.
    An example for a loot table can be found here.

    Loot Pair(top)

    Pairs are a way of storing loot items in small groups. Every pair has a chance to be chosen and used. Besides items, it has a few more settings:
    - "killedByPlayer": Boolean, default: false. When this flag is true, the loot pair will be checked only if the entity was killed by a player.
    - "killer": List, default: empty. A list of entities that must kill the entity in order the pair to be chosen.
    - "chance": Decimal, default: 100. A number between 0 and 100. This is the chance for choosing this pair.
    - "lootingChance": Decimal, default: 0. A looting multiplier for the chance of choosing an item.
    - "items": List. A list of items.
    - "commands": A list of commands.
    An example for a loot pair can be found here.

    Loot Item(top)

    Loot items store all the information related to items. Every item has a chance to be chosen and used. The sum of all the chances of all the items should be exactly 100. There are a few settings related to them:
    - "type": String. The material name of the item.
    - "data": Integer, default: 0. The data value of the item.
    - "name": String. A custom name for the item (Supports color codes).
    - "lore": List. A custom lore for the item. (Supports color codes).
    - "chance": Decimal, default: 100. A number between 0 and 100. This is the chance for choosing this item.
    - "min": Integer, default: 1. The minimum amount of this item.
    - "max": Integer, default: 1. The maximum amount of this item.
    - "looting": Boolean, default: false. Should the amount of the item get increased by looting?
    - "burnable": Section. If exists, another item will be dropped if the entity was killed by fire. All sections related to items can be added to the "burnable" section.
    - "enchants": Section. A list of enchants with their level to be applied for the item.
    - "nbt-data": Section. A list of nbt keys and their values to be applied to the item.
    An example for a loot item can be found here.

    Loot Command(top)

    Loot commands stores all the commands that will be ran when chosen. Every command has a chance to be chosen and used. The sum of all the chances of all the items should be exactly 100. There are a few settings related to them:

    - "chance": Decimal, default: 100. A number between 0 and 100. This is the chance for choosing this command.
    - "min": Integer, default: 1. The minimum range for the {number} placeholder.
    - "max": Integer, default: 1. The maximum range for the {number} placeholder.
    - "commands": A list of commands that will be ran. You can use {player-name} and {number} placeholders.
    An example for a loot item can be found here.



    Cannot find a loot table(top)

    The plugin checks if a loot table exists, and if not - it will use a default one, which has no drops at all.
    If you find a mob like this, just copy and paste a random loot table, rename it to the name of the entity type and edit the content of the loot table. Loot tables work the same on all the entities, and there's no differences between one entity to another.




    [​IMG]
  • Loading...
  • Loading...