Skip to content

9. Legacy Information & JSON Formats

CAS_ual_TY edited this page Jul 5, 2023 · 1 revision

Spells & Shields LEGACY

Quick Guides

Locate Configuration Files

Configuration files are in your .minecraft/config/spells_and_shields/ folder (unless differently set in the profile). To get there (on Windows only), type %appdata% in the address field of the Explorer and hit enter. If you see a Roaming folder open it. Now you should see and have located the .minecraft folder.

Edit Spell Trees

Open the common.toml configuration file. Now change the following values:

  • Set loadSpellTrees to true
  • Set createDefaultSpellTrees to true
  • Set addDefaultSpellTrees to false

Now start the game and close it again. The files are now generated inside the config/spells_and_shields/spell_trees/ folder and can be edited. They will be active on the next start of the game.

Configure Spells

Open the common.toml configuration file. Now change the following values:

  • Set loadSpells to true
  • Set createSpells to true

Now start the game and close it again. The files are now generated inside the config/spells_and_shields/spells/ folder and can be edited. They will be active on the next start of the game.

Make Effect Spells Permanent

Make sure you are able to Edit Spell Trees. Manually open each spell tree file and change any occurence of temporary_<effect> to permanent_<effect>, eg. change spells_and_shields:temporary_haste to spells_and_shields:permanent_haste

Json Formats

JSON formats are explained here. The basics of JSON are not included, there are enough tutorials you can find on Google. JSON Arrays may always be empty unless otherwise stated.

Spell Trees

Tree Base

Format:

{
  "id": "<UUID>",
  "title": Component,
  "icon_spell": "<Spell ID>",
  "requirements": [ Requirement ],
  "root": Node
}

Elements:

  • id: A universally unique identifier for the spell tree. May not conflict with other spell trees. To generate UUIDs use this tool: https://www.uuidgenerator.net/
  • title: Minecraft component. Can be plain text or translatable (with lang key in the lang file, eg. en_us). Look at examples or check out the wiki page: https://minecraft.fandom.com/wiki/Raw_JSON_text_format
  • icon_spell: The spell used for the tree tab icon. The spell does not have to be part of the tree.
  • requirements: The requirements a player must pass to be able to have access to and see the spell tree tab.
  • root: Root node (spell) of the tree. Deeper nodes are children of the root node.

Node

Format:

{
  "spell": "<Spell ID>",
  "levelCost": Integer,
  "requirements": [ Requirement ],
  "children": [ Node ]
}

Elements:

  • spell: The spell of this node.
  • levelCost: The amount of experience levels required to and consumed when learning this spell.
  • requirements: Requirements the player must pass in addition to the level cost to be able to learn this spell.
  • children: Any amount of children nodes deeper in the tree.

Requirement

Format:

{
  "type": "<Requirement ID>",
  ...
}

Elements:

  • type: The requirement.
  • ...: Additional requirement settings.
  • See Requirement Types for a list of options.

Requirement Types

Bookshelves

Format:

{
  "type": "spells_and_shields:bookshelves",
  "bookshelves": Integer
}

Elements:

  • type: "spells_and_shields:bookshelves" (do not change).
  • bookshelves: The amount of required bookshelves around the Enchanting Table. Max is 32 but it is recommended not to go above 30.

Advancement

Format:

{
  "type": "spells_and_shields:advancement",
  "advancement": "<Advancement ID>"
}

Elements:

  • type: spells_and_shields:advancement (do not change).
  • advancement: The advancement the player must achieve.

Example:

{
  "type": "spells_and_shields:advancement",
  "advancement": "minecraft:nether/return_to_sender"
}

Item

Format:

{
  "type": "spells_and_shields:item",
  "item": "<Item ID>",
  "count": Integer,
  "consume": Boolean
}

Elements:

  • type: spells_and_shields:item (do not change).
  • item: The required item.
  • count: The required amount of said item.
  • consume: If this requirement is set in a node of a spell tree the item will be consumed when said node is learned.

Example:

{
  "type": "spells_and_shields:item",
  "item": "minecraft:dragon_egg",
  "count": 1,
  "consume": false
}

Clone this wiki locally