This is an edit of Undeadsewer's standalone version of Enemy Health and Info modified to use the unit names provided by HopLib instead of its own to better distinguish enemies.
Obviously requires HopLib
If you are looking for a more customizable enemy healthbar, check out Floating Healthbars.
This crashes my game every time I look at an enemy. The health bar in vhud + is off and I have hoplib installed. Here is the crash log:
Application has crashed: C++ exception
[string "core/lib/utils/corecode.lua"]:100: attempt to call method 'alive' (a nil value)
SCRIPT STACK
name_by_unit() @mods/pd2-hoplib-master/req/NameProvider.lua:50
set_unit_health() @mods/Enemy Health and Info/lib/hudmanager.lua:144
func() @mods/VanillaHUD Plus/lua/EnemyHealthbarAlt.lua:269
_update_fwd_ray_ori() @mods/base/req/core/Hooks.lua:268
_update_fwd_ray() @mods/VanillaHUD Plus/lua/EnemyHealthCircle.lua:319
original() lib/units/beings/player/states/playerstandard.lua:432
original() @mods/base/req/core/Hooks.lua:188
update() @mods/base/req/core/Hooks.lua:265
original() lib/units/beings/player/playermovement.lua:272
@mods/base/req/core/Hooks.lua:265
Callstack:
Current thread: Main
System information:
Application version : 1.113.57.
CPU : AMD Ryzen 5 3600 6-Core Processor (6 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1
DirectX : 12.0
GPU : NVIDIA GeForce GTX 1660 / nvd3dum.dll[32767.65535.65535.65535]
Language : english
Memory : 32695MB 804KB
OS : 6.2.9200 () 0x100-0x1 (64 bits)
Physics : threaded
Renderer : DX9 threaded
Sound : Realtek Semiconductor Corp. (Speakers (Realtek(R) Audio))
that line it's listing is not the current hoplib version, make sure you're using the current one
@Hoppip I reinstalled hoplib from github and it still crashes me. Is there something I'm missing?
@MatthewCAbel the crashlog is mentioning vhud+ still, I know you said its off, but maybe try and see if it works without vhud+
@Hoppip Uninstalling vhud+ fixed the crashing but now the mod doesn't work at all. It's being loaded by the game but the health bar isn't showing.
@MatthewCAbel hmm not sure, there might be another conflict or something