Target Options Entity
The target_options entity defines valid targeting options for skills and interactions, controlling what entities can be targeted by abilities.
Managing target options in the admin panel
Target options are in the Game Objects section of the admin sidebar, under Objects - Target Options (/reldens-admin/target-options). The installation includes two options, object (ID 1) and player (ID 2):
To create a target option:
- Log in to the admin panel at /reldens-admin and open Game Objects > Objects - Target Options.
- Click Create New (the form opens at /reldens-admin/target-options/edit).
- Fill in the Target Key (required and unique) and the Target Label.
- Click Save.
- Use the option when assigning a skill to an object: in Game Objects > Objects - Skills select the object, the skill and the Target ID.
In the form, r marks a required field and u a field that must be unique.
Key Properties
- id: Option ID
- target_key: Target identifier
- target_label: Display name
Default Target Options
- object (1): Label "Object"
- player (2): Label "Player"
How Target Options Are Used
- Every objects_skills row (a skill assigned to an object, for example an enemy) stores its target option in the required target_id column, so at least one option must exist before a skill can be assigned to an object.
- The Skills Importer resolves the target options by their target_key: in the skill objectsRelations data each object key is mapped to a target key (for example "enemy_1": "player"), and the importer saves the matching option ID in target_id. Keep the keys stable when the skills are imported.
Database Relations
- objects_skills: Object skills using these target options (target_id)
Related Documentation
- Skill Entity - The skills assigned to the objects.
- Objects Entity - The objects that own the skills.
- Skills Importer - Bulk import of skills and their object relations.
reldens