RimWorld

RimWorld

Better Random Incidents
78 Comments
Thundercraft 19 Mar, 2024 @ 11:48am 
Is there still a little hope for an update for RimWorld 1.4... or 1.5?
Pozitivizd 9 Jun, 2023 @ 12:33am 
I hope you'll update it to 1.4
Nut Torquer 10 Nov, 2022 @ 1:38pm 
Update when you get a chance please
Riccars 5 Aug, 2022 @ 5:48pm 
Had an issue where it seemed the mod lagged the game considerably every couple seconds on an arctic map with 2 pawns. Looks like it checked every possible incident, including modded ones which were a lot. Also drove me crazy on other maps where raids would be almost nonstop and I'd get nothing done.
Shard 13 May, 2022 @ 12:52am 
There is an option to reduce raid frequency, though I forget what it is called -- I stopped using the mod myself due to other reasons, but I had the issue of up to 12 raids per day, and found a setting to adjust it in the mod options.
The Bard of Hearts 12 May, 2022 @ 7:17pm 
+1 for the last comment. I eventually just had to uninstall this mod.
Bazalisk 11 May, 2022 @ 12:16pm 
any chance we can have a cooldown timer on raid spawns. my pawns are not able to sleep or eat as this mod spams the map with raids during raids whilst raids on raids are happening to the raids! oh god the raids!!!
levoweal 11 May, 2022 @ 11:52am 
How all insect/infestation changes work with Better Infestations? Will there be conflict?
Shard 11 Apr, 2022 @ 12:10pm 
I had forgotten this mod spawned insects from filth. In my latest game, I've got about 400 insects infesting the northern part of the canyon I'm in because I couldn't clean the caves up there. My tribals are fighting an unending bug war. Very different than normal playthrough.
Phil08 15 Mar, 2022 @ 1:00pm 
Be careful when adding it. I spent now hours two figure out, why I get constant raids (about 4 raids per day). Turns out it was this mod, because I play on a world with many factions who are enemies...
123nick 23 Jan, 2022 @ 5:59am 
besides the significant changes, does this mod do anything with mod-added events? like, will vanilla events expanded shuttle crashes and caravan animals wandering in now all have their own independent timers for when they should happen? or does this explicitly only modify raids?
123nick 14 Jan, 2022 @ 6:59pm 
Does this work with incident count multiplier? cause that multiplies the rate incidents come up, so both mods might affect the same thing
The Bard of Hearts 19 Dec, 2021 @ 10:44pm 
OK... I think this mod is what is causing me to be getting at least 2 if not 3 raids per day - every day. It basically breaks the game at this point. Something to do with having multiple factions and not all of them are your friend.
Logan  [author] 1 Dec, 2021 @ 8:42pm 
Not dead, but I mostly only poke at these when something breaks, and I only rarely update rimworld to avoid breaking saves mid-campaign. So I mostly rely on user reports for issues. Not sure why Steam decided not to notify me of the comments here.

In RW 1.2, there was a difficult to remove red warning generated by bugs eating rotten corpses. It was *not* a thrown exception, just an error-level warning that a bug was eating a item providing 0 nutrition. This looks different, so I'll try to reproduce it and fix it.

Regarding "Some like it rotten" support, I *think* just disabling the bugs-eat-corpses option should might fix that. If it doesn't, I can probably make it fix it after a restart.
Wololo 18 Nov, 2021 @ 4:27am 
dead mod ?
Thundercraft 23 Sep, 2021 @ 9:34pm 
Screenshot of Mod Options:
https://pasteboard.co/HnzsoccsviLg.jpg
Thundercraft 23 Sep, 2021 @ 9:29pm 
I tried using this in RimWorld 1.3 with a bare minimum mod list (Mod Manger, HugsLib, Core & DLC). However, it is at least partly incompatible with 1.3. (It's buggy and I don't trust it.) After playing a while and using dev mode to spawn an infestation and make them hungry, I kept getting red errors over and over and over again as the insects kept trying - and failing to - eat something.

Error log: https://pastebin.com/HFJre8pd

