Old Enemy Mod Fix
Makes old enemy mods spawn again when they install fine but never appear. Rewires the empty spawn list old-SDK enemy bundles load under REPOLib 4.x, so the enemy spawns at its normal rates.
About this mod Author’s original text
Old Enemy Mod Fix
Makes old enemy mods spawn again when they install fine but never appear.
What it does
Enemy bundles built against an older REPOLib SDK load their spawn-object list empty under REPOLib 4.x. REPOLib sees an enemy with nothing to spawn, logs "no spawn objects found", and skips it. There is no crash, the enemy just never shows up. The prefab and setup are still in the bundle. This pulls them back out and rewires them right before registration, and the enemy spawns at its normal rates.
Installation
- Install BepInEx.
- Put OldEnemyModFix.dll in BepInEx/plugins. Requires REPOLib.
- Install it next to the affected enemy mods. It contains no enemy content.
Confirmed working with
- Rudeus-Vacuum_Enemy
- souurdough-SpinosaurusIsCalling
Other old-SDK enemy mods with the same "no spawn objects found" log line should also work.
For developers - detailed breakdown
GUID: themorningstar.oldenemymodfix
One Harmony patch, a prefix on REPOLib.Modules.Enemies.RegisterEnemy(EnemyContent).
An old-SDK.repobundle contains an EnemyContent whose serialized _setup and _spawnObjects fields do not map to REPOLib 4.x's field layout, so both deserialize empty. The enemy prefab, a GameObject carrying an EnemyParent, and the EnemySetup ScriptableObject both still load, because the bundle's preload table pulls them into memory even though they are not top-level assets.
The prefix:
- Skips healthy content where Setup is non-null and SpawnObjects is non-empty, so new-SDK mods are never touched.
- Builds a haystack from the content's name and bundle name, for example "Vacuum Content" or "Enemy - Spinosaurus1", normalized to lowercase with spaces, dashes, and underscores stripped.
- Finds the prefab with Resources.FindObjectsOfTypeAll(), taking the one whose normalized enemyName is the longest token of at least three characters contained in the haystack. Longest match stops a short name from taking the wrong slot.
- Finds the matching EnemySetup by the same token, preferring one that already has spawn entries.
- Writes both into the private backing fields by reflection.
RegisterEnemy then does the rest: it registers the prefab as a network prefab and rebuilds enemySetup.spawnObjects, so the bundle's stale PrefabRefs are never read.
Identification is by name token. If the enemy's name appears nowhere in the content or bundle name, it logs a warning and skips rather than guess. It only helps mods whose plugin ran and handed REPOLib the content. A mod whose own Awake crashed before registering anything is Repo Old Mod Rescue's job.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: