PoolModifierStatEffect ​
Inherits: StatEffect < Resource
Effect that modifies pool properties (max value, overfill, generation, etc.) Each effect modifies ONE property - add multiple effects to modify multiple properties
Properties ​
int | target_pool_id | 0 |
PoolProperty | pool_property | PoolProperty.MAX_VALUE |
CalculationType | calculation_type | CalculationType.ADD |
Methods ​
EffectType | get_effect_type() |
String | get_effect_category() |
bool | affects_pool( pool_id: int ) |
String | get_property_name() |
bool | is_capacity_property() |
bool | is_generation_property() |
bool | is_overfill_property() |
float | calculate_effect_value( stat_points: float, formula_context: FormulaContext = null ) |
float | modify( base_value: float, stat_points: float, formula_context: FormulaContext = null ) |
bool | is_supported_property() |
Dictionary | get_preview_info( stat_points: float ) |
String | get_short_description() |
String | get_tooltip_text( stat_points: float ) |
Array[Dictionary] | validate() |
Enumerations ​
enum PoolProperty ​
The options of pool property: max value, overfill max, negative max, overfill decay rate, gen rate, gen value.
- MAX_VALUE =
0 - OVERFILL_MAX =
1 - NEGATIVE_MAX =
2 - OVERFILL_DECAY_RATE =
3 - GEN_RATE =
4
Property descriptions ​
Pool Target
int target_pool_id = 0 ​
Which pool to modify
PoolProperty pool_property = PoolProperty.MAX_VALUE ​
Which property to modify
Modification Settings
CalculationType calculation_type = CalculationType.ADD ​
How the value changes the property: add, subtract, multiply, increase or decrease by a percentage, set
Method descriptions ​
EffectType get_effect_type() ​
========== EFFECT IDENTIFICATION ==========
String get_effect_category() ​
The group of the effect in the editor.
bool affects_pool( pool_id: int ) ​
========== TARGET VALIDATION ==========
String get_property_name() ​
========== PROPERTY HELPERS ==========
bool is_capacity_property() ​
Does the effect change the capacity of the pool (it is worked out again when the equipment changes)?
bool is_generation_property() ​
Does the effect change how the pool fills by itself?
bool is_overfill_property() ​
Does the effect change the overfill of the pool?
float calculate_effect_value( stat_points: float, formula_context: FormulaContext = null ) ​
========== EFFECT VALUE CALCULATION ==========
float modify( base_value: float, stat_points: float, formula_context: FormulaContext = null ) ​
The property's new value for stat_points, starting from base_value (the pool's base max, or the generation rate / value the pool definition declares). The calculation type decides how: Add 10, Increase by 10 %, ... StatsComponent adds the results of all effects up (see _update_pool_effects)
bool is_supported_property() ​
True for the properties the stats component applies to a pool instance. The three overfill / negative limits live on the shared PoolDefinition, so a stat cannot change them for one entity
Dictionary get_preview_info( stat_points: float ) ​
========== DISPLAY ==========
String get_short_description() ​
A one line text about what the effect does.
String get_tooltip_text( stat_points: float ) ​
The tooltip text of the effect for a number of stat points.
Array[Dictionary] validate() ​
========== VALIDATION ==========