Progressions

using Databrain.Stats;

public StatsProgression : DataObject {}

The StatsProgression lets you easily create player- or item progressions with a custom progression curve.

Progression Curve

The actual progression curve.

Max Level

Set the max level.

Max XP

Set the max xp points.

On Level Up

The event which gets called on level up.

On XP Added

The event which gets called on xp points added.

Level Up Logic

Only when Logic add-on is installed. The logic which gets executed on level up.

Level Icons

For each progression you can also set custom level icons.

  1. Simply go to the level icons tab and click on "import from folder".

  2. Select a folder where your images are. Please make sure that your images are named nummerically (1.png, 2.png, 3.png)

  3. You can then get the current level icon through the API.

API

ResetXP

Set the XP back to zero.

GetLevelIcon

Return the current level icon as a sprite.

GetCurrentLevel

Get the current progression level.

GetCurrentXP

Get the current XP points.

AddXP

Add XP points. If xp points reaches new level, then the OnLevelUp event gets called.

Last updated