AmorLib

v1.2.8·Updated 2026-10-05

My cool library mod for plugin developers

About this mod Author’s original text

AmorLib

Adds an API for plugin developers to modify lights without conflicting with other mods. Decouples StateReplicators from FloLib and SyncedEvents from EEC for convenient host-client syncing. With safe dependency wrappers for InjectLib and PartialData reflection and JsonSerializerOptions. And various other consolidated fixes and utilities.

Basically, a common library so that I don't have to copy paste the same code for each plugin.

Documentation is still a work in progress. Please refer to the GitHub repo or ask in my plugin feedback thread for how to use.

Terminals

Contains the following vanilla bug fixes:

  • FlowGeos modded reactor terminal instantiation.
  • Hidden terminal commands are fully hidden (not able to be tabbed).
  • Reactor terminals are appended to their zone's TerminalsSpawnedInZone.

API

Currently exposes LightAPI. Major thanks to Dinorush for the help with putting this together.

(Expand)

First, you need to pull LightWorker(s) of the lights you want to change. (LightAPI has several helper methods to get certain LightWorkers in a zone or within range of a position.) Then, to add a modifier, call AddModifier on the LightWorker. For example, if you are applying the same modifier to multiple lights:

IEnumerable workersInZone = LightAPI.GetLightWorkersInZone((0, 0, 0));

GetLightWorkersInZone lightMod = workersInZone.AddLightModifiers("red", 1.0f, true, LightPriority.Normal);

This will instantly enable all lights in the elevator zone, set intensity to 1, and change the color to red.

If you want to lerp light settings for individual lights, create a modifier with the current light settings as to not immediately apply new settings:

LightWorker worker = MyCoolWorkers[i]; // example list of LightWorkers

LG_Light light = worker.Light;

ILightModifier mod = worker.AddModifier(light.m_color, light.m_intensity, light.enabled);

// Go to MyCoolCoroutine...

while (time

Other Features

  • Dependencies
  • InjectLib wrapper
  • PData wrapper
  • Events
  • Additional level-related events
  • SNetEvents-related events
  • Networking
  • StateReplicators
  • SyncedEvents
  • Utils
  • Json-related
  • BoolBase
  • ValueBase
  • LocaleText
  • CourseNodeUtil
  • GlobalBase & GlobalIndexUtil
  • JsonSerializerUtil
  • RandomUtil
  • ZoneGraphUtil

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack_GTFO

File & checksum

Filename
AmorLib-1.2.8.zip
File size
145.2 KiB