pufmat / skillsmod

A Minecraft mod that adds a fully configurable skill system to the game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Levels do not update with points given via command

Sweenus opened this issue · comments

When giving a player points in a specific tree via commands, the tree's level does not update.
Example:

  1. Start a fresh game - skill tree is level 0
  2. Add 10 points to the tree via command
  3. The points are added, but the tree's level is still 0

I would expect the level to be 10 in this example.
This allows a player to take advantage of the low exp required to level up.

This isn't likely to be an issue during ordinary gameplay, but this causes issues with an item in Simply Skills that allows a user to store & load builds, by adding and removing points via the API.

This is intended behavior. The only way to update level is by adding or removing experience. In the next release I'll add more API related to levels and experience. They will allow you to calculate how much experience to add or remove to increase or decrease level.

There is no built-in command and API to increase or decrease level as I'm not sure what should happen with progress. For example when the player has half of the progress required to the next level and the command to increase level is executed. I can think of 3 different ways: set progress to zero, keep the same progress value, scale progress to maintain the same percent.