-
Notifications
You must be signed in to change notification settings - Fork 9
Skilltrees
NeumimTo edited this page Jun 26, 2021
·
4 revisions
- Skilltrees must have unique name
- Multiple classes may share a single skilltree, but player should not have access to the same skill from mulitiple classes
- Skilltrees are loaded from the path config/nt-rpg/Skilltrees/**/*.
- Skilltree files must have .conf extension
- If PluginConfig is mentioned anywhere below it means the content of a file config/Settings.conf
- Name
- An unique name of the skilltree that you later use as a referene in classes
- String
Name: MySkilltree
- Description
- Currently unused
- String
Description: "blabla"
- Skills
- an array of skills within the skilltree and theirs configuration
Skills: [
{
Id: "..."
Settings {
...
}
...
}
{
...
}
...
]
There are two main way how to add skill into a skilltree
- You want to use this if you already have the existing skill somewhere loaded.
- This means that you have your skill created via java or js api.
Skills: [
{
SkillId: "ntrpg:battlecharge"
Name: "battlecharge"
Icon: "minecraft:iron_nugget"
ModelId: 77
Description: [
"Leaps towards the enemy,"
"once lands deals damage and slow"
]
SkillTreeId: 2
MinPlayerLevel: 1
MaxSkillLevel: 5
LevelGap: 0
SkillSettings: {
manacost: 7
manacost_levelbonus: 1
damage: 10
damage_levelbonus: 1
range: 15
range_levelbonus: 1
slow-duration-ticks: 1
slow-duration-ticks_levelbonus: 1
radius: 5
radius_levelbonus: 5
cooldown: 5000
cooldown_levelbonus: -50
}
}
-
SkillId
- Id of the skill
- String
-
Name
- Name of the skill within the scope of the skilltree
- Must be unique across all skilltrees
- Players are using this name to cast/bind the skill
- Name is not persisted in storage, its safe to change it later
- String
-
Icon
- Material to be used in the skilltree and skill binds as icon for this skill
- If not used default is "minecraft:stone"
- String
-
ModelId
- Spigot only
- CustomModelData nbt for the icon
- Integer
-
Description
- Some additional informations for the skill
- String array
- Optional
-
SkillTreeId
- When defining a skilltree's ascii map this id is used to reference the skill node
- Must be unique within a single skilltree scope
- Integer
-
MinPlayerLevel
- Minimal level player class has to have in oder to learn the skill
- Integer
- Optional
-
MaxSkillLevel
- Max skill level
- Once reached player cannot level up the skill anymore
- there are ways for players to go beyond this limit, via for example "all_skills_bonus" character property
- Integer
- Optional
-
LevelGap
- Level gap required for players to upgrade the skill
- If set to 1, player is able to upgrade the skill only every other level, it set to 10 only every 10th level etc
- Basically prevents players to spend all their skillpoints in the single spell
- Integer
- Optional
-
SkillSettings
- Number-based configuration for the skill
- What are you put able varies from skill to skill
- Node Options
-
*_levelbonus
- bonus per skill level -
*_per_<attribute>
- bonus per attribute level
-
-
possible values
- specialization - Class specialization (passive)
- item-access - Gives character access to the weapon or armor (passive)
- attribute - Adds attribute (passive)
- property - Changes character property (passive)
- command - Executes a command (active)
- permission - Adds character a permission (passive)
-
All configuration nodes for skills are same as in example above, with the only exception of
Settings
node that has no use here
{
SkillId: "command:giveDiamond"
Icon: "minecraft:diamond_ore"
Type: command
ExecuteAsConsole: false
Command: "give {{player}} minecraft:diamond_ore"
Permission: "some.permission"
}
-
Command
- The command
- you can reference player name as "{{player}}" token
- String
-
ExecuteAsConsole
- Whenever the command should be ran as a console (bypasses all permissions)
- Boolean
-
Permission
- If not ran as a console a temporal permission is applied to the caster
- The permission is removed right after the command is executed
- String
- Optional
{
SkillId: "myexample:giveperm01"
Type: permission
Icon: "minecraft:web"
Permissions: [
"some.permission.xxx.yyy"
]
}
- Permissions
- permission to gain upon learning the skill
- String list
{
SkillId: "ntrpg:increased_health_warrior_I"
Type: property
Name: "Increased Health I"
Properties: [
{
value: 3
level: 0
property_name: max_health
}
]
}
- Properties
- array for each property setting
- value
- value to add, may be negative
- Integer
- level
- Min. skill level when this bonus starts to apply
- Integer
- property_name
- the name of the property
- String
- value
- array for each property setting
{
SkillId: "ntrpg:diamond_sword"
Type: item-access
Name: Diamond_Sword
SkillTreeId: 70
ModelId: 998
Icon: "minecraft:diamond_sword"
Items: [
{
level: 1
items: [
"minecraft:diamond_sword"
]
}
]
}
- Items
- list of objects
- level
- current level of skill that gains access to items
- items
- String list
- fully qualified mc id, including modid: or minecraft: prefix
- optionally you can override ItemGroups.conf weapon damage setting with damage=xxx "minecraft:diamond_sword;damage=50"
- If you are utilizing custom model data nbt you can use model=xxx, as similar to ItemGroups.conf - "minecraft:diamond_sword;model=1257"
A map of the skilltree displaying skill relations etc
Characters for spigot:
-
References PluginConfig.SKILLTREE_GUI
-I<>V^+┐┘┌┘└┴┬┤├
-
References PluginConfig.SKILLTREE_RELATIONS Characters for sponge:
\\ | / -
(will be merged with spigot settings once sponge moves its ass to 15.2)
AsciiMap: [
".┌>2."
".I.^."
".1.3."
".^X^."
]
-
X
- starting location that is displayed when player opens the skilltree for the first time -
.
- an empty space -
<numeric>
- a skill referenced via itsSkillTreeId
todo