RimWorld

RimWorld

Permeable Terrain
Kat 19 Apr, 2023 @ 12:37pm
Custom Floor Problem
Hey, I love your mods!

I want to add my own custom floor, but for some reason I can't get it to work with your mod.

My Terrain_Floors.xml looks like this:
<?xml version="1.0" encoding="utf-8" ?> <Defs> <TerrainDef ParentName="FloorBase"> <defName>SF_Grass</defName> <label>Super Fertile Grass</label> <description>Super fertile grass.</description> <texturePath>Terrain/Surfaces/MeSoil</texturePath> <fertility>1.8</fertility> <takeFootprints>True</takeFootprints> <statBases> <WorkToBuild>30</WorkToBuild> </statBases> <generatedFilth>Filth_Dirt</generatedFilth> <constructEffect>ConstructDirt</constructEffect> <modExtensions> <li MayRequire="owlchemist.permeableterrain" Class="PermeableTerrain.Permeable"> <value>0.1</value> </li> </modExtensions> </TerrainDef> </Defs>

I don't know if this would be the right place for the "<modExtensions>" but it also didn't work without it either. I'm on version 1.3.3287. I can place the floor, but filth doesn't get the 0.1 multiplier.
Last edited by Kat; 19 Apr, 2023 @ 12:39pm
< >
Showing 1-2 of 2 comments
Owlchemist  [developer] 19 Apr, 2023 @ 1:31pm 
Hmmm a couple things to check:
1.) if you start the game while devmode is enabled, the console will print out a list of permeable terrains. is it listed?

and 2.) Do you by chance have Permeable Terrain as *both* a local mod and subscribed on steam? If so, MayRequire can choke on that due to a hidden suffix appended.
Kat 20 Apr, 2023 @ 11:59am 
Thanks for the quick answer!

1.) Yes, the log does indeed list my custom floors. ("[Permeable Terrain] The following terrains have been defined as being permeable:")
2.) No, the only local mod I have is mine.

I tried it in a new game with just your mod and it also didn't work.

But after changing it to "<TerrainDef ParentName="NaturalTerrainBase"> it works!

After looking at the differences between the two parents I can most definitely say that I have to set everything like so:

<?xml version="1.0" encoding="utf-8" ?> <Defs> <TerrainDef Name="MyCustomFloor" Abstract="True"> <filthAcceptanceMask> <li>Unnatural</li> </filthAcceptanceMask> <affordances> <li>Light</li> <li>Medium</li> <li>Heavy</li> <li>GrowSoil</li> <li>Diggable</li> </affordances> <layerable>true</layerable> <takeFootprints>True</takeFootprints> <constructEffect>ConstructDirt</constructEffect> <designationCategory>Floors</designationCategory> </TerrainDef> <TerrainDef ParentName="MyCustomFloor"> <defName>Grass_Floor</defName> <label>Grass Flooring</label> <description>Grass flooring</description> <texturePath>Terrain/Surfaces/MySoil</texturePath> <fertility>0</fertility> <statBases> <WorkToBuild>30</WorkToBuild> </statBases> </TerrainDef> </Defs>

If I remove "filthAcceptanceMask" it doesn't work, if I add it it works.

Thank you for guiding me in the right direction!
Last edited by Kat; 20 Apr, 2023 @ 12:01pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50