Garry's Mod

Garry's Mod

NPC Battle Cleanup
241 Comments
Xalalau  [author] 13 Sep @ 10:34am 
Ty. There's even an alternative in the description if you want to experiment. I'll update this addon here one day to better expose configurations and make corpses removal a bit different.
bob 12 Sep @ 3:11pm 
So this is it... the mod i've been looking for in my addons for forever.
moor 1 Aug @ 11:55pm 
okay
Xalalau  [author] 1 Aug @ 4:06pm 
Mostly
moor 1 Aug @ 3:33am 
does this remove npc gibs ?
♫MusicMen225♫ 18 Jun @ 12:45pm 
No worry :) For example, there's DrGBase, it's one of the more popular for custom NPCs. That's honestly the only other one I use besides VJ Base so I don't really know of many other ones.
Xalalau  [author] 18 Jun @ 7:51am 
Could you list these bases here? I don't play a lot of GMod anymore these days.
♫MusicMen225♫ 18 Jun @ 6:52am 
Damn. That's actually a pretty nice surprise, considering I thought this was no longer going to be developed per the description. Hope to see the rewrite whenever it's out then! Although, any plans for support of other NPC bases or is that not really planned? This works well for default and VJ Base NPCs but other bases not so much.
Xalalau  [author] 17 Jun @ 8:57pm 
Hey, thanks! I actually have a rewrite plan to improve this addon - mainly to remove corpses more effectively and expose configuration options so players can define what should be deleted themselves. Keeping everything locked inside the Lua file wasn’t the best design choice.
♫MusicMen225♫ 17 Jun @ 3:00am 
Honestly? I know there's an alternative addon and this isn't being kept up to date, but this is still the best addon for NPC cleanup out of all that I have seen so far. It's also nice that this doesn't remove player collisions with ragdolls, or at least as far as I'm aware anyway. Thanks for making this even if you don't work on it anymore, it's a great addon that I will definitely want to keep using for years into the future :3
Serial Designation N 31 Mar @ 2:18pm 
does it support Drg Base NPCS?
Domawesome04 25 Mar @ 10:59am 
Finally, I can play campaign maps with good frame rate
Xalalau  [author] 16 Dec, 2024 @ 8:53pm 
It deletes every entity that starts with item_.

You can disable it by downloading the code, placing it in your addons folder, opening /lua/autorun/server/sv_nbc.lua, removing line 101 and unsubscribing from this addon.

