mattymatty-EntranceTeleportOptimizations icon

EntranceTeleportOptimizations

Mod to optimize EntranceTeleport scripts

Last updated a day ago
Total downloads 381
Total rating 6 
Categories Client-side Performance
Dependency string mattymatty-EntranceTeleportOptimizations-0.0.2
Dependants 2 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

README

EntranceTeleportOptimizations

GitHub Release GitHub Pre-Release
Thunderstore Downloads

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<EntranceTeleport>() 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.


✦ 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.