Class Path

A "Class Path" in Reldens is like the tree path for the players to follow.

Managing class paths in the admin panel

Class paths are in the Classes & Levels section of the admin sidebar, under Class Paths (/reldens-admin/skills-class-path). The list shows the key, label, levels set and enabled flag of every class path:

Admin Panel - Class Paths list

To create a class path:

  1. Create the levels set the class path will use first, see Levels Set Entity. In the default data every class path has its own levels set with its levels.
  2. Log in to the admin panel at /reldens-admin and open Classes & Levels > Class Paths.
  3. Click Create New (the form opens at /reldens-admin/skills-class-path/edit).
  4. Fill in the Key (required and unique, for example paladin). The key also names the player spritesheet of the class, see Player Sprites.
  5. Fill in the Label, the class name shown to the players.
  6. Select the Levels Set ID (required).
  7. Check Enabled: only the enabled class paths are loaded by the game.
  8. Click Save.
  9. Add the skills the class unlocks in Classes & Levels > Levels Skills (one row per class path, level and skill), the custom level names in Levels Labels and the level up effects in Level Up Animations.
  10. Restart the server, the class paths are loaded on startup.
Admin Panel - Create Class Paths form

In the form, r marks a required field and u a field that must be unique. On an existing class path, Duplicate clears the ID so the next save creates a copy: change the key before saving. The class path assigned to each player is in Users > Players Class Path.

How it works

The idea behind the class path is that developers can configure players to increase their level and win specified skills on each level up. At the same time this provides the possibility to configure different labels for any of the levels in the set from which the class path inherits.

In summary a class path contains: a key, the initial label, the labels by level, and the skills by level.

Class Path

In terms of development, an object instance of the ClassPath class:

  • Receives your player object as a parameter which will be set as the "owner"
  • Extends the LevelsSet class (which handles the experience required by each level)
  • Contains the available skills (unlocked on each level up)
  • Has add/remove skills methods and extends the level up/down methods to include new skills

LevelsSet

This is basically the levels list and handles the level up/down, which can be based on experience. In order to help with level creation and handling, this class has auto-fill and sort methods to handle gaps.

For example, if auto-fill is enabled and you have a level instance for level 1 and the next level instance is for level 5, then the auto-fill will use the same level 1 instance for the middle levels (2, 3 and 4). This class also requires the owner to be specified on creation, so the owner properties can be affected using modifiers that are executed on each level up.

Level

A level instance has a key, a label and a Modifiers list to be applied by the LevelsSet class.

Related Documentation

Go Up