Reference
Reference
Generated from apps/docs-astro/src/generated/docs.json
-
@apps/library— Kind 1 -
achievements— Kind 1024 — Achievements data that is not tied to save data. So it can persist across saves and be used to track achievements. -
autoSave— Kind 1024 — If set to `passage`, the story variables are saved on every passage navigation to a special save slot If set to `state`, the story variables are saved on every state change (i.e when a variable is changed) to a special save slot -
cache— Kind 1024 — Optional cache adapter to use to speed up state fetching -
classId— Kind 1024 — Immutable id that must be stable (i.e never ever change if you wish to keep current saves compatible) since it is used to index registered classes in the engine -
compress— Kind 1024 — Determines whether or not save/achievement/settings data will be compressed. Note that even when this is enabled, compression will not occur unless the stringified data is long enough (> 1KB) -
emitMode— Kind 1024 — Optimization strategy for state change events. This setting controls how the engine handles state snapshots when emitting `:stateChange` events, balancing between performance and data accuracy. **Performance Impact:** - `acc` (acc): Deep clones the old state before modifications, ensuring complete isolation between `oldState` and `newState` objects. Use when you need guaranteed data integrity but may impact performance with large state objects. - `perf` (performance): Avoids deep cloning for better performance. In rare edge cases with complex state caching scenarios, `oldState` and `newState` might reference the same object, but provides significant performance benefits for large states. -
initialSeed— Kind 1024 — Intial seed for predictable rng. **Must be a number between 0 and 2^32 - 1 (inclusive).** -
loadOnStart— Kind 1024 — If `true`, the most recent save (if any) will be loaded when the engine is initialized -
maxStates— Kind 1024 — Maximum number of individual states that will be stored before old ones get merged into each other -
name— Kind 1024 — Must be unique to prevent conflicts -
persistence— Kind 1024 — Optional persistence adapter for saving support -
prototype— Kind 1024 -
regenSeed— Kind 1024 — Determines if and when the prng seed will be regenerated. If set to `passage`, the seed will be regenerated on every passage navigation. If set to `eachCall`, the seed will be regenerated on every call to the `random` getter. If set to `false`, the seed will not be regenerated at all. Essentially, the engine will use the initial seed for all random number generation. -
saveCompat— Kind 1024 — Determines how strict the engine will be when deciding if a save is compatible the the current engine's version. If set to `strict`, the engine will only consider saves that only differ by the `patch` version as the current engine's version as compatible. If set to `liberal`, the engine will only consider saves that differ by the `patch` version, and have a lower or equal `minor` version as compatible. -
saveData— Kind 1024 -
saveSlots— Kind 1024 — Maximum amount of saves at any given time. Must not be less than 1 -
saveVersion— Kind 1024 — Semantic version to use for all newly created saves by the engine. Also acts as a reference point for the engine to determine if a previous save is compatible with the current version of the story. -
settings— Kind 1024 — Story specific settings that shouldn't be tied to save data like audio volume, font size, etc -
stateMergeCount— Kind 1024 — Number of individual states that will be merged into one when the state fills up -
toJSON— Kind 1024 — Must return a serializable plain object that when deserialized, can be reinitialized into an identical clone of the class. Is required for persistence. -
SugarboxEngine— Kind 128 — The main engine for Sugarbox that provides headless interface to basic utilities required for Interactive Fiction Dispatches custom events that can be listened to with "addEventListener" -
TAchievementData— Kind 131072 -
TAchievementData— Kind 131072 -
TAchievementData— Kind 131072 -
TEventType— Kind 131072 -
TEventType— Kind 131072 -
TNewSaveStructure— Kind 131072 -
TOldSaveStructure— Kind 131072 -
TPassageData— Kind 131072
Showing the first 30 items. For the full list, use /reference/all.