Project MMO: Iron's Spellbooks Compat (backport)
About the Mod
This compatibility modification allows configuring skill requirements for casting spells using datapacks. If a character's level doesn't meet the set conditions, they won't be able to use the corresponding spell. You can set different requirements for each spell level. Settings can be applied separately for scrolls, spellbooks, and/or enchanted swords, and you can also establish restrictions on adding spells to the spellbook.
/reload
{
"requirements": {},
"default_requirements": {},
"sources": [
"scroll",
"spellbook",
"sword",
"inscribe"
],
"replace": true
}
Skill Requirement Configuration
{
"requirements": {
"1": {},
"2": { "combat": 5},
"3": { "combat": 15},
"4": { "combat": 25},
"5": { "combat": 50}
},
"default_requirements": {
"combat": 10,
"charisma": 2
},
"sources": [
"scroll",
"spellbook",
"sword",
"inscribe"
],
"replace": true
}
Multiple Requirement Application
{
"requirements": {
"1": {},
"2": { "archery": 5, "combat": 5},
"3": { "archery": 15, "combat": 15},
"4": { "archery": 25, "combat": 25, "charisma": 25},
"5": { "archery": 50, "combat": 50, "charisma": 50, "alchemy": 50}
},
"default_requirements": {
"combat": 10,
"charisma": 2
},
"sources": [
"scroll",
"spellbook",
"sword",
"inscribe"
],
"replace": true
}
Getting Started
After loading into the world, use the command /pmmo_irons_compat genSpellData to create the necessary datapack with skill settings. The datapack will appear in the \curseforge\minecraft\Instances[instance name]\saves[world]\datapacks folder where you can modify all required parameters.
Possible application sources for requirements (fields sources):
- scroll — for scrolls
- spellbook — for spellbooks
- sword — for swords
- inscribe — for inscribing into books
If you exclude any of these sources, there will be no corresponding skill level requirements.
Important: This version doesn't support the magic skill (magic) as in the 1.20.1 version, since the damage type system in datapacks only appeared in version 1.19.4. Iron's Spells 'n Spellbooks give experience points in the "combat" and "endurance" categories regardless of specific spell requirements.