Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M mmoitems
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • mmoitems
  • Wiki
  • Item Drop Tables

Item Drop Tables · Changes

Page history
Created Item Drop Tables (markdown) authored Jun 22, 2019 by Indyuce's avatar Indyuce
Hide whitespace changes
Inline Side-by-side
Showing with 69 additions and 0 deletions
+69 -0
  • Item-Drop-Tables.md Item-Drop-Tables.md +69 -0
  • No files found.
Item-Drop-Tables.md 0 → 100644
View page @ 25006118
Data is stored in the drops.yml file, located in the main plugin folder. Here is a config sample:
```
monsters:
ZOMBIE:
rock-table:
coef: 7
items:
CONSUMABLE:
ROCK: 50,1-3,10
coin-table:
coef: 1
items:
MISCELLANEOUS:
GOLD_COIN: 1,1-10,0
```
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: `chance = <subtable-coefficient> / <sum-of-all-subtable-coefficients>`
The monsters section corresponds to the items that drop whenever an entity dies. Here is the config template:
```
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](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) (1.13).
**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.
**Additional subtable options:**
* **disable-silk-touch** - when set to true, this will prevent the subtable from dropping any item if the block was mined with a silk touch pickaxe. This prevents item duplication glitches with blocks like ores.
```
blocks:
DIAMOND_ORE:
rare-diamond:
coef: 1
disable-silk-touch: true
items:
MATERIAL:
RARE_DIAMOND: 100,2-3,0
```
## Adding mmoitems to MythicMobs drop tables
Adding MMOItems to MM drop tables is pretty easy. Since 4.5, items created using MI can be summoned in MM drop tables using this format:
![](https://i.imgur.com/jqkMone.png)
This tells the drop table to add the sword from MMOItems called _CUTLASS_ with a drop chance of 10% (so 0.1 in a MM drop table). You can change the amount of items you want to be dropped as if this drop was a vanilla drop. If you want the item to be unidentified when it is dropped, you will have to add one option within the brackets: this means that the item has a 30% chance of being unidentified when it is dropped: `mmoitems{type=sword;id=cutlass;unidentified=30} 1 .1`
\ No newline at end of file
Clone repository

Home

Item Info

  • Item Types
  • Item Stats & Options
  • Item Creation

Features

  • Mitigation
  • Elemental Damage
  • Item Identification
  • Item Deconstruction
  • Gem Stones
  • Custom Durability
  • Item Sets
  • Item Drop Tables

Ability List (incomplete)

  • Page 1
  • Page 2
  • Page 3

Compatibility & API

  • Supported plugins
  • "Texture by durability"
  • Plugin API

Other

  • Installation Guide