You are viewing a potentially older version of this package. View all versions.
TheMorningStar-TheMimic-1.0.4 icon

TheMimic

Something's been listening. It waits until you're alone, calls out in your friend's voice, and takes your face when it catches you. A FNAF animatronic for R.E.P.O. Best with a full crew. Still in testing.

Date uploaded 2 days ago
Version 1.0.4
Download link TheMorningStar-TheMimic-1.0.4.zip
Downloads 2639
Dependency string TheMorningStar-TheMimic-1.0.4

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Zehs-REPOLib-4.2.0 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 4.2.0
DaXcess-FixPluginTypesSerialization-1.1.1 icon
DaXcess-FixPluginTypesSerialization

Fix custom Serializable structs and such not properly getting deserialized by Unity.

Preferred version: 1.1.1

README

The Mimic

The Mimic is here. He can replicate the voices of you and your friends, and if you're unwary, your appearance as well... Has a chance to spawn on any level with at least two players.

All models, textures, and audio taken from Security Breach: Ruin.

Still in testing. Fully built out and everything should work, but expect some jank. Fixes should be rolling out as issues are discovered. Everyone in the lobby needs the mod installed.

What it does

  • Voice mimicry: records short clips of each player's own voice chat, 2.5 seconds each, up to 6 held in memory, and replays them from the Mimic's body as a lure that sounds like proximity chat. Nothing is written to disk. If nobody has been talking, it speaks a player's typed chat line through the game's text-to-speech instead.
  • Appearance theft: after taking a dead player's head, it clones that player's whole avatar, cosmetics and colors, and walks around wearing it.
For developers - detailed breakdown

Ships as MimicMonster.dll plus MimicMonster.repobundle. REPOLib registers the bundle. The DLL exists so the prefab's script references resolve. Requires REPOLib.

AI. EnemyMimic is a state machine on the game's enemy idiom, with stateImpulse-gated entry and UpdateState() RPCs gated on SemiFunc.IsMasterClientOrSingleplayer(), host-authoritative. States are Spawn, Idle, Roam, Stalk, SeekCorpse, Impersonate, Hunt, Jumpscare, Leave, Despawn, Stun. Corpse-seeking uses the game's EnemyHeadGrabber pattern, SemiFunc.PlayerGetList() with PlayerAvatar.playerDeathHead. On spawn with SemiFunc.PlayerGetAll().Count < 2 it calls EnemyParent.Despawn() and logs why.

Voice. Two Harmony patches drive capture. A postfix on PlayerAvatar.Awake adds a MimicVoiceCapture to every player, and a patch on LocalVoiceFramed<short>.PushDataAsync feeds each client's own outgoing mic frames into an in-memory ring at 48kHz, 2.5s snippets, max 6. Each client only ever captures itself, so attribution is per player without extra work. For playback the host's EnemyMimic requests a specific player's voice through VoiceLureRequestRPC. The one client that owns that voice broadcasts a random snippet in 8KB chunks through its own PhotonView, every client reassembles it, low-pass filters and edge-fades it, and plays it on an AudioSource at the Mimic routed to the game's microphone mixer group. When a player has no captured mic voice, the Mimic re-synthesizes one of their typed text-to-speech chat lines instead. MimicTTSPlayback clones a live TTSVoice onto the Mimic's body to speak it.

Disguise. A runtime Instantiate() of a live player's PlayerAvatarVisuals rig, with the cloned PlayerAvatarVisuals component disabled, because its Update reads an owning PlayerAvatar the clone does not have. Cosmetics apply through PlayerCosmetics.SetupCosmetics and SetupColors. MimicDisguiseAnimDriver replaces the disabled driver. It sets the Animator to AlwaysAnimate so culling does not freeze the detached rig, and clears stuck pose bools like Crouching and Tumbling. It reads Moving and Sprinting from the rig's world-position delta, since NavMeshAgent.velocity is 0 on non-host clients.

Jumpscare. It locks the player's camera with CameraAim.AimTargetSet and OverrideAimStop, plays the scare, then kills them with HurtCollider and PlayerHurt(). The Mimic is pinned in place so it cannot move mid-animation.

Voice lures need people actually talking, and Photon Voice only runs in multiplayer, so solo capture is empty and a lure logs "no snippets". Cross-level statics are cleared on every scene load to prevent stale-ViewID lures.