A plugin for TShock that allows admins to block certain NPCs from spawning in the world.
- Originally made by Olink
- Originally updated for TShock
4.5.3
on Terraria1.4.2.3
by moisterrific. - Upgraded by adding support for having a limit of npc's that can spawn into a world by Moneylover3246.
- Updated for TShock
5.2
on Terraria1.4.4.9
by yours truly. - Fixed most of the issues from the previous version.
- Now supports the latest TShock silent command specifier
- Put the .dll into the
\ServerPlugins\
folder. - Restart the server.
- Give your desired group the
plugin.npc.blocker
permission.
blocknpc
(same asbannpc
andbanmob
)unblocknpc
(same asunbannpc
andunbanmob
)
/blocknpc <NPC name or ID> <Max spawn limit (Default 0)
/unblocknpc <NPC name or ID>
.banmob Zombie 5
- Allows only 5 Zombies to be alive in the world at the same time, and will silently send a message/unbanmob king slime
- Tells all players on the server you unbanned King Slime from spawning/npc-reload
- Reloads the config
NPCAddedMessageSlient
- The message to send to a player silently when an NPC is bannedNPCAddedMessage
- The message to send to all players when an NPC is bannedNPCRemovedMessageSilent
- The message to send to a player silently when an NPC is unbannedNPCRemovedMessage
- The message to send to all players when an NPC is unbannedBlockBanMessageToOthers
- Whether or not to send a message silently regardless of the command specifier
- To reset the database, delete
npc_blocker.sqlite
in thetshock
folder - All commands require the
plugin.npc.blocker
permission
- Banning a segmented enemy (like worm types) is kind of glitchy, if you ban a body part of their segment, they will still spawn but die almost instantly afterwards, banning the head part prevents the spawn completely.
- I've not completely tested this against more specific instances such as bosses with multiple parts (moon lord?).
- Download the source code.
- Open the
.sln
file. - Check to make sure the references are all correct and up to date.
- Build.
- I plan on adding more features to this plugin down the road, such as listing the current amount of banned NPCs and optionally ban NPCs based on a specific threshold (for example: allow no more than 5 wraiths to exist in the world).
- Also maybe develop this into a more robust plugin where NPCs can be banned based on number of votes, game time, progression level, etc.
- The original version was very outdated with the last update in 2015. I did the best I could to update it to work with the latest TShock/Terraria versions and fixed most if not all of the problems with the original, such as only being able to input NPC ID, inadequate command output messages, and more.
- Still, despite all these issues Olink did a great job because I totally wouldn't be able to make something like this from scratch.