
Medic
[Inspired by: UltimateRevive by Quilt] Pick up your teammate’s PlayerDeathHead and press H—spend 20 HP to revive them. Players will automatically show gratitude upon revive with a configurable message.
Date uploaded | 2 weeks ago |
Version | 1.1.4 |
Download link | MountainFarmer-Medic-1.1.4.zip |
Downloads | 13306 |
Dependency string | MountainFarmer-Medic-1.1.4 |
This mod requires the following mods to function

BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
Medic!
Revive fallen teammates by transferring your own health while holding their PlayerDeathHead.
Press H to spend HP and bring them back. On success (and if enabled), 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.1.4
- 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.
- Audio feedback (1.1.1+): Plays a configurable sound when you don’t have enough health to attempt a revive.
- Failed revive chat (1.1.3+): Posts a clear, configurable chat line (including the downed player’s name) when you try to revive without enough HP.
Anti‑spam: a per‑player shared cooldown gates both the chat and the denial sound (default 12s, configurable). - True in‑game chat (toggleable): The revivee sends a chat line via the native chat method—identical to a normal message—only on a successful revive and only if enabled.
- Randomized gratitude (1.1.0+): On a successful revive, the revivee picks a random phrase from a phrases list loaded at startup.
- Phrases are read from
gratitude_phrases.txt
(one per line). Lines starting with#
are comments. - Search order: plugin folder (next to the DLL) → BepInEx/config → fallback list in config.
- Hot reload: press Ctrl+P to reload the phrases file at runtime.
- Phrases are read from
- Event-driven avatar cache (1.1.4+): Player avatars register on spawn/despawn so revive logic hits cached references and only falls back to a scene scan when needed.
- Mixed‑lobby friendly: Players without the mod can still be revived. (They just won’t emit the gratitude chat line unless they’re running the mod.)
What’s new in 1.1.4
- Changed: Hooked into player avatar spawn/despawn so revive lookups reuse cached references instead of repeatedly scanning the scene during gameplay.
- Fixed: Scene-wide fallback scans only run when the cache is empty or invalid, reducing GC pressure during revives.
Previously in 1.1.3
- Added: Configurable failed‑revive chat messages with per‑player shared cooldowns for chat and denial sound (default 12s). Messages include the downed player’s name.
- Improved: Input handler now avoids frame drops when repeatedly pressing H on low HP.
- Changed: Centralized denial audio into a single
AudioSource
and added caching for avatar/health lookups. - Config: New keys for cooldowns and message templates (see below).
How it works (tech notes)
- Pressing H while holding a
PlayerDeathHead
asks the MasterClient to perform an authoritative revive. - If you lack sufficient health, an audible warning plays and the revive is denied (with optional chat notification).
- 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 (and only ifEnableGratitude
is true), so the chat line is broadcast to everyone just like normal chat. - Health sync:
- Master subtracts HP from the reviver and broadcasts it via
SyncReviverHealth
(v1.0.2+). - The revivee’s new HP is applied and broadcast via
SyncRevivedHealth
.
- Master subtracts HP from the reviver and broadcasts it via
- Gratitude phrases:
MedicPlugin.GetRandomGratitude()
returns a random entry from the loaded list (or the fallback list) and feeds it into the native chat send. - Audio origin (1.1.2+): The deny sound plays from the reviver’s position (not a global/menu source).
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
intoBepInEx/plugins/Medic!/
(create the folder if needed). - (Optional) Place
icon.png
,manifest.json
,README.md
, andgratitude_phrases.txt
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, you’ll hear an audio warning and (optionally) a chat line explains the failure.
- On success, the revived player posts a global chat line (same pipeline as normal chat), visible to everyone if chat is enabled and the revivee is running the mod.
Configuration
A config file BepInEx/config/com.callmehill.medic.cfg
is created on first run.
General
General/HealthTransferAmount
(float, default 20)
How much HP the reviver gives to the revivee.
Chat
Chat/EnableGratitude
(bool, default true)
Toggle to enable/disable the revive gratitude chat line (on successful revives).Chat/PhrasesFile
(string, default gratitude_phrases.txt)
File to load phrases from (plugin directory →BepInEx/config
).Chat/FallbackPhrases
(string, default Wow! Thank you, friend!|You saved me!|I owe you one!|Back in the fight!|That was clutch!)
Pipe‑separated fallback phrases used if the file is missing or empty.Chat/EnableFailedReviveMessage
(bool, default true)
Show a chat line when a revive fails due to low health.Chat/FailedReviveMessage
(string, example I don't have enough health to revive you!)
Template for the failure notification. May include the revivee’s name if supported by your build.Chat/FailedReviveCooldownSeconds
(float, default 12)
Per‑player cooldown for failed‑revive chat messages (anti‑spam).
Sound
Sound/DeniedSoundNativeName
(string, default soundDeny)
NativeAudioClip
name used for the deny sound.Sound/DeniedCooldownSeconds
(float, default 12)
Per‑player cooldown for the deny sound (shared budget with failed‑revive chat).
Behavior
- Phrase length guard: Phrases longer than 160 characters are trimmed during load to avoid chat overflow.
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. You should hear an audio warning if you lack sufficient health. - Client didn’t lose HP when reviving host: Update to v1.0.2 or later on all modded players to ensure the reviver’s HP cost is synced (
SyncReviverHealth
). - No chat line appears: The revive succeeded, but either
EnableGratitude
is off or the revivee isn’t running the mod (chat is emitted locally on the revivee). - Phrases not changing: Edit
gratitude_phrases.txt
and press Ctrl+P to reload. - Denial audio is too frequent: Increase
Sound/DeniedCooldownSeconds
(and/orChat/FailedReviveCooldownSeconds
) to widen the shared cooldown. - Audio warning missing: Ensure
Sound/DeniedSoundNativeName
matches a loaded clip in the game. - Log spam on vanilla clients: Expected; harmless “RPC not found” messages when they don’t have the custom component.
Changelog
See CHANGELOG.md for full history.
Credits
- Author: callmehill
CHANGELOG
Changelog
All notable changes to Medic! will be documented in this file.
[1.1.4] - 2025-09-08
Changed
- Event-driven avatar cache: Player avatars now register on spawn/despawn so revive lookups use cached references instead of repeatedly scanning the scene. (Performance boost: removes per-frame scene scans during revive attempts.)
- Unified health sync handler: Consolidated revivee/reviver health logic into a shared handler while continuing to emit the legacy
SyncRevivedHealth
/SyncReviverHealth
RPC names for backwards compatibility. (Reliability gain: keeps every client on the same health state without duplicate code paths.) - Per-entry health TTL: Cached health values track their own timestamps, ensuring simultaneous revive checks don't reuse stale data from other avatars.
Fixed
- Fallback scanning guard: Only perform
FindObjectsOfType<PlayerAvatar>
when the cache misses or becomes invalid, preventing redundant allocations during revive attempts. (Stability fix: avoids GC spikes that could delay revives.) - Instant health cache updates: Refresh the avatar's cached HP immediately after
SetHealth
runs so rapid follow-up revives respect the new value and correctly trigger denial feedback when HP is too low. - Cross-version revive sync: Restored compatibility with older mod releases by keeping the legacy RPC names so pre-1.1.4 clients don't log missing
SyncHealth
errors during mixed-version revives.
[1.1.3] - 2025-09-07
Added
- Failed revive chat messages: Attempting to revive without the required HP now posts a clear chat notification so everyone knows why the revive didn’t fire.
- Performance optimization: Smoothed the revive key handler to eliminate frame drops when rapidly mashing H.
- Personalized messages: Failed revive notifications include the downed player's name for easier identification.
- Smart cooldown system: Chat and denial sounds share per-player cooldowns to stop spam.
Fixed
- FPS drops on low-HP revives: Rapidly pressing H no longer tanks the frame rate when you're below the health cost.
- Audio spam: Denial sounds respect the new cooldown, preventing rapid-fire audio.
- Failed revive chat spam: Guarded against multiple chat lines when a revive attempt is rejected.
Changed
- Single AudioSource: Centralized denial audio through one
AudioSource
instance to reduce overhead. - Cached lookups: Avatar references and current health values are cached for faster access.
- Configurable cooldowns and messages: Exposed new options to tune cooldown durations and customize denial text.
[1.1.2] - 2025-09-03
Fixed
- Deny sound origin: Now emits from the reviver’s position instead of a global/menu location, preventing distant/quiet audio near the cart or extraction point.
Improved
- Revive chat timing: Added a one-frame delay before posting the revive chat on the revivee’s client to improve reliability in mixed/laggy lobbies.
[1.1.1] - 2025-09-02
Added
- Audible warning on revive denial: Plays when the reviver lacks sufficient health (config:
Sound/DeniedSoundVolume
).
Removed
- Non-startup logging: Only the activation message remains during initialization.
[1.1.0] - 2025-09-01
Added
- Randomized gratitude chat: Revived players now post a random phrase chosen from
gratitude_phrases.txt
. - Chat toggle:
Chat/EnableGratitude
boolean to enable/disable the gratitude chat line. - Hot reload: Press Ctrl+P to reload phrases at runtime.
- Config options:
Chat/PhrasesFile
— file name to load phrases from (plugin folder → BepInEx/config).Chat/FallbackPhrases
— pipe-separated fallback list used if the file is missing/empty.
- Content: Includes 8 default phrases out of the box in
gratitude_phrases.txt
.
Improved
- Phrase length guard: Phrases longer than 160 characters are trimmed during load to avoid chat overflow.
Compatibility
- No breaking changes. Mixed lobby behavior unchanged.
[1.0.2] - 2025-08-31
Fixed
- Reviver HP sync: When a client revives the host, the client now correctly loses the configured HP (e.g., 20), while the host respawns at the configured amount. Added
SyncReviverHealth
RPC mirroringSyncRevivedHealth
so the reviver’s owner applies the HP cost locally.
Compatibility
- No config or save changes. Mixed-mod lobbies still supported.
[1.0.1] - 2025-08-31
Removed
- Development heartbeat logger that printed every 5 seconds.
No gameplay or network behavior changes; purely removes debug noise from logs.
Compatibility
- No breaking changes. Config and save data unaffected.
[1.0.0] - 2025-08-31
Added
- Pick-up revive: Hold a teammate’s
PlayerDeathHead
and press H to revive (cost: 20 HP by default). - Revivee gratitude message: The revived player automatically shows gratitude via in-game chat.
- Mixed lobby support: Unmodded players can be revived; chat/gratitude requires the revivee to run the mod.
- Config:
HealthTransferAmount
(default 20).