RimWorld

RimWorld

The Inquisition (Warhammer 40k)
FL0RENT_ Dec 15, 2021 @ 9:13am
Issue with pawngroups in enemy raids
There is an issue with the raids shared by both this mod the Astartes one.
When one of the factions from either mod is enemy with you and tries to raid you, the game is very likely to crash.
In some situations, the raid will be rescheduled and it will cause an endless loop of crashes, gradually slowing the game with each attempt at a new raid.


This is due to the way Rimworld generates raids and how it interacts with blacklists for raiding strategies.
When a raid is scheduled, the points for pawns and the two parameters for raiding strategies are selected. that part does not take the blacklists of individual pawn groups into account, only the tech level.
Then, when the raid starts, it will chose a pawn group compatible with the options and generate the pawns.
If no compatible pawn is found, the game will crash.
If the raid was forced (the issue MWRK had with "raids for me", and maybe the retaliatory raids from when you attack a base), it will be rescheduled with the same parameters.

Also, because ally raids have their own separate versions of raiding strategies, they outright ignore your strategy blacklist.

I'm not sure if there is a way to outright ban a faction from using a certain type of raid (via xml, at least), so I would recommend either removing the disallowed strategies or creating a new pawn group for "miscellaneous" raid types and weighing your groups to make them much rarer than the others so they only spawn when no other group is compatible.