Enemy Health Bar

Enemy Health Bar 1.4.0

Displays a health bar ui above enemies when you attack them
1.PNG
4.PNG

3.PNG
2.PNG



This Rust plugin adds a floating health bar ui above entities you attack, such as npcs, animals, patrol helicopter, and others. It supports multiple color themes, and you can configure how long the ui stays visible and which entities trigger it.

Permissions

  • enemyhealthbar.use - Allows a player to see the health bar ui.
  • enemyhealthbar.ignore - Prevents a player's own health from being displayed to others when they are attacked.

Commands

  • /healthbar - Toggles the health bar UI on/off for you.
  • /healthbar list - Lists all available color palettes (from the plugin's config).
  • /healthbar <paletteName> - Sets your personal color palette to the specified name (if it exists in the config).

Configuration

JSON:
{
    "Version": "1.3.0",
    "Health Bar Display Duration Seconds": 5.0,
    "Health Bar Toggle Chat Command": "healthbar",
    "Whitelisted Entity Keywords (Leave empty to allow all entities)": [
        "player",
        "scientist",
        "bear",
        "polarbear",
        "wolf",
        "stag",
        "boar",
        "patrolhelicopter",
        "bradleyapc",
        "vehicles"
    ],
    "Blacklisted Entity Keywords": [],
    "Health Bar Hidden Below This Distance": 5.0,
    "Health Bar Hidden Beyond This Distance": 50.0,
    "Default Ui Color Palette": "Orange",
    "Ui Color Palettes": {
        "Orange": {
            "Health Bar Background Color": "#3A1E03",
            "Health Bar Border Color": "#190C02",
            "Health Bar Fill Color": "#D27411",
            "HP Value Text Color": "#FFE9C2"
        },
        "Green": {
            "Health Bar Background Color": "#033A0D",
            "Health Bar Border Color": "#051905",
            "Health Bar Fill Color": "#11D238",
            "HP Value Text Color": "#D7FFD2"
        },
        "Blue": {
            "Health Bar Background Color": "#03193A",
            "Health Bar Border Color": "#020E19",
            "Health Bar Fill Color": "#1192D2",
            "HP Value Text Color": "#D2F1FF"
        },
        "Red": {
            "Health Bar Background Color": "#3A0D03",
            "Health Bar Border Color": "#190503",
            "Health Bar Fill Color": "#D23811",
            "HP Value Text Color": "#ECD646"
        }
    }
}
  • Health Bar Display Duration Seconds - How long the health bar stays visible after an attack.
  • Health Bar Toggle Chat Command - The chat command players can use to toggle the health bar on or off for themselves.
  • Whitelisted Entity Keywords - Determines which entities can display a health bar. If left empty, all entities are allowed. If specific keywords are added, only entities whose prefab name contains one of those keywords will show a health bar.
  • Blacklisted Entity Keywords - Prevents specific entities from ever displaying a health bar, even if they match the whitelist. This is useful if you want to allow most enemies but exclude certain ones.
  • Health Bar Hidden Below This Distance - Hides the health bar if the player is closer than this distance to the target (to prevent overlapping with the vanilla bar).
  • Health Bar Hidden Beyond This Distance - The health bar will only be shown if the target is within this distance from the player.
  • Selected Ui Color Palette - The name of the currently active ui color scheme.
  • Ui Color Palettes - A list of custom color schemesthat can be selected in Selected Ui Color Palette.
    • Each palette consists of:
      • Health Bar Background Color - The color behind the health bar.
      • Health Bar Border Color - The border color of the bar.
      • Health Bar Fill Color - The color representing remaining health.
      • HP Value Text Color - The text color for displaying exact HP values.

Stored Data

JSON:
{
  "Health Bar Enabled": {
    "76561198000000001": true,
    "76561198000000002": false
  },
  "User Color Palettes": {
    "76561198000000001": "Green",
    "76561198000000002": "Red"
  }
}
  • Health Bar Enabled - Shows each player's Steam Id along with a true/false value indicating whether their health bar is turned on (true) or off (false).
  • User Color Palettes - Stores each player's Steam Id along with the name of the color palette they've chosen (like “Red” or “Blue”). Players not listed here will default to the plugin's main palette.

Localization

JSON:
{
  "NoPermission": "You do not have permission to use this command.",
  "HealthBarEnabled": "Enemy health bar enabled!",
  "HealthBarDisabled": "Enemy health bar disabled!"
}

Developer Hooks

C#:
bool CanSeeEnemyHealthBar(BasePlayer viewer, BaseCombatEntity target)
Called just before the health-bar UI would be shown, giving other plugins a chance to decide whether the bar should appear for a specific viewer/target pair.
  • viewer - the player who would see the health bar.
  • target - the entity whose health is about to be displayed (e.g., a scientist, bear, another player).
  • Returning true forces the bar to show, false blocks it, and null lets Enemy Health Bar apply its normal logic.
Author
VisEntities
License duration
Unlimited
Price
9.99 USD
First release
Last update

Ratings

5.00 star(s) 1 reviews

Also by VisEntities

  • Workbench Equip Only
    Workbench Equip Only
    Requires players to be near workbenches to equip weapon mods
  • Auto Bag Renamer
    Auto Bag Renamer
    Automatically renames sleeping bags based on their location and surrounding biome
  • Clan Tag First
    Clan Tag First
    Forces clan tags to appear before all other Better Chat group titles

Latest updates

  1. 1.4.0

    Added new hook CanSeeEnemyHealthBar, allowing external plugins to control whether the health-bar...
  2. 1.3.0

    Players can now pick their own color palette from the plugin's predefined list. The /healthbar...
  3. 1.2.0

    A new config option, Health Bar Hidden Below This Distance, has been introduced to hide the...

Latest reviews

Like all of VisEntites plugins, this is easy to set up and configure to your liking - samples and options are provided to make configuration even easier. It is performant and visually appealing. I really enjoy this kind of visual change for my server.
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart