Garry's Mod

Garry's Mod

387 ratings
NPC Battle Cleanup
4
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun
File Size
Posted
Updated
0.029 MB
Jun 5, 2020 @ 9:35pm
Jun 23 @ 11:59am
36 Change Notes ( view )

Subscribe to download
NPC Battle Cleanup

In 2 collections by Xalalau
Xalaserver Base
57 items
Brasil - Supremacia
100 items
Description
-----------------------------------------------------------
BRASIL, Junte-se: https://discord.gg/ytkXGNU
GMBR, criadores BR de addons e vídeos e tudo.
-----------------------------------------------------------

TOOL DEV STATUS: BUG FIXES ONLY

From 04/12/2021 onwards I'll only be providing fixes for this tool, so I can focus on other projects.

Thank you all for your support and dedication so far.




Introduction
Hello, there!

NPC Battle Cleanup (NBC) is an elegant and very light addon inspired by this old mod. It's designed to react to game events by automatically cleaning up battle remains, which cause lag and chaos.

Features
  • It works without any requirements;
  • Supports presets;
  • Supports singleplayer and multiplayer;
  • Lets you control the remotion delay;
  • Kills all live NPCs from disconnected players;
  • Removes decals from the map (blood, gunshots, explodion marks...);
  • Removes corpses, leftovers and debris from dead NPCs;
  • Removes weapons and items dropped by dead NPCs and/or dead/live players;
  • Respects GMod's Keep Corpses option (ai_serverragdolls 1).

Removal Support
  • All the default HL2 SENTs and SWEPs;
  • Addons with generic class names;
  • Compatible with TFA;
  • M9K;
  • CW2;
  • ArcCW;
  • VJ Base.

When you find an entity (weapon, item, gib...) that isn't being removed, usually it’s not a bug, but a custom class name that needs special treatment. That's why I list some important compatible addons, like VJ Base, right above. I studied them and did the correct/new checks.

So, if you want cleanup support for some entity or addon related to "battles against NPCs", ask in the comments and leave some information / links / videos - anything that helps me quickly identify what needs to be done.

More
Support my work if you like it:
[www.paypal.com]

Here is the code[github.com].
I appreciate reports, ideas and help.

Thank you!
< >
170 Comments
Xalalau  [author] Oct 17 @ 4:43am 
@Duke
The addon should remove them, it must be some game update bug. I'll take a look later.

@Suri
This is a feature and it can be disabled in the options menu.

Now I'm starting to think that the "it's deleting my RP NPCs when I leave" bug two of you reported doesn't exist. I think I'll have to disable this behaviour by default because the settings are being ignored.
duke of salem Sep 28 @ 7:33pm 
Can you make Barnacles removed from map after being killed?
Suri Sep 25 @ 1:12pm 
Found an issue. This addon despawns any AI or NPC when a player disconnects from the server
Jduke Sep 12 @ 12:32pm 
Half-Life resurgence ragdolls dont disspear.
Xalalau  [author] Aug 13 @ 10:19am 
Sorry for the delay. I need at least the name or link of the addons to be able to check the problem. I'm not a RP player.
CJ Jul 27 @ 12:40pm 
I am with Kudere Bot, If I leave my server on overnight without restarting, all my vendor NPCS just disappear. How do we fix this? Some people have NPCs that need to be permanently there!
Xalalau  [author] Jul 22 @ 11:33am 
Hey, take a look at my new addon:
https://steamcommunity.com/sharedfiles/filedetails/?id=2553727051

@Kudere Bot
I'll test it later.

@Aidenzappering
The addon deletes remains, not ragdolls, so the idea is to support these mods.
Aidenzappering Jul 20 @ 4:02am 
One question. Is this compatible with ragdoll mods?
Kudere Bot Jun 30 @ 4:09am 
I have perma npc-terminals(vehicle shop) on my map. This addon remove it. Can it be fixed?
Xalalau  [author] Jun 23 @ 11:55am 
@Yubi @Aidenzappering
Fixed

@Dr. George Winkler 5
Keep corpses works here, there must be some incompatibility in your game.

@Locurafia
The addon already works fine with the LiteGibs

@zcj1873
Thanks