SkillTree

 

Skill Trees


Skill Trees are added in RaC 1.1.10.
They give the possiblity for a player to level the skills used.
WARNING: Configuring skill trees is not that simple and can easily lead to players complaining.

What exactly is a skilltree? What can I do with it?
Imagine you do not want your players to get skills strait forward. They should choose which way is the best for them.
This is what skill-trees are for.
Players may choose the skills they like and skip the ones they don't like / want.
Also you can put different Levels for Skills with this.
Example:
Your mage has 3 Skills for selection:
Fireball (3 lvls) Explosion (3 lvls) Healing (3 lvls)
The player can now choose which one he wants to skill.
Some may want more healing, others more fireballs ....

Here a picture of an example skill-tree for Archers.

Configuration


Now to the configuration. To show you how this needs to be configured that this works.
First thing to do is to turn on Skill-Trees in the config.yml. Therefore set 'skills_useSkillSystem: true'.
I will be hanging on the example of the archer Skill-Tree (PoisonArrow, FireArrow, TeleportArrow).
This can be done with all Traits present in RaC not only the ones shown.
(INFO: Also you will / should get used to TraitModifiers, that are discribed in the Traits part).

What we need as configuration:
- A slot for the Gui (the place the icon should be shown in the GUI)
- Skill-Tree item (the item to display in the GUI)
- If the skill is a permanent Trait (If the Trait is skillable or if it is always present (as long as the prequisits are there))
- Configuration for the Levels of the Trait (what is needed to skill the level, how many points, what min. level is needed...)

(DISCLAIMER: The configuration examples are only snippets of the complete configuration)

Lets start with the GUI:
( the example is only 1 trait! nothing around)

PoisonArrowTrait:
  ...
  permanentTrait: false
  skillTreeSlot: 1
  skillTreeMaterial: ARROW
  skillTreeDamage: 0


What does the example show:
1. 'permanentTrait' this indicates if the Trait is for skilling or is permanently present. If it is set to true, it is ignored by the skilling system and is always granted.
2. 'skillTreeSlot' this is the slot in the GUI the Trait is placed. The first slot (upper right) is slot 0. Then count to the right. At the end, go to the next line & start. So slot 9 is second row, 1st slot.
3. 'skillTreeMaterial' this is the material used for the GUI. Materials can be looked up here.
4. 'skillTreeDamage' this is the damage value for the item in the GUI (example for different Wood or glass color).

The second part are the preconditions to select a Trait.
Here you can choose other Traits that need to be learned before (build a tree).
Also you can define how many skillpoints are needed per skill-level.
At last you can define a min. level for the Skill-level needed.

Example: (this is related to the Poison Arrow from above)

FireArrowTrait:
  .....
  skillTreeMaxLevel: 3
  skillLevelsPre:
  - 'level:1#points:1#minlevel:1#traits:Poison Arrow@1'
  - 'level:2#points:2#minlevel:10#traits:Poison Arrow@2'
  - 'level:3#points:3#minlevel:15#traits:Poison Arrow@3'


Example Explernation:
The Trait FireArrowTrait has 3 levels (0-3) where 0 is not skilled.
To skill the Trait the first time, you need 1 skill point and need the Trait 'Poison Arrow' atleast level 1.
To skill the Trait to level 2, you need 2 skill points and need the Trait 'Poison Arrow' atleast level 2 and player level 10.
To skill the Trait to level 3, you need 3 skill points and need the Trait 'Poison Arrow' atleast level 3 and player level 15.


Configuration - Explernation:
1. 'skillTreeMaxLevel' this tells the plugin how many levels the Trait has.
2. 'skillLevelsPre' this defines what the levels need:
- every line is a prequisit
- if a level is not found, the next level above is used
- if not present, everything is 1 (1 skillpoint, no traits needed, no level needed)
How to build your prequisit (1 line): A line is defines by multiple parts. Parts are split by the '#' character. Parts:
- 'level:x' this is the skill-level for what we define these prequisits.
- 'points:x' the skill-points needed to level this skill to this level
- 'minlevel:x' the minimum level (player level) needed for the Skill level.
- 'traits:trait1@x;trait2@x' the trait prequisits needed (what actually builds the tree). A prequisit here is the trait name, an @ and the trait level (eg: 'Poison Arrow@1'). Multiple traits needed can be split by ';'.

Now you need to put this on multiple Traits to build up a Skill-Tree.

Skill-Points


Skill points can be earned by leveling.
You can set how many skillpoints the player gets in the config.yml.
At the moment the player can get 1 skill point every x levels.
To get a skillpoint every level, you need to set 'skills_skillpointEveryXLevel: 1'.
More will be done here soon.

How to modify Traits to Levels


Traits can be modified to the Trait-Levels by using Modifiers (as mentioned at start).
At the moment the only modifier that supports Trait-Levels is the EvaluationModifier.
It can be used to change various values of the Trait. For a deeper insight on the Evaluation Modifier, look into Modifiers in the Traits page.
Here is an example on how to use it:

FireArrowTrait:
  ....
  modifiers:
  - 'eval:(%SKILLLEVEL% * 2) + 2:0:damage'


Example:


Here is an complete example of the Archer-Tree seen in the pic:

archer:
  config:
    tag: '[Archer]'
    healthbonus: '+1'
    manabonus: 10
    guislot: -1
  traits:
    PoisonArrowTrait:
      displayName: 'Poison Arrow'
      duration: 10
      totalDamage: 10
      cooldown: 30
      cost: 1
      permanentTrait: false
      skillTreeSlot: 1
      skillTreeMaxLevel: 3
      skillTreeMaterial: ARROW
    FireArrowTrait:
      displayName: 'Fire Arrow'
      duration: 10
      totalDamage: 10
      cooldown: 30
      cost: 2
      permanentTrait: false
      skillTreeSlot: 10
      skillTreeMaxLevel: 3
      skillTreeMaterial: ARROW
      skillLevelsPre:
      - 'level:1#points:1#minlevel:1#traits:Poison Arrow@1'
      - 'level:2#points:2#minlevel:10#traits:Poison Arrow@2'
      - 'level:3#points:3#minlevel:15#traits:Poison Arrow@3'
    TeleportArrowTrait:
      displayName: 'Teleport Arrow'
      cooldown: 5
      cost: 1
      permanentTrait: false
      skillTreeSlot: 19
      skillTreeMaterial: ARROW
      skillTreeMaxLevel: 3
      skillLevelsPre:
      - 'level:1#points:1#minlevel:1#traits:Poison Arrow@1;Fire Arrow@1'
      - 'level:2#points:2#minlevel:10#traits:Poison Arrow@2;Fire Arrow@2'
      - 'level:3#points:3#minlevel:15#traits:Poison Arrow@3;Fire Arrow@3'