So, it seems clear to me that I'll have to wait for this to get updated. And most of this mod's functionality seems hard to test. For example: I'd rather not run a hundred or so simulations to test that "Diseases Consider Health".

At least, I was able to test and verify that this mod's change to make Infestation target the filthiest spots on the map. This definitely works. I could also tell that the option to make insects target rotten corpses to eat more-or-less works... except it may be part of those red errors above.
Thundercraft 23 Sep, 2021 @ 9:18pm 
I'm disappointed that the mod's description failed to explain the Mod Options. Looking in this menu reveals some additional functionality:

[*] Bugs Eat Corpses (default OFF) - Make bugs eat rotten corpses
[*] MTB Multiplier (default 1.0) - Adjusts global event MTB
[*] Insect Spawn Multiplier (default 1.0) - Adjusts global rate of insects spawning from filth
[*] Infestation Filth (default 10000) - Adjusts filth needed on map for an infestation to happen in about a day
[*] Inevitable Infestation (default OFF) - Infestations happen with a fixed MTB, if there is a single valid cell
[*] Infestation Targets Filth (default ON) - Infestations are more likely to spawn at the dirtiest spot on the map
[*] Diseases Consider Health (default ON) - Makes the health of pawns affect how likely they are to get a disease
[*] Shrink Raid Size (default OFF) - Considerably reduces the size of raids, especially for late game
[*] Debug (default OFF) - Spams the log with extra debug messages
ZzZombo 13 Aug, 2021 @ 8:47am 
"Some Like It Rotten" clashes with your insect changes as the player can decide what species may eat rotten corpses separately. I suggest you to completely disable your options regarding that if the former is loaded alongside.
Almantuxas 13 Aug, 2021 @ 8:30am 
@Logan Indeed, Assembly-CSharp.dll only has GetFactions and GetFactions_NewTemp can't be found.
Logan  [author] 13 Aug, 2021 @ 2:12am 
Yup, that makes sense. I'll see if I can find some time this weekend to recompile and figure out what the function name is now. I'm betting GetFactions_NewTemp is now GetFactions.
Almantuxas 12 Aug, 2021 @ 2:18am 
V That error appears every 10 seconds, with a minimal mod list, with BRI enabled.
Almantuxas 11 Aug, 2021 @ 9:35am 
System.MissingMethodException: System.Collections.Generic.IEnumerable`1<RimWorld.Faction> RimWorld.FactionManager.GetFactions_NewTemp(bool,bool,bool,RimWorld.TechLevel,bool)
at (wrapper dynamic-method) RimWorld.StorytellerComp_RandomMain.RimWorld.StorytellerComp_RandomMain.MakeIntervalIncidents_Patch1(RimWorld.StorytellerComp_RandomMain,RimWorld.IIncidentTarget)
at RimWorld.Storyteller+<MakeIncidentsForInterval>d__23.MoveNext()
at RimWorld.Storyteller+<MakeIncidentsForInterval>d__22.MoveNext()
at RimWorld.Storyteller.StorytellerTick()
at (wrapper dynamic-method) Verse.TickManager.Verse.TickManager.DoSingleTick_Patch0(Verse.TickManager)
Nut Torquer 9 Aug, 2021 @ 11:10pm 
It seems to not give me any events, either good or bad. Closest I got was a Annual Expo after about a year on a Rich Explorer start.
Logan  [author] 21 Jul, 2021 @ 3:05pm 
(If it throws errors running on 1.3, let me know and I'll prioritize it).
Logan  [author] 21 Jul, 2021 @ 3:05pm 
It compiles against 1.3 without error. Which means it *probably* runs without error and without a recompile. I'll officially release 1.3... eventually...
The Bard of Hearts 20 Jul, 2021 @ 6:52pm 
+1 for a 1.3 update! :steamhappy:
Logan  [author] 16 Jul, 2021 @ 10:14am 
Yes, it does what it says on the tin. If you can make peace with most of the factions, the raids will decrease. The assumption is you'll have 3-4 hostile factions (mechs, pirates, savage tribals, sometimes one more), so that sets the "baseline" for raid frequency. If you have 25 hostile factions... Also, if you are hostile to two allied factions, they can raid at the same time.

I should probably add a raid frequency knob in the settings so you can tell it how many hostile factions should give the base raid frequency. I hadn't considered someone might increase the number of factions so far.
condottiere 13 Jul, 2021 @ 5:10am 
P.S. Not a criticism, btw! If this is correct, then the mod definitely works as advertised on the tin. A lot more excitement than plinking one raider every quadrum.
condottiere 13 Jul, 2021 @ 5:09am 
If I understand this correctly, the raid incident calculation is performed per enemy faction? I forgot I had this in my modlist, and on a whim I recently shoved the faction slider up to 100 factions. It's been 27 days in my new colony, and I've had well over 200 raids. Thankfully, many of the raiders take each other out. My half dozen pawns are all coked-out wrecks high on whatever yayo or wake-up they can scrounge from the mortar-cratered battlefield.
Suff 10 May, 2021 @ 9:41pm 
As relevant concern, I'm concerned about the rate the bugs spawns in my the enclosed living rooms, it happened mostly map start before I cleaned out the rooms, I had to kill couple bugs each day from 1 to 5 spawning in my only barracks. Nothing too bad, just that they appear in there out of nowhere as soon as I live the room was kinda awkward. (I play with mod real fog of war, so maybe I'm missing something in spawning mechanics, but that's what it felt like). Maybe some pre-spawning mechanics similar to hive indication could be added to make the process predictable.

I understand that it might be out of your scope of interest. Just wanted to share.
Thanks for the mod
2/2
Suff 10 May, 2021 @ 9:41pm 
A suggestion.

I've had a lot of blocked by the rock pockets on the map the insects seems to unluckily spawn inside. They aren't mining and just dying from starvation eventually, adding to the filth. Is it intentional? It feels like spawning the bugs in inaccessible areas doesn't make much sense, as their fate is just dying there. Maybe checking the pathing is enough, or it's an opportunity for adding some AI digging.
1/2
Suff 5 May, 2021 @ 11:49pm 
@Logan thanks a lot, tons of insightful info
Logan  [author] 5 May, 2021 @ 10:59pm 
@Lobo, there is an indirect way to use this against mechanoids. The insects which spawn in are targeted by mechanoids, and provide a continual stream of targets. If the mechanoids are not actively assaulting you, they will gradually kill themselves shooting at the insects.

That said, the primary effect is actually the opposite; this mod makes mechanoid raids *more* common relative to other raids, as you cannot simply declare war with everyone to reduce the percentage of *a fixed number* of raids which are mechanoids.
Logan  [author] 5 May, 2021 @ 10:55pm 
2. Insects without a hive are fairly passive. They can fight back if you engage them in melee, but otherwise they will usually run away. BRI doesn't change this.
1. You can also adjust the Infestation Filth setting, if you increase it you should get fewer bugs. Bugs show up more with high concentrations of filth rather than total amount on the map, and are more common the warmer it is. On warm maps, I'd expect to see a handful of megascarabs at any time. Right after a major fire, and if there are rotting corpses on the map, I'd expect a few larger ones.

To directly answer your question, ash does not attract bugs, so it's other detritus causing the insects. Corpse Bile is your primary culprit, along with similar biologic debris.

I probably need to apply a curve to the temperature effect; I usually play on fairly cold maps, so don't know how it behaves in the tropics or similar. I'll probably add a tuable parameter for temperature.

Suff 4 May, 2021 @ 11:34am 
1. Can I get an estimate, if I had 20% 300x300 map burnt down so ashes are laying around (Crash Landing mod as a start), how much insects should I expect?
I'm day 4th and changed Insect Spawn Multiplier to 0.25, but I still have to kill 5-6 bugs daily, couple spawns inside my buildings, rest are swarming the map, I can see every of them as I play with Real Fog of War, but it feels like there are 25-30 running around. Right now
2. I have already killed about 6-7 megaspiders, are they supposed to be fully passive running meat sources? It's strange they don't attempt to fight back
Lobo 13 Mar, 2021 @ 8:57am 
so how do we best defend against mechanoids? a few exempels from pepol here why use the mod. and how to decrease the chanse
MrKampfCookie 12 Mar, 2021 @ 9:30am 
I can also give you this further information:
When clicking at the second MTB-line, it states the following:

MTB Adjusted days: 23.28
Verse.Log:Message(String, Boolean)
lperkins2.BRI.BRI:Patch_CategoryMTB(StorytellerComp_CategoryMTB, IEnumerable`1&, IIncidentTarget)
RimWorld.StorytellerComp_CategoryMTB:RimWorld.StorytellerComp_CategoryMTB.MakeIntervalIncidents_Patch1(StorytellerComp_CategoryMTB, IIncidentTarget)
RimWorld.<MakeIncidentsForInterval>d__21:MoveNext()
RimWorld.<MakeIncidentsForInterval>d__20:MoveNext()
RimWorld.Storyteller:StorytellerTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Logan  [author] 11 Mar, 2021 @ 10:06pm 
Yeah, the MTB stuff is this mod. The question is what part of it... Could be the filth map, could be something else. I was hoping to have a profiler log or something to make it easier to tell. Could hit the settings and toggle the various sub-parts and see if any of them make a difference... Specifically the infestation related ones.
MrKampfCookie 8 Mar, 2021 @ 2:54pm 
I'm having a similar issue to that of Big Head Zach where my game freezes periodically every few seconds when this mod is active. Right when the freeze occurs, the console pastes two lines of MTB-code (first line is always the same, second line will sometimes change numbers).
Big Head Zach 8 Feb, 2021 @ 6:31am 
I got an i7 with 6 cores in it.
Will have to insert it back into my save and see what it does, and I'll share a log. Might be a day or two.
Logan  [author] 7 Feb, 2021 @ 10:23pm 
If you can provide a log, I'd be happy to take a look. There is one step that is likely the culprit, which is a fairly CPU intensive check. It's multithreaded, so if you have enough cores you don't notice it, but maybe I need to make it async too...
Big Head Zach 7 Feb, 2021 @ 8:00am 
How often does this check run? I used Performance Analyzer to look into a 0.3-0.4s hitch I started getting every 15 seconds or so and this seemed to be the cause. Arguably with other mods also adding events it may be adding to the complexity of your math, but wanted to let you know. No red errors were involved but I can attempt to provide you a log if that would help.
The Bard of Hearts 9 Oct, 2020 @ 4:53pm 
Awesome. Thanks man!
Logan  [author] 9 Oct, 2020 @ 3:51pm 
It's updated, and has some new functionality.

