Skip to content

SetStatActiveStateEffect ​

Inherits: Effect < DatabaseResource < Resource

Switches stats on or off on the target entity: one stat, or every stat of a stat group (all Offensive stats off while the target is disarmed). What each stat was before is remembered and put back when the effect ends.

Properties ​

Targetstarget_modeTargets.SINGLE_STAT
intstat_id0
intstat_group_id0
Array[int]excluded_stats[]
boolset_activetrue

Methods ​

Array[int]resolve_stat_ids( stats_component: StatsComponent )
voidspecific_effect_logic( effect_instance: EffectInstance )
voidon_apply_finished( effect_instance: EffectInstance )
Stringget_effect_description()
Stringget_editor_description()
boolis_valid_configuration()
voidset_stat( new_stat_id: int, new_set_active: bool = true )
voidset_stat_group( new_group_id: int, new_set_active: bool = true )

Enumerations ​

enum Targets ​

The options of targets: single stat, stat group.

  • SINGLE_STAT = 0 - the stat chosen below
  • STAT_GROUP = 1 - every stat of a stat group the target has

Property descriptions ​

Stat Configuration

Targets target_mode = Targets.SINGLE_STAT ​

One stat, or every stat of a stat group

int stat_id = 0 ​

The stat that is switched (or the stat group, when the effect targets a group).

int stat_group_id = 0 ​

The stat group whose stats are all switched (group mode)

Array[int] excluded_stats = [] ​

Stats of the group that are left out (group mode)

bool set_active = true ​

True switches the stats on, false switches them off.

Method descriptions ​

Array[int] resolve_stat_ids( stats_component: StatsComponent ) ​

The stats this effect switches on its target: the chosen stat, or the stats of the group the target has (without the excluded ones)

void specific_effect_logic( effect_instance: EffectInstance ) ​

What the effect does to its target when it is applied.

void on_apply_finished( effect_instance: EffectInstance ) ​

Handle effect removal - restore previous state

String get_effect_description() ​

The text of the effect for tooltips, with its values filled in.

String get_editor_description() ​

A short text for the effect editor that says what the effect does.

bool is_valid_configuration() ​

Check if this effect is properly configured

void set_stat( new_stat_id: int, new_set_active: bool = true ) ​

Set the stat to modify

void set_stat_group( new_group_id: int, new_set_active: bool = true ) ​

Set the stat group to switch