You mean like even 0 babies will trigger misscarriage event?
it should not throw an error just by calling a function.something is definitely wrong.i guess we can only test and see.
Ah, I see. Miscarriage event only happens in case there's a pregnancy already. Same how Minotaur miscarriage trait works, basically.
Dnspy throws an error upon file saving with an additional trait, but still saves the data. Usually it's a bad thing and game crash, but I didn't encounter any crash. Maybe it's not a critical error and won't break anything. That's why I'm offering this mod as a stability test/if it works with other BepInEx mods.
So yeah, here's a mod. Short description: it adds a chance of miscarriage event for all monsters, like a base trait for Salamander. But for other monsters it won't show in stats window. Also, for it to work I think you'll have to buy/create a new monster, because existing ones won't carry it other (seems like they keep their traits in save file). Anyway, it will increase difficulty for sure.
Installation: Replace Assembly-Csharp.dll in Managed folder. Make a copy of original file. Play the game.
Only works with version 2.0.15.1
You must be registered to see the links
Now, I also noticed there's an additional possibility for this mod. You see, traits have configuration option like this:
"m_IsMonsterTrait": "TRUE",
"m_IsSlaveTrait": "FALSE",
So, in theory, slaves can also have this trait, but I have no idea how it will work. I'll do some testings to see how game handles miscarriage trait added to slaves themselves.