Per-World Rules
Scope XP, abilities, combat, and skills per world
Overview
Per-World Rules let a server owner change how MMO Skill Tree behaves in a specific world, matched by world name. A rule can scale or switch off XP, turn off the whole ability layer (and its on-screen HUDs), switch weapon combat to vanilla, and disable specific skills. It is built for a lobby, a story instance, or a dungeon world that should not earn the same XP and bonuses as the open world.
mods/mmoskilltree/world-rules.jsonContent packs ship rules under Server/MMOSkillTree/WorldRules/*.json.
Name Matching
Each rule carries a Match pattern checked against the world name (world/WorldRulesMatcher.java). Four pattern forms are available; the single best match wins (precedence detailed below the list):
- Exact name -
"Lobby"matches only the world named Lobby - Prefix - a trailing
*, e.g."Dungeon_01_*", matches a whole family of instanced worlds (Dungeon_01_a3f9,Dungeon_01_77b2, etc.) - Suffix Since 1.5.1 - a leading
*, e.g."*_Arena", matches any world NAME ENDING in that text - Contains Since 1.5.1 - leading AND trailing
*, e.g."*Dungeon*", matches any world name containing that text anywhere - Bare
"*"- a catch-all default applied to any world with no more specific match - No rule - a world that matches nothing is fully unrestricted (full MMO)
Matching is case-insensitive, and * is the only metacharacter (only meaningful at the ends of the pattern). Exact wins outright. Otherwise, among every prefix/suffix/contains rule that matches, the one with the longest literal core wins regardless of which of the three forms it is (a longer suffix core beats a shorter prefix core); ties break toward the more anchored form (prefix, then suffix, then contains). The bare "*" catch-all only applies when no prefix/suffix/contains rule matches, and the built-in unrestricted default applies when nothing matches at all.
Instanced worlds need suffix or contains, not prefix
Dungeon_01_a3f9. A prefix-only rule like "Dungeon_01_*" still works there since the prefix is fixed, but a world whose variable part comes FIRST (a random-prefixed, fixed-suffix instance) needs a suffix pattern ("*_Dungeon_01") or a contains pattern to match at all. This was the actual 1.5.1 fix: some instanced-world naming schemes could not be matched by prefix alone.What a Rule Controls
| Field | Effect |
|---|---|
XpMultiplier | Scales all skill XP gained in the world. 1.0 is unchanged, 0.0 turns XP off entirely, 0.5 halves it, 2.0 doubles it. A negative value is clamped to 0.0. |
AbilitiesEnabled | One combined switch for the whole ability layer. When false, ability casting is blocked silently (the cast item just behaves like a normal item, with no per-keypress nagging) and the ability-cooldown and quest-tracker HUDs are hidden. |
CombatBonusesEnabled | The MMO weapon-combat layer fed by skill-tree nodes and mastery (crit, lifesteal, flat and percent damage, combo finisher, defense and fall reduction). When false, weapon combat runs vanilla in the world (base damage only). Ability casting and XP are untouched. |
StatBonusesEnabled Since 1.5.1 | Independent from CombatBonusesEnabled: strips a player's persistent stat modifiers (skill-tree STAT_HEALTH/STAT_STAMINA/STAT_MANA rewards, mastery stat sacrifices, class passives) on world entry and restores them on exit. Default true. Where CombatBonusesEnabled only affects damage-time math, this affects standing max-HP/stamina/mana and similar persistent grants. |
DisabledSkills | Skill ids whose XP is blocked in the world, on top of any globally disabled skills. A deny-list that only restricts further; it can never re-enable a globally disabled skill. |
EnabledSkills | An optional XP allow-list. When non-empty, only these skill ids gain XP in the world and every other skill is treated as disabled. Empty means there is no allow-list. |
File Structure
The file is a master switch plus a map of named rules. Each rule is keyed by an id of your choosing (its Match pattern is the actual selector):
{
"schemaVersion": 1,
"enabled": true,
"rules": {
"lobby": {
"Match": "Lobby",
"XpMultiplier": 0.0,
"AbilitiesEnabled": false,
"CombatBonusesEnabled": false,
"StatBonusesEnabled": false
},
"dungeons": {
"Match": "Dungeon_01_*",
"XpMultiplier": 2.0,
"DisabledSkills": ["mining", "woodcutting"]
},
"arena_instances": {
"Match": "*_Arena",
"EnabledSkills": ["artillery", "defense"],
"AbilitiesEnabled": false,
"CombatBonusesEnabled": false
}
}
}schemaVersion- Config format version (do not change)enabled- Master kill-switch. Whenfalse, every world resolves to the unrestricted default and no rule appliesrules- Your named rules, keyed by id
The matching rules for that example: the Lobby world earns no XP, casts no abilities, fights with vanilla weapons, and strips persistent stat bonuses. Any Dungeon_01_ instance world doubles XP but trains neither Mining nor Woodcutting. Any world whose name ENDS in _Arena (matched by the suffix pattern, so it covers generated arena instances regardless of prefix) is a combat sandbox - only Artillery and Defense gain XP, with abilities and combat bonuses off. Every other world is unaffected.
Omitting Fields
Every field is optional and defaults to the unrestricted value, so a rule only needs to spell out what it changes:
XpMultiplier- defaults to1.0(unchanged)AbilitiesEnabled- defaults totrueCombatBonusesEnabled- defaults totrueStatBonusesEnabled- defaults totrueDisabledSkills/EnabledSkills- default to empty (no restriction)
Skill ids are case-insensitive and use the internal id, not the display label. The in-game "Block" skill, for example, is
defensein config. Disabling a skill blocks only its XP gain in that world; existing levels and unlocks are untouched.
Validation
Run /mmoconfig validate to audit your rules. The world_rules domain flags a blank or duplicate Match pattern, an unknown id in a disabled or allowed skill list, and a skill listed in both EnabledSkills and DisabledSkills (the deny-list wins in that case). A clean validate means every world resolves to the rule you intended.
Best Practices
- Use a
Name_*prefix for any world that spawns with a random suffix (instances, raid arenas, generated dungeons) so one rule covers the whole family at once - For a pure lobby or hub, set
XpMultiplierto0.0and both toggles tofalseso it stays quiet and cosmetic - Prefer
EnabledSkillsover a longDisabledSkillswhen only a couple of skills should be active - "only Artillery and Defense" is two ids instead of a deny-list of every other skill - Toggle
enabledtofalseto disable all per-world rules at once without deleting them, then back on to restore - Back up
world-rules.jsonbefore major changes