tModLoader Boss attacks damaging NPC's


Skeletron Prime
So, in the Mod Ancients Awakened theres a boss called Rajah Rabbit, Champion of the Innocent. And, despite his name, he has a penchant for killing all of your NPC's because of an attack he has where he rains carrots from the sky, which pierces blocks. Because this is a Scal Tier boss, said carrots deal a lot of damage, and there are a lot of them. You can see where this is going. After fighting him you usually have no NPC's left except for one from the mod that has 160000 health. Now, I made a suggestion on the discord server for the mod to prevent him from doing this, but one person (Who I'm starting to think is a bit biased, as they have disagreed with EVERY single suggestion I've made on that server) said that Coding-wise, it would be impossible. Is this true? I don't think it is, or the ML attacks would probably massacre all my NPC's, but I've never had one die during the fight.
It's near impossible for the same reason they told you in the Discord: There's no way for a projectile to damage only the player without every projectile running code to specifically prevent hitting NPCs (which is way too much to do given the number of carrots) or to make all friendly NPCs immune (which can screw things up elsewhere).

The best solution here is to just fight Rajah somewhere else. Fighting a boss near your NPCs is a surefire way to get them killed, and it's not really fair to blame the devs of AA that your choice of arena places your NPCs in the line of fire.
Fighting certain bosses elsewhere is a nice solution. For example, the destroyer would notoriously wipe out your entire town, if you try to fight it there.
You just make a more remote area into your "boss fighting place" or something.
That is what I thought first on a modded playthough where I wanted to keep town NPCs well and alive...

But then you get things like offscreen enemies murdering your townspeople, or someone drowning in a tiny pudle of water... and being annoyed about the truffle managed to drown in a 2 blocks deep puddle of water that wouldn't affect the player, and he drowned WHILE autopause was on and I was looking at his shop... I just decided to look for mods that actually can keep NPCs alive...

And there are mods that make them invulnerable to monsters and drowning. look around for such mods, they are quite nice. simple, but effective to keep your townspeople alive. (they still would die in lava though)
You can download my Friendly NPCs Don't Die mod which makes sure enemies can't damage your npcs.
Top Bottom