Adds better NPC integration for the Garry's Mod addon Z-City.
Find a file
2026-06-02 16:52:55 -04:00
lua Bug fixes and remove all the printing 2026-06-02 16:52:55 -04:00
addon.json Addon.json 2026-05-25 16:49:49 -04:00
README.md Bug fixes and remove all the printing 2026-06-02 16:52:55 -04:00

Z-City NPC Integration

Adds better NPC integration for the Garry's Mod addon Z-City. While Z-City has a convar that enables the custom health system on NPCs, it really isn't the best or most advanced thing in the world. This has irritated me since I first started using Z-City. Therefore, I've decided to take care of the problem myself with my own plugin.

  • NPCs can be ragdolled like players can, and will wiggle around on the ground. They can get back up, too!
  • It takes all elements of Z-City's health system into account, such as unconsciousness and pain.
  • NPCs are responsive to damage from many sources -- bullets, fire, melee (especially kicks!) and more.
  • NPCs can also see and target downed NPCs, and will prioritize standing NPCs over them when needed.
  • Various configurable settings are included, allowing you to tweak the mod to your liking.

This mod is built to perform reasonably well, thus it includes optimizations, configurable performance settings, and an automatic corpse remover.

This addon is based off of Kazarei's Euphoria, which in turn is a fork of Fedhoria by Rama. Credits to them for making the cool thing.

Known issues

  • Bandages, tourniquets, etc. that are on the ragdoll or NPC body will not be there when they get back up. Don't know how to fix this right now, though if anyone experienced with Z-City's codebase would know how to I would appreciate knowing.
  • The NPC getting up animation is quite ridiculous and a little ugly. Honestly, getting it to work that much was a struggle in itself and I'm terrified of trying to do anything more than that. If anyone else would like to do that, however, feel free to create a discussion and I can send you the source code link.
  • Occasionally the game thinks that all damage is bullet damage? God knows why. I'll figure it out eventually.

Compatibility

This should be compatible with:

  • The majority of NPC AI improvement mods
  • Competently-programmed Z-City addons

It is, however, not compatbile with:

  • Most mods that modify the behavior of death ragdolls (Reagdoll, Artagdoll, especially Fedhoria.)
  • Mods that automatically remove death ragdolls (it will delete all ragdolled NPCs, even if they're still alive! Try the built-in automatic corpse removal instead.)

Todo list

MUST BE DONE BEFORE RELEASE:

  • Spinal injuries
  • NPCs should not unfake when moved around
  • Fire / falling / pain reaction (more rapid flailing)
  • NPCs should not unfake if being grabbed

Stuff to do:

  • Facial expressions
  • Generally improve stumbling (foot stepping)
  • Stop NPCs from dropping their guns (that's not a good thing to do)

Post release ideas:

  • Localization support for other languages
  • ReaSFX integration would probably be nice. I mean there's so many SFX packs to choose from, so I don't even have to pack it in
  • To be entirely honest Fedhoria isn't the best addon out there for euphoria physics. Maybe rebase to another addon (or alternatively build a new one?)
  • NPC targeting works, but works really weirdly (sometimes it just. keeps targeting corpses when it shouldn't.) It actually isn't THAT much of an issue because it doesn't feel totally outlandish but I would still love to fix it.