RimWorld

RimWorld

43 ratings
Post Office: The Letter Filter
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
1.178 MB
19 Jul, 2023 @ 6:46am
29 Jul @ 8:06am
10 Change Notes ( view )

Subscribe to download
Post Office: The Letter Filter

Description
Post Office allows you to mute certain types of letters and messages (yes, you can finally disable the "Legendary Work" messages, although you'll have to learn how to write regular expressions first, but hey, it's not that hard, I promise! ^^)

Why? Because I am playing with the "CAI 5000 - Advanced AI + Fog Of War" mod and those "Raid: [some faction]" or "Mechanoid cluster" incident letters kinda take some of the fun away of just having your colonists walk around a corner and be greeted by a bunch of angry tribals...

Have you always wanted to have mortar shells suddenly rain onto your base because you didn't notice you were being sieged?
Or have raiders appear on your door step completely out of the blue?
What about drop pods just suddenly crashing trough your roof into your storage area?

Welp, your wishes have been answered, I guess.
With Post Office, you can opt to globally disable certain letter types. For example, simply disable "ThreatBig" letters (the big red ones shown on the right) and all letters of that type (from all mods btw ^^) will be hidden.

Don't care about notifications that a new quest is available? Just disable "NewQuest" letters and you're good to go.

Why not simply use the "Silent Raids" mod? Because that one doesn't work for all mods (and because I struggled getting it to work with RimWar :P), soo yeah... now this mod exists ¯\_(ツ)_/¯

Requires Harmony to work.

Can be added and removed from your saves.

Source code: https://github.com/frederik-hoeft/post-office
Popular Discussions View All (3)
11
12 Jun, 2024 @ 3:15pm
Regular Expressions Help
Th3_Fr3d
2
25 Nov, 2024 @ 9:03am
Debug Actions Menu
Ayrlixx
2
24 Nov, 2024 @ 5:48am
Causes Error
XenoTheStrange
52 Comments
Geojak 18 Sep @ 3:06am 
their used to be a mod called "Letter Reorderer". It has not been updated for long time. it would fit well into yours
Geojak 18 Sep @ 3:06am 
i added the letter reoder feature to your mod

[HarmonyPatch(typeof(LetterStack), "ReceiveLetter", new Type[] { typeof(Letter), typeof(string), typeof(int), typeof(bool) })]
public static class LetterStack_ReceiveLetter_ReorderPatch
{
[HarmonyPostfix]
public static void Postfix(Letter let, int delayTicks, ref List<Letter> ___letters)
{
// ignore delayed letters or nulls
if (delayTicks > 0 || let == null || !let.CanShowInLetterStack)
return;

try
{
// remove and re-prepend to move the new letter to the front of the list
if (___letters != null && ___letters.Remove(let))
{
___letters = ___letters.Prepend(let).ToList();
}
}
catch (Exception ex)
{
Log.Error($"[Post Office] Error reordering letters: {ex}");
}
}
electrococaine 17 Sep @ 12:41pm 
I think you can check how "Animal Filth? Don't Care" mod did it if you need to
electrococaine 17 Sep @ 12:36pm 
can you please also make it work with those small text notifications that pop-up above weather and temperature (eg. "animal filth, "need meal source", "need holding platforms")
Eclipse 13 Sep @ 6:11pm 
could you please make that cai thing for real fog of war mod?
Th3_Fr3d  [author] 29 Jul @ 8:07am 
pushed the 1.6 update without support for CAI 5000 since it seems to have been discontinued for now
Th3_Fr3d  [author] 28 Jul @ 7:28am 
The 1.6 version of this mod is now waiting for CAI 5000 - Advanced AI + Fog Of War to update, since it's a build dependency
Th3_Fr3d  [author] 27 Jul @ 8:45am 
@Aegis Yes, I'll push a 1.6 update, hopefully in the next few weeks, when I have a little more time
Aegis 27 Jul @ 8:23am 
This mod is exactly what I was looking for (including regular expressions <3), except it doesn't work in 1.6 =( (the mod options are blank, opening them throws an error in the debug log).

Any chance someone is motivated enough to update this for 1.6?
Th3_Fr3d  [author] 25 Nov, 2024 @ 6:32am 
@LeMestache I'd say one thing to be aware of is that Rimworld heavily uses the composite pattern and prefers delegation over inheritance, so you'll find rather generic concrete classes (like Pawn or Hediff) and the actual behavior is implemented by their components. Coming from more conventional OOP background it takes some getting used to, but it actually makes a lot of sense in terms of modding support. Anyways, I'm sure you'll figure it out. Good luck!