@Dynamic, I can't skip growing zones since I have no way to know if they're a real garden or not. That said, dirt doesn't count as dirty, in fact it *can't* get dirt on it. If it gets other kinds of "filth" though, that'll attract bugs.

@blechinger See the changelog about having the "inevitable infestation" inverted on the backend. If you had it unchecked, it would use the stock behavior. Oops. Should be fixed now.

As for new functionality, there's a flag to reduce the size of raids marginally, especially in the late game. It also will preferentially choose enemies of your tech level or higher, so tribals are less likely to attack while mechanoids and pirates are more likely to attack. The overall rate of raids should be the same, but this helps reduce the number of raiding pawns. Also, the lower the ratio of wealth per pawn, the less likely you are to be raided.
Logan  [author] 6 Oct, 2020 @ 4:43pm 
It should have kept working, I just recompiled against 1.2, give me a bit to make sure nothing broke and it'll be updated.
The Bard of Hearts 19 Aug, 2020 @ 5:38pm 
+1 vote for a 1.2 of this mod! This is a good one that I really want to keep using.
Othobrithol 19 Aug, 2020 @ 12:09am 
Hmm I don't think your changes to infestation are carrying over into 1.2
Which is really sad because honestly, you have the best mechanism for them.
Inquisition Time! 6 Jun, 2020 @ 2:58am 
It is compatible with the mod Time Based Dangers?
Dynamic 26 May, 2020 @ 4:33pm 
This mod'll sometimes cause insects to spawn in roofed growing zones because it is dark and dirt is dirty. Could you add an extra check to counter this?