FOnline Engine
Current 2026.1.58-dev 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 121 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:175 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:169 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:172 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:322 Runs before the client applies a critter action; localCall distinguishes local initiation from server delivery
event Game.OnCritterAnimationInit(Critter cr, CritterStateAnim& stateAnim, CritterActionAnim& actionAnim, AbstractItem? contextItem, CritterAnimationContext context, int32 movingSpeed, CritterAnimationFlags& flags, float32& normalizedTime, float32& speed) 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:325 Selects project animation identifiers and playback for a context and effective movement speed; normalizedTime is in [0,1], speed must be finite and positive
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:328 Runs after animation selection and before playback; refreshAnim distinguishes view refresh from a queued action
event Game.OnCritterAnimationSprite(hstring modelName, CritterStateAnim stateAnim, CritterActionAnim actionAnim, uint32& sprId) script.event.client.Game.OnCritterAnimationSprite client, mapper experimental (scope)
since 2022.1.0.wip
contract source: Source/Common/Common.h:47
- Source/Client/Client.h:331 Resolves a project-owned 2D animation; a nonzero sprId transfers a loaded sprite handle to the engine, while StopChain reports failure
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:334 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:280 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:283 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:286 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:301 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:304 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:178 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:166 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:184 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:277 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:295 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:298 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:289 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:292 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:271 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:274 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:181 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:190 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:310 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:313 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:316 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:340 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:241 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:247 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:244 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:307 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:319 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:196 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:211 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:238 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:229 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:217 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:223 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:232 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:205 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:208 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:235 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:226 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:214 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:220 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:202 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:199 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:193 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:337 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:187 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:163 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:262 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:250 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:253 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:265 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:259 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:256 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:268 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:330 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:333 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:336 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:327 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:216 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:177 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:180 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:183 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:186 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:189 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:192 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:195 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:198 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:201 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:174 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:204 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:210 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:207 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:213 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:271 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:268 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:283 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:274 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:229 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:265 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:280 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:232 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:235 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:238 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:277 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:211 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:205 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:241 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:244 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:202 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:289 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:286 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:250 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:247 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:259 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:262 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:256 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:253 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:220 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:226 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:214 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:217 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:223 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:208 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:292 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:151 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:154 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:148 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:129 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:126 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:132 Exposes a project-defined player logout callback; Engine does not fire it directly
Start typing to search.