边缘世界 RimWorld

边缘世界 RimWorld

Permeable Terrain
Kat 2023 年 4 月 19 日 下午 12:37
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.
最后由 Kat 编辑于; 2023 年 4 月 19 日 下午 12:39
< >
正在显示第 1 - 2 条,共 2 条留言
Owlchemist  [开发者] 2023 年 4 月 19 日 下午 1:31 
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 2023 年 4 月 20 日 上午 11:59 
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!
最后由 Kat 编辑于; 2023 年 4 月 20 日 下午 12:01
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50