-
Notifications
You must be signed in to change notification settings - Fork 0
6. Spell Trees JSON Formats
CAS_ual_TY edited this page Jan 20, 2024
·
5 revisions
WIP
WIP
JSON Format:
Elements:
-
t1/title: The name of the spell tree. -
t2/icon: The icon used for the tab of this spell tree (see Spells Format). -
t3/root_node: The root spell of this tree.
JSON Format:
{
"n1/spell_id": String,
"n2/node_id": Optional Integer,
"n3/node_frame": Optional Integer,
"n4/level_cost": Integer,
"n5/hidden_requirements": [
Optional Requirements...
],
"n6/learn_requirements": [
Optional Requirements...
],
"n7/mana_cost": Optional Double,
"n8/spell_parameters": [
Optional Variables...
],
"n9/child_nodes": [
Spell Nodes...
]
}Elements:
-
n1/spell_id: The id of the spell this node unlocks when learning it. -
n2/node_id(Optional): A unique integer within this spell tree to identify this spell node. The value must be between1and4294967295(both inclusive). This is optional and can be left out entirely. -
n3/node_frame(Optional): The background frame used in the spell tree, eg.0= advancement,1= challenge,2= goal (see the frames here: https://minecraft.fandom.com/wiki/Advancement). This is optional and can be left out entirely (default is0). -
n4/level_cost: The amount of xp levels this spell costs to learn. -
n5/hidden_requirements(Optional): All requirements you must fulfill to be able to see this spell in the spell tree and to be able to learn it. This is optional and can be left out entirely. -
n6/learn_requirements(Optional): All requirements you must fulfill to be able to learn this spell. This is optional and can be left out entirely. -
n7/mana_cost(Optional): The spell's mana cost can be overridden by setting this field to a value greater than or equal0. This is optional and can be left out entirely. -
n8/spell_parameters(Optional): The spell's parameters can be overridden by setting the same ones (same name and type) here with different values. This is optional and can be left out entirely. -
n9/child_nodes: Children nodes of this node in the tree.
WIP See Spells JSON Formats
All types of requirements for spell nodes in spell trees usable for both hidden requirements and learn requirements.
JSON Format:
{
"type": "spells_and_shields:bookshelves",
"bookshelves": Integer
}Elements:
-
bookshelves: The amount of bookshelves required.
JSON Format:
{
"type": "spells_and_shields:advancement",
"advancement": String
}Elements:
-
advancement: The required advancement ID, eg."minecraft:end/root".
JSON Format:
{
"type": "spells_and_shields:item",
"item": Item,
"consume": Boolean
}Elements:
-
item: The item you have to carry in your inventory in order to be able to learn this spell -
consume: Whether or not to consume to item when the spell is learned
You must have a different spell of a certain spell tree learned to pass this requirement.
JSON Format:
{
"type": "spells_and_shields:learned",
"spell_tree": String,
"node_id": Integer
}Elements:
-
spell_tree: The spell tree ID, eg."spells_and_shields:nether". -
node_id: The node ID of the spell in the spell tree.
You must have a minimum amount of sub-requirements passed.
JSON Format:
{
"type": "spells_and_shields:min",
"requirements": Requirement[],
"minimum": Integer
}Elements:
-
requirements: The list of requirements to pass. -
minimum: The amount of requirements that must be passed of the list (atleast this number). Value must be greater than 0.
You may not exceed in passing a set amount of sub-requirements.
JSON Format:
{
"type": "spells_and_shields:max",
"requirements": Requirement[],
"maximum": Integer
}Elements:
-
requirements: The list of requirements. -
minimum: The amount of requirements that may be passed (up to and including this number is permitted). Value must be greater than or equal to 0.
In case you have seen this somehow this needs to be mentioned: Do not use this! This type is only used for synchronization from the server to the client and if you use this the game will crash.
{ "t1/title": Component, "t2/icon": Spell Icon, "t3/root_node": Spell Node }