Level Modifiers Entity

Level Modifiers Entity

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

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

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

Configure level modifiers in the admin panel under Skills → Levels → Modifiers. Each level can have unlimited modifiers targeting different properties with various operations.

Package

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

Go Up