-
Notifications
You must be signed in to change notification settings - Fork 63
Dual refuelable
juanosarg edited this page Jun 4, 2026
·
1 revision
CompProperties_Refuelable_DualFuel makes a building require a secondary fuel to function. It inherits from base game CompProperties_Refuelable
public float secondaryFuelCapacity = 10f;
public float initialSecondaryFuelPercent = 0f;
public float autoRefuelSecondaryPercent = 0.3f;
public ThingFilter secondaryFuelFilter;
public bool initialAllowAutoRefuelSecondary = true;
public bool showAllowAutoRefuelSecondaryToggle = false;
public bool targetSecondaryFuelLevelConfigurable = false;
public float initialConfigurableSecondaryTargetFuelLevel = 0f;
public float minimumSecondaryFueledThreshold = 1f;
private float secondaryFuelMultiplier = 1f;
public bool factorSecondaryByDifficulty = false;
[MustTranslate]
public string secondaryFuelLabel;
[MustTranslate]
public string secondaryFuelGizmoLabel;
[MustTranslate]
public string outOfSecondaryFuelMessage;
[NoTranslate]
public string secondaryFuelIconPath;
private Texture2D secondaryFuelIcon;It is a comp class, so you just add it in XML in the <comps> tag. For example, here is the automortar in Vanilla Furniture Expanded - Security, which needs both shells and reinforced barrels:
<comps>
<li Class="VEF.Buildings.CompProperties_Refuelable_DualFuel">
<fuelLabel>Shots until barrel change</fuelLabel>
<fuelGizmoLabel>Barrel durability</fuelGizmoLabel>
<outOfFuelMessage>Needs new reinforced barrel</outOfFuelMessage>
<fuelFilter>
<thingDefs>
<li>ReinforcedBarrel</li>
</thingDefs>
</fuelFilter>
<fuelIsMortarBarrel>true</fuelIsMortarBarrel>
<fuelCapacity>20</fuelCapacity>
<fuelMultiplier>20</fuelMultiplier>
<initialFuelPercent>1</initialFuelPercent>
<showFuelGizmo>true</showFuelGizmo>
<minimumFueledThreshold>1</minimumFueledThreshold>
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
<initialAllowAutoRefuel>true</initialAllowAutoRefuel>
<autoRefuelPercent>0</autoRefuelPercent>
<fuelIconPath>Things/Item/Resource/ReinforcedBarrel/ReinforcedBarrel</fuelIconPath>
<secondaryFuelLabel>Ammunition</secondaryFuelLabel>
<secondaryFuelGizmoLabel>Shells loaded</secondaryFuelGizmoLabel>
<outOfSecondaryFuelMessage>No shells</outOfSecondaryFuelMessage>
<secondaryFuelFilter>
<thingDefs>
<li>Shell_HighExplosive</li>
</thingDefs>
</secondaryFuelFilter>
<secondaryFuelCapacity>5</secondaryFuelCapacity>
<initialSecondaryFuelPercent>0</initialSecondaryFuelPercent>
<autoRefuelSecondaryPercent>0.5</autoRefuelSecondaryPercent>
<targetSecondaryFuelLevelConfigurable>true</targetSecondaryFuelLevelConfigurable>
<initialConfigurableSecondaryTargetFuelLevel>5</initialConfigurableSecondaryTargetFuelLevel>
<minimumSecondaryFueledThreshold>1</minimumSecondaryFueledThreshold>
<initialAllowAutoRefuelSecondary>true</initialAllowAutoRefuelSecondary>
<showAllowAutoRefuelSecondaryToggle>true</showAllowAutoRefuelSecondaryToggle>
</li>
</comps>- Abilities
- 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