GainModifierStatEffect ​
Inherits: StatEffect < Resource
Changes what the entity GAINS on a channel: experience, currency (gold find), loot quantity, loot rarity (magic find), threat, resource gain, the duration of statuses put on it. The code that gives something asks the receiver's stats (StatsComponent.modify_gain(channel, amount)), so no system needs to know a "gold find" or "experience" stat; a temporary buff on the stat works like any other stat. A dev can add a channel by calling modify_gain from their own code. See docs/systems/entity-stats.md, section 24.2.
Description ​
Stacking of several effects on one channel: flat additions first, then all percentages together (added, not multiplied), then the multiplies.
Properties ​
String | channel | GainChannels.EXPERIENCE |
CalculationType | calculation_type | CalculationType.PERCENTAGE_INCREASE |
Methods ​
EffectType | get_effect_type() |
String | get_effect_category() |
Dictionary | get_contribution( stat_points: float, formula_context: FormulaContext = null ) |
String | get_short_description() |
Dictionary | get_preview_info( stat_points: float ) |
String | get_tooltip_text( stat_points: float ) |
Array[Dictionary] | validate() |
Constants ​
PackedStringArrayCHANNELS =[- The channels the toolkit itself asks about (a dev can use any other name)
Property descriptions ​
Gain Settings
String channel = GainChannels.EXPERIENCE ​
Which channel this changes (see GainChannels). Any name works; the toolkit asks about the ones in GainChannels
CalculationType calculation_type = CalculationType.PERCENTAGE_INCREASE ​
ADD / MINUS: flat. PERCENTAGE_INCREASE / PERCENTAGE_DECREASE: a percentage. MULTIPLY: a factor
Method descriptions ​
EffectType get_effect_type() ​
========== EFFECT IDENTIFICATION ==========
String get_effect_category() ​
The group of the effect in the editor.
Dictionary get_contribution( stat_points: float, formula_context: FormulaContext = null ) ​
What this effect contributes for stat_points: (flat addition, percentage points, factor)
String get_short_description() ​
A one line text about what the effect does.
Dictionary get_preview_info( stat_points: float ) ​
What the effect gives for a number of stat points, for the tooltip and the editor preview.
String get_tooltip_text( stat_points: float ) ​
The tooltip text of the effect for a number of stat points.
Array[Dictionary] validate() ​
========== VALIDATION ==========