-
Notifications
You must be signed in to change notification settings - Fork 63
RoofExtension
juanosarg edited this page May 30, 2026
·
1 revision
RoofExtension is a def extension that adds a few custom behaviours for new roofs.
public bool drawRoofShadow = true;
public bool dealDamageOnCollapsed = true;
public Color? roofOverlayColor = null;
public CustomRoofGraphic customRoofGraphic = null;CustomRoofGraphic is a wrapper class:
// Drawing data
public Vector2 drawSize = Vector2.one;
public Vector3 offset = Vector3.zero;
public AltitudeLayer layer = AltitudeLayer.Skyfaller;
// Material data
public string customRoofGraphicPath = null;
public ShaderTypeDef customRoofGraphicShader = null;
public Color customRoofGraphicColor = Color.white;
public int renderQueue = 0;This Def Extension is added to the RoofDef of the roof you want to add them to.
If you aren't sure if the RoofDef ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.
For example, on Vanilla Gravship Expanded:
<modExtensions>
<li Class="VEF.Maps.RoofExtension">
<dealDamageOnCollapsed>false</dealDamageOnCollapsed>
<drawRoofShadow>false</drawRoofShadow>
<roofOverlayColor>(0.3, 0, 0.4)</roofOverlayColor>
<customRoofGraphic Class="VanillaGravshipExpanded.ColorableVacBarrierRoofGraphic">
<!-- Draw data -->
<offset>(0, 0, 0.5)</offset>
<!-- Material data -->
<customRoofGraphicPath>Things/Structures/RoofVacBarrier</customRoofGraphicPath>
<customRoofGraphicShader>TransparentPostLight</customRoofGraphicShader>
<!-- Normally used as the singular color for material, here we use it as a base/default color. -->
<customRoofGraphicColor>(146,76,237)</customRoofGraphicColor>
</customRoofGraphic>
</li>
</modExtensions>- 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