NPC Battle Cleanup

If you liked this item, please rate it up on Steam Workshop page.

Author: Xalalau

Last revision: 1 Feb, 2023 at 02:07 UTC

File size: 31.2 KB

On Steam Workshop

Description:

———————————————————–
BRASIL, Junte-se: https://discord.gg/ytkXGNU
GMBR, criadores BR de addons e vídeos e tudo.
———————————————————–

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.

Btw there’s a new alternative called Realistic Battle Cleanup if you don’t want the map too clean.

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;
  • ARC9;
  • 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.

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

Removing custom entities

Unfortunately I didn’t expose the entity lists in the menu, so you need to edit them directly in the Lua file like this:

1) Unsub from this addon;
2) Download it from GitHub[github.com] (Code -> Download zip);
3) Extract the folder inside your garrysmod/addons folder;
4) Edit the tables from lua/autorun/server/sv_nbc.lua as you wish.

Alternative Addon

Even though NPC Battle Cleanup works well I recommend another addon called "Immersive Battle Cleanup" as an alternative since its development is active.

https://steamcommunity.com/sharedfiles/filedetails/?id=2890177857

As you all know I’m not providing feature updates here anymore.

Thank you!