Skip to content

EffectsTreeEditor ​

Inherits: VBoxContainer

Reusable tree-based editor for managing collections of effects. Supports ability on_use_effects, passive_effects, composite child_effects, charge tier effects, and combo step effects.

Properties ​

AbilityDefinitionparent_ability
CompositeEffectparent_composite_effect
Array[int]effects_array[]
boolread_onlyfalse
boolshow_root_labeltrue
Stringroot_label_text"Effects"
boolallow_reorderingtrue
boolshow_effect_detailstrue

Variables ​

boolis_loadingfalse
Effectselected_effectnull
intselected_effect_index-1
ArrayModecurrent_array_modeArrayMode.NONE
ResourceManagerresource_manager
DialogManagerdialog_manager

Methods ​

voidsetup_managers( p_resource_manager: ResourceManager, p_dialog_manager: DialogManager )
voidload_ability_on_use_effects( ability: ActiveAbilityDefinition )
voidload_ability_passive_effects( ability: PassiveAbilityDefinition )
voidload_ability_effects( ability: AbilityDefinition )
voidload_composite_effects( composite_effect: CompositeEffect )
voidload_tier_effects( charge_ability: PowerUpActiveAbilityDefinition, tier_index: int )
voidload_combo_effects( combo_ability: ComboActiveAbilityDefinition, step_index: int )
voidset_effects_array( new_effects_array: Array[int], ability: AbilityDefinition = null, composite: CompositeEffect = null )
Array[int]get_effects_array()
ArrayModeget_array_mode()
boolhas_effects()
intget_effects_count()
voidapply_theme_manager()

Signals ​

effects_changed() ​

effect_selected( effect: Effect ) ​

effect_double_clicked( effect: Effect ) ​

effect_add_requested( effect_id: int ) ​

effect_remove_requested( index: int ) ​

effect_move_requested( from_index: int, to_index: int ) ​

Enumerations ​

enum ArrayMode ​

Tracks which array on the parent resource this editor is currently bound to. This lets signal handlers in the ability editor know which array to mutate.

  • NONE = 0
  • ABILITY_ON_USE = 1 - ActiveAbilityDefinition.on_use_effects
  • ABILITY_PASSIVE = 2 - PassiveAbilityDefinition.passive_effects
  • COMPOSITE = 3 - CompositeEffect.child_effects
  • TIER = 4 - PowerUpActiveAbilityDefinition.tier_effects[n]
  • COMBO_STEP = 5 - ComboActiveAbilityDefinition.combo_effects[n]

Constants ​

  • int TREE_ICON_SIZE = 24
  • const MENU_ADD_EFFECT = 100
  • const MENU_REMOVE_EFFECT = 101
  • const MENU_EDIT_EFFECT = 102
  • const MENU_MOVE_UP = 104
  • const MENU_MOVE_DOWN = 105

Property descriptions ​

AbilityDefinition parent_ability ​

No description yet.

CompositeEffect parent_composite_effect ​

No description yet.

Array[int] effects_array = [] ​

No description yet.

bool read_only = false ​

No description yet.

bool show_root_label = true ​

No description yet.

String root_label_text = "Effects" ​

No description yet.

bool allow_reordering = true ​

No description yet.

bool show_effect_details = true ​

No description yet.

Variable descriptions ​

bool is_loading = false ​

No description yet.

Effect selected_effect = null ​

No description yet.

int selected_effect_index = -1 ​

No description yet.

ArrayMode current_array_mode = ArrayMode.NONE ​

No description yet.

ResourceManager resource_manager ​

No description yet.

DialogManager dialog_manager ​

No description yet.

Method descriptions ​

void setup_managers( p_resource_manager: ResourceManager, p_dialog_manager: DialogManager ) ​

No description yet.

void load_ability_on_use_effects( ability: ActiveAbilityDefinition ) ​

Load the on_use_effects array from an ActiveAbilityDefinition. Use this for the "On Use Effects" section of the ability editor.

void load_ability_passive_effects( ability: PassiveAbilityDefinition ) ​

Load the passive_effects array from a PassiveAbilityDefinition (or subclass). Use this for the "Passive Effects" section of the ability editor.

void load_ability_effects( ability: AbilityDefinition ) ​

Legacy entry point: loads ability.effects (now maps to on_use for active, passive for passive). Kept for backwards compatibility — prefer the explicit methods above.

void load_composite_effects( composite_effect: CompositeEffect ) ​

Load child effects from a CompositeEffect.

void load_tier_effects( charge_ability: PowerUpActiveAbilityDefinition, tier_index: int ) ​

Load effects for a specific charge tier.

void load_combo_effects( combo_ability: ComboActiveAbilityDefinition, step_index: int ) ​

Load effects for a specific combo step.

void set_effects_array( new_effects_array: Array[int], ability: AbilityDefinition = null, composite: CompositeEffect = null ) ​

Set a custom effects array directly (generic fallback).

Array[int] get_effects_array() ​

Get the current effects array.

ArrayMode get_array_mode() ​

Get the current array mode so signal handlers know which array was modified.

bool has_effects() ​

No description yet.

int get_effects_count() ​

No description yet.

void apply_theme_manager() ​

No description yet.