Active Terrains - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

Active terrains allows you to make terrains that tick, which provides a LOT of extra functionality, such as terrains that heal pawns, terrains that set them on fire, terrains that spawn motes, terrains that push heat, etc.

Some of these were implemented on base game, but they are not very versatile.

We provide a few comps to add to terrains. They go in the <terrainComps> tag on an ActiveTerrain:

How do I use this code?

As an example here is the chemdrench terrain in VFE Medieval 2:

<VEF.Maps.ActiveTerrainDef ParentName="FloorBase">
    <defName>VFEM2_Chemdrench</defName>
    <label>chemdrench</label>
    <description>Rough straw matting drenched heavily in chemfuel. Ignites very easily and spreads rapidly between all connected areas.</description>
    <texturePath>Terrains/Chemdrench</texturePath>
    <pollutedTexturePath>Terrain/Surfaces/StrawMattingPolluted</pollutedTexturePath>
    <pollutionOverlayTexturePath></pollutionOverlayTexturePath>
    <pollutionColor>(1, 1, 1, 1)</pollutionColor>
    <pollutionTintColor>(1, 1, 1, 1)</pollutionTintColor>
    <edgeType>FadeRough</edgeType>
    <renderPrecedence>240</renderPrecedence>
    <burnedDef>BurnedStrawMatting</burnedDef>
    <tickerType>Normal</tickerType>
    <pathCost>3</pathCost>
    <statBases>
      <Beauty>-2</Beauty>
      <Cleanliness>-0.1</Cleanliness>
      <WorkToBuild>120</WorkToBuild>
      <FilthMultiplier>0.05</FilthMultiplier>
      <Flammability>1.5</Flammability>
    </statBases>
    <costList>
	<Hay>2</Hay>
	<Chemfuel>1</Chemfuel>
    </costList>
    <designationHotKey>Misc6</designationHotKey>
    <uiOrder>2011</uiOrder>
	<terrainComps>
		<li Class="VFECore.TerrainCompProperties_FireSpreader">
			<spreadTimer>8</spreadTimer>		
		</li>		
	</terrainComps>
</VEF.Maps.ActiveTerrainDef>
⚠️ **GitHub.com Fallback** ⚠️