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
- State Merging: For every active mod, it finds
Data/ephemeral.jsonand deep-merges it into the currentEphemeralbranch of the state tree. - 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}.
| Function | Parameters | Behavior |
|---|---|---|
CallModFunction | modId, functionName, parameters | Routes the call to the specific Lua environment of the “ModId” mod for this session. |
Statistics
None.
Related
Last updated on