StatusEffectDefinition ​
Inherits: DatabaseResource < Resource
Defines a configurable status effect that can be applied to entities
Properties ​
Color | color | Color.WHITE |
String | base_status_type | "" # "Incapacitate", "Root", "Blind", "Cripple", "Silence... |
bool | enable_diminishing_returns | true |
float | diminishing_return_percentage | 0.5 # Each stack reduces duration by this % |
int | max_diminishing_applications | 3 # How many times diminishing can stack |
float | diminishing_reset_time | 10.0 # Time before diminishing resets |
bool | grants_temporary_immunity | false |
int | immunity_threshold | 3 # How many applications before immunity |
float | immunity_duration | 10.0 # Duration of immunity |
int | triggered_immunity_id | 0 # Which ImmunityDefinition to activate |
bool | hide_weapon_mesh | false |
bool | breaks_on_damage_taken | false |
float | break_damage_threshold_percent_of_health | 10.0 |
Methods ​
float | get_effective_duration( base_duration: float, application_count: int ) |
bool | should_grant_immunity( application_count: int ) |
bool | should_break_on_damage( damage_amount: float, current_health: float, max_health: float ) |
bool | is_crowd_control() |
bool | is_movement_impairing() |
bool | is_ability_impairing() |
bool | affects_combat() |
int | get_id() |
String | get_effect_description() |
Array[Dictionary] | get_duration_preview( base_duration: float, max_applications: int = 5 ) |
String | get_preview_text( base_duration: float ) |
Constants ​
Array[String]CROWD_CONTROL_TYPES =["Incapacitate", "Root", "Silence", "Disarm", "Flee", "Disorient"]- The status types that count as crowd control.Array[String]MOVEMENT_IMPAIRING_TYPES =["Root", "Incapacitate", "Cripple"]- The status types that keep an entity from moving freely.Array[String]ABILITY_IMPAIRING_TYPES =["Silence", "Disarm", "Incapacitate"]- The status types that keep an entity from using abilities.
Property descriptions ​
Basic Properties
Color color = Color.WHITE ​
The color that stands for this in the interface
Effect Classification
String base_status_type = "" # "Incapacitate", "Root", "Blind", "Cripple", "Silence", ​
The kind of control: "Incapacitate", "Root", "Silence", "Disarm", "Cripple", "Blind", "Flee" or "Disorient". It decides what the entity cannot do
Diminishing Returns
bool enable_diminishing_returns = true ​
Does applying the status again and again make it shorter?
float diminishing_return_percentage = 0.5 # Each stack reduces duration by this % ​
Each repeat shortens the duration by this fraction (0.5 = half as long each time)
int max_diminishing_applications = 3 # How many times diminishing can stack ​
How many times the shortening stacks
float diminishing_reset_time = 10.0 # Time before diminishing resets ​
Seconds without the status before the counter starts over
Immunity System
bool grants_temporary_immunity = false ​
Does the target become immune after enough applications?
int immunity_threshold = 3 # How many applications before immunity ​
How many applications before the immunity starts
float immunity_duration = 10.0 # Duration of immunity ​
How many seconds the immunity lasts
int triggered_immunity_id = 0 # Which ImmunityDefinition to activate ​
The immunity (ImmunityDefinition id) that is switched on
Special Behavior
bool hide_weapon_mesh = false ​
Hide the weapon while the status lasts
bool breaks_on_damage_taken = false ​
Does a big enough hit end the status?
float break_damage_threshold_percent_of_health = 10.0 ​
A single hit breaks the status when it takes at least this share of the maximum health
Method descriptions ​
float get_effective_duration( base_duration: float, application_count: int ) ​
The duration of the status after diminishing returns, by how many times it was applied.
bool should_grant_immunity( application_count: int ) ​
Does the status give a temporary immunity after this many applications?
bool should_break_on_damage( damage_amount: float, current_health: float, max_health: float ) ​
Does this damage break the status?
bool is_crowd_control() ​
Is this status crowd control?
bool is_movement_impairing() ​
Does this status keep the entity from moving freely?
bool is_ability_impairing() ​
Does this status keep the entity from using abilities?
bool affects_combat() ​
Does this status change how the entity fights (disarm, silence, blind, incapacitate)?
int get_id() ​
The id of the status.
String get_effect_description() ​
A text about what the status does.
Array[Dictionary] get_duration_preview( base_duration: float, max_applications: int = 5 ) ​
The duration of the status for each of the first applications, for the editor.
String get_preview_text( base_duration: float ) ​
A text that shows the duration of the status for each application, for the editor.