forked from nisovin/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 72
MagicXp
JasperLorelai edited this page Aug 2, 2026
·
1 revision
Magic Schools or MagicXP is a feature by which casting spells lets a player earn a value named "magic xp".
- MagicXp is stored in the
MagicSpells/expdirectory every minute, saved on quit; loaded on plugin reload or player join. Ifgeneral.ymlhasseparate-player-spells-per-world, then schools are per world. - The MagicXp value can be compared using modifier conditions:
-
magicxpabove, with the formatschool1:amount1,school2:amount2,...(e.g.magicxpabove cool-school:5 require) -
magicxpbelow, with the formatschool1:amount1,school2:amount2,...(e.g.magicxpbelow cool-school:10 require)
-
If magic-xp-auto-learn is enabled, whenever the player casts a spell, an amount of XP is granted to the schools listed in the spell's xp-granted list. The plugin will look for all spells which list that school in xp-required, and if the player has enough XP to learn that spell, as configured, the player will learn it.
In general.yml:
| Option | Description | Type | Default |
|---|---|---|---|
enable-magic-xp |
If enabled, MagicXP will be enabled. | Boolean | false |
str-xp-header |
Message sent wwhen /ms magicxp is executed, this line is sent first as the "header". Then, str-no-xp is sent if the player has no xp, or all Magic Schools and the player's Xp in them is printed. |
Rich Text | Empty |
str-no-xp |
Message send when /ms magicxp is executed and the player has no xp. |
Rich Text | Empty |
magic-xp-auto-learn |
Earning XP will let the player auto-learn spells. | Boolean | false |
str-xp-auto-learned |
Message sent if magic-xp-auto-learn is enabled, and a spell was learned due to earning enough required MagicXp. Additional placeholder %s can be used to return the spell's name in the message. |
Rich Text | "You have learned the %s spell!" |
Under magic-schools section, specify Magic Schools, by specifying:
- The section key, used as the internal MS name for a school.
- The value, which will be the stylised name and colored name of the school.
Example:
magic-schools:
cool-school: "<aqua>Cool School"
fire-school: "<red>Fire School"Configure spells to award Magic XP upon successful cast. Awarding XP can be configured to auto-learn spells. Use the following spell options:
-
xp-requiredlist which configures how much XP the player needs to have in other schools before casting this spell would be able to reward xp in thexp-grantedlist. -
xp-grantedlist which configures how much XP the player is granted, if they have enough XP in schools configured byxp-required.
Example:
some-spell:
# . . .
xp-required:
- cool-school 3
xp-granted:
- fire-school 1