Skip to content

MultiplierStatEffect ​

Inherits: StatEffect < Resource

Effect that applies bonuses to other stats (regular or core stats)

Properties ​

inttarget_stat_id0
CalculationTypecalculation_typeCalculationType.ADD

Methods ​

EffectTypeget_effect_type()
Stringget_effect_category()
floatcalculate_effect_value( stat_points: float, formula_context: FormulaContext = null )
floatcalculate_bonus( current_target_value: float, stat_points: float, formula_context: FormulaContext = null )
Dictionaryapply_effect( stats_component: StatsComponent, stat_points: float, context: Dictionary = {} )
Dictionaryget_preview_info( stat_points: float )
Stringget_short_description()
Stringget_tooltip_text( stat_points: float )
Array[Dictionary]validate()

Property descriptions ​

Multiplier Settings

int target_stat_id = 0 ​

The stat to modify (can be regular stat or core stat)

CalculationType calculation_type = CalculationType.ADD ​

How the value changes the target stat: 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.

float calculate_effect_value( stat_points: float, formula_context: FormulaContext = null ) ​

========== EFFECT VALUE CALCULATION ==========

float calculate_bonus( current_target_value: float, stat_points: float, formula_context: FormulaContext = null ) ​

The bonus to add to the target stat for a number of stat points.

Dictionary apply_effect( stats_component: StatsComponent, stat_points: float, context: Dictionary = {} ) ​

========== EFFECT APPLICATION ==========

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 ==========