Medic!
Revive fallen teammates by transferring your own health while holding their PlayerDeathHead.
Press H to spend HP and bring them back. On success, the revived player automatically posts a global chat line using the game’s built-in chat pipeline so everyone sees it.
- Author: callmehill
- Version: 1.0.1
- BepInEx: 5.x (tested with 5.4.21)
Features
- Pick-up revive: Hold a teammate’s
PlayerDeathHead and press H to revive.
- HP transfer: Default cost is 20 HP from the reviver to the revivee.
- True in-game chat: The revivee sends a chat line via the native chat method—identical to a normal message. No chat is sent on keypress; only on a successful revive.
- Mixed lobby friendly: Players without the mod can still be revived. (They just won’t emit the chat line unless they’re running the mod.)
How it works (tech notes)
- Pressing H while holding a
PlayerDeathHead asks the MasterClient to perform an authoritative revive.
- The revive triggers the game’s native
ReviveRPC for the downed player across all clients.
- After one frame, only the revivee’s client calls the game’s private
PlayerAvatar.ChatMessageSend(...) method locally, so the chat line is broadcast to everyone just like normal chat.
- Health is synced to all clients after the revive.
Note: Unmodded clients may log “RPC not found” for the custom health/chat RPCs. This is harmless and does not affect gameplay.
Installation
- Install BepInEx 5 for your game.
- Drop
Medic!.dll into BepInEx/plugins/Medic!/ (create the folder if needed).
- (Optional) Place the
icon.png, manifest.json, and README.md in the same plugin folder for mod managers.
Usage
- Pick up a fallen teammate’s PlayerDeathHead.
- Press H to spend HP and attempt a revive.
- If you don’t have enough HP, nothing happens and a log message is printed.
- On success, the revived player posts a global chat line (same pipeline as normal chat), visible to everyone.
Configuration
A BepInEx/config/com.example.medic.cfg file is created on first run.
General/HealthTransferAmount (float, default 20)
How much HP the reviver gives to the revivee.
Compatibility
- BepInEx 5 (5.4.x).
- Works in mixed lobbies; only the chat line requires the revivee to be running the mod.
- No extra keybinds or admin controls are introduced.
Troubleshooting
- H does nothing: Make sure you are holding a PlayerDeathHead and have at least
HealthTransferAmount + 1 HP.
- No chat line appears: The revive succeeded, but the revivee may not be running the mod (chat is emitted locally on the revivee).
- Log spam on vanilla clients: Expected; harmless “RPC not found” messages when they don’t have the custom component.
Changelog
1.0.1
- Removed periodic heartbeat invocation to prevent repeated terminal logs.
1.0.0
- Initial release: pick-up revive on H, HP transfer, revivee-emitted global chat, mixed lobby support, configurable HP cost.
Credits