Skill Entity
Skill Entity
The skills_skill entity defines executable skills and abilities for players and NPCs with comprehensive combat mechanics.
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
Implementation
Configure skills in the admin panel under Skills. Define type, mechanics, effects, and animations. Assign to class paths or NPCs as needed.
Package
Implemented in @reldens/skills package with comprehensive skill system documentation.
reldens