TheMorningStar-Enemy_Test_Spawner icon

Enemy Test Spawner

Spawn any registered enemy on a hotkey, for testing. Pick an enemy from a REPOConfig dropdown and press the key to make it appear in front of you. Off by default; host or singleplayer only.

Last updated 4 hours ago
Total downloads 11
Total rating 0 
Categories Tools Monsters AI Generated
Dependency string TheMorningStar-Enemy_Test_Spawner-1.0.0
Dependants 0 other packages depend on this package

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

README

Enemy Test Spawner

Spawns any enemy on a hotkey, for testing. Off by default.

What it does

Pick any registered enemy from a dropdown in REPOConfig. The list fills itself from every enemy in the game, vanilla and modded. Press the spawn key, default Insert, and the enemy appears in front of you, default 3 metres, facing you. Config applies live with no relaunch. It works for the host or in singleplayer. It is meant for testing rare or difficulty-gated enemies and checking whether an enemy mod works at all.

Installation

  1. Install BepInEx.
  2. Put EnemyTestSpawner.dll in BepInEx/plugins/. Requires REPOLib.
  3. It does nothing until Enabled is set to true in REPOConfig.

Config

Setting Default What it does
Enabled false Master switch. Inert until true.
SpawnKey Insert Hotkey that spawns the chosen enemy. Any KeyCode name, such as F2 or Keypad0.
Enemy dropdown Which enemy to spawn.
SpawnDistance 3 Metres in front of you it appears.
For developers - detailed breakdown

GUID: themorningstar.enemytestspawner

The dropdown comes from a Harmony postfix on REPOLib.Modules.Enemies.RegisterEnemies. It binds the Enemy config entry after REPOLib finishes registering, using an AcceptableValueList<string> built from Enemies.AllEnemies and Enemies.RegisteredEnemies, which REPOConfig renders as a cycle selector. If the hook fails or the list is empty, it binds a plain text field and matches input as a substring.

The spawn path runs in Update into Spawn, reading all config live:

  1. Enum.TryParse on SpawnKey, falling back to Insert on a typo.
  2. Gate on SemiFunc.IsMasterClientOrSingleplayer(). Clients get a log line, not a spawn.
  3. Look up the EnemySetup in EnemyDirector.instance's enemiesDifficulty1/2/3 pools by exact name, then substring. No match logs every available enemy name.
  4. Spawn every prefab in setup.spawnObjects at player + forward * SpawnDistance + 0.5 up, rotated to face you. Multiplayer goes through PhotonNetwork.InstantiateRoomObject, singleplayer through a plain Instantiate.

After spawning it logs a two-pass component dump at 0.3s and 2.5s: every Enemy* and PhotonView component with its enabled and active state, plus a count of missing-script components. When a modded enemy spawns but stands still, the dump shows which AI component is disabled or missing.

It searches the difficulty pools, not the registration list. An enemy that registered but never landed in a pool is not found, and the available-enemy log line then shows what is actually spawnable. It spawns the enemy raw. The director does not know it exists, so there is no vanilla pacing around it.