promotional bannermobile promotional banner

Project MMO: Iron's Spellbooks Compat (backport)

A backported addon for Project MMO

About:

This compatability mod allows you to add skill requirements to spells using datapacks. If a player doesn't meet the requirements then they can't cast the spell. It allows you to specify requirements on a per spell level basis as well. These requirements can be configured to only apply when casting from scrolls, spellbooks, and/or swords. You can also make it so these requirements prevent players from inscribing the spell into their spellbook entirely. There is also a config that allows you to award xp to a player when their spell heals another player. This enables healers/priest archetypes to actually be able to level a skill while supporting other players.

NOTE: There is no real support for the magic skill afaik, as that is for 1.20.1. This is just a backport.
I may continue on the mod in the future, but don't count on it.

Credit goes to the original mod creator, Silvertide

Original addon for 1.20.1 can be found here


Guide:

As soon as you load into your world, use the command /pmmo_irons_compat genSpellData to generate the datapack required to change the skill settings of the mod.

The datapack will appear in \curseforge\minecraft\Instances\(instance name)\saves\(world)\datapacks
and will contain everything you need. An easy way to access it from in-game is to press esc, then click on "Mods", then "Open mods folder" and navigate to your saves folder from there.

The .json files will look like this:
{
  "requirements": {},
  "default_requirements": {},
  "sources": [
    "scroll",
    "spellbook",
    "sword",
    "inscribe"
  ],
  "replace": true
}
and can be altered to give the desired requirements to your spells.

Here is an example you may use as a template:
{
  "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
}

The "requirements" section allows you to set requirements for specific spell levels. In the code I provided, level 1 spells has no requirements in order for you to cast them. The "requirements" section also overrides the "default_requirements" for level 1 spells with this configuration.
Any other spell level that doesn't have set requirements, will require you to be level 10 combat and level 2 charisma. You can have spells require multiple level requirements at a time, as an example for spells you would use with a bow could be combined with "archery".
You can add as many skill level requirements as you want for any spell level.

Example for "requirements" with multiple skill level requirements:
{
  "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
}

The "sources" section allows you to specify when the requirements are needed.
As an example, if you were to remove the "inscribe" from underneath sources, you would have no level requirements in order to inscribe something.

The "replace" section is purely for datapack compatibility. If there are other datapacks changing anything related to the spells, then having it set to "replace": true will override anything that was loaded before this datapack generated by the mod. If multiple datapacks have this, the datapack that loads last will be the one to override.

The "default_requirements" sections isn't required to be included. If you only want the configured spell to have the same requirement across all levels, remove "requirements" and only use "default_requirements". Don't delete the "sources" section, as that is essentially what makes the entire .json work. If you don't want a spell to have level requirements, delete the .json instead.

Do note that instead of "magic" like in the 1.20.1 version of this addon, it's "combat" since datapack support for damage types first were added in 1.19.4, meaning that spells share XP with regular combat skills.
You could eventually replace "combat" with any skill name, but you will get only combat and endurance XP when you kill something with spells from Iron's Spells 'n Spellbooks regardless of the skill requirements on a spell.

After you've configured the .json files to your liking, save it and use the command /reload in-game to make the changes take effect.

The Project MMO: Iron's Spellbooks Compat (backport) Team

profile avatar
  • 5
    Projects
  • 2.6K
    Downloads

More from ZahkrosisView all

  • Othala Client project image

    Othala Client

    • 14
    • Modpacks

    A steampunk fantasy server pack with plenty of mods for combat, building, tech, and exploration - not quite suited to be played alone.

    • 14
    • May 22, 2026
    • Modpacks
    • +4
  • Divine Bean SMP project image

    Divine Bean SMP

    • 306
    • Modpacks

    Embark in a vast magical world where you can fulfill your medieval fantasies, be it building a decked out castle and cast spells to defend it from dragons, or perform dark rituals to make a zombie army to do it for you. Join us on the server!

    • 306
    • July 28, 2024
    • Modpacks
    • +3
  • Zahk's RPG Origins project image

    Zahk's RPG Origins

    • 632
    • Mods

    Adds new custom origins to the Origins (Forge) mod, while removing the original origins.

    • 632
    • June 22, 2024
    • Mods
  • ZMCRP Pixelmon Modpack project image

    ZMCRP Pixelmon Modpack

    • 230
    • Modpacks

    An immersive collection of mods used on the ZMCRP Server.

    • 230
    • June 16, 2023
    • Modpacks
    • +3
  • Othala Client project image

    Othala Client

    • 14
    • Modpacks

    A steampunk fantasy server pack with plenty of mods for combat, building, tech, and exploration - not quite suited to be played alone.

    • 14
    • May 22, 2026
    • Modpacks
    • +4
  • Divine Bean SMP project image

    Divine Bean SMP

    • 306
    • Modpacks

    Embark in a vast magical world where you can fulfill your medieval fantasies, be it building a decked out castle and cast spells to defend it from dragons, or perform dark rituals to make a zombie army to do it for you. Join us on the server!

    • 306
    • July 28, 2024
    • Modpacks
    • +3
  • Zahk's RPG Origins project image

    Zahk's RPG Origins

    • 632
    • Mods

    Adds new custom origins to the Origins (Forge) mod, while removing the original origins.

    • 632
    • June 22, 2024
    • Mods
  • ZMCRP Pixelmon Modpack project image

    ZMCRP Pixelmon Modpack

    • 230
    • Modpacks

    An immersive collection of mods used on the ZMCRP Server.

    • 230
    • June 16, 2023
    • Modpacks
    • +3