0.9.24 Update
Another small update today, continuing to flesh out the modding framework on advice from our awesome community on Discord.
- Added 59 hooks for mods to inject code at various points. These hooks include, but are not limited to:
onload -- Evaluated only once, after the module has finished loading
ontick -- Evaluated every frame, whether or not a game is in progress
onactive -- Evaluated every frame, if a game is in progress and is active (there is not a pending event, the user is not stuck in a menu or cutscene, et cetera)
onnewgame -- Evaluated when a new game has begun
onturnend -- Evaluated when the turn has ended, after all other logic has processed
onturnstart -- Evaluated when a new turn has started, after all other logic has processed
onnightmaretriggered -- Evaluted when the user WILL have a nightmare this turn (but may not have actually fired yet)
onhavingnightmare -- Evaluated when the user is within a room-based nightmare (not a visual-only nightmare), including Airlock, Containment, Maze, and Nowhere
onfatiguegain -- Fires when the player gains fatigue
onstressgain -- Fires when the player gains stress
onpsychosisgain -- Fires when the player gains psychosis
onfatigueloss -- Fires when the player loses fatigue
onstressloss -- Fires when the player loses stress
onpsychosisloss -- Fires when the player loses psychosis (very rare)
onpressuregain -- Fires when the player gains pressure
onpressureloss -- Fires when the player loses pressure
onarcfinished -- Fires when a story arc completes
ondeeploregained -- Fires when deep lore is gained from the observation window
onmemoryunlocked -- Fires when the player unlocks a memory (even if they already had unlocked it)
oninsanitygained -- Evaluated when the player gains a new random insanity (Does not check certain event or task-specific insanities)
onrandomdamage -- Fires when the Director damages a random system (Does not fire when certain events/tasks deliberately damage a specific system)
onpassengerdied -- Fires when a passenger dies for any reason
onpodscontaminated -- Fires when some or all pods become contaminated
onpodcondamage -- Fires when a pod is damaged due to being contaminated
onairlocktoggled -- Fires when the inner airlock is toggled
onbreakersurge -- Fires when a breaker surge occurs
onpowersurge -- Fires when a power surge occurs (random lock or overclock of all systems)
onshuffleinsanity -- Fires when the player (generally ANNIE) shuffles insanities
onconsolesabotage -- Fires when a console is sabotaged
onconsolerepair -- Fires when a console is repaired
onsystemglitched -- Fires when a system becomes randomly glitched (may not cover all cases)
onpermaglitched -- Fires when a system becomes permanently glitched
onsystemdisabled -- Fires when a system becomes disabled (may not cover all cases)
onsystemlocked -- Fires when a system becomes locked (may not cover all cases)
onsystemoverclocked -- Fires when a system becomes overclocked (may not cover all cases)
onsystemhardened -- Fires when a system becomes hardened (may not cover all cases)
onsystemlosesoverclock -- Fires when a system loses overclocked (may not cover all cases)
onsystemsabotaged -- Fires when the player sabotages a system
onsystemrepaired -- Fires when a system is repaired (NOT emergency repaired)
onsystemrepairfail -- Fires when a repair fails
onsystemerepaired -- Fires when a system is emergency repaired
onsystemerepairfail -- Fires when an emergency repair fails
onpowertoggle -- Fires when power to a system is toggled (on or off)
onbreakeropened -- Fires when a breaker opens
onbreakerclosed -- Fires when a breaker is closed
onbreakerdamaged -- Fires when a breaker is damaged
onbreakerrepaired -- Fires when a breaker is repaired
onbreakerreplaced -- Fires when a breaker is replaced
onthrusterdamage -- Fires when a thruster is damaged
onmemoryapply -- Fires when the player gets their memory bonuses assigned at the start of a new game
onapplydilemma -- Fires when the player's dilemma reward or penalty is applied at the start of a new game
onscaredofdoors -- Fires when the player panics when interacting with a door due to Entamaphobia
ondirectorstart -- Fires when the director (RNG function) starts
ondirectorend -- Fires when the director (RNG function) ends
ongameloss -- Fires when the game ends in a loss, but before endgame flag is set
ongamewin -- Fires when the game ends in a win, but before endgame flag is set
oncooldownevent -- Fires when the player is going to get a cooldown event due to having a bad time
onreactordamaged -- Fires when the reactor takes damage
onobservationtoggled -- Fires when the observation window has been toggled to open or close
- Added 59 hooks for mods to inject code at various points. These hooks include, but are not limited to:
onload -- Evaluated only once, after the module has finished loading
ontick -- Evaluated every frame, whether or not a game is in progress
onactive -- Evaluated every frame, if a game is in progress and is active (there is not a pending event, the user is not stuck in a menu or cutscene, et cetera)
onnewgame -- Evaluated when a new game has begun
onturnend -- Evaluated when the turn has ended, after all other logic has processed
onturnstart -- Evaluated when a new turn has started, after all other logic has processed
onnightmaretriggered -- Evaluted when the user WILL have a nightmare this turn (but may not have actually fired yet)
onhavingnightmare -- Evaluated when the user is within a room-based nightmare (not a visual-only nightmare), including Airlock, Containment, Maze, and Nowhere
onfatiguegain -- Fires when the player gains fatigue
onstressgain -- Fires when the player gains stress
onpsychosisgain -- Fires when the player gains psychosis
onfatigueloss -- Fires when the player loses fatigue
onstressloss -- Fires when the player loses stress
onpsychosisloss -- Fires when the player loses psychosis (very rare)
onpressuregain -- Fires when the player gains pressure
onpressureloss -- Fires when the player loses pressure
onarcfinished -- Fires when a story arc completes
ondeeploregained -- Fires when deep lore is gained from the observation window
onmemoryunlocked -- Fires when the player unlocks a memory (even if they already had unlocked it)
oninsanitygained -- Evaluated when the player gains a new random insanity (Does not check certain event or task-specific insanities)
onrandomdamage -- Fires when the Director damages a random system (Does not fire when certain events/tasks deliberately damage a specific system)
onpassengerdied -- Fires when a passenger dies for any reason
onpodscontaminated -- Fires when some or all pods become contaminated
onpodcondamage -- Fires when a pod is damaged due to being contaminated
onairlocktoggled -- Fires when the inner airlock is toggled
onbreakersurge -- Fires when a breaker surge occurs
onpowersurge -- Fires when a power surge occurs (random lock or overclock of all systems)
onshuffleinsanity -- Fires when the player (generally ANNIE) shuffles insanities
onconsolesabotage -- Fires when a console is sabotaged
onconsolerepair -- Fires when a console is repaired
onsystemglitched -- Fires when a system becomes randomly glitched (may not cover all cases)
onpermaglitched -- Fires when a system becomes permanently glitched
onsystemdisabled -- Fires when a system becomes disabled (may not cover all cases)
onsystemlocked -- Fires when a system becomes locked (may not cover all cases)
onsystemoverclocked -- Fires when a system becomes overclocked (may not cover all cases)
onsystemhardened -- Fires when a system becomes hardened (may not cover all cases)
onsystemlosesoverclock -- Fires when a system loses overclocked (may not cover all cases)
onsystemsabotaged -- Fires when the player sabotages a system
onsystemrepaired -- Fires when a system is repaired (NOT emergency repaired)
onsystemrepairfail -- Fires when a repair fails
onsystemerepaired -- Fires when a system is emergency repaired
onsystemerepairfail -- Fires when an emergency repair fails
onpowertoggle -- Fires when power to a system is toggled (on or off)
onbreakeropened -- Fires when a breaker opens
onbreakerclosed -- Fires when a breaker is closed
onbreakerdamaged -- Fires when a breaker is damaged
onbreakerrepaired -- Fires when a breaker is repaired
onbreakerreplaced -- Fires when a breaker is replaced
onthrusterdamage -- Fires when a thruster is damaged
onmemoryapply -- Fires when the player gets their memory bonuses assigned at the start of a new game
onapplydilemma -- Fires when the player's dilemma reward or penalty is applied at the start of a new game
onscaredofdoors -- Fires when the player panics when interacting with a door due to Entamaphobia
ondirectorstart -- Fires when the director (RNG function) starts
ondirectorend -- Fires when the director (RNG function) ends
ongameloss -- Fires when the game ends in a loss, but before endgame flag is set
ongamewin -- Fires when the game ends in a win, but before endgame flag is set
oncooldownevent -- Fires when the player is going to get a cooldown event due to having a bad time
onreactordamaged -- Fires when the reactor takes damage
onobservationtoggled -- Fires when the observation window has been toggled to open or close