MMOItems - Custom Block & Monster Drops

Oct 21, 2018
MMOItems - Custom Block & Monster Drops

  • This wiki section explains how to use the custom mob/block drops system.

    Data is stored in the drops.yml file, located in the main plugin folder.
    Here is the default (working) drops.yml setup:
    Code (Text):
    # You can create as many subtables as you
    # want for each monster/block/mythic mob.
    #
    # 'coef' is the subtable coefficient. The higher the
    # the higher the chance is for the subtable to be selected.
    #
    # If table-1 has coef=1 and table-2 has coef=3, then table-1
    # has 1 (his coefficient) chance out of 4 (sum of all coefficients)
    # to be selected.
    #
    # When a drop table is read, a random subtable is chosen
    # among all subtables. It then reads the subtable items.
    #
    # The subtable names do not matter, just make sure every
    # subtable in a drop table has a different name.
    #
    # Subtable Item Format: [chance to drop],[min amount]-[max amount],[chance of being unidentified]
    # '50,1-3,10' means:
    #       - 50% chance of dropping
    #       - 1 to 3 items will drop
    #       - 10% chance of being unidentified (for each item)

    # Blocks Drop Tables
    # Read when a block is mined/broken by a player.
    blocks: {}



    # Monsters Drop Tables
    # Read when any monster dies.
    monsters:
        ZOMBIE:
            rock-table:
                coef: 7
                items:
                    CONSUMABLE:
                        ROCK: 50,1-3,10
            nugget-table:
                coef: 1
                items:
                    MISCELLANEOUS:
                        GOLD_COIN: 1,1-10,0
         
         
         
    # MythicMobs Drop Tables
    # Read when a mob from MM dies.
    mythic-mobs: {}

    Drop tables are split into subtables. When a drop table is read, a random subtable among all the subtables is chosen and the items from that subtable are then dropped. Having multiple subtables allows you to actually prevent two items from spawning at the same time.

    Let's say for instance you want a zombie to drop a custom iron sword or a custom leather chestplate. Since having a chance to drop both items at the same time would be to overpowered, you can split the zombie drop table into two subtables. In the first subtable, you would have your iron sword, and in the second subtable you would have the iron chestplate. This way, these two items can't spawn at the same time.


    Subtables can have different subtable coefficients. The higher the coefficient is, the higher the chance is for the subtable to be selected. Calculating the chance for a subtable to be selected is pretty easy. If, inside a drop table, the first subtable has a coefficient of 1 and the second has a coefficient of 2, the first subtable has a 1 in 3 chance of being selected. The chance for a subtable to be chosen can thus be calculated using this formula:
    Code (Text):
    chance = <subtable-coefficient> / <sum-of-all-subtable-coefficients>

    The monsters section corresponds to the items that drop whenever an entity dies. You have to specify in order:

    • MOB_NAME:
      • first-subtable:
        • coef: <subtable-coefficient>
        • items:
          • ITEM_TYPE: (not case sensitive):
            • ITEM_ID: (drop-chance),(min)-(max),(unidentified-chance)
          • ITEM_TYPE:
            • ITEM_ID: (drop-chance),(min)-(max),(unidentified-chance)
            • etc.
          • etc.
      • second-subtable:
        • coef: <subtable-coefficient>
        • items:
          • ITEM_TYPE: (not case sensitive):
            • ITEM_ID: (drop-chance),(min)-(max),(unidentified-chance)
            • etc.
          • etc.
      • etc.


    The blocks config section corresponds to the items that drop whenever a block is broken/mined by a player. Follow the same format as in the monsters section, but replace the mob name by the block type name. Block types can be found here (1.13).


    The mythic-mobs section will only apply if MythicMobs is installed. This section lists all items that drop whenever a mob from MythicMobs dies. Follow the same format in the monsters section, but replace the mob name by the mythic mob internal name.




    You can configurate three values for each subtable item:
    • drop-chance - The chance for your item to drop.
    • min & max - The amount of drops is chosen randomly between these two values.
    • unidentified-chance - the chance for your item to be unidentified when it drops.
  • Loading...
  • Loading...