small fix for the equipment in the item:0 format authored by mikekevie's avatar mikekevie
Drop Tables are collections of multiple drops that can be assigned to mobs. Using them makes it easier to organize your drops in almost any case where your mobs are supposed to drop multiple items. Drop Tables are collections of multiple drops that can be assigned to mobs. Using them makes it easier to organize your drops in almost any case where your mobs are supposed to drop multiple items.
Drop Tables are stored in their own respective configuration-files located in \/MythicMobs\/DropTables. They have the advantage of being able to utilize [Conditions](/Skills/conditions) and various other special options, and can be shared by multiple mobs without the need of duplicating it. Drop Tables are stored in their own respective configuration-files located in \/MythicMobs\/DropTables. They have the advantage of being able to utilize [Conditions](/Skills/conditions) and various other special options, and can be shared by multiple mobs without the need of duplicating it.
You can make any number of files in the DropTables folder, and they can be named anything you like as long as the file ends in `.yml`. You can make any number of files in the DropTables folder, and they can be named anything you like as long as the file ends in `.yml`.
Drop Tables can be nested - a Drop Table can contain multiple other Drop Tables. Drop Tables can be nested - a Drop Table can contain multiple other Drop Tables.
```yaml ```yaml
internal_mobname: internal_mobname:
Type: <mobtype> Type: <mobtype>
Drops: Drops:
- <internal_droptablename> - <internal_droptablename>
``` ```
The structure of a fully-configured drop table looks like this: The structure of a fully-configured drop table looks like this:
```yaml ```yaml
#Lets you specify exactly how many items will drop from this table #Lets you specify exactly how many items will drop from this table
internal_droptablename: internal_droptablename:
TotalItems: <amount> TotalItems: <amount>
MinItems: <amount> #defaults to TotalItems' value MinItems: <amount> #defaults to TotalItems' value
MaxItems: <amount> #defaults to TotalItems' value MaxItems: <amount> #defaults to TotalItems' value
BonusLuckItems: <multiplier> BonusLuckItems: <multiplier>
BonusLevelItems: <multiplier> BonusLevelItems: <multiplier>
BiasStat: <stat> BiasStat: <stat>
#Conditions of the dropper #Conditions of the dropper
Conditions: Conditions:
- condition 1 - condition 1
- condition 2 - condition 2
- ... - ...
#Conditions of the person that triggered the drop (i.e. the killer of the mob) #Conditions of the person that triggered the drop (i.e. the killer of the mob)
TriggerConditions: TriggerConditions:
- condition 1 - condition 1
- ... - ...
Drops: Drops:
- <item/exp/droptable> <amount> <chance> - <item/exp/droptable> <amount> <chance>
- ... - ...
``` ```
## DropTable Options ## DropTable Options
> In the descriptions below "drop" identifies a single "drop line" and not the actual amount of items the drop generates. So, if you have a drop like `bone 5`, despite generating 5 bone items, the drop counts as a single drop, as it was generated by a single "drop line" > In the descriptions below "drop" identifies a single "drop line" and not the actual amount of items the drop generates. So, if you have a drop like `bone 5`, despite generating 5 bone items, the drop counts as a single drop, as it was generated by a single "drop line"
**TotalItems: \[number\]** **TotalItems: \[number\]**
- Defines exactly how many drops the table will generate - Defines exactly how many drops the table will generate
- Setting this causes item chances to be calculated as weights - Setting this causes item chances to be calculated as weights
**MaxItems: \[number\]** **MaxItems: \[number\]**
- Defines a maximum number of drops that will generate - Defines a maximum number of drops that will generate
- If only this is set, drops will run down the list unless the maximum number of items is reached - If only this is set, drops will run down the list unless the maximum number of items is reached
**MinItems: \[number\]** **MinItems: \[number\]**
- Defines a minimum number of drops that will generate - Defines a minimum number of drops that will generate
- If only this is set, drops will run down the list until the minimum items is reached - If only this is set, drops will run down the list until the minimum items is reached
- If you enable **both** ```MinItems``` and ```MaxItems```, the chances for each table entry will become *weights* instead. - If you enable **both** ```MinItems``` and ```MaxItems```, the chances for each table entry will become *weights* instead.
**BonusLevelItems: \[number\]/\[range\]** **BonusLevelItems: \[number\]/\[range\]**
- A modifier on the number of drops generated based on the mob's level - A modifier on the number of drops generated based on the mob's level
- Can be set as a range, i.e. ```0.2to0.5``` - Can be set as a range, i.e. ```0.2to0.5```
- Works like:```amount = amount + (mob_level * bonus_level_items)``` - Works like:```amount = amount + (mob_level * bonus_level_items)```
- Requires that```TotalItems```, ```MinItems```, or ```MaxItems``` are set on the table - Requires that```TotalItems```, ```MinItems```, or ```MaxItems``` are set on the table
**BonusLuckItems: \[number\]/\[range\]** **BonusLuckItems: \[number\]/\[range\]**
- A modifier on the number of drops generated based on the killer's luck stat - A modifier on the number of drops generated based on the killer's luck stat
- Can be set as a range, i.e. ```0.15to8``` - Can be set as a range, i.e. ```0.15to8```
- Works with Luck attribute, Luck-based enchants/curses, and Luck potion effects - Works with Luck attribute, Luck-based enchants/curses, and Luck potion effects
- Works like: ```amount = amount + (luck * bonus_luck_items)``` - Works like: ```amount = amount + (luck * bonus_luck_items)```
- Requires that ```TotalItems```, ```MinItems```, or ```MaxItems``` are set on the table - Requires that ```TotalItems```, ```MinItems```, or ```MaxItems``` are set on the table
**BiasStat: \[Stat\]** **BiasStat: \[Stat\]**
- The [stat](/Stats) to use for this item's Loot Bias - The [stat](/Stats) to use for this item's Loot Bias
- Loot Bias increases the rare drop chances of Weighed DropTables - Loot Bias increases the rare drop chances of Weighed DropTables
- A value of 0 would make no changes, a value of 100 would make rare drops roughly twice as likely - A value of 0 would make no changes, a value of 100 would make rare drops roughly twice as likely
- Defaults to the `LOOT_BIAS` stat - Defaults to the `LOOT_BIAS` stat
### Examples ### Examples
This mob will always drop a bunch of experience and some rotten flesh, This mob will always drop a bunch of experience and some rotten flesh,
but is also using a droptable which is described further below. but is also using a droptable which is described further below.
```yaml ```yaml
snow_loving_zombie: snow_loving_zombie:
Type: zombie Type: zombie
Health: 100 Health: 100
Equipment: Equipment:
- snowsword:0 - snowsword HAND
Drops: Drops:
- exp 75-125 1 - exp 75-125 1
- rare_snowsword_droptable - rare_snowsword_droptable
``` ```
This example is a droptable that has a 5 % chance of dropping a custom This example is a droptable that has a 5 % chance of dropping a custom
sword, but only if the mob is killed in an "ICE\_PLAINS" biome and if a sword, but only if the mob is killed in an "ICE\_PLAINS" biome and if a
player is within 20 blocks. player is within 20 blocks.
```yaml ```yaml
rare_snowsword_droptable: rare_snowsword_droptable:
Conditions: Conditions:
- biome{b=ICE_PLAINS} - biome{b=ICE_PLAINS}
- playerwithin{d=20} - playerwithin{d=20}
Drops: Drops:
- snowsword 1 0.05 - snowsword 1 0.05
``` ```
In this example, the DropTable would drop 5 gold/diamonds if the player In this example, the DropTable would drop 5 gold/diamonds if the player
has no Luck, and 15-27 gold/diamonds if the player has a Luck V effect. has no Luck, and 15-27 gold/diamonds if the player has a Luck V effect.
```yaml ```yaml
LuckyDroptable: LuckyDroptable:
TotalItems: 5 TotalItems: 5
BonusLuckItems: 2to5 BonusLuckItems: 2to5
Drops: Drops:
- GOLD_NUGGET 1 1 - GOLD_NUGGET 1 1
- DIAMOND 1 0.2 - DIAMOND 1 0.2
``` ```
## Equipment Droptables ## Equipment Droptables
It is also possible to use droptables to configure equipment setups. This type of droptables can be used either directly in the [Equipment element](/Mobs/Mobs#equipment) of the mob or by using the [Equip mechanic](/skills/mechanics/equip). It is also possible to use droptables to configure equipment setups. This type of droptables can be used either directly in the [Equipment element](/Mobs/Mobs#equipment) of the mob or by using the [Equip mechanic](/skills/mechanics/equip).
The syntax itself is similar to the one of a "normal" droptable, except, in this case, it's necessary to specify an equipment slot. The syntax itself is similar to the one of a "normal" droptable, except, in this case, it's necessary to specify an equipment slot.
### Examples ### Examples
```yaml ```yaml
# Droptable Config # Droptable Config
Example_EquipmentDropTable: Example_EquipmentDropTable:
Drops: Drops:
- LEATHER_HELMET HELMET 1 1 - LEATHER_HELMET HELMET 1 1
- LEATHER_CHESTPLATE CHEST 1 1 - LEATHER_CHESTPLATE CHEST 1 1
- CHAINMAIL_CHESTPLATE CHEST 1 0.5 - CHAINMAIL_CHESTPLATE CHEST 1 0.5
- DIAMOND_CHESTPLATE CHEST 1 0.1 - DIAMOND_CHESTPLATE CHEST 1 0.1
- NETHERITE_CHESTPLATE CHEST 1 0.05 - NETHERITE_CHESTPLATE CHEST 1 0.05
``` ```
```yaml ```yaml
# Mob Config # Mob Config
ExampleMob: ExampleMob:
Type: ZOMBIE Type: ZOMBIE
Equipment: Equipment:
- Example_EquipmentDropTable - Example_EquipmentDropTable
``` ```
These configurations will allow `ExampleMob` to These configurations will allow `ExampleMob` to
- always have a leather helmet - always have a leather helmet
- always have at least a leather chestplate, while having something more powerful if the chance is met - always have at least a leather chestplate, while having something more powerful if the chance is met
\ No newline at end of file