EffectUtil ​
Inherits: RefCounted
Helpers of the Effects editor: where the effect resources, their property scenes and their scripts are, the name and category of every effect type (derived from the folders of the scripts), and the inheritance of the effect types (is this type a composite, what are its parents and children, the path of its script).
Methods ​
String | get_effect_display_name( effect_type: String ) static |
Dictionary | get_effect_categories_from_map() static |
bool | inherits_from( effect_type: String, parent_class: String ) static |
bool | is_composite_type( effect_type: String ) static |
Array | get_inheritance_chain( effect_type: String ) static |
Array | get_children_of( parent_class: String ) static |
Array | get_direct_children_of( parent_class: String ) static |
String | get_immediate_parent( effect_type: String ) static |
bool | is_base_class( effect_type: String ) static |
String | get_effect_type( effect: Effect ) static |
String | get_effect_script_path( effect_type: String ) static |
bool | is_hidden_effect( effect_type: String ) static |
int | count_types_built_on( base_class: String ) static |
Array | get_available_effect_types() static |
Array | get_all_effect_types() static |
Array | get_effect_types_by_category( category: String ) static |
Array | get_effect_categories() static |
Dictionary | scan_effects_directory() static |
Dictionary | get_all_effect_types_with_custom() static |
Array | get_effect_categories_with_custom() static |
Array | get_effect_types_by_category_with_custom( category: String ) static |
Constants ​
StringEFFECT_RESOURCES_PATH ="res://src/data/effects/"StringEFFECT_PROPERTIES_PATH ="res://addons/chroniclenode/components/effect_properties/"StringEFFECTS_SCRIPTS_PATH ="res://addons/chroniclenode/data_classes/effects/"DictionaryEffectScriptMap ={DictionaryEffectDisplayNames ={- Names shown in the editor instead of the class name (the class name stays: saved effects refer to the script)DictionaryEffectInheritance ={ArrayHiddenEffects =[- Base classes in the root effects folder — not intended for direct use in the editor (CompositeEffect is not one: it lives in the composite folder and can be chosen). Effects in subfolders are considered concrete and will appear in the picker.
Method descriptions ​
String get_effect_display_name( effect_type: String ) ​
No description yet.
Dictionary get_effect_categories_from_map() ​
Derive effect categories from EffectScriptMap subfolder structure. Returns { category_display_name: [effect_type_strings] }
bool inherits_from( effect_type: String, parent_class: String ) ​
Check if an effect type inherits from a specific parent class
bool is_composite_type( effect_type: String ) ​
Is this type the composite effect or built on it (does it hold child effects)?
Array get_inheritance_chain( effect_type: String ) ​
Get all parent classes for an effect type (ordered from immediate parent to base)
Array get_children_of( parent_class: String ) ​
Get all effect types that inherit from a specific parent class
Array get_direct_children_of( parent_class: String ) ​
Get immediate children (direct inheritance only)
String get_immediate_parent( effect_type: String ) ​
Get the immediate parent of an effect type
bool is_base_class( effect_type: String ) ​
Check if effect type is a base class (has children)
String get_effect_type( effect: Effect ) ​
Get effect type string from effect resource
String get_effect_script_path( effect_type: String ) ​
Get script path for effect type
bool is_hidden_effect( effect_type: String ) ​
Returns true if an effect type is a hidden base class not intended for direct use
int count_types_built_on( base_class: String ) ​
How many effect types of the picker are built on base_class (they extend it, directly or through other types)
Array get_available_effect_types() ​
Get available effect types (sorted), excluding hidden base classes
Array get_all_effect_types() ​
Get all effect types including hidden base classes
Array get_effect_types_by_category( category: String ) ​
Get effect types for a named category
Array get_effect_categories() ​
Get all category display names (sorted)
Dictionary scan_effects_directory() ​
Scans subfolders for effect scripts not present in EffectScriptMap. Returns { category_display_name: [effect_type_strings] } for custom effects only.
Dictionary get_all_effect_types_with_custom() ​
Get all effect types including any custom effects found by directory scan, merged into their respective categories. Returns { category: [effect_types] }.
Array get_effect_categories_with_custom() ​
Get all category names including any categories from custom effects
Array get_effect_types_by_category_with_custom( category: String ) ​
Get effect types for a category, including custom effects