Skill Entity
The skills_skill entity defines executable skills and abilities for players and NPCs with comprehensive combat mechanics.
Managing skills in the admin panel
Skills are in the Skills section of the admin sidebar, under Skills (/reldens-admin/skills-skill). The same section holds the data attached to a skill: Attack Properties, Physics Data, Owner Effects, Target Effects Properties, the conditions, the Animations, the Groups and the Skill Types:
To create a skill:
- Log in to the admin panel at /reldens-admin and open Skills > Skills.
- Click Create New (the form opens at /reldens-admin/skills-skill/edit).
- Fill in the Key (required and unique, for example iceShard) and the Label shown to the players.
- Select the Type (required): attack, effect, physical_attack, physical_effect or base, see Skill Types Entity.
- Fill in the SkillDelay (required, cooldown in milliseconds), the CastTime (required, 0 for an instant skill) and the Range (required, in pixels, 0 for no limit).
- Fill in the RangePropertyX and RangePropertyY (required, the default skills use state/x and state/y) and check RangeAutomaticValidation.
- Check AllowSelfTarget for skills that can target the owner (for example a heal), and set the critical fields and the UsesLimit if needed.
- Click Save.
- Add the data of the skill type: Attack Properties for the attack and physical attack skills, Physics Data for the physical skills, Target Effects Properties and Owner Effects for the effect skills, and the Animations (see Skill Sprite Entity).
- Give the skill to its owners: to the players in Classes & Levels > Levels Skills (the class path level that unlocks it), to the enemies in Game Objects > Objects - Skills.
- Restart the server, the skills are loaded on startup.
In the form, r marks a required field and u a field that must be unique. To create a variant of a skill, open it, click Duplicate, change the key and save; the attack, physics, effects and animations rows are not copied. Many skills can be created at once with the Skills Importer in the Wizards section.
Key Properties
- key: Unique skill identifier
- type: Skill type reference (base, attack, effect, physical)
- label: Display name
- autoValidation: Auto-validate before execution
- skillDelay: Cooldown in milliseconds
- castTime: Cast time before execution (milliseconds)
- usesLimit: Maximum uses (0 = unlimited)
- range: Skill range in pixels (0 = infinite)
- rangeAutomaticValidation: Auto-validate range
- rangePropertyX/Y: Owner position properties
- rangeTargetPropertyX/Y: Target position properties
- allowSelfTarget: Can target owner
- criticalChance: Critical hit chance percentage
- criticalMultiplier: Critical damage multiplier
- criticalFixedValue: Fixed critical damage bonus
- customData: JSON custom configuration
Skill Execution Flow
- Validation: Check conditions, range, cooldown
- Owner Effects: Apply self-buffs
- Cast Time: Delay before execution (if configured)
- Skill Logic: Execute damage, effects, or custom logic
- Target Effects: Apply buffs/debuffs to target
- Cooldown: Reset canActivate after skillDelay
Combat Mechanics
Attack Skills
- Damage calculation: attack vs defense properties
- Dodge system: aim vs dodge properties
- Critical hits with configurable chance and multiplier
- Property-based formulas for dynamic combat
Effect Skills
- Apply modifiers to target
- Buffs (increase stats)
- Debuffs (decrease stats)
- Status effects with duration
Physical Skills
- Projectile-based with collision detection
- Magnitude and object dimensions
- Validate target on hit
- Fire hit events for visual effects
Targeting System
- Range: Maximum distance for skill activation
- Self-Target: Allow targeting the skill owner
- Validation: Automatic range checking
- Properties: Custom position properties (x, y)
Critical Hit System
- criticalChance: Percentage chance to critical (0-100)
- criticalMultiplier: Damage multiplier on critical
- criticalFixedValue: Fixed damage bonus on critical
Database Relations
- skills_skill_type: Skill type classification
- skills_skill_animations: Visual animations
- skills_skill_attack: Attack-specific configuration
- skills_skill_physical_data: Physics properties
- skills_skill_owner_conditions: Execution conditions
- skills_skill_owner_effects: Self-buff modifiers
- skills_skill_target_effects: Target modifiers
- skills_skill_group_relation: Skill grouping
- skills_class_path_level_skills: Class path unlocks
- objects_skills: Skills assigned to NPCs
Package
Implemented in @reldens/skills package with comprehensive skill system documentation.
reldens