Simple blood volume display
1. As a simple blood volume display tool, it needs to be used with REFramework. 2. I have been trying to play with REFramework in the past few days, so I wrote this (cooperating with deepseek). 3. Display the blood volume pointing to the enemy at the bottom of the screen. 4. You can try to modify it yourself (throw it to Ai). 5. If the display is not normal, change the screen resolution in the script. 6. Written casually (a large part is incomplete)
About this mod Machine translation
- As a simple blood volume display tool, it needs to be used with REFramework
- I tried to play with REFramework in the past few days, so I wrote this (cooperating with deepseek)
- Display the HP of the enemy pointed at the bottom of the screen
- You can try to modify it yourself (throw it to Ai)
- If the display is abnormal, change the screen resolution in the script.
- Written casually (a large part of it is incomplete)
Okay, delete the entire "Technical Details" section, and also delete the implementation descriptions such as "Recognition Principle". Other content reserved.
---
Enemy HP Bar — Simple target enemy health display
A lightweight "Resident Evil 4 Remake" module for use with **REFramework**. When aiming at an enemy, the enemy's health bar and blood volume values are displayed in the bottom center of the screen.
---
✨ Function
- **Display when aiming**: When the crosshair points at the enemy, a health bar will appear in the center of the bottom of the screen
- **HP value**: Displays `Current HP / Maximum HP`
- **Enemy Identification**: Display names according to enemy type (villager, pig brother, chainsaw man, flying insect, wolf, village chief...)
- **Color distinction**: Different enemies have different health bars and text colors (can be customized)
- **Smooth transition**: When the blood volume decreases, the health bar decreases smoothly instead of jumping instantly.
- **Hysteresis Effect**: The health bar remains for a short period of time after releasing the aim to avoid frequent flashing
- **Death Filter**: Dead enemies are not counted and the health bar is not displayed.
- **Number of enemies**: The lower left corner displays the number of surviving enemies in the current scene.
- **Pause Protection**: Press ESC to automatically stop drawing when paused
---
📋 Prerequisites
- **REFramework** (required)
- download:
- Please see the warehouse instructions for the installation method.
- **Game version**: Resident Evil 4 Remake (RE4 Remake)
- **REFramework version**: The latest version is recommended
---
📦 Installation
- Install **REFramework**
- Put `EnemyHP.lua` into:
```
\reframework\autorun\EnemyHP.lua
```
- Start the game and the script will automatically load and take effect.
---
🎮 Use
- **No operation required**: It will take effect automatically after entering the game
- **Aim at the enemy**: A health bar is displayed in the bottom center of the screen
- **Release Aim**: The health bar remains for about 4 seconds and then disappears
- **Switch target**: Immediately display the health bar of the new enemy
- **Lower left corner**: Displays the current number of surviving enemies
---
⚙️ Customize
1. Screen resolution (important)
If your display is abnormal (the position of the health bar is offset or beyond the screen), **change this first**:
Open `EnemyHP.lua` and find the beginning:
```lua
local SCREEN_W = 2560
local SCREEN_H = 1600
```
**Change to your game resolution**, for example:
| resolution | value |
|---|---|
| 1920×1080 | `SCREEN_W = 1920, SCREEN_H = 1080` |
| 2560×1440 | `SCREEN_W = 2560, SCREEN_H = 1440` |
| 3840×2160 | `SCREEN_W = 3840, SCREEN_H = 2160` |
2. Health bar parameters
```lua
local BAR_WIDTH = 600 -- health bar width
local BAR_HEIGHT = 7 -- health bar height
local BAT_BOTTM_PADDING = 10 -- offset from the bottom of the screen
local LERP_SPEED = 0.15 -- blood volume smoothing speed (the larger, the faster)
local HOLD_TIME = 4 -- the number of seconds the health bar remains after releasing the aim
```
3. Enemy name and color
In `MANUAL_NAMES` add:
```lua
local MANUAL_NAMES = {
["Ch1c0z0"] = { name = "Village", color = 0xFFFFFF00 }, -- green
["Ch1d6z0"] = { name = "Chainsaw Man", color = 0xFF0000FF }, -- red
-- Add new enemies:
["Ch2b300"] = { name = "Cultist", color = 0xFF00FFFF }, -- yellow
}
```
**Color format is ABGR** (note not RGB):
```
0xAABBGGRR
↑↑ ↑↑↑↑↑↑
│ └── BGR order
└── Alpha (FF = opaque, 00 = ful …
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
- Place the files exactly as the readme says; mods with listed dependencies need those installed too.
- Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.
Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.