Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.util.DynamicStatsAPI Interface Reference

Public Member Functions

MutableStat getStat (String id)
 
float getValue (String id)
 
StatBonus getMod (String id)
 
float getValue (String id, float base)
 
void removeUmodified ()
 
Map< String, MutableStat > getStats ()
 
Map< String, StatBonus > getMods ()
 
boolean isEmpty ()
 

Detailed Description

Mutable stats that are created on-demand when they're needed, unlike the "standard" stats that have to be hardcoded.

Intended to be useful for stuff like the interactions between terrain, hull mod effects, and character skills. It's desirable for them to be able to affect each other, but since all can be modded in from scratch, it's hard to rely on the hardcoded stat set.

Author
Alex Mosolov

Copyright 2015 Fractal Softworks, LLC

Definition at line 21 of file DynamicStatsAPI.java.

Member Function Documentation

◆ getMod()

StatBonus com.fs.starfarer.api.util.DynamicStatsAPI.getMod ( String  id)

◆ getMods()

Map< String, StatBonus > com.fs.starfarer.api.util.DynamicStatsAPI.getMods ( )

◆ getStat()

MutableStat com.fs.starfarer.api.util.DynamicStatsAPI.getStat ( String  id)

Base value of the stat is 1.

Parameters
id
Returns

◆ getStats()

Map< String, MutableStat > com.fs.starfarer.api.util.DynamicStatsAPI.getStats ( )

◆ getValue() [1/2]

float com.fs.starfarer.api.util.DynamicStatsAPI.getValue ( String  id)

Base value of the stat is 1.

Parameters
id
Returns

◆ getValue() [2/2]

float com.fs.starfarer.api.util.DynamicStatsAPI.getValue ( String  id,
float  base 
)

◆ isEmpty()

boolean com.fs.starfarer.api.util.DynamicStatsAPI.isEmpty ( )

◆ removeUmodified()

void com.fs.starfarer.api.util.DynamicStatsAPI.removeUmodified ( )

The documentation for this interface was generated from the following file: