RimWorld

RimWorld

911 ratings
Cleaning Speed
3
5
4
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
515.643 KB
9 Feb, 2022 @ 8:37am
12 Jun @ 9:54am
5 Change Notes ( view )

Subscribe to download
Cleaning Speed

In 1 collection by Aelanna
The Eccentric's Angels [1.4]
148 items
Description
Updated for Rimworld v1.4: Cleaning Speed is now a vanilla StatDef! However, the vanilla implementation is not affected by pawn capacities, so Cleaning Speed now simply adds the appropriate pawn capacity modifiers as well as the two traits that affect it.

A simple mini-mod that implements a Cleaning Speed stat and adds two traits that affect it. Without it, vanilla cleaning occurs at a fixed rate, with nothing positively or negatively affecting it.

Mod Contents

Cleaning Speed is multiplied by Global Work Speed (100%) and relies on Manipulation (100%) and Sight (50%). This means that the speed at which a pawn cleans will be affected by traits that modify Global Work Speed (such as Industrious, Hard Worker, Lazy, and Slothful) and implants that affect Manipulation (such as prosthetic or bionic limbs). At 100% Cleaning Speed, a pawn will clean filth at the same rate as vanilla.

Fastidious is a new trait that increases a pawn's Cleaning Speed by 50% and decreases the rate at which they generate filth by 50%.

Slovenly is a new trait that decreases a pawn's Cleaning Speed by 50% and increases the rate at which they generate filth by 50%.

Note: If you use Ideology's slavery system, Cleaning Speed will cause slaves to clean slightly slower due to their penalty to Global Work Speed.

Mod Compatibility

Cleaning Speed should be compatible with all other work-related mods unless they also attempt to modify the speed at which cleaning happens. At the time of writing, I am not aware of any mods that do so; please let me know if you encounter any issues!

Safe to Add

Cleaning Speed should be safe to add or remove from an existing save, but as always, it's in your best interest to make an extra save file just in case!

Technical Details

Cleaning Speed modifies the rate at which work is done by postfixing JobDriver_CleanFilth.MakeNewToils and replacing the tickAction of the actual work-performing Toil. CleaningSpeed values for individual pawns are cached in a static Dictionary with a lifetime of 60 ticks.

As Cleaning Speed is a fully implemented StatDef, bonuses to Cleaning Speed can be applied anywhere StatModifiers are allowed, including weapons (tools), apparel, traits, and hediffs:

<statOffsets> <CleaningSpeed MayRequire="Aelanna.CleaningSpeed">0.50</CleaningSpeed> </statOffsets>

For an example of a mod that has Cleaning Speed support, Eccentric Tech - Angel Apparel's worker uniforms and worker aprons each grant a cumulative 50% bonus to Cleaning Speed.
72 Comments
Citizen706 1 Jul @ 2:54pm 
@LoopKat Thanks for the tip, I'll take a look on that

@Aelanna I'll pay attention to that, with the new 1.6 optimization update I also think most of those mods will be obsolete, thanks again!
LoopKat 1 Jul @ 11:58am 
@Aelanna I mean, that's a fair disclaimer, though that's also why I offered JobsLimitsTweak as the primary recommendation because that seemed to be more specific to their particular issue. And, it's always good practice to read a mod's description and skim through comments to see what sort of issues people may be experiencing

Personally, I've got 398 mods in my modlist and haven't noticed any conflicts between the performance mods that I recommended, but mileage will likely vary, especially whenever a new game version actually drops (I stayed on 1.4 for probably a year after 1.5's release just to see how many mods would be updated/continued/deprecated). Most of my mods are simpler tweaks/add-ons such as quality of life, textures, weapons, walls, animals, etc. as opposed to mods that overhaul the game in a more significant way, such as Combat Extended or Medieval Overhaul, so performance mods probably run into fewer issues in a setup like mine
Aelanna  [author] 1 Jul @ 8:42am 
@LoopKat @Citizen706 - As mentioned previously, this mod does very little to the actual function of cleaning other than adding two additional StatParts to the vanilla CleaningSpeed StatDef. However, I just want to point out that blanket-recommending performance-enhancing mods often does more harm than good as every single one of those mods functions by altering the behavior of the vanilla game and thus potentially introducing compatibility issues themselves. RocketMan in particular has an inactive author and most of its functions have been obsoleted by changes in 1.6, so it's unlikely to be updated. Performance Analyzer is also a dev-oriented tool and liable to introduce even more issues than the others if misused.
LoopKat 30 Jun @ 11:34pm 
@Citizen706 Try the mod "JobsLimitsTweak" and see if that helps at all. There's a behavior in Rimworld where pawns who try to do more than 10 jobs in one second experience major issues. Usually the pawn just becomes unresponsive, but in cases where their stats are very high, it can cause major lag too

Otherwise, make sure you're stocked up on the usual performance mods: Performance Fish + Fishery database (from github, not the Workshop), RocketMan, Dubs Performance Analyzer, and Performance Optimizer
Citizen706 20 Jun @ 12:32pm 
Thanks for replying. After running some tests I also think so but I don't know which mod could interfere.

The two things I think could be is either the very high workspeed of my colonists or the Pick up and Haul mod.

I'm not a good modder so I'm not sure.
Aelanna  [author] 20 Jun @ 10:41am 
@Citizen706 - I just ran a test myself with over 100 colonists and flood-filling the entire map with filth and there was barely any bump in game performance (approximately 2.3ms/tick to 2.5ms/tick, which rapidly went down as the filth was actually cleaned up). This sounds more like a mod compatibility issue than anything that this mod is doing, which is simply adding two stat parts to the vanilla Cleaning Speed stat via a simple XML patch. If you can help narrow down which mod might be causing the slowdown then I can take a look and see if there's anything that can be done about it, but otherwise there's not much for me to go on.
Citizen706 20 Jun @ 9:43am 
Hello, dude! I tested out your mod on 1.6 with a colony with 50+ pawns, 40+ animals and let the colony get VERY dirty.

I noticed that performance drops by like 95% when cleaning the mess.

My pawns have extremely high workspeed (I'm using a personal mod that alters the stats of the pawns to be absolutely OP), I don't know if that's the root of the problem but I appreciate if you could take a look.

On the debug log there's nothing popping up but the lag is visible.

Thanks!
nikita150u 28 Sep, 2024 @ 1:03am 
Ok, ill ask them
Aelanna  [author] 27 Sep, 2024 @ 1:15pm 
@nikita150u - Cleaning Speed is a vanilla stat since 1.4 and thus all this mod is doing is making said stat affected by capacities and adding the two new traits. If Common Sense's custom job isn't taking Cleaning Speed into account, then they need to fix it on their side. :)
nikita150u 27 Sep, 2024 @ 12:49pm 
Can you make patch for Common sense? Cause seems like its adding own cleaning job which extremely long and not affected by this mod