EnemyHealthBarMod
Displays customizable health bars above enemies with smooth animations and performance optimizations.
About this mod Author’s original text
Enemy Health Bar Mod
Displays customizable health bars above enemies in Megabonk.
Features
- Health Bars: Health bars above enemies, optionally with numbers
- Damage Flash Animation: White flash effect when enemies take damage
- Death Animation: Red explosion effect when enemies die
- Distance Fading: Health bars fade based on distance to reduce clutter
- Performance Optimized: Uses Unity's transform hierarchy for efficient positioning
- Highly Customizable: Adjust colors, size, position, and behavior
Configuration
All settings can be adjusted via the config file.
General
ShowHealthBars (bool)
Enable/disable health bars
Options: true, false
Default: true
ShowHealthText (bool)
Show HP numbers on bars
Options: true, false
Default: true
Appearance
BarWidth (float)
Width of health bar in pixels
Range: 50 - 400
Default: 200
BarHeight (float)
Height of health bar in pixels
Range: 5 - 50
Default: 20
BarYOffset (float)
Vertical offset above enemy
Range: 0.5 - 5.0
Default: 1.75
UseColorGradient (bool)
Color bars by health percentage
Options: true, false
Default: true
FullHealthColor (string)
Color at full health (hex RRGGBBAA)
Default: 14E64CFF (green)
MidHealthColor (string)
Color at mid health (hex RRGGBBAA)
Default: FFD90CFF (yellow)
LowHealthColor (string)
Color at low health (hex RRGGBBAA)
Default: FF1F1FFF (red)
BackgroundColor (string)
Bar background color (hex RRGGBBAA)
Default: 1A1A1ACC (dark gray)
TextSize (float)
Font size for HP numbers
Range: 12 - 48
Default: 24
EnableDeathAnimation (bool)
Red explosion when enemies die
Options: true, false
Default: true
ShowDamageFlash (bool)
White flash when damaged
Options: true, false
Default: true
DamageFlashLingerMs (float)
Flash duration in milliseconds
Range: 50 - 500
Default: 125
Performance
FadeStartDistance (float)
Distance where fade begins (meters)
Range: 10 - 100
Default: 30
FadeEndDistance (float)
Distance where bars disappear (meters)
Range: 20 - 150
Default: 50
MaxBarsPerFrame (int)
Max bars to create per frame
Range: 1 - 20
Default: 5
UpdateFrequencyFar (int)
Update every N frames for distant bars
Range: 1 - 10
Default: 3
SkipUpdateDistance (float)
Distance beyond which bars stop updating (meters)
Range: 50 - 200
Default: 100
Debug
EnableDebugLogs (bool)
Enable detailed logging
Options: true, false
Default: false
Installation
- Install BepInEx IL2CPP
- Extract this mod to BepInEx/plugins
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: