EntranceTeleportOptimizations

v1.0.0·Updated 2026-04-04

Mod to optimize EntranceTeleport scripts

About this mod Author’s original text

This Mod is still in BETA

============

EntranceTeleportOptimizations

============

EntranceTeleportOptimizations is a focused on the performance of the EntranceTeleport system (FireExits & Main).

It improves performance during teleport usage and dungeon generation when using mods like Loadstone.

✱ Optimizations

  • Cached Teleports

All EntranceTeleport instances are cached in an internal list upon spawn and removed on destroy.

This replaces expensive GetObjectsByType() calls with fast, direct list access.

  • Smarter ExitPoint Lookup
  • Normally, EntranceTeleport searches for its exitPoint on every use, which is costly.

This mod stops the search early if the teleport already knows its exit.

A reference to the exit script is cached and is used for sanity checks to avoid issues caused by runtime modifications from other mods.

  • Exterior teleports previously ran this search every frame while the moon was loading—this mod removes that overhead by assigning the exit after dungeon generation (After RoundManager.SetExitIDs).
  • ID Assignment Fix

Some custom interiors use incorrect prefabs for FireExits with already-assigned IDs ( should be ID 1 except main that should have ID 0 ).

This can cause issues like:

  • The infamous "The entrance appears to be blocked."
  • Warping to the wrong fire exit

This mod forces all interior teleports to use ID 1, so the vanilla game can assign IDs correctly.

  • NRE Fix

The vanilla game sometimes creates an NRE spam when an enemy is destroyed without being removed from the internal SpawnedEnemyList

This mod adds a null check to prevent this exception

✦ Extra Features

🔸 Enemy Detection: [Near activity detected!]

  • Exterior Detection:

Vanilla only checks enemies inside the facility—this mod optionally allows detection of outside enemies.

  • Configurable Range:

Detection ranges for both interior and exterior can be customized.

⚙️ Developer Features

🔸 Matching Teleport Names

If enabled, the mod renames interior EntranceTeleports to match their exterior counterpart, appending (Interior) for clarity.

📦 Installation

This mod is intended to be installed using a mod manager such as Gale.

Manual installation is not officially supported.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
EntranceTeleportOptimizations-1.0.0.zip
File size
54.4 KiB