EntityDefinition ​
Inherits: DatabaseResource < Resource
Inherited by: CharacterDefinition, NPCDefinition
EntityDefinition contains all visual, audio, and display configuration for entities This serves as the base class for NPCDefinition and CharacterDefinition
Properties ​
PackedScene | entity_model | |
Vector3 | model_scale | Vector3(1.0, 1.0, 1.0) |
EntityCollisionShape | entity_collision_shape | EntityCollisionShape.NORMAL |
NavigationDomain | navigation_domain | NavigationDomain.AMPHIBIOUS |
Texture2D | footprint_texture | |
String | animation_type | "" |
Array[String] | animation_packages | ["core", "ability_animations", "transitions"] |
String | selected_voice_type | "" |
String | footstep_entity_type | "" |
Array[int] | entity_tags | [] |
int | spoken_language_id | 0 |
Array[int] | ui_tags | [] |
bool | template | false |
Methods ​
Vector3 | get_collision_size( shape: EntityCollisionShape ) static |
void | set_entity_name( new_name: String ) |
String | get_entity_name() |
void | set_entity_id( new_id: int ) |
int | get_entity_id() |
void | set_animation_type( new_animation: String ) |
String | get_animation_type() |
void | set_animation_packages( new_animation_packages: Array[String] ) |
Array[String] | get_animation_packages() |
void | set_entity_model( new_model: PackedScene ) |
PackedScene | get_entity_model() |
bool | has_entity_model() |
void | set_model_scale( new_scale: Vector3 ) |
Vector3 | get_model_scale() |
void | set_uniform_model_scale( scale: float ) |
void | set_collision_shape( new_shape: EntityCollisionShape ) |
EntityCollisionShape | get_collision_shape() |
String | get_collision_shape_name() |
bool | has_voice_type_selection() |
void | clear_voice_type_selection() |
void | set_voice_type_selection( entity_type: String, voice_variant: String ) |
String | get_voice_entity_type() |
String | get_voice_variant() |
bool | has_footstep_entity_type() |
void | clear_footstep_entity_type() |
bool | is_template() |
String | get_display_name() |
bool | is_valid() |
Enumerations ​
enum EntityCollisionShape ​
========== ENUMS ==========
- TINY =
0 - SMALL =
1 - NORMAL =
2 - LARGE =
3
enum NavigationDomain ​
Where the navigation of an entity goes (NavigationController): Amphibious walks and swims (the default: it never enters lava, it crosses deep water by swimming), Land walks only (it goes round deep water and lava), Water lives in the water and cannot walk (a fish, a sea monster: it moves over the surface of the water and is stuck on land). The party is always amphibious. See docs: World > Movement volumes > Navigation.
- AMPHIBIOUS =
0 - LAND =
1 - WATER =
2
Constants ​
DictionaryCOLLISION_SIZES ={- The capsule of every collision shape: x = radius, y = height, z = how high the capsule's centre is above the entity's feet. The one table the collision, the navigation bake and the navigation agents read.
Property descriptions ​
Visual Configuration
PackedScene entity_model ​
3D model/skeleton scene for this entity
Vector3 model_scale = Vector3(1.0, 1.0, 1.0) ​
Scale multiplier applied to the entity model
EntityCollisionShape entity_collision_shape = EntityCollisionShape.NORMAL ​
Collision shape size category for physics interactions
NavigationDomain navigation_domain = NavigationDomain.AMPHIBIOUS ​
Where this kind of entity can go: walk and swim (Amphibious), walk only (Land) or swim only (Water). The party members are always Amphibious
Texture2D footprint_texture ​
The picture of one footprint of this kind of entity (a boot sole, a paw, a hoof): a white shape on a transparent background, the toes pointing up. The ground tints it and says how long it stays. Empty = this entity leaves no footprints
Animation Configuration
String animation_type = "" ​
Animation type identifier for DatabaseAnimation lookup
Array[String] animation_packages = ["core", "ability_animations", "transitions"] ​
Animation packages to include (core, ability_animations, transitions, etc.)
Audio Configuration
String selected_voice_type = "" ​
Voice audio selection in format "entity_type/voice_variant" (e.g. "humanoid/voice_humanoid_masculine_01")
String footstep_entity_type = "" ​
Footstep audio entity type for DatabaseAudio lookup (e.g. "humanoid", "beast")
Array[int] entity_tags = [] ​
Type tags of this kind of entity (Humanoid, Beast, Undead ...): EntityTagDefinition ids. Conditions read them
int spoken_language_id = 0 ​
The language this kind of entity speaks (the id of a proficiency that is a language). Its lines are in that language: a listener who does not understand it reads them garbled. 0 = none
Array[int] ui_tags = [] ​
The entity tags of this kind of entity (UITagDefinition ids: Boss, Elite, Rare ...): labels with no effect on the entity that the interface reads to show it differently (the unit frame, the nameplate, the map icon). A placed NPC can add tags and take some away (UniqueEntityData)
bool template = false ​
True when this definition is a template: other definitions follow it and it is not placed in the world.
Method descriptions ​
Vector3 get_collision_size( shape: EntityCollisionShape ) ​
The capsule of a collision shape: x = radius, y = height, z = the height of its centre above the feet.
void set_entity_name( new_name: String ) ​
Set entity display name
String get_entity_name() ​
Get entity display name
void set_entity_id( new_id: int ) ​
Set entity ID
int get_entity_id() ​
Get entity ID
void set_animation_type( new_animation: String ) ​
Set animation type
String get_animation_type() ​
Get animation type
void set_animation_packages( new_animation_packages: Array[String] ) ​
Set animation packages
Array[String] get_animation_packages() ​
Get animation packages
void set_entity_model( new_model: PackedScene ) ​
Set entity model
PackedScene get_entity_model() ​
Get entity model
bool has_entity_model() ​
Check if entity has a model
void set_model_scale( new_scale: Vector3 ) ​
Set model scale (ensures positive values)
Vector3 get_model_scale() ​
Get model scale
void set_uniform_model_scale( scale: float ) ​
Set uniform scale for all axes
void set_collision_shape( new_shape: EntityCollisionShape ) ​
Set collision shape
EntityCollisionShape get_collision_shape() ​
Get collision shape
String get_collision_shape_name() ​
Get collision shape name as string
bool has_voice_type_selection() ​
Check if voice type is selected
void clear_voice_type_selection() ​
Clear voice type selection
void set_voice_type_selection( entity_type: String, voice_variant: String ) ​
Set voice type selection
String get_voice_entity_type() ​
Get voice entity type
String get_voice_variant() ​
Get voice variant
bool has_footstep_entity_type() ​
Check if footstep entity type is set
void clear_footstep_entity_type() ​
Clear footstep entity type
bool is_template() ​
Check if this EntityDefinition is a template
String get_display_name() ​
Get display name appropriate for templates vs entities
bool is_valid() ​
Validates that all required entity configuration is present