Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
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
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
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
- Install BepInEx.
- Put
EnemyTestSpawner.dllinBepInEx/plugins/. Requires REPOLib. - It does nothing until
Enabledis 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:
Enum.TryParseonSpawnKey, falling back to Insert on a typo.- Gate on
SemiFunc.IsMasterClientOrSingleplayer(). Clients get a log line, not a spawn. - Look up the
EnemySetupinEnemyDirector.instance'senemiesDifficulty1/2/3pools by exact name, then substring. No match logs every available enemy name. - Spawn every prefab in
setup.spawnObjectsatplayer + forward * SpawnDistance + 0.5 up, rotated to face you. Multiplayer goes throughPhotonNetwork.InstantiateRoomObject, singleplayer through a plainInstantiate.
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.