This repository was archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
CompProperties_ResourceStorage
KylianB edited this page Aug 10, 2022
·
11 revisions
This comp can be added to any building. It allows said building to connect to other buildings in the net and act as storage.
Below, an example of the comp, the building do not need to tick (🟢 mean it default to true).
<li Class="PipeSystem.CompProperties_ResourceStorage">
<!-- Accept a PipeNetDef -->
<pipeNet>VCHE_ChemfuelNet</pipeNet>
<!-- Amount that can be stored -->
<storageCapacity>1500</storageCapacity>
<!-- False if you don't want the storage bar to show -->
<drawStorageBar>True</drawStorageBar> 🟢
<!-- False if you don't want the storage info to show in inspect tab -->
<addStorageInfo>True</addStorageInfo> 🟢
<!-- False if player shouldn't be able to transfer content to other comps -->
<addTransferGizmo>True</addTransferGizmo> 🟢
<!-- Lenght and Width of the bar -->
<barSize>(1.3, 0.25)</barSize>
<!-- 0 mean there is no bar outline -->
<margin>0.1</margin>
<!-- Bar center offset -->
<centerOffset>(0, 0, 0.35)</centerOffset>
<!-- Only use this if you want the player to be able to tell pawn to extract stuff -->
<extractOptions>
<!-- Extract gizmo icon -->
<texPath>UI/Gizmos/ExtractChemfuel</texPath>
<!-- Those need to be translation key -->
<labelKey>VCHE_ExtractChemfuel</labelKey>
<descKey>VCHE_ExtractChemfuelDesc</descKey>
<!-- The amount extracted -->
<extractAmount>150</extractAmount>
<!-- The amount of ticks it take to extract-->
<extractTime>150</extractTime>
<!-- The thing spawned after extract -->
<thing>Chemfuel</thing>
<!-- 1 spawned, 1*X less in the grid -->
<ratio>X</ratio>
</extractOptions>
<refillOptions>
<!-- If true, will always be refilled by pawns. -->
<!-- If false, allow user to enable/disable tank refill -->
<alwaysRefill>false</alwaysRefill>
<!-- Number of ticks needed to refill -->
<refillTime>150</refillTime>
<!-- Thing to refill with -->
<thing>Chemfuel</thing>
<!-- 1 used, 1*X more in the grid -->
<ratio>X</ratio>
</refillOptions>
<!-- Use this if you want filth to be spawned when the storage is destroyed -->
<destroyOption>
<!-- Filth to spawn -->
<filth>VNPE_Filth_Paste</filth>
<!-- Amount to spawn: X/ratio -->
<ratio>1</ratio>
<!-- Spawn around -->
<maxRadius>4</maxRadius>
</destroyOption>
</li>You will also need to add to your def (if drawStorageBar is True):
<drawerType>MapMeshAndRealTime</drawerType>
If you want the storage to explode when damaged, and the explosion size scaling with how full the storage is, you can use the CompProperties_ExplosiveContent comp.
<li Class="PipeSystem.CompProperties_ExplosiveContent">
<!-- 0 when empty, 12 when full -->
<explosiveMaxRadius>12</explosiveMaxRadius>
<!-- Vanilla options below -->
<explosiveDamageType>Flame</explosiveDamageType>
<destroyThingOnExplosionSize>2</destroyThingOnExplosionSize>
<startWickHitPointsPercent>0.333</startWickHitPointsPercent>
<preExplosionSpawnThingDef>Filth_Fuel</preExplosionSpawnThingDef>
<preExplosionSpawnChance>1</preExplosionSpawnChance>
<wickTicks>70~150</wickTicks>
</li>If your building have this comp. Use the GetComp<CompResourceStorage>() method. Then you have access to everything inherited from CompProperties_Resource;
- QuestNode_GetFaction
- Expandable projectiles
- Faction Def Extension
- Toggable patches
- Recipes Inheritance
- Adding new backstories
- Spawning things on new generated maps
- CompApparelHediffs
- CompShieldBubble
- CompHediffGiver
- CompLeavesSpawner & CompAutumnLeavesSpawner
- CompProperties_HomingProjectile
- ThoughtExtensions
- ExcludeFromQuestsExtension
- WeatherLetterExtensions
- WeatherOverlayExtension
- WeatherEffectsExtension
- ThingDefExtension
- Stuff commonality extension
- Biome extension
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- 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
- Animal Behaviours Basics
-
Animal Behaviours Comp Classes
- Acid Attacks and Acid Immunity
- Animal Resources
- Animal Resources On Caravan
- Apply Hediff When Bound
- Asexual Reproduction
- Auto Nutrition
- Blink
- Build Periodically
- Cause Incident
- Change Def if Not Unique
- Change Weather
- Corpse Decayer
- Destroy This Item
- Die After Period
- Die And Change Into Another Def
- Dig Periodically
- Dig When Hungry
- Disease Event Immunity
- Disease Immunity
- Diseases After Period
- Doesn't flee
- Draftability
- Drop on Death
- Eat Weird Food
- Electrified
- Enrage Other Pawns
- Exploding Hatcher
- Extreme Xenophobia
- Fertilizer
- Filth Producer
- Fixed Gender
- Floating
- Gas Producer
- Give Thoughts On Caravan
- Graphic by Style
- Graphic by Terrain
- Hediff Effecter
- Hediff When Fleeing
- Highly Flammable
- Infecter
- Initial Ability
- Initial Hediff
- Initial Mental State
- Last Stand
- Light Sustenance
- Metamorphosis
- Mind Effecter
- Nearby Effecter
- No Taming Decay
- Passive Regenerator
- Pawn Overlay
- Produces no filth
- Refueling
- Regeneration
- State After Health Loss
- Summon On Spawn
- Swallow Whole
- Thought Effecter
- Untameable
- Animal Behaviours Hediff Comp Classes
- Animal Behaviours Damage Workers
- Animal Behaviours Def Extensions
- Animal Behaviours Extra Defs
- Animal Behaviours Misc