Sorry for the burden, but the configs are hardcoded. Actually I'd like to do some good changes to this addon - like exposing these configurations, but I need free time. I have become a slave to capitalism.
Tiny Desk Engineer 10 Dec, 2024 @ 4:11pm 
This addon seems to get rid of item_healthcharger and item_suitcharger entities even though they really shouldn't be.
car 12 Oct, 2024 @ 2:27pm 
@user (spooky) only if you disable keep corpses which breaks the game
Xalalau  [author] 19 Jul, 2024 @ 8:01pm 
I'll likely revisit this addon to improve how bodies are removed, add support for more entities and expose the entities lists (so people will be able to add things without asking me for support).
KannedKielbasa 16 Jul, 2024 @ 9:25pm 
Tacrp support? :')
Xalalau  [author] 1 Jul, 2024 @ 2:31am 
Xalalau  [author] 26 Jun, 2024 @ 9:58am 
GMod only provides functions to erase them all at once.
g0ldyosh 26 Jun, 2024 @ 9:12am 
Would be nice if decals faded out instead of disappearing instantly.
Xalalau  [author] 17 Jun, 2024 @ 4:26pm 
hey
s e a l 17 Jun, 2024 @ 8:07am 
I just realised who made this! Hey Construct Beta man!
Pentax_JN 25 May, 2024 @ 9:29pm 
this is the exactly that i wanted Thx bro
Omarb10legends 9 Apr, 2024 @ 4:09pm 
the one support swep we needed. MW is not here, unfortunate. but gread addon nontheless
Xalalau  [author] 7 Mar, 2024 @ 11:24am 
There's support. The addon must have updated.
KlatZS | RUS 7 Mar, 2024 @ 7:49am 
no vj base support :steamthumbsdown:
LostSoul 22 Jan, 2024 @ 8:47am 
:steamthumbsup:
Xalalau  [author] 19 Jan, 2024 @ 5:20am 
Wdym?
ryan 19 Jan, 2024 @ 4:51am 
its funny as hell that someone posted this in a different addon
rosen 20 Dec, 2023 @ 9:41am 
[NPC Battle Cleanup] lua/autorun/server/sv_nbc.lua:422: bad argument #1 to 'SetCreator' (Entity expected, got nil)
1. error - [C]:-1
2. ArgAssert - lua/gpm/utils.lua:152
3. SetCreator - packages/player-extensions/init.lua:15
4. NPCDeathEvent - lua/autorun/server/sv_nbc.lua:422
5. v - lua/autorun/server/sv_nbc.lua:541
6. unknown - lua/includes/modules/hook.lua:96
goose 3 Oct, 2023 @ 7:46pm 
isn't this in the base game only its 40X slower and it only cleans up the bodys not everything else
Vaelune 20 Sep, 2023 @ 1:16pm 
does it clean up any ragdoll, even active ragdolls that are considered living and not actually a corpse?
Xalalau  [author] 27 Jun, 2023 @ 9:00pm 
Possibly. If It doesn't work you can ask for support.
Dave 27 Jun, 2023 @ 12:52pm 
Does this work with gib mods, like gibsplat or zippys gore?
memeguy101 4 Mar, 2023 @ 2:57pm 
when you die but your in hl1
Xalalau  [author] 11 Jan, 2023 @ 4:53am 
Sure, I only need to add a single line to support it.
Reasonably Overworked 6 Jan, 2023 @ 3:45pm 
Hi! I noticed TR@VIESO advertised this alternative too. Can we perhaps get an Arc9 weapon base support too like the other one did?
Xalalau  [author] 5 Jan, 2023 @ 5:27pm 
Unfortunately the entity lists aren't exposed in the menu, so you need to edit them directly in the Lua file. I added instructions in the description to achieve that.

Btw if you want a more well supported addon that does almost the same thing, try Immersive Battle Cleanup https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2890177857
XanE 5 Jan, 2023 @ 12:56pm 
This doesn't seem to clean up APC bits, it may be because the APC I am creating is called something different, can you advise where to add this?
Xalalau  [author] 2 Dec, 2022 @ 8:27am 
Ty. There's a new alternative called Realistic Battle Cleanup if you don't want the map too clean.
Syntality 2 Dec, 2022 @ 5:27am 
Just tried it out, Ill ping if any issues but OMG I frickin love you. I've been searching for something like this that actually works for a long time now!
Xalalau  [author] 23 Nov, 2022 @ 6:57am 
I can test here later but the code is configured to save your changes.
Vaelune 22 Nov, 2022 @ 12:13pm 
it doesn't save my settings when i leave the game
wut 13 Nov, 2022 @ 9:23pm 
uncheck weapona
LostRacon 22 Oct, 2022 @ 1:36pm 
Is there an option to leave weapons dropped, so that they don’t de spawn?
Lady Alcina Dimitrescu 26 Sep, 2022 @ 6:59am 
Oh well,im gonna re-install the Gmod and see if the problem still there.
Xalalau  [author] 26 Sep, 2022 @ 6:31am 
You probably need to increase g_ragdoll_maxcount. Idk about the decals.
Lady Alcina Dimitrescu 26 Sep, 2022 @ 4:14am 
I don't know if it's caused by this addon but.
NPC's no longer have decals when they got shot.
Their corpses get removed when they killed even tho this addon is disabled.

Do anyone have the same proble mhere ?
Xalalau  [author] 19 Sep, 2022 @ 5:15am 
Ok. Gotta check it later.
Aperture Science Prototype XR7 18 Sep, 2022 @ 4:21pm 
Killing enemies near map entities (ammo crates, chargers, etc.) seems to be obliterating said map entities in addition to the NPC's corpse.