FOnline Engine
Current master GitHub
Documentation Docs/en/reference/script-api/events.md

Engine Events

Generated reference. Do not edit this page directly. Update engine metadata, regenerate Docs/generated/api.json, then run python BuildTools/docs_reference.py --write.

A dash in the description column means that the owning source metadata has no documentation comment. Every contract cell identifies an exact source classification, the inventory-pinned scope contract, or an unclassified default; script reachability alone does not make a symbol stable.

Reference index Canonical JSON model Generation contract

This page contains 122 exported engine events.

Game (client)

Signature Symbol ID Runtime Contract Flags Source Description
event Game.OnConnected() script.event.client.Game.OnConnected client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:173 Runs when the client transport connection is established
event Game.OnConnecting() script.event.client.Game.OnConnecting client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:167 Runs immediately before a requested network connection attempt starts
event Game.OnConnectingFailed() script.event.client.Game.OnConnectingFailed client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:170 Runs when a network connection attempt fails
event Game.OnCritterAction(bool localCall, Critter cr, CritterAction action, int32 actionData, AbstractItem? contextItem) script.event.client.Game.OnCritterAction client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:320 Runs before the client applies a critter action; localCall distinguishes local initiation from server delivery
event Game.OnCritterAnimationFallout(hstring modelName, CritterStateAnim stateAnim, CritterActionAnim actionAnim, int32& fStateAnim, int32& fActionAnim, int32& fStateAnimEx, int32& fActionAnimEx, uint32& flags) script.event.client.Game.OnCritterAnimationFallout client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:335 Resolves legacy Fallout animation numbers and flags; handlers may replace all output values, while StopChain reports resolution failure
event Game.OnCritterAnimationFrames(hstring modelName, CritterStateAnim stateAnim, CritterActionAnim actionAnim, int32& pass, uint32& flags, int32& ox, int32& oy, string& animName) script.event.client.Game.OnCritterAnimationFrames client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:329 Resolves a 2D animation frame tuple; handlers may replace pass, flags, offsets, and animName, while StopChain reports resolution failure
event Game.OnCritterAnimationInit(Critter cr, CritterStateAnim& stateAnim, CritterActionAnim& actionAnim, AbstractItem? contextItem) script.event.client.Game.OnCritterAnimationInit client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:323 Runs before critter animation lookup; handlers may replace stateAnim and actionAnim
event Game.OnCritterAnimationProcess(Critter cr, CritterStateAnim stateAnim, CritterActionAnim actionAnim, AbstractItem? contextItem, bool refreshAnim) script.event.client.Game.OnCritterAnimationProcess client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:326 Runs after animation selection and before playback; refreshAnim distinguishes view refresh from a queued action
event Game.OnCritterAnimationSubstitute(hstring baseModelName, CritterStateAnim baseStateAnim, CritterActionAnim baseActionAnim, hstring& modelName, CritterStateAnim& stateAnim, CritterActionAnim& actionAnim) script.event.client.Game.OnCritterAnimationSubstitute client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:332 Resolves an animation substitution; handlers may replace the model and animation pair, while StopChain reports resolution failure
event Game.OnCritterIn(Critter cr) script.event.client.Game.OnCritterIn client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:278 Runs when a critter enters the client's current visible entity set
event Game.OnCritterOut(Critter cr) script.event.client.Game.OnCritterOut client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:281 Runs before a critter leaves the client's current visible entity set
event Game.OnCritterVisibilityModeChanged(Critter cr, CritterVisibilityMode mode) script.event.client.Game.OnCritterVisibilityModeChanged client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:284 Runs when a still-visible critter changes visibility mode
event Game.OnCustomEntityIn(Entity entity) script.event.client.Game.OnCustomEntityIn client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:299 Runs when a custom entity enters the client's replicated entity set
event Game.OnCustomEntityOut(Entity entity) script.event.client.Game.OnCustomEntityOut client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:302 Runs before a custom entity leaves the client's replicated entity set
event Game.OnDisconnected() script.event.client.Game.OnDisconnected client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:176 Runs after the client transport connection closes
event Game.OnFinish() script.event.client.Game.OnFinish client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:164 Runs during client shutdown before script modules are finalized
event Game.OnInfoMessage(EngineInfoMessage infoMessage, string extraText) script.event.client.Game.OnInfoMessage client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:182 Runs for an informational message received from the server
event Game.OnInputLost() script.event.client.Game.OnInputLost client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:275 Runs on frames where the application window is not focused and input polling is skipped
event Game.OnItemInvIn(Item item) script.event.client.Game.OnItemInvIn client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:293 Runs when an item enters the chosen critter's inventory
event Game.OnItemInvOut(Item item) script.event.client.Game.OnItemInvOut client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:296 Runs when an item leaves the chosen critter's inventory, using a detached snapshot of the removed item
event Game.OnItemMapIn(Item item) script.event.client.Game.OnItemMapIn client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:287 Runs when an item enters the client's current map-item set
event Game.OnItemMapOut(Item item) script.event.client.Game.OnItemMapOut client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:290 Runs before an item leaves the client's current map-item set
event Game.OnKeyDown(KeyCode key, string text) script.event.client.Game.OnKeyDown client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:269 Runs for a key press and includes the associated text input when available
event Game.OnKeyUp(KeyCode key) script.event.client.Game.OnKeyUp client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:272 Runs for a key release
event Game.OnLoginSuccess() script.event.client.Game.OnLoginSuccess client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:179 Runs when the server accepts login and the client receives the login-success message
event Game.OnLoop() script.event.client.Game.OnLoop client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:188 Runs once per client frame after networking, input, scheduled callbacks, and time events, before map processing
event Game.OnMapLoad() script.event.client.Game.OnMapLoad client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:308 Runs after a local or global map-load message has established the new client map context
event Game.OnMapLoaded() script.event.client.Game.OnMapLoaded client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:311 Runs when the server confirms map placement and the client marks the map fully loaded
event Game.OnMapUnload() script.event.client.Game.OnMapUnload client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:314 Runs while the current map context is being unloaded
event Game.OnMapView(mpos hex) script.event.client.Game.OnMapView client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:341 Runs when the server requests that the client view map around hex
event Game.OnMouseDown(MouseButton button) script.event.client.Game.OnMouseDown client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:239 Runs for a mouse-button press; wheel steps are exposed as paired virtual button presses and releases
event Game.OnMouseMove(ipos offsetPos) script.event.client.Game.OnMouseMove client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:245 Runs for mouse movement and reports the frame-relative delta in offsetPos
event Game.OnMouseUp(MouseButton button) script.event.client.Game.OnMouseUp client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:242 Runs for a mouse-button release; wheel steps are exposed as paired virtual button presses and releases
event Game.OnPreLoadMap(hstring locPid, hstring mapPid, isize& screenSize) script.event.client.Game.OnPreLoadMap client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:305 Runs before a local map view is created; handlers may replace screenSize for that map
event Game.OnReceiveItems(Item[] items, any contextParam) script.event.client.Game.OnReceiveItems client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:317 Runs for a server-delivered item batch reconstructed as detached client item views with project-defined context
event Game.OnRenderIface() script.event.client.Game.OnRenderIface client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:194 Runs during the script drawing scope of each client frame, before queued video is processed
event Game.OnRenderMap_AfterFlatSprites(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterFlatSprites client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:209 Runs immediately after the flat-sprite pass for drawArea
event Game.OnRenderMap_AfterFlushMap(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterFlushMap client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:236 Runs after the map render target is flushed to the main scene for drawArea
event Game.OnRenderMap_AfterFog(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterFog client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:227 Runs immediately after the fog pass for drawArea when fog rendering is enabled
event Game.OnRenderMap_AfterLighting(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterLighting client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:215 Runs immediately after the map lighting pass for drawArea when lighting is enabled
event Game.OnRenderMap_AfterSprites(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterSprites client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:221 Runs immediately after the regular map-sprite pass for drawArea
event Game.OnRenderMap_AfterSpritesAndFog(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterSpritesAndFog client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:230 Runs after regular sprites and the optional fog pass for drawArea
event Game.OnRenderMap_AfterTiles(Map map, irect drawArea) script.event.client.Game.OnRenderMap_AfterTiles client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:203 Runs immediately after the map tile pass for drawArea
event Game.OnRenderMap_BeforeFlatSprites(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeFlatSprites client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:206 Runs immediately before the flat-sprite pass for drawArea
event Game.OnRenderMap_BeforeFlushMap(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeFlushMap client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:233 Runs before the map render target is flushed to the main scene for drawArea
event Game.OnRenderMap_BeforeFog(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeFog client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:224 Runs immediately before the fog pass for drawArea when fog rendering is enabled
event Game.OnRenderMap_BeforeLighting(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeLighting client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:212 Runs immediately before the map lighting pass for drawArea when lighting is enabled
event Game.OnRenderMap_BeforeSprites(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeSprites client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:218 Runs immediately before the regular map-sprite pass for drawArea
event Game.OnRenderMap_BeforeTiles(Map map, irect drawArea) script.event.client.Game.OnRenderMap_BeforeTiles client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:200 Runs immediately before the map tile pass for drawArea
event Game.OnRenderMap_Rebuild(Map map) script.event.client.Game.OnRenderMap_Rebuild client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:197 Runs when the map render cache is rebuilt
event Game.OnScreenScroll() script.event.client.Game.OnScreenScroll client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:191 Runs when the map view's screen offset changes
event Game.OnScreenSizeChanged() script.event.client.Game.OnScreenSizeChanged client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:338 Runs after the application reports a screen-size change
event Game.OnScriptOverrun(string entry, timespan execution, timespan lockWait, int32 count) script.event.client.Game.OnScriptOverrun client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:185 Reports a bounded, drained script overrun summary before the next OnLoop callback
event Game.OnStart() script.event.client.Game.OnStart client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:161 Runs once after client initialization completes
event Game.OnTouchDoubleTap(ipos screenPos) script.event.client.Game.OnTouchDoubleTap client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:260 Runs for a recognized double tap at screenPos
event Game.OnTouchDown(int64 fingerId, ipos screenPos) script.event.client.Game.OnTouchDown client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:248 Runs when a touch contact begins at screenPos
event Game.OnTouchMove(int64 fingerId, ipos screenPos, ipos offsetPos) script.event.client.Game.OnTouchMove client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:251 Runs when a touch contact moves, with current screen position and movement delta
event Game.OnTouchScroll(ipos screenPos, ipos offsetPos) script.event.client.Game.OnTouchScroll client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:263 Runs for a touch-scroll gesture with current screen position and scroll delta
event Game.OnTouchTap(ipos screenPos) script.event.client.Game.OnTouchTap client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:257 Runs for a recognized single tap at screenPos
event Game.OnTouchUp(int64 fingerId, ipos screenPos) script.event.client.Game.OnTouchUp client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:254 Runs when a touch contact ends at screenPos
event Game.OnTouchZoom(ipos screenPos, float32 factor) script.event.client.Game.OnTouchZoom client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:266 Runs for a touch-zoom gesture with its center and multiplicative factor

Game (mapper)

Signature Symbol ID Runtime Contract Flags Source Description
event Game.OnEditMapLoad(Map map) script.event.mapper.Game.OnEditMapLoad mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Tools/Mapper.h:328 Runs after a map is loaded and normalized, before it is added to the Mapper's loaded-map list
event Game.OnEditMapSave(Map map) script.event.mapper.Game.OnEditMapSave mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Tools/Mapper.h:331 Runs after Mapper writes a map successfully and before it marks the undo state clean
event Game.OnInspectorProperties(Entity entity, int32[]& properties) script.event.mapper.Game.OnInspectorProperties mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Tools/Mapper.h:334 Runs when the Inspector selects entity; handlers populate or reorder the mutable property-index list
event Game.OnMapperMessage(string& text) script.event.mapper.Game.OnMapperMessage mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Tools/Mapper.h:325 Runs for submitted Mapper console text; handlers may replace text, and StopChain suppresses built-in command parsing

Critter (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Critter.OnBarter(Critter playerCr, bool begin, int32 barterCount) script.event.server.Critter.OnBarter server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:212 Exposes a project-defined barter lifecycle event; Engine does not fire it directly
event Critter.OnCritterAppeared(Critter appearedCr) script.event.server.Critter.OnCritterAppeared server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:173 Runs when another critter enters this critter's current visibility set
event Critter.OnCritterAppearedDist1(Critter appearedCr) script.event.server.Critter.OnCritterAppearedDist1 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:176 Runs when another visible critter enters the ShowCritterDist1 distance tier
event Critter.OnCritterAppearedDist2(Critter appearedCr) script.event.server.Critter.OnCritterAppearedDist2 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:179 Runs when another visible critter enters the ShowCritterDist2 distance tier
event Critter.OnCritterAppearedDist3(Critter appearedCr) script.event.server.Critter.OnCritterAppearedDist3 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:182 Runs when another visible critter enters the ShowCritterDist3 distance tier
event Critter.OnCritterDisappeared(Critter disappearedCr) script.event.server.Critter.OnCritterDisappeared server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:185 Runs when another critter leaves this critter's current visibility set
event Critter.OnCritterDisappearedDist1(Critter disappearedCr) script.event.server.Critter.OnCritterDisappearedDist1 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:188 Runs when another critter leaves the ShowCritterDist1 distance tier or is no longer visible
event Critter.OnCritterDisappearedDist2(Critter disappearedCr) script.event.server.Critter.OnCritterDisappearedDist2 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:191 Runs when another critter leaves the ShowCritterDist2 distance tier or is no longer visible
event Critter.OnCritterDisappearedDist3(Critter disappearedCr) script.event.server.Critter.OnCritterDisappearedDist3 server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:194 Runs when another critter leaves the ShowCritterDist3 distance tier or is no longer visible
event Critter.OnCritterVisibilityModeChanged(Critter targetCr, CritterVisibilityMode mode) script.event.server.Critter.OnCritterVisibilityModeChanged server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:197 Runs when targetCr remains visible but changes visibility mode for this critter
event Critter.OnFinish() script.event.server.Critter.OnFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:170 Runs while this critter is being finished
event Critter.OnItemOnMapAppeared(Item item, Critter? dropper) script.event.server.Critter.OnItemOnMapAppeared server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:200 Runs when a map item enters this critter's visibility set; dropper is present for a direct critter drop
event Critter.OnItemOnMapChanged(Item item) script.event.server.Critter.OnItemOnMapChanged server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:206 Runs when a still-visible map item's view-relevant state changes
event Critter.OnItemOnMapDisappeared(Item item, Critter? picker) script.event.server.Critter.OnItemOnMapDisappeared server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:203 Runs when a map item leaves this critter's visibility set; picker is present when a critter picks it up
event Critter.OnTalk(Critter playerCr, bool begin, int32 talkers) script.event.server.Critter.OnTalk server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Critter.h:209 Exposes a project-defined talk lifecycle event; Engine does not fire it directly

Game (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Game.OnCritterFinish(Critter cr) script.event.server.Game.OnCritterFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:270 Runs while a critter is being finished and before it is unregistered
event Game.OnCritterInit(Critter cr, bool firstTime) script.event.server.Game.OnCritterInit server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:267 Runs once before a critter's own initialization script; firstTime distinguishes creation from restore
event Game.OnCritterItemMoved(Critter cr, Item item, CritterItemSlot fromSlot) script.event.server.Game.OnCritterItemMoved server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:282 Runs after an item enters, leaves, or changes slot in a critter inventory; fromSlot reports its previous slot
event Game.OnCritterLoad(Critter cr) script.event.server.Game.OnCritterLoad server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:273 Runs after a persistent critter is loaded and enters server ownership
event Game.OnCritterMoved(Critter cr, mpos oldHex) script.event.server.Game.OnCritterMoved server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:228 Runs after a critter changes map hex and reports the previous hex in oldHex
event Game.OnCritterPreLoad(Critter cr) script.event.server.Game.OnCritterPreLoad server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:264 Runs after a persistent critter and its owned entities are restored but before world entry; StopChain rejects the load
event Game.OnCritterSendInitialInfo(Critter cr) script.event.server.Game.OnCritterSendInitialInfo server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:279 Runs while the server prepares initial controlled-critter state for its player
event Game.OnCritterStartMoving(Critter cr, bool wasMoving) script.event.server.Game.OnCritterStartMoving server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:231 Runs after a movement context is activated and broadcast; wasMoving reports whether it replaced active movement
event Game.OnCritterStopMoving(Critter cr) script.event.server.Game.OnCritterStopMoving server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:234 Runs after active critter movement is stopped and the resulting state is broadcast
event Game.OnCritterTransfer(Critter cr, Map? prevMap) script.event.server.Game.OnCritterTransfer server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:237 Runs after a critter transfer completes; prevMap is absent when the critter did not come from a local map
event Game.OnCritterUnload(Critter cr) script.event.server.Game.OnCritterUnload server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:276 Runs before a persistent critter leaves server ownership without being destroyed
event Game.OnFinish() script.event.server.Game.OnFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:210 Runs during server shutdown before script modules are finalized
event Game.OnGenerateWorld() script.event.server.Game.OnGenerateWorld server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:204 Runs only for an empty database to create the initial world; StopChain aborts server initialization
event Game.OnGlobalMapCritterIn(Critter cr) script.event.server.Game.OnGlobalMapCritterIn server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:240 Runs when a critter enters the global-map container
event Game.OnGlobalMapCritterOut(Critter cr) script.event.server.Game.OnGlobalMapCritterOut server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:243 Runs when a critter leaves the global-map container
event Game.OnInit() script.event.server.Game.OnInit server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:201 Runs after script modules initialize and before the world is generated or restored; StopChain aborts server initialization
event Game.OnItemFinish(Item item) script.event.server.Game.OnItemFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:288 Runs while an item is being finished and before it is unregistered
event Game.OnItemInit(Item item, bool firstTime) script.event.server.Game.OnItemInit server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:285 Runs once before an item's own initialization script; firstTime distinguishes creation from restore
event Game.OnLocationFinish(Location location) script.event.server.Game.OnLocationFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:249 Runs while a location is being finished, before its maps are destroyed
event Game.OnLocationInit(Location location, bool firstTime) script.event.server.Game.OnLocationInit server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:246 Runs once before a location's own initialization script; firstTime distinguishes creation from restore
event Game.OnMapCritterIn(Map map, Critter cr) script.event.server.Game.OnMapCritterIn server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:258 Runs after a critter is attached to a local map
event Game.OnMapCritterOut(Map map, Critter cr) script.event.server.Game.OnMapCritterOut server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:261 Runs before a critter is detached from a local map
event Game.OnMapFinish(Map map) script.event.server.Game.OnMapFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:255 Runs while a map is being finished and before it is unregistered
event Game.OnMapInit(Map map, bool firstTime) script.event.server.Game.OnMapInit server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:252 Runs once before a map's own initialization script; firstTime distinguishes creation from restore
event Game.OnPlayerCritterSwitched(Player player, Critter cr, Critter prevCr) script.event.server.Game.OnPlayerCritterSwitched server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:219 Runs after a player switches from prevCr to cr and initial critter information is sent
event Game.OnPlayerDirCritter(Player player, Critter cr, mdir& dir) script.event.server.Game.OnPlayerDirCritter server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:225 Validates a player direction request; handlers may replace dir, and StopChain rejects the request
event Game.OnPlayerLogin(Player player, Player? notLoggedInPlayer) script.event.server.Game.OnPlayerLogin server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:213 Runs after login success is sent and before post-login setup; notLoggedInPlayer is present only during reconnect, and StopChain rejects the login
event Game.OnPlayerLogout(Player player) script.event.server.Game.OnPlayerLogout server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:216 Runs after a hard disconnect is observed and before the player is detached and unregistered
event Game.OnPlayerMoveCritter(Player player, Critter cr, int32& speed) script.event.server.Game.OnPlayerMoveCritter server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:222 Validates a player movement request; handlers may replace speed, and StopChain rejects the request
event Game.OnStart() script.event.server.Game.OnStart server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:207 Runs after world generation or restoration and before normal server work; StopChain aborts startup
event Game.OnStaticItemWalk(StaticItem item, Critter cr, bool isIn, mdir dir) script.event.server.Game.OnStaticItemWalk server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Server.h:291 Runs when a critter crosses a static item's trigger footprint; isIn distinguishes entry from exit

Item (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Item.OnCritterWalk(Critter critter, bool isIn, mdir dir) script.event.server.Item.OnCritterWalk server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Item.h:87 Runs when a critter crosses this static item's trigger footprint; isIn distinguishes entry from exit
event Item.OnFinish() script.event.server.Item.OnFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Item.h:84 Runs while this item is being finished

Location (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Location.OnFinish() script.event.server.Location.OnFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Location.h:76 Runs while this location is being finished
event Location.OnMapAdded(Map map) script.event.server.Location.OnMapAdded server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Location.h:79 Runs after a map is added to this location
event Location.OnMapRemoved(Map map) script.event.server.Location.OnMapRemoved server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Location.h:82 Runs when a map is removed from this location

Map (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Map.OnCheckLook(Critter cr, Critter target) script.event.server.Map.OnCheckLook server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Map.h:146 Exposes a project-defined critter visibility check; Engine does not fire it directly
event Map.OnCheckTrapLook(Critter cr, Item item) script.event.server.Map.OnCheckTrapLook server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Map.h:149 Exposes a project-defined trap visibility check; Engine does not fire it directly
event Map.OnFinish() script.event.server.Map.OnFinish server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Map.h:143 Runs while this map is being finished

Player (server)

Signature Symbol ID Runtime Contract Flags Source Description
event Player.OnAllowCommand(string arg1, uint8 arg2) script.event.server.Player.OnAllowCommand server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Player.h:125 Exposes a project-defined command authorization callback; Engine does not fire it directly
event Player.OnGetAccess(int32 arg1, string& arg2) script.event.server.Player.OnGetAccess server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Player.h:122 Exposes a project-defined player access callback with an integer input and mutable text argument; Engine does not fire it directly
event Player.OnLogout() script.event.server.Player.OnLogout server experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Server/Player.h:128 Exposes a project-defined player logout callback; Engine does not fire it directly
Start typing to search.