Modifiers let you randomize your items even more using the item generator. Modifiers are packets of item stats which have some chance to be added to an item when it is being generated.
A typical modifier for a randomized weapon would be for instance Sharp
which would add +3 Atk Damage to the weapon or Toxic
which would add an on-hit poison ability to the weapon. Some modifiers are more powerful than others and therefore should have a different chance to be selected. Some modifiers should even be obtainable only for a certain item tier.
When creating a generation template, you need to specify a modifier list:
# Example item
LONG_SWORD:
type: SWORD
base: ...
# Modifiers which have a chance to be rolled
modifiers:
# First modifier
sharp:
weight: 2.5
prefix: '&fSharp'
stats:
attack-damage: 3
lore:
- '&7Much sharper!'
# Second modifier
fiery:
weight: 5
prefix:
format: '&cFiery'
priority: 1
stats:
ability:
on-hit:
type: burn
mode: on_hit
As seen on the [General|Item-Generator] page, one item can be generated with multiple modifiers. A modifier is defined by four options: its selection chance, its modifier weight, its stat list and its prefix/suffix.
Prefixes/suffixes
When a modifier is selected during item generation, its suffix/prefix is automatically applied to the item. If multiple prefixes/suffixes are added, MMOItems only keeps the prefixes/suffixes with the higher priority, e.g an item which has Sharp
with prefix priority 0 (because 0 by default) and Fiery
with prefix priority 1 will only display Fiery
. If you don't want to use the prefix/suffix priority system, just define the prefix/suffix using this format:
modifier:
prefix: '&fSharp'
instead of
modifier:
prefix:
format: '&fSharp'
priority: <integer-needed>
Weight
The modifier weight is the amount of capacity deduced to the generated item when the modifier is applied to this item. If your item has 5 modifier capacity, it won't be able to receive a modifier with weight 6. Since modifier capacity is directly determined by the item's tier, some tiers just cannot have specific modifiers.
modifier:
weight: 5
Selection Chance
This is a smaller option to balance your modifiers. You can setup modifiers so that, even if the generated item has enough modifier capacity to receive the modifier, there is still a X% chance that the modifier will not apply. Use the following format:
modifier:
chance: .1 # Corresponds to a 10% selection chance
Modifier Stats
These are the stats which will be applied to the item, if the modifier is selected, i.e if the generated item has enough modifier capacity and if the modifier selection chance test was successful. The format used here to define what stats are added is the exact same as the format used to define the base item data of an [item generation template|Item-Generator-Template].
toxic:
prefix: '&2Toxic'
stats:
ability:
on-hit:
type: poison
type: on-hit