MMOUpgrade custom stats
MMOUpgrade registers custom stats into MMOItems at startup. Add them to MMOItems item configs, then regenerate or give the item again.
Registered Stats
| Stat ID | Type | License | Purpose |
|---|---|---|---|
MMOUPGRADE_LEVEL | Double | Free/Premium | Stores the current upgrade level. |
MMOUPGRADE_MAX_LEVEL | Double | Premium | Overrides max-level for one item. |
MMOUPGRADE_ENABLED | Boolean | Premium | Allows the item to be upgraded even when its type is not in allowed-types. |
MMOUPGRADE_STONE_CHANCE | String | Premium | Formula that replaces the upgrade stone chance. |
MMOUPGRADE_LUCKY_CHANCE | String | Premium | Formula that replaces the lucky charm chance. |
MMOUPGRADE_PROTECT_CHANCE | String | Premium | Formula for the protect charm's actual downgrade-prevention chance. |
stat-registration.yml Example
stats:
level:
id: MMOUPGRADE_LEVEL
material: EMERALD
name: "MMOUpgrade Level"
description:
- "Upgrade level stored by MMOUpgrade."
compatible-types:
- "!block"
- "all"
max-level:
id: MMOUPGRADE_MAX_LEVEL
material: DIAMOND
name: "Upgrade Max Level"
description:
- "The max level this item can be upgraded to."
compatible-types:
- "!block"
- "all"
enabled:
id: MMOUPGRADE_ENABLED
material: EMERALD
name: "Upgrade Enabled"
description:
- "Can this item be upgraded?"
compatible-types:
- "!block"
- "all"
Example on an MMOItems Item
# Conceptual example inside an MMOItems item config
MMOUPGRADE_MAX_LEVEL: 50
MMOUPGRADE_ENABLED: true
MMOUPGRADE_STONE_CHANCE: "100 - ({level} * 5)"
MMOUPGRADE_LUCKY_CHANCE: "10 + ({level} * 1)"
MMOUPGRADE_PROTECT_CHANCE: "80"
Formula: use
{level} for the current level. For example, 100 - ({level} * 5) gives 100% at level 0 and 50% at level 10 before bonuses and caps.