Skip to content

EntityTagDefinition ​

Inherits: DatabaseResource < Resource

A type tag an entity can have: "Humanoid", "Beast", "Undead", "Construct", "Demon" ... Entities get them from their definition (EntityDefinition.entity_tags); code can add or remove them at runtime (Entity.add_entity_tag / remove_entity_tag). Conditions read them (EntityHasTagCondition), so "+30 % damage against Undead" is a stat effect with the condition "opponent has tag Undead". See docs/systems/entity-stats.md, section 24.3.

Description ​

This is the entity type (the database type is still called entity_tag): what an entity is, and the effects every entity of the type has. It is not the entity tag of the interface (UITagDefinition). Its NPC level and experience settings are read by the game but not shown in the editor. When the project does not scale NPC levels (Gameplay Config, NPC Level Scaling) they change nothing.

Properties ​

ColorcolorColor.WHITE
Array[int]applied_effects[]
ScalingRulelevel_scalingScalingRule.FOLLOW_GAME
intlevel_offset0
floatexperience_multiplier1.0

Enumerations ​

enum ScalingRule ​

How an NPC with this type follows the level of the player (Gameplay Config, NPC Level Scaling)

  • FOLLOW_GAME = 0 - Like every NPC: the settings of the project decide
  • NEVER_SCALES = 1 - Keeps the level of its definition, whatever the player's level
  • FIXED_OFFSET = 2 - Always a number of levels above (or under) the player: a boss that is 3 levels above you

Property descriptions ​

Color color = Color.WHITE ​

The color that stands for this in the interface

Effects Applied To The Type

Array[int] applied_effects = [] ​

The effects (Effect ids) every entity of this type has, as long as it has the type: Undead takes more damage from Holy, a Construct is immune to poison. They are put on the entity when it is made (and when the type is added to it while playing) and taken off when the type is taken away. Empty (default) = the type changes nothing by itself

NPC Level and Experience

ScalingRule level_scaling = ScalingRule.FOLLOW_GAME ​

How an NPC of this type follows the level of the player. Only matters when the project scales NPC levels. If an NPC has several types, Fixed offset wins over Never scales

int level_offset = 0 ​

For Fixed offset: levels above the player (negative: under). 3 = always 3 levels above

float experience_multiplier = 1.0 ​

Experience a defeated NPC of this type gives, as a multiplier (an elite gives 3 times as much). All the types of an NPC multiply