Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - thewho666

#1
Help / Re: Stop/nerf insect digging speed
May 05, 2021, 06:11:39 AM
Thanks for helping me 👍
I found it and sort of understand what's happening.
The insects dig more often if the room is smaller?

public class ThinkNode_ChancePerHour_InsectDigChance : ThinkNode_ChancePerHour
{
private const float BaseMtbHours = 18f;

protected override float MtbHours(Pawn pawn)
{
Room room = pawn.GetRoom();
if (room == null)
{
return 18f;
}
int num = (room.IsHuge ? 9999 : room.CellCount);
float num2 = GenMath.LerpDoubleClamped(2f, 25f, 6f, 1f, num);
return 18f / num2;
}
}


So maybe this would work?
48h between "digs" regardless of the roomsize?

public class ThinkNode_ChancePerHour_InsectDigChance : ThinkNode_ChancePerHour
{
private const float BaseMtbHours = 18f;

protected override float MtbHours(Pawn pawn)
{
return 48f;
}
}


I also read through the harmony patching instructions but it seems way to advanced for the amount of free time I have at the moment.
Maybe I'll try to add doors to the mod I linked in the first post instead.
#2
Help / Stop/nerf insect digging speed
May 04, 2021, 10:58:15 AM
Hello everyone!
I'd like to slow down the insane speed that the insects mine with. I'm currently doing a prison labor playthrough with only two colonists and I don't even have time to react before my "insect protection system" breaks through my walls..
I'm not here to discuss how I should play so please stick to the topic of writing mods  :)
Soo, I've not written any mods or programmed anything like this before, but I poked around a bit and think I got the basics.

My first thought was to change the "mining speed" of the insects, but they do not "mine" do they? So changing the attack stats would make them almost harmless?
So my second idea was to change their "AI" so that their chance of attacking/mining rock/walls etc. is much lower.
But my veery limited knowledge says that this can't be done through a simple xml mod?

So is this something a beginner like me could do?
I tried searching for similar topics but could not find anything directly helpful 🤔

Plan B is to try adding doors to this mod 😅
https://steamcommunity.com/sharedfiles/filedetails/?id=2422894878