Skip to Content

Ephemeral Mod

The EphemeralMod service handles run-specific mod overrides and logic. Every time a new session or “run” begins, it merges mod-specific data into the fresh state tree and activates modded Lua scripts.

Code path: Runtime/GnosisEngine/Source/Services/Ephemeral/Services/Mod/GnosisEphemeralModService.cs.

Lifecycle Actions

  1. State Merging: For every active mod, it finds Data/ephemeral.json and deep-merges it into the current Ephemeral branch of the state tree.
  2. Logic Initialization: It wakes up any session-specific modded Lua logic defined for the current run.

State Patching (ephemeral.json)

Mods can modify starting stats, player health, or initial inventory for that specific match using the ephemeral.json file.

ephemeral.json
{ "Ephemeral": { "stats": { "health": 200, "speed": 1.5 } } }

Functions

Calls to modded logic follow the format: EphemeralMod.{ModId}.

FunctionParametersBehavior
CallModFunctionmodId, functionName, parametersRoutes the call to the specific Lua environment of the “ModId” mod for this session.

Statistics

None.

Modding Overview, Permanent Mod.

Last updated on