Level Modifiers Entity

The skills_levels_modifiers entity defines stat modifications that are automatically applied when a player or NPC reaches specific levels.

Managing level modifiers in the admin panel

Level modifiers are in the Classes & Levels section of the admin sidebar, under Levels Modifiers (/reldens-admin/skills-levels-modifiers). Each row belongs to one level and changes one property of the owner when that level is reached:

Admin Panel - Levels Modifiers list

To create a level modifier:

  1. Create the level first, see Level Entity.
  2. Log in to the admin panel at /reldens-admin and open Classes & Levels > Levels Modifiers.
  3. Click Create New (the form opens at /reldens-admin/skills-levels-modifiers/edit).
  4. Select the Level ID (required).
  5. Fill in the Key (required, for example inc_atk) and the Property Key (required, the path of the property to change, for example stats/atk).
  6. Select the Operation (required, for example Increment) and fill in the Value (required, for example 10).
  7. Optionally limit the result with MinValue / MaxValue or with the MinProperty / MaxProperty paths.
  8. Click Save. To add the same change on another level, open the saved modifier, click Duplicate, select the other level and save.
  9. Restart the server, the levels and their modifiers are loaded on startup.
Admin Panel - Create Levels Modifiers form

In the form, r marks a required field. Conditions for a modifier are added in Skills > Levels Modifiers Conditions.

Key Properties

  • level_id: Reference to skills_levels
  • key: Modifier identifier
  • property_key: Target property to modify (e.g., 'hp', 'attack', 'stats/combat/attack')
  • operation: Mathematical operation type reference
  • value: Modification value
  • minValue: Minimum result value constraint
  • maxValue: Maximum result value constraint
  • minProperty: Property path for minimum constraint
  • maxProperty: Property path for maximum constraint

Operation Types

  • INC (1): Increment - add to current value
  • DEC (2): Decrement - subtract from current value
  • MUL (4): Multiply - multiply current value
  • DIV (3): Divide - divide current value
  • INC_P (5): Increase Percentage - add percentage of current value
  • DEC_P (6): Decrease Percentage - subtract percentage of current value
  • SET (7): Set - replace with new value
  • METHOD (8): Custom Method - call custom calculation
  • SET_N (9): Set Alternative - replace with new value

The operations offered in the Operation select are listed in the Settings section of the admin sidebar, under Operation Types (/reldens-admin/operation-types). The same list is used by the item modifiers and the skill effects:

Admin Panel - Operation Types list

How It Works

When a player or NPC levels up, all modifiers associated with that level are automatically applied. When leveling down, modifiers are reverted using inverse operations. This system enables complex character progression with customizable stat growth at each level.

Property Path Support

Modifiers support deep property access using '/' separator notation. Example: stats/combat/attack targets nested properties for precise stat modifications.

Database Relations

  • skills_levels: Parent level configuration
  • operation_types: Mathematical operation types
  • skills_levels_modifiers_conditions: Optional conditions for modifier application

Implementation

Each level can have unlimited modifiers targeting different properties with various operations.

Package

Implemented in @reldens/skills and @reldens/modifiers packages.

Go Up