VFXSelection ​
Inherits: Resource
Inherited by: VFXSelectionBeam, VFXSelectionEnchant, VFXSelectionLoop, VFXSelectionMaterial, VFXSelectionOneShot, VFXSelectionPath, VFXSelectionTelegraph, VFXSelectionTransformation, VFXSelectionWeather
Base VFX selection class - stores VFX configuration and references All VFX selections inherit from this base class
Properties ​
String | vfx_type | "": |
float | duration_override | 0.0 |
bool | on_top_level | false |
bool | tint_enabled | false |
Color | tint_color | Color.WHITE |
float | tint_strength | 1.0 |
VFXTint.Mode | tint_mode | VFXTint.Mode.MULTIPLY |
Array[String] | variety | [] |
Methods ​
void | begin_play() |
void | end_play() |
String | pick_vfx_name() |
Array[String] | play_names() |
String | vfx_name_to_play() |
Array[VFX] | spawn_vfx( vfx_manager: VFXManager, target: Variant = null, originator: Variant = null, timer: Timer = null ) |
Variant | prepare_target_for_vfx_type( target: Variant, originator: Variant = null ) |
String | get_description() |
String | get_vfx_type() |
String | get_vfx_name() |
String | get_vfx_selection_class_name( vfx_selection: VFXSelection ) static |
Enumerations ​
enum VfxLocation ​
The options of vfx location: base, hands, left hand, right hand, head, chest, weapon, feet, overhead.
- BASE =
0 - HANDS =
1 - LEFT_HAND =
2 - RIGHT_HAND =
3 - HEAD =
4 - CHEST =
5 - WEAPON =
6 - FEET =
7 - OVERHEAD =
8 # Above entity
Property descriptions ​
String vfx_type = "": ​
Notify editor of change The visual effect that is picked, by name.
float duration_override = 0.0 ​
0 = use VFX default duration
bool on_top_level = false ​
Set top_level = true when activated (for world-space positioning)
Tint
bool tint_enabled = false ​
Puts a colour on the whole effect when it plays. Off: the effect keeps the colours it was made with (or the tint saved in its scene).
Color tint_color = Color.WHITE ​
The colour put on the effect.
float tint_strength = 1.0 ​
How much of the tint is put on: 1 is all of it, less mixes it with the colours the effect was made with.
VFXTint.Mode tint_mode = VFXTint.Mode.MULTIPLY ​
Multiply: the colours of the effect are multiplied by the tint (for neutral white and grey effects). Colorize: the brightness is kept and the colour is replaced (for effects that have their own colours).
Variety
Array[String] variety = [] ​
More effects of the same kind played in its place: each time it plays, one of the main effect and these is picked at random (2026-11-14: a hit that looks different every time: the seven hits of a theme, its signature hits). Empty: always the main effect.
Method descriptions ​
void begin_play() ​
Picks the effect of this play: the main one or one of the variety, at random (VFXManager calls it when it spawns, end_play after)
void end_play() ​
No description yet.
String pick_vfx_name() ​
One of the main effect and its variety, at random (the variety names that are not in the library are left out)
Array[String] play_names() ​
Every effect this selection can play: the main one, then the variety (those in the library, once each)
String vfx_name_to_play() ​
The name of the effect to play now: the one picked for this play, or the main one
Array[VFX] spawn_vfx( vfx_manager: VFXManager, target: Variant = null, originator: Variant = null, timer: Timer = null ) ​
Makes the visual effect for a target and an originator. Gives the effects made.
Variant prepare_target_for_vfx_type( target: Variant, originator: Variant = null ) ​
Prepare target based on VFX type - override in subclasses for special handling
String get_description() ​
Get a description of this VFX selection for UI
String get_vfx_type() ​
Get the VFX type for database queries
String get_vfx_name() ​
Get the VFX name for database queries
String get_vfx_selection_class_name( vfx_selection: VFXSelection ) ​
Helper to get VFX selection class name from existing VFX selection