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 Generator Templates

Last edited by Indyuce Apr 14, 2020
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Item Generator Templates

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 config files with a few exceptions (see [Random Stat Data Format|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, we have a 10% flat projectile damage, plus 3% for every item level, e.g a lvl 12 item will have in average 42% 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 independant of the item level, this works too:

ITEM_TEMPLATE:
    base:
        attack-speed: 1.7
Clone repository

  • Home
  • Installation Guide

General

  • Item Types
  • Item Stats & Options
  • Item Creation

Features

  • Mitigation
  • Elemental Damage
  • Item Identification
  • Item Tiers
  • Gem Stones
  • Custom Durability
  • Item Sets
  • Item Upgrading
  • Soulbound

Crafting Stations

  • Crafting Stations
  • Upgrading Recipes
  • Recipe Conditions
  • Recipe Ingredients
  • Recipe Triggers

Item Management

  • Item Updater
  • Item Drop Tables

Item Generator

  • General
  • Templates
  • Modifiers

Abilities

  • Abilities
  • Ability List

Compatibility & API

  • Supported Plugins
  • Custom Item Textures
  • Plugin API