Item generation templates are the base items used to generate random items. They have a list of base item stats which defines how the default item with no modifier looks, and a list of modifiers which can make the item more powerful based on its rarity.
LONG_SWORD:
# Basic template information
type: SWORD
# Base item data
base:
material: IRON_SWORD
name: '&fLong Sword'
attack-speed: 1.6
attack-damage:
base: 6
scale: 1.2
required-level:
base: 0
scale: 1
The base
config section corresponds to the base item stats. For example, this config sets the item base attack damage to 6 + 1.2 * <level>
where is the selected item level. The base item is also an iron sword which name is Long Sword
, and so on. The stat format for the base
config section is the same as in the /MMOItems/item
Random Stat Data Format
Item generation templates can be found under the /MMOItems/generator/items
folder. You may add as many YML configs as you want in that folder to sort your templates.
Numeric Stats
Number based item statistics like armor/atk damage/... all scale according to the item level. However, so that items with the same level do not have the exact same stat values, a slight random offset is applied to each stat independently of the other stat offsets.
ITEM_TEMPLATE:
base:
projectile-damage:
base: 10
scale: 3
spread: 0.1
max-spread: 0.3
First of all, the base
option defines the default stat value for a level 0 item. The scale
option indicates that this flat value is increased by 3 for every item level, e.g a lvl 12 item will have 10 + 10 * 3 = 40%
projectile damage.
The spread
option defines how much the stat value fluctuates around that average (42% in the example above). Setting it to 0.1 corresponds to a standard deviation of 10% relative to the stat value. Roughly speaking, the stat value will receive a +/- 10% random offset in average.
The max-spread
defines the maximum offset of the stat value around the average value. Setting it it 0.3 is reasonable, because that would mean the stat value will fluctuate between 70% and 130% of the average value.
If you do not want to apply that random fluctuation to stat values, leave these options to 0 (or just remove them from your stat config section). Standard deviation/max deviation is set to 0% by default.
If you want a stat value entirely independant of the item level, this format works too:
ITEM_TEMPLATE:
base:
attack-speed: 1.7