KastoneX-EnemyLocation_WZK_EnemySpawnFix icon

EnemyLocation WZK EnemySpawnFix

Restores enemy spawning when WZK Enemy Location 1.0.3 interrupts enemy logic on R.E.P.O. 0.5.0. Fixes inaccessible map/player fields. Requires WZK Enemy Location.

Last updated 2 weeks ago
Total downloads 1163
Total rating 0 
Categories Mods Client-side AI Generated
Dependency string KastoneX-EnemyLocation_WZK_EnemySpawnFix-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

WZK-Enemy_Location-1.0.3 icon
WZK-Enemy_Location

Add Enemy Point In the Map

Preferred version: 1.0.3
BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2305

README

Enemy Spawn Fix for Enemy Location by WZK

Restores enemies when the WZK Enemy Location field-access exception interrupts their logic. Successful startup and enemy presence were confirmed in-game.

An unofficial add-on specifically for Enemy Location 1.0.3 by WZK.

Requires WZK-Enemy_Location-1.0.3. This package is not a standalone enemy marker mod.

What it fixes

FieldAccessException: Field MapCustom.mapCustomEntity is inaccessible from EnemyLocationClass.EnemyDespawn

The original mod directly accesses two fields that are internal in R.E.P.O. 0.5.0: MapCustom.mapCustomEntity and PlayerAvatar.playerDeathHead.

EnemyParent's logic coroutine starts with a despawn call. An exception from Enemy Location's despawn postfix can interrupt that coroutine before its later enemy logic. This patch restores access to both fields.

Implementation

A BepInEx 5 preloader patch changes only these two fields' access flags, in memory. They remain excluded from Unity serialization using NotSerialized, preserving the existing asset layout. The patch does not change spawn counts, timers, game method bodies, or saved games. No original game or third-party mod binaries are included.

Install

Install with r2modman or Thunderstore Mod Manager. The original Enemy Location is a required dependency. Fully exit and restart the game.

Manual installation: merge BepInEx into the profile/game root. The DLL belongs in BepInEx/patchers/EnemyLocationWZKFix, not plugins.

If a manual test copy is already installed, remove that copy before installing this managed package to avoid duplicate patchers.

Players running the incompatible Enemy Location version should install the fix locally. Untested future game/mod versions may require an update.

Validation

Tested with R.E.P.O. 0.5.0, BepInEx 5.4.23.5 and WZK Enemy Location 1.0.3. The tester confirmed successful game startup and enemies appearing after installing the corrected build. Marker behavior has not been separately confirmed.

Offline validation confirmed that only the intended field flags change, game method IL remains unchanged, repeat application is safe, both fields remain nonserialized, and the original game DLL stays unchanged on disk.

Credits and license

Original Enemy Location mod: WZK. Independent compatibility add-on published by KastoneX; not affiliated with WZK or Semiwork.

MIT license. Created with AI assistance and tested in-game.

Support the author

If this mod helped you, you can support tuqeno on Boosty.

I publish mods on Thunderstore as KastoneX. Support is optional — thank you!