RimWorld

RimWorld

39 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
47 Comments
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!
LeMestache 25 Nov, 2024 @ 5:31am 
I have a bachelors in CS so I won't have too many issues with C#, but I couldn't find a decent guide to quickly get into modding, guess I just need to invest more time in it. I'll see how it goes, thanks a lot!
Th3_Fr3d  [author] 25 Nov, 2024 @ 5:07am 
@LeMestache I work as a software engineer so the C# part wasn't an issue for me to get into Rimworld modding. Otherwise, a good way to get started is to look at the official rimworld wiki and whenever you're after something specific use tools like grep (or dnGrep on Windows) to search through Rimworld's XML data (in steamapps/common/RimWorld/Data) to get an idea for what you're after. Once you know a specific class or symbol name, you can use tools like dotPeek to disassemble Rimworld's binaries (Assembly-CSharp.dll) and search in there for the implementation details. This can also give you a good idea on where to apply Harmony patches and things like that.

For the project setup and deployment feel free to take a look at the source code of this mod, linked in the description.
LeMestache 24 Nov, 2024 @ 2:20pm 
That's certainly an interesting interaction, was wondering why it was trying to access CAI-5000 which I didn't have. Thanks for the quick fix, gonna try my hand at modding later for fun. Did you learn everything on your own or did you look up some guide to get a basic understanding of modding Rimworld? Not programming in general, just Rimworld :P
Th3_Fr3d  [author] 24 Nov, 2024 @ 5:41am 
@LeMestache should be fixed now :)
Th3_Fr3d  [author] 24 Nov, 2024 @ 4:53am 
@LeMestache Incredible. Apparently Vehicle Framework does some reflection in the background where it enumerates any and all types that are currently loaded, even if they are completely unrelated to their mod - something they absolutely should not do. Anyways, in doing so they somehow manage to access a Harmony patch in Post Office for Combat AI 5000, which is inactive and not initialized because that mod is not part of your mod pack (which is fine), and everything crashes because Vehicle Framework tries to access something that obviously isn't loaded.

Thanks for the report, I believe this could also be the reason why the debug action menu breaks for some people. Can someone confirm that of those who are having issues with the debug menu you have Vehicle Framework loaded but not Combat AI 5000?