-
Notifications
You must be signed in to change notification settings - Fork 59
Stats When Powered
juanosarg edited this page Jun 24, 2025
·
2 revisions
CompProperties_StatsWhenPowered allows a building to have different stats when powered
public List<StatModifier> poweredStatFactors;
public List<StatModifier> poweredStatOffsets;
public List<StatModifier> unpoweredStatFactors;
public List<StatModifier> unpoweredStatOffsets;
public bool clearRoomCacheOnPowerChange = false;
public List<StatDef> clearStatCacheOnPowerChange;
public bool onlyWorksIndoors = false;
public bool onlyWorksOutdoors = false;It is a comp class, so you just add it in XML in the <comps> tag. For example, this is the air purifier in VE Furniture - Spacer
<comps>
<li Class="VEF.Buildings.CompProperties_StatsWhenPowered">
<poweredStatOffsets>
<Cleanliness>20</Cleanliness>
</poweredStatOffsets>
<onlyWorksIndoors>true</onlyWorksIndoors>
<!-- The room stats aren't recalculated unless something forces the game to re-cache it, -->
<!-- so we need a way to force it ourselves if we're changing a stat that affects a room. -->
<clearRoomCacheOnPowerChange>true</clearRoomCacheOnPowerChange>
<!-- Normally we wouldn't clear the stat, but since this stat directly affects -->
<clearStatCacheOnPowerChange>
<li>Cleanliness</li>
</clearStatCacheOnPowerChange>
</li>
</comps>- Abilities
- Aesthetic scaling
- Animal Behaviours
- Apparels
- Buildings
- Cooking
- Factions
- Genes
- Global
- Graphics
- Hediffs
- Maps
- Memes
- OptionalFeatures
- Pawns
- Planet
- Plants
- Storyteller
- Things
- Weapons
- Weathers
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Advanced Resource Processor
- Update to KCSG 2.0
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions