RimWorld

RimWorld

145 ratings
Permeable Terrain Continued
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5
File Size
Posted
71.098 KB
4 Jun @ 2:34pm
1 Change Note ( view )

Subscribe to download
Permeable Terrain Continued

Description
Original Mod: https://node2.projectplanet.cn/@steamcommunity.com/sharedfiles/filedetails/?id=2629981384
Note: You must unsubscribe from the original mod, I use the same packageId to keep compatibility going!



Original Description

One sentence summary
This mod makes it so that liquidy filths, such as blood and vomit, do not last very long if they fall upon permeable terrains such as soil and sand.

Overview
Normally, the lifespan of filth is treated equally no matter where it lands. I made this mini-mod because I play in the desert where the rain seldom comes to wash the filth away, and I was tired of just seeing a sea of blood and vomit when I looked out into the desert wastes.

When filth is generated, no matter the source, it checks two things: Is this filth "liquidy", and is the terrain it landed on permeable? If both are true, then the filth's lifespan is cut by around 90% and will only stick around for several days, as opposed to the typical multiple seasons.

FAQ
Q. Does this mod impact performance?
A. No. This code sits dormant and all is does is run a multiplication to the expiration date when filth is spawned, active for all of one tick.
Q. How does this compare to [FSF] Filth Vanishes With Rain And Time?
A. Rain will already wash away most filth types. FSF's mod allows a few additional filth types to also be washed away (specifically, bulkier artificial debris types like rubble, etc). Additionally, it reduces the lifespan from the vanilla 40'ish days to a much shorter span.
This mod just reduces the lifespan of liquid-type fifth depending on what surface it lands upon. It also has an additional feature to reduce the lifespan of any other type of filth, via a slider in the mod options.

Compatibility
Can be added or removed to games at any point, however it is not retroactive. It only works for newly generated filth, as existing filth already have their expiration dates defined.
  • [FSF] Filth Vanishes With Rain And Time, you may want to adjust the modifier to about 250%. This is because that mod already has a lifespan reduction adjustment. As a side note, rain already washes away filth except for bulky debris types.
  • Regrowth: Core changes filth handling as well. This mod includes a patch to compensate for it automatically.
For other modders
By default, any terrain with "takeFootprints" is considered permeable. For custom terrain that does not have this node, but you still want it to be permeable, add this:
<modExtensions> <li MayRequire="owlchemist.permeableterrain" Class="PermeableTerrain.Permeable"> <value>0.1</value> </li> </modExtensions>

This mod defines any filth as being liquid if it has the "Interact_CleanFilth_Fluid" sound effect. You can otherwise force this behavior by adding this line:
<modExtensions> <li MayRequire="owlchemist.permeableterrain" Class="PermeableTerrain.Liquidy" /> </modExtensions>
If you have DevMode enabled upon game load, you'll get a report of permeable terrain types in the log.
10 Comments
Strubbelkopp 13 Oct @ 12:12am 
I think the Duplicate XML error appears, since ReGrowth: Core removed the <disappearsInDays> tag from Filth_OilSmear in 1.4, which Permeable Terrain added back in. However in 1.5, ReGrowth: Core doesn't remove the tag anymore, so now Permeable Terrain still adds it back in, duplicating it.
To fix it, you could just remove the following from "/Patches/patch.regrowth.botr.core.xml":


<li MayRequire="Ludeon.RimWorld.Ideology" Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="Filth_OilSmear"]/filth</xpath>
<value>
<disappearsInDays>35~40</disappearsInDays>
</value>
</li>
WaffleKing 13 Sep @ 2:49am 
Does this work with urine and feces from Dub's Bad Hygiene? That would be awesome if it does.
Azraile 11 Sep @ 11:37pm 
getting the same error as brooks
delta p(uppy) 7 Aug @ 5:53pm 
work on save?
kad 10 Jun @ 2:37am 
great!
AngleWyrm 10 Jun @ 1:48am 
Check out this image of your mod
https://i.imgur.com/7yphg0W.png
Brooks 6 Jun @ 11:40pm 
Hey. Got a red error and confirmed it's this mod: https://gist.github.com/HugsLibRecordKeeper/5ee97408f45cae8eb829cfe8cbf536ac

XML error: Duplicate XML node name disappearsInDays in this XML block: <filth><disappearsInDays>35~40</disappearsInDays><rainWashes>false</rainWashes><cleaningWorkToReduceThickness>70</cleaningWorkToReduceThickness><canFilthAttach>true</canFilthAttach><maxThickness>1</maxThickness><cleaningSound>Interact_CleanFilth_Fluid</cleaningSound><disappearsInDays>35~40</disappearsInDays></filth>

Should be an easy fix. Thanks for your work!
Kultturelli 6 Jun @ 6:34am 
Thanks!
Casval 6 Jun @ 3:52am 
ty
jsc 5 Jun @ 7:23am 
thankyou