|
Project Zomboid Lua Docs 29123
Unofficial documentation for Project Zomboid's Lua
|
(Multiplayer) (Client) AcceptedFactionInvite: Triggered when receiving confirmation that a local player has accepted a faction invite.
Parameters
| Name | Type | Notes |
|---|---|---|
| faction | string | Name of the faction. |
| username | string | Username of the faction leader. |
(Multiplayer) (Client) AcceptedSafehouseInvite: Triggered when a player accepts an invite to a safehouse.
Parameters
| Name | Type | Notes |
|---|---|---|
| safehouse | string | Name of the safehouse. |
| username | string | Username of the safehouse owner. |
(Multiplayer) (Client) AcceptedTrade: Triggered when the other player in the client's current trade accepts or declines the trade.
Parameters
| Name | Type | Notes |
|---|---|---|
| accepted | boolean | Whether the trade was accepted. |
(Client) AddXP: Triggered after a local character gains perk XP, except when the XP source specifically requested not to.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character who gained the XP. |
| perk | PerkFactory.Perk | The perk XP was gained in. |
| amount | number | The amount of XP gained. This is the final value after all modifiers. |
DoSpecialTooltip: Triggered when updating the tooltip of an IsoObject with a special tooltip. Used for hover-over information about plants.
Parameters
| Name | Type | Notes |
|---|---|---|
| tooltip | ObjectTooltip | Empty tooltip for the object. |
| square | IsoGridSquare | Square of the object the tooltip is being updated for. |
EveryDays: Triggered at 0:00 every in-game day.
Parameters
None.
EveryHours: Triggered at the start of every in-game hour.
Parameters
None.
EveryOneMinute: Triggered every in-game minute.
Parameters
None.
EveryTenMinutes: Triggered every ten in-game minutes.
Parameters
None.
GrappleGrabCollisionCheck:
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | |
| weapon | HandWeapon |
GrapplerLetGo: Triggered when a grappler lets go of their grappled target.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The grappler. |
| result | string | The reason the grapple ended. 'Aborted' means the grapple was cancelled. |
(Client) LevelPerk: Triggered after a local character gains or loses a perk level.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character whose perk level changed. |
| perk | PerkFactory.Perk | The perk that changed level. |
| level | integer | The new level of the perk. |
| increased | boolean | True if the level increased, false if it decreased. |
LoadChunk:
Parameters
| Name | Type | Notes |
|---|---|---|
| chunk | IsoChunk |
LoadGridsquare: Triggered after a new square is loaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| square | IsoGridSquare | The square that was loaded. |
(Multiplayer) (Client) MngInvReceiveItems: Triggered when managing a remote player's inventory from the admin menu.
Parameters
| Name | Type | Notes |
|---|---|---|
| inventory | umbrella.MngInvItemTable | Details of the player's inventory. |
(Client) OnAIStateChange: Triggered when a local zombie or any loaded player changes state.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character whose state changed. |
| currentState | State | The state the character changed to. |
| previousState | State | The character's previous state. |
(Client) OnAcceptInvite: Triggered when the client accepts a steam invite to a server.
Parameters
| Name | Type | Notes |
|---|---|---|
| connectString | string | Steamworks connection string. Takes the format of '+connect ip:port' |
(Multiplayer) (Client) OnAddMessage: Triggered when a message is added to chat.
Parameters
| Name | Type | Notes |
|---|---|---|
| message | ChatMessage | The message that was added. |
| tabId | integer | The ID of the tab the message was added to. |
(Multiplayer) (Client) OnAdminMessage: Triggered when a ticket is created and the local player is an admin.
Parameters
| Name | Type | Notes |
|---|---|---|
| message | string | The text of the ticket. |
| x | integer | World X co-ordinate of the player who made the ticket. |
| y | integer | World Y co-ordinate of the player who made the ticket. |
| z | integer | World Z co-ordinate of the player who made the ticket. |
OnAlertMessage: See OnAddMessage
Parameters
| Name | Type | Notes |
|---|---|---|
| message | ChatMessage | The message that was added. |
| tabId | integer | The ID of the tab the message was added to. |
OnAmbientSound: Triggered whenever a sound meta event or building alarm is triggered.
Parameters
| Name | Type | Notes |
|---|---|---|
| name | string | Name of the sound script played. |
| x | number | World X co-ordinate of the sound. |
| y | number | World Y co-ordinate of the sound. |
(Client) OnCGlobalObjectSystemInit: Triggered when the client GlobalObject system is being initialised.
Parameters
None.
(Client) OnChallengeQuery: Triggered when the main menu wants to check for challenge maps.
Parameters
None.
OnCharacterCollide: Triggered when a non-zombie character collides into another (possibly zombie) character.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character colliding into the other character. |
| collidedCharacter | IsoGameCharacter | The character being collided into. |
OnCharacterDeath: Triggered when any character dies, including zombies, players and animals.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character who died. |
(Multiplayer) (Client) OnChatWindowInit: Triggered when the chat window is initialised.
Parameters
None.
OnClickedAnimalForContext:
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | |
| context | ISContextMenu | |
| animals | IsoAnimal[] | |
| test | boolean |
(Server) OnClientCommand: Triggered when a client command sent through sendClientCommand is received by the server.
Parameters
| Name | Type | Notes |
|---|---|---|
| module | string | The module the command was sent with. |
| command | string | The command the command was sent with. |
| player | IsoPlayer | The player who sent the command. |
| args | table or nil | The arguments table the command was sent with. If the table was empty, nil is passed instead. |
OnClimateManagerInit: Triggered when the climate manager is initialised.
Parameters
| Name | Type | Notes |
|---|---|---|
| climateManager | ClimateManager | The climate manager. |
OnClimateTick: Triggered every climate manager tick.
Parameters
| Name | Type | Notes |
|---|---|---|
| climateManager | ClimateManager | The climate manager. |
(Client) OnClimateTickDebug: Triggered every climate manager tick, but only on the client and only when debug mode is enabled.
Parameters
| Name | Type | Notes |
|---|---|---|
| climateManager | ClimateManager | The climate manager. |
(Client) OnClothingUpdated: Triggered every time a character's clothing is updated. This includes changing clothes and accumulating dirt or blood.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character whose clothing updated. |
(Multiplayer) (Client) OnConnectFailed: Triggered when the client fails to connect to a server.
Parameters
| Name | Type | Notes |
|---|---|---|
| message | string |
(Multiplayer) (Client) OnConnected: Triggered after successfully connecting to a server on the main menu, before character creation begins.
Parameters
None.
(Multiplayer) (Client) OnConnectionStateChanged: Triggered when the client's connection state is updated while trying to connect to a server.
Parameters
| Name | Type | Notes |
|---|---|---|
| state | string | |
| message | string |
(Client) OnContainerUpdate: Triggered when a container is added or removed from the world.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | any | The container that was added or removed. |
(Client) OnContextKey: Triggered while the player is holding the context key.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player pressing the context key. |
| timeMs | number | How long, in milliseconds, the context key has been held for. |
(Client) OnCoopJoinFailed: Triggered when a splitscreen character fails to be added.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The index of the player who could not be added. |
(Multiplayer) (Server) OnCoopServerMessage: Triggered when receiving a server message during a co-op (in-game hosted) game.
Parameters
| Name | Type | Notes |
|---|---|---|
| tag | string | |
| cookie | string | |
| payload | string |
OnCreateLivingCharacter: Triggered when any IsoLivingCharacter object is created. Most useful for detecting spawning animals.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoLivingCharacter | The character who was created. |
| desc | SurvivorDesc | The character's descriptor. |
(Client) OnCreatePlayer: Triggered every time a local player loads into the world.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The index of the newly-spawned player |
| player | IsoPlayer | The new player object |
(Client) OnCreateSurvivor: Triggered when an IsoSurvivor object is created.
Parameters
| Name | Type | Notes |
|---|---|---|
| survivor | IsoSurvivor | The survior that was created. |
(Client) OnCreateUI: Triggered when the UI is initialised.
Parameters
None.
(Client) OnCustomUIKey: Triggered when a key that is not used by vanilla UI is released.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was pressed. |
(Client) OnCustomUIKeyPressed: Triggered when a key that is not used by vanilla UI is pressed.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was pressed. |
(Client) OnCustomUIKeyReleased: Triggered when a key that is not used by vanilla UI is released.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was pressed. |
OnDeadBodySpawn: Triggered when spawning a dead body.
Parameters
| Name | Type | Notes |
|---|---|---|
| body | IsoDeadBody | The dead body being spawned. |
OnDestroyIsoThumpable: Triggered when an IsoThumpable object is destroyed by damage.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoThumpable | The thumpable that was destroyed. |
| player | nil | Purpose unknown: always nil. |
(Client) OnDeviceText: Triggered whenever a radio displays text.
Parameters
| Name | Type | Notes |
|---|---|---|
| guid | string | GUID of the line being displayed. |
| codes | string | Codes of the line being displayed. These typically contain perk/stat changes, but can be used to associate any arbitrary data with a line. |
| x | number | World X co-ordinate where the line is being displayed. |
| y | number | World Y co-ordinate where the line is being displayed. |
| z | number | World Z co-ordinate where the line is being displayed. |
| text | string or ChatMessage | The displayed, translated text of the line, or the chat message being displayed. |
| device | WaveSignalDevice | The device playing the line. |
(Multiplayer) (Client) OnDisconnect: Triggered when the client disconnects from a server.
Parameters
None.
OnDistributionMerge: Triggered when the distribution tables merge.
Parameters
None.
(Client) OnDoTileBuilding2: Triggered every tick while the local mouse and keyboard player has a build cursor (or other drag).
Parameters
| Name | Type | Notes |
|---|---|---|
| cursor | ISBuildingObject | The build cursor object the player is dragging. |
| bRender | boolean | Whether the preview should be rendered. |
| x | integer | World X co-ordinate of the square the build cursor is over. |
| y | integer | World Y co-ordinate of the square the build cursor is over. |
| z | integer | World Z co-ordinate of the square the build cursor is over. |
| square | IsoGridSquare or nil | The square the build cursor is over. |
(Client) OnDoTileBuilding3: Triggered every tick while a controller player has a build cursor (or other drag).
Parameters
| Name | Type | Notes |
|---|---|---|
| cursor | ISBuildingObject | The cursor object the player is dragging. |
| bRender | boolean | Whether the preview should be rendered. |
| x | integer | World X co-ordinate of the square the build cursor is over. |
| y | integer | World Y co-ordinate of the square the build cursor is over. |
| z | integer | World Z co-ordinate of the square the build cursor is over. |
(Client) OnDynamicMovableRecipe: Triggered when a local character crafts a dynamically generated Movable scrapping recipe.
Parameters
| Name | Type | Notes |
|---|---|---|
| sprite | string | Sprite of the movable. |
| recipe | MovableRecipe | The movable recipe that was crafted. |
| item | Moveable | The movable item being scrapped. |
| character | IsoGameCharacter | The character crafting the recipe. |
(Client) OnEnterVehicle: Triggered when a character enters a vehicle.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character that entered the vehicle. |
OnEquipPrimary: Triggered when a character changes the item in their primary equip slot.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character that equipped the item. |
| item | InventoryItem or nil | The newly equipped item. |
OnEquipSecondary: Triggered when a character changes the item in their secondary equip slot.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character that equipped the item. |
| item | InventoryItem or nil | The newly equipped item. |
(Client) OnExitVehicle: Triggered when a character exits a vehicle.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character that exited the vehicle. |
(Client) OnFETick: Triggered every tick while on the main menu.
Parameters
| Name | Type | Notes |
|---|---|---|
| unknown | 0 | Purpose unknown: always 0. |
(Server) OnFillContainer: Triggered whenever a container is first filled with loot, or when loot respawns.
Parameters
| Name | Type | Notes |
|---|---|---|
| roomType | string | Distribution type of the room the container is in, or the type of the vehicle. |
| containerType | string | The type of the container that was filled. |
| container | ItemContainer or ItemPickerContainer | The container that was filled. An ItemPickerContainer is sometimes passed when a sub-container is spawned and filled, and is probably a bug. |
(Client) OnFillInventoryObjectContextMenu: Triggered after the context menu for an inventory item is filled.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The index of the player whose context menu has been filled. |
| context | ISContextMenu | The context menu that was filled. |
| items | InventoryItem[] or umbrella.ContextMenuItemStack[] | The items that were selected to fill the context menu. If only full stacks are selected, a table of ContextMenuItemStacks is passed. Otherwise it is a table of InventoryItems. |
(Client) OnFillWorldObjectContextMenu: Triggered after a world context menu is filled.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The index of the player whose context menu has been filled. |
| context | ISContextMenu | The context menu that was filled. |
| worldObjects | IsoObject[] | The objects that were right clicked on. The first object is whatever the mouse click hit directly. If one can be found, it will also add a door, a window, a window frame, a thumpable, a hoppable, and a tree. Many kinds of objects will never appear in this list or appear inconsistently so it is a common pattern to get the square from the first object and then loop through its objects. |
| test | boolean | Whether the context menu was filled to test for interactive objects on the square. If true, the context menu will not actually be displayed. |
OnGameBoot: Triggered after the game finishes starting up. Note: For clients, lua files in lua/server/ will not have ran by the time this event is triggered, so event callbacks added by those files will not be triggered. This does not apply to servers.
Parameters
None.
(Client) OnGameStart: Triggered upon finishing loading and entering the game.
Parameters
None.
(Client) OnGameStateEnter: Triggers upon entering the Terms Of Service GameState. Probably meant to trigger for other GameStates too, but it doesn't.
Parameters
| Name | Type | Notes |
|---|---|---|
| state | GameState |
OnGameTimeLoaded: Triggered after GameTime is initialised.
Parameters
None.
(Client) OnGamepadConnect: Triggered after a controller is connected.
Parameters
| Name | Type | Notes |
|---|---|---|
| controllerId | integer | ID of the controller. |
(Client) OnGamepadDisconnect: Triggered after a controller is disconnected.
Parameters
| Name | Type | Notes |
|---|---|---|
| controllerId | integer | ID of the controller. |
(Multiplayer) (Client) OnGetDBSchema: Triggered when receiving the database schema from the server.
Parameters
| Name | Type | Notes |
|---|---|---|
| schema | table<string, umbrella.DBSchemaEntry[]> |
(Multiplayer) (Client) OnGetTableResult: Triggered when receiving a database table query result from the server.
Parameters
| Name | Type | Notes |
|---|---|---|
| data | ArrayList<DBResult> | |
| rowId | integer | |
| tableName | string |
OnGridBurnt: Triggered when a square is burned by fire.
Parameters
| Name | Type | Notes |
|---|---|---|
| square | IsoGridSquare | The square that was burned. |
OnHitZombie: Triggered whenever a zombie is hit by a character.
Parameters
| Name | Type | Notes |
|---|---|---|
| zombie | IsoZombie | The zombie that was hit. |
| attacker | IsoGameCharacter | The character that hit the zombie. |
| bodyPart | BodyPartType | The type of the body part that was hit. |
| weapon | HandWeapon | The weapon the zombie was hit with. |
OnInitGlobalModData: Triggered when GlobalModData is initialised. This is the earliest event after Sandbox Options are loaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| newGame | boolean | True if this is the first time the save has started. |
OnInitModdedWeatherStage: Triggered when a modded weather period is created.
Parameters
| Name | Type | Notes |
|---|---|---|
| weatherPeriod | WeatherPeriod | The weather period that was created. |
| weatherStage | WeatherPeriod.WeatherStage | The weather stage that was created. |
| strength | number | TODO |
OnInitRecordedMedia: Triggered when RecordedMedia is initialised.
Parameters
| Name | Type | Notes |
|---|---|---|
| recordedMedia | RecordedMedia | The RecordedMedia object. |
OnInitSeasons: Triggered when the ErosionManager is created.
Parameters
| Name | Type | Notes |
|---|---|---|
| season | ErosionSeason |
OnInitWorld: Triggered after the world has initialised.
Parameters
None.
OnItemFound:
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | |
| itemType | string | |
| amount | number |
(Client) OnJoypadActivate: Triggered whenever a controller starts being used during gameplay.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadActivateUI: Triggered whenever a controller starts being used outside of gameplay, such as on the main menu.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadBeforeDeactivate: Triggered when a controller is disconnected, before disconnection is processed.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadBeforeReactivate: Triggered when a controller is connected, before connection is processed.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadDeactivate: Triggered after a controller has been disconnected.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadReactivate: Triggered after a controller has been connected.
Parameters
| Name | Type | Notes |
|---|---|---|
| joypadId | integer | ID of the joypad. |
(Client) OnJoypadRenderUI: Triggered when rendering controller debug UI.
Parameters
None.
(Client) OnKeyKeepPressed: Triggered every frame while a key is held down.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was held. |
(Client) OnKeyPressed: Triggered when a key is released.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was released. |
(Client) OnKeyStartPressed: Triggered when a key starts being pressed.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | integer | Key code of the key that was pressed. |
(Client) OnLoad: Triggered upon finishing loading and entering the game.
Parameters
None.
OnLoadMapZones: Triggered before loading the map zones.
Parameters
None.
OnLoadRadioScripts: Triggered after ZomboidRadio loads the radio scripts.
Parameters
| Name | Type | Notes |
|---|---|---|
| scriptManager | RadioScriptManager | The radio script manager. |
| newGame | boolean | True when a new save launches for the first time. |
(Client) OnLoadSoundBanks: Triggered after the game loads the FMOD sound banks.
Parameters
None.
OnLoadedMapZones: Triggered after loading the map zones.
Parameters
None.
OnLoadedTileDefinitions: Triggered after loading the tile definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| spriteManager | IsoSpriteManager | The sprite manager. |
(Client) OnMainMenuEnter: Triggered upon entering the main menu.
Parameters
None.
OnMechanicActionDone: Triggered after a character completes a mechanic action on a vehicle.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character who performed the action. |
| success | boolean | Whether the action succeeded. |
(Multiplayer) (Client) OnMiniScoreboardUpdate: Triggered when the admin mini-scoreboard is updated.
Parameters
None.
(Client) OnModsModified: Triggered on the main menu when a mod's files have changed.
Parameters
None.
(Client) OnMouseDown: Triggered when the player left clicks, as long as the input isn't eaten by UI.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnMouseMove: Triggered every frame, unless mouse movement is eaten by something else.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
| xMultiplied | number | Screen X co-ordinate of the click multiplied by zoom level. |
| yMultiplied | number | Screen Y co-ordinate of the click multiplied by zoom level. |
(Client) OnMouseUp: Triggered whenever the player releases the left mouse button, unless the input is eaten by UI.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
OnMouseWheel:
Parameters
| Name | Type | Notes |
|---|---|---|
| wheel | number |
OnMultiTriggerNPCEvent: Triggered when the player triggers an NPC event.
Parameters
| Name | Type | Notes |
|---|---|---|
| type | string | |
| data | table | |
| def | BuildingDef |
OnNewFire: Triggered when a new fire is started.
Parameters
| Name | Type | Notes |
|---|---|---|
| fire | IsoFire | The fire that was created. |
(Client) OnNewGame: Triggered whenever a local player character is created for the first time.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The character that was created. |
| square | IsoGridSquare | The square the character spawned on. |
OnObjectAboutToBeRemoved: Triggered before a tile object is destroyed or picked up.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object about to be removed. |
OnObjectAdded: Triggered when an object is added to the world. Note: usually not called on the client, but is in some cases.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject |
OnObjectCollide: Triggered when two objects collide with each other.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoMovingObject | The object that collided into the other object. |
| collided | IsoObject | The object that was collided into. |
(Client) OnObjectLeftMouseButtonDown: Triggered when the player left clicks a world object.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object that was clicked. |
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnObjectLeftMouseButtonUp: Triggered when the player releases left click on a world object.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object that was clicked. |
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnObjectRightMouseButtonDown: Triggered when the player right clicks a world object.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object that was clicked. |
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnObjectRightMouseButtonUp: Triggered when the player releases right click on a world object.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object that was clicked. |
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnPlayerAttackFinished: Triggered when a local player finishes attacking.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player who attacked. |
| weapon | HandWeapon | The weapon the player attacked with. |
(Client) OnPlayerDeath: Triggered when a local player dies.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player who died. |
OnPlayerGetDamage: Triggered every time a local player takes damage. Triggered once per frame by each bleeding body part. Also triggered when zombies are hit by weapons: this is the only case in which the event is triggered on the server.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character who took damage. |
| damageType | "POISON" or "HUNGRY" or "SICK" or "BLEEDING" or "THIRST" or "HEAVYLOAD" or "INFECTION" or "LOWWEIGHT" or "FALLDOWN" or "WEAPONHIT" or "CARHITDAMAGE" or "CARCRASHDAMAGE" | The type of damage the character took. |
| damage | number | The damage that was taken. |
(Client) OnPlayerMove: Triggered during each local player's update if they are walking.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoPlayer |
(Client) OnPlayerUpdate: Triggered during each local player's update (every tick).
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player being updated. |
OnPostDistributionMerge: Triggered after the distribution tables have been merged.
Parameters
None.
OnPostFloorLayerDraw: Triggered after a floor layer has been rendered.
Parameters
| Name | Type | Notes |
|---|---|---|
| z | integer | The Z level that was rendered. |
OnPostMapLoad: Triggered after the map has been loaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| cell | IsoCell | The cell that was loaded. |
| x | integer | |
| y | integer |
(Client) OnPostRender: Triggered after every in-game rendering frame.
Parameters
None.
OnPostSave: Triggered after saving and exiting the game.
Parameters
None.
(Client) OnPostUIDraw: Triggered after every UI render frame
Parameters
None.
OnPreDistributionMerge: Triggered after the distribution tables have been merged.
Parameters
None.
(Client) OnPreFillInventoryObjectContextMenu: Triggered when the context menu for an inventory item is created, before it is filled.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The index of the player whose context menu has been created. |
| context | ISContextMenu | The context menu that was created. |
| items | InventoryItem[] or umbrella.ContextMenuItemStack[] | The items that were selected to fill the context menu. If only full stacks are selected, a table of ContextMenuItemStacks is passed. Otherwise it is a table of InventoryItems. |
(Client) OnPreFillWorldObjectContextMenu: Triggered after the world context menu is created, before it is filled.
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | The number of the player whose context menu has been created. |
| context | ISContextMenu | The context menu that was created. |
| worldobjects | IsoObject[] | The objects that were selected. |
| test | boolean | Whether the context menu was created to test for interactive objects on the square. If true, the context menu will not actually be displayed. |
OnPreMapLoad: Triggered before the map starts loading.
Parameters
None.
(Client) OnPreUIDraw: Triggered before every UI render frame
Parameters
None.
(Client) OnPressRackButton: Triggered when a local player has a gun and presses the button to rack it.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player attempting to rack. |
| weapon | HandWeapon | The weapon they are attempting to rack. |
| shift | false | Unknown purpose: always false. Added at some point during B42. |
(Client) OnPressReloadButton: Triggered when a local player has a gun and presses the button to reload it.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player attempting to reload. |
| weapon | HandWeapon | The weapon they are attempting to reload. |
(Client) OnPressWalkTo: Triggered when the local player 1 presses their Walk To keybind.
Parameters
| Name | Type | Notes |
|---|---|---|
| arg0 | 0 | Always zero. |
| arg1 | 0 | Always zero. |
| arg2 | 0 | Always zero. |
(Multiplayer) (Server) OnProcessAction:
Parameters
| Name | Type | Notes |
|---|---|---|
| action | "build" | |
| character | IsoPlayer | |
| args | table |
(Multiplayer) (Server) OnProcessTransaction:
Parameters
| Name | Type | Notes |
|---|---|---|
| action | "scrapMoveable" or "pickUpMoveable" or "rotateMoveable" or "placeMoveable" or "dropOnFloor" | |
| character | IsoPlayer | |
| item | InventoryItem or nil | |
| source | ContainerID | |
| destination | ContainerID | |
| args | table or nil | When type is "dropOnFloor", has field IsoGridSquare "square". When type is "rotateMoveable" or "placeMoveable", has field string "direction" |
(Multiplayer) OnReceiveGlobalModData: Triggered when receiving a global mod data table.
Parameters
| Name | Type | Notes |
|---|---|---|
| key | string | The key of the mod data table that was requested. |
| data | table or false | The mod data table that was returned. False if there was no mod data table by that key. |
(Multiplayer) OnReceiveItemListNet: Triggered when receiving a list of items sent with sendItemListNet. This is not used by vanilla, it is provided for mods to use. Item lists sent by clients cannot be longer than 50 items and all of the items must be in the player's inventory.
Parameters
| Name | Type | Notes |
|---|---|---|
| sender | IsoPlayer or nil | The player who sent the item list. Nil if it was sent by the server. |
| items | ArrayList<InventoryItem> | The list of items. |
| receiver | IsoPlayer or nil | The specific local player the list was sent to. Nil if it was sent by a client to the server, or by the server to all clients. |
| transferID | string | Arbitrary string associated with the message. Defaults to -1 if none was given. |
| custom | string or nil | Arbitrary string associated with the message. Nil if none was given. |
(Multiplayer) (Client) OnReceiveUserlog: Triggered when receiving another client's Userlogs.
Parameters
| Name | Type | Notes |
|---|---|---|
| username | string | |
| logs | ArrayList |
(Client) OnRefreshInventoryWindowContainers: Triggered when the available containers in the inventory UI change.
Parameters
| Name | Type | Notes |
|---|---|---|
| inventoryPage | ISInventoryPage | |
| reason | string |
OnRenderTick: Triggered on every rendering tick.
Parameters
None.
OnResetLua: Triggered after Lua has been reloaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| reason | string |
OnResolutionChange: Triggered whenever the window resolution changes.
Parameters
| Name | Type | Notes |
|---|---|---|
| oldX | integer | Previous width of the window. |
| oldY | integer | Previous height of the window. |
| newX | integer | New width of the window. |
| newY | integer | New height of the window. |
(Client) OnRightMouseDown: Triggered when the player right clicks, as long as the input isn't eaten by UI.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Client) OnRightMouseUp: Triggered whenever the player releases the right mouse button, unless the input is eaten by UI.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | number | Screen X co-ordinate of the click. |
| y | number | Screen Y co-ordinate of the click. |
(Server) OnSGlobalObjectSystemInit: Triggered when the server GlobalObject system has been initialised.
Parameters
None.
(Multiplayer) (Client) OnSafehousesChanged: Triggered every time a safehouse is added, removed or changed.
Parameters
None.
OnSave: Triggered while saving the world, after characters and sandbox options have been saved, but before global mod data and the world have been saved.
Parameters
None.
(Multiplayer) (Client) OnScoreboardUpdate: Triggered when the client receives an update to the in-game scoreboard.
Parameters
| Name | Type | Notes |
|---|---|---|
| usernames | ArrayList<String> | |
| displayNames | ArrayList<String> | |
| steamIDs | ArrayList<String> |
OnSeeNewRoom: Triggered when a room becomes visible for the first time.
Parameters
| Name | Type | Notes |
|---|---|---|
| room | IsoRoom | The room. |
(Multiplayer) (Client) OnServerCommand: Triggered when a server command sent through sendServerCommand is received by the client.
Parameters
| Name | Type | Notes |
|---|---|---|
| module | string | The module the command was sent with. |
| command | string | The command the command was sent with. |
| args | table or nil | The arguments table the command was sent with. If the table was empty, nil is passed instead. |
(Multiplayer) (Client) OnServerFinishSaving: Triggered when the server has finished saving and unpauses the game.
Parameters
None.
(Multiplayer) (Server) OnServerStartSaving: Triggered when the server has paused the game to save.
Parameters
None.
(Multiplayer) (Server) OnServerStarted: Triggered when the server has started and can now be connected to.
Parameters
None.
(Multiplayer) (Client) OnServerStatisticReceived: Triggered when the MPStatistics have been received from the server.
Parameters
None.
(Multiplayer) (Client) OnServerWorkshopItems: Triggered when receiving an update about the server's Steam Workshop items while connecting. Has a very variable signature depending on the type.
Parameters
| Name | Type | Notes |
|---|---|---|
| type | string | |
| items | ArrayList<String> or ArrayList<SteamUGCDetails> or string or integer or nil | |
| error | string or integer or nil | |
| maxSize | integer or nil |
(Multiplayer) (Client) OnSetDefaultTab: Triggered when the player sets their favourite chat window tab.
Parameters
| Name | Type | Notes |
|---|---|---|
| title | string |
OnSleepingTick:
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | number | |
| timeOfDay | number |
OnSourceWindowFileReload: Triggered when a file is reloaded from the debug source viewer.
Parameters
None.
(Client) OnSpawnRegionsLoaded: Triggered when the spawn regions have been loaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| regions | table |
OnSpawnVehicleEnd:
Parameters
| Name | Type | Notes |
|---|---|---|
| vehicle | BaseVehicle |
OnSpawnVehicleStart:
Parameters
| Name | Type | Notes |
|---|---|---|
| vehicle | BaseVehicle |
(Client) OnSteamFriendStatusChanged: Triggered when the player has gained or lost a steam friend.
Parameters
| Name | Type | Notes |
|---|---|---|
| steamID | string | Steam ID of the friend who was gained/lost. |
(Multiplayer) (Client) OnSteamGameJoin: Triggered when the player joins a game through steam.
Parameters
None.
(Client) OnSteamRefreshInternetServers: Triggered when the steam server list has been refreshed.
Parameters
None.
(Client) OnSteamRulesRefreshComplete: Triggered after a server's rules are retrieved.
Parameters
| Name | Type | Notes |
|---|---|---|
| address | string | |
| port | number | |
| rules | table | Table of information about the server TODO: investigate what this actually is, class definition? |
OnSteamServerFailedToRespond2:
Parameters
| Name | Type | Notes |
|---|---|---|
| host | string | |
| port | number |
(Client) OnSteamServerResponded: Triggered when receiving a server for the server list.
Parameters
| Name | Type | Notes |
|---|---|---|
| index | integer |
(Client) OnSteamServerResponded2: Triggered when receiving a server for the favourite server list.
Parameters
| Name | Type | Notes |
|---|---|---|
| address | string | |
| port | number | |
| server | Server |
(Client) OnSteamWorkshopItemCreated: Triggered when the client successfully uploads a workshop item.
Parameters
| Name | Type | Notes |
|---|---|---|
| workshopId | string | |
| bUserNeedsToAcceptWorkshopLegalAgreement | boolean |
(Client) OnSteamWorkshopItemNotCreated: Triggered when the client fails to upload a workshop item.
Parameters
| Name | Type | Notes |
|---|---|---|
| result | integer |
(Client) OnSteamWorkshopItemNotUpdated: Triggered when the client fails to update a workshop item.
Parameters
| Name | Type | Notes |
|---|---|---|
| result | integer |
(Client) OnSteamWorkshopItemUpdated: Triggered when the client successfully updates a workshop item.
Parameters
| Name | Type | Notes |
|---|---|---|
| bUserNeedsToAcceptWorkshopLegalAgreement | boolean |
(Client) OnSwitchVehicleSeat: Triggered when a local character moves seats in a vehicle.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character who moved seats. |
(Multiplayer) (Client) OnTabAdded: Triggered when a tab is added to the chat.
Parameters
| Name | Type | Notes |
|---|---|---|
| title | string | |
| tabID | integer |
(Multiplayer) (Client) OnTabRemoved: Triggered when a tab is removed from the chat.
Parameters
| Name | Type | Notes |
|---|---|---|
| title | string | |
| tabID | integer |
OnTemplateTextInit: Triggered when TemplateText is initialised.
Parameters
None.
OnThrowableExplode: Triggered when a throwable or trap explodes.
Parameters
| Name | Type | Notes |
|---|---|---|
| throwable | IsoTrap | The explosive. |
| square | IsoGridSquare | The square it exploded on. |
(Client) OnThunderEvent: Triggered when a thunder event is enqueued.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | integer | World X co-ordinate where the thunder event will happen. |
| y | integer | World Y co-ordinate where the thunder event will happen. |
| strike | boolean | Whether the thunder event will make a striking sound. |
| light | boolean | Whether the thunder event will create light. |
| rumble | boolean | Whether the thunder event will make a rumbling sound. |
OnTick: Triggered every game tick.
Parameters
| Name | Type | Notes |
|---|---|---|
| tick | number | The number of ticks since the game started. |
OnTickEvenPaused: Triggered every game tick, even if the game is paused.
Parameters
| Name | Type | Notes |
|---|---|---|
| tick | number | The number of ticks since the game started. Always zero while paused. |
OnTileRemoved: Triggered when a tile object is removed.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object being removed. |
OnTriggerNPCEvent: Triggered when the player triggers an NPC event.
Parameters
| Name | Type | Notes |
|---|---|---|
| type | string | |
| data | table | |
| def | BuildingDef |
(Server) OnUpdateModdedWeatherStage: Triggered when a modded weather stage tries to be updated.
Parameters
| Name | Type | Notes |
|---|---|---|
| weatherPeriod | WeatherPeriod | |
| weatherStage | WeatherPeriod.WeatherStage | |
| strength | number |
(Client) OnUseVehicle: Triggered when a local character enters or exits a vehicle.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player using the vehicle. |
| vehicle | BaseVehicle | The vehicle being used. |
| pressedNotTapped | boolean | True if the button was held for a short duration, false if the button was tapped. |
OnVehicleDamageTexture: Triggered when a vehicle part has become damaged enough to gain a damage overlay.
Parameters
| Name | Type | Notes |
|---|---|---|
| driver | IsoGameCharacter | The character driving the vehicle. |
OnWaterAmountChange: Triggered when the amount of fluid (not just water) in an object changes.
Parameters
| Name | Type | Notes |
|---|---|---|
| object | IsoObject | The object which has gained/lost fluid. |
| previousAmount | number | The amount of fluid the object had before the change. |
(Client) OnWeaponHitCharacter: Triggered when a non-zombie character is hit by an attack from a local player.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoGameCharacter | The character who attacked. |
| target | IsoGameCharacter | The character who was hit by the attack. |
| weapon | HandWeapon | The weapon that was attacked with. |
| damage | number | How much damage the attack did. TODO: what does this actually mean? injuries? |
(Server) OnWeaponHitThumpable: Triggered when a Thumpable is hit by an attack.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoGameCharacter | The character attacking the object. |
| weapon | HandWeapon | The weapon the object was attacked with. |
| object | Thumpable | The object that was attacked. |
(Client) OnWeaponHitTree: Triggered when a tree is hit by an attack.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoGameCharacter | The character hitting the tree. |
| weapon | HandWeapon | The weapon the tree was hit with. |
OnWeaponHitXp: Triggered when XP is being granted for an attack.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoGameCharacter | The character who attacked. |
| weapon | HandWeapon | The weapon the character attacked with. |
| target | IsoMovingObject | The target of the attack. |
| damage | number | The damage of the attack. |
| hitcount | 1 | Unknown purpose: always 1. Added at some point in B42. |
OnWeaponSwing: Triggered when a player begins swinging a weapon.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoPlayer | The character attacking. |
| weapon | HandWeapon | The weapon being attacked with. |
(Client) OnWeaponSwingHitPoint: Triggered when a local player's attack connects.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoPlayer | The player attacking. |
| weapon | HandWeapon | The weapon being attacked with. |
(Server) OnWeatherPeriodComplete: Triggered when a weather period finishes.
Parameters
| Name | Type | Notes |
|---|---|---|
| period | WeatherPeriod |
(Server) OnWeatherPeriodStage: Triggered when a weather period progresses a stage.
Parameters
| Name | Type | Notes |
|---|---|---|
| period | WeatherPeriod |
(Server) OnWeatherPeriodStart: Triggered when a weather period begins.
Parameters
| Name | Type | Notes |
|---|---|---|
| period | WeatherPeriod |
(Server) OnWeatherPeriodStop: Triggered when a weather period ends early, such as by an admin command.
Parameters
| Name | Type | Notes |
|---|---|---|
| period | WeatherPeriod |
OnWorldSound: Triggered whenever a world sound is created.
Parameters
| Name | Type | Notes |
|---|---|---|
| x | integer | World X co-ordinate of the square the sound was created on. |
| y | integer | World Y co-ordinate of the square the sound was created on. |
| z | integer | World Z co-ordinate of the square the sound was created on. |
| radius | integer | Radius of the sound. |
| volume | integer | Volume of the sound. Zombies are more likely to investigate louder sounds when they have multiple choices. |
| source | Object | The source of the sound. |
OnZombieCreate: Triggered when a zombie is being spawned.
Parameters
| Name | Type | Notes |
|---|---|---|
| zombie | IsoZombie | The zombie being spawned. |
OnZombieDead: Triggered when a zombie dies. The zombie's inventory is not filled with loot when this event is triggered, but their clothing and attached items are added. The corpse does not exist until a few seconds later.
Parameters
| Name | Type | Notes |
|---|---|---|
| zombie | IsoZombie | The zombie that died. |
(Client) OnZombieUpdate: Triggered whenever a zombie updates.
Parameters
| Name | Type | Notes |
|---|---|---|
| zombie | IsoZombie | The zombie being updated. |
(Multiplayer) (Client) ReceiveFactionInvite: Triggered when the client receives a faction invite.
Parameters
| Name | Type | Notes |
|---|---|---|
| factionName | string | |
| hostUsername | string |
(Multiplayer) (Client) ReceiveSafehouseInvite: Triggered when the client receives a safehouse invite.
Parameters
| Name | Type | Notes |
|---|---|---|
| title | string | |
| hostUsername | string |
RenderOpaqueObjectsInWorld:
Parameters
| Name | Type | Notes |
|---|---|---|
| playerIndex | integer | |
| x | integer | |
| y | integer | |
| z | integer | |
| square | IsoGridSquare |
(Multiplayer) (Client) RequestTrade: Triggered when the client receives a trade request.
Parameters
| Name | Type | Notes |
|---|---|---|
| requester | string |
ReuseGridsquare: Triggered before a square is unloaded.
Parameters
| Name | Type | Notes |
|---|---|---|
| square | IsoGridSquare | The square being reused. |
(Multiplayer) (Server) SendCustomModData: Triggered when a client is requesting server mod data.
Parameters
None.
(Multiplayer) (Client) ServerPinged: Triggered when receiving a ping response from the server. The 'numClients' string is suffixed with '/512'.
Parameters
| Name | Type | Notes |
|---|---|---|
| clientAddress | string | |
| numClients | string |
(Client) SetDragItem: Triggered before a local player's drag item (typically a build cursor) is set.
Parameters
| Name | Type | Notes |
|---|---|---|
| item | table | The drag item being set. |
| playerIndex | integer | The index of the player whose drag item is being set. |
(Multiplayer) (Client) SwitchChatStream: Triggered when the client switches chat tabs.
Parameters
None.
(Multiplayer) (Client) SyncFaction: Triggered when the client receives changes to a faction.
Parameters
| Name | Type | Notes |
|---|---|---|
| faction | string |
(Multiplayer) (Client) TradingUIAddItem: Triggered when the other player in a trade adds an item.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player who added the item. |
| item | InventoryItem | The item that was added. |
(Multiplayer) (Client) TradingUIRemoveItem: Triggered when the other player in a trade removes an item.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player who removed the item. |
| id | integer | The id of the removed item. |
(Multiplayer) (Client) TradingUIUpdateState: Triggered when the other player in a trade changes the state of the trade.
Parameters
| Name | Type | Notes |
|---|---|---|
| player | IsoPlayer | The player changing the state. |
| state | integer | The new state. TODO: enum for this |
(Multiplayer) (Client) ViewBannedIPs: Triggered when receiving the response to a request from getBannedIPs().
Parameters
| Name | Type | Notes |
|---|---|---|
| bannedIPs | ArrayList<DBBannedIP> | List of banned ip database entries. |
ViewBannedSteamIDs:
Parameters
None.
(Multiplayer) (Client) ViewTickets: Triggered when receiving the list of tickets from the server.
Parameters
| Name | Type | Notes |
|---|---|---|
| tickets | ArrayList |
onAddForageDefs: Triggered after the foraging item definitions are created.
Parameters
| Name | Type | Notes |
|---|---|---|
| forageSystem | forageSystem | The foraging system. |
(Client) onDisableSearchMode: Triggered when a local player disables search mode.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoPlayer | The character disabling search mode. |
| isSearchMode | false | Always false. |
(Client) onEnableSearchMode: Triggered when a local player enables search mode.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoPlayer | The character disabling search mode. |
| isSearchMode | true | Always true. |
(Client) onFillSearchIconContextMenu: Triggered when opening the context menu for a foraging item.
Parameters
| Name | Type | Notes |
|---|---|---|
| context | ISContextMenu | The foraging context menu. |
| icon | ISBaseIcon | The foraging icon the context menu was created for. |
(Client) onItemFall: Triggered when a local character is forced to drop the items in their hands.
Parameters
| Name | Type | Notes |
|---|---|---|
| item | InventoryItem | The item that fell. |
(Multiplayer) onLoadModDataFromServer: Triggered when the server sends a square's mod data to the clients, or when the client receives it.
Parameters
| Name | Type | Notes |
|---|---|---|
| square | IsoGridSquare | The square that had its mod data updated. |
(Client) onToggleSearchMode: Triggered when a local player toggles search mode.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoPlayer | The character toggling search mode. |
| isSearchMode | boolean | Whether search mode is now on or off. |
(Client) onUpdateIcon: Triggered when an ISForageIcon is moved or removed.
Parameters
| Name | Type | Notes |
|---|---|---|
| zoneData | table | |
| iconID | string | |
| icon | ISForageIcon |
preAddCatDefs: Triggered before the foraging system processes item category definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| system | forageSystem | The foraging system. |
preAddForageDefs: Triggered before the foraging system processes any definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| system | forageSystem | The foraging system. |
preAddItemDefs: Triggered before the foraging system processes item definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| system | forageSystem | The foraging system. |
preAddSkillDefs: Triggered before the foraging system processes trait and profession definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| system | forageSystem | The foraging system. |
preAddZoneDefs: Triggered before the foraging system processes zone definitions.
Parameters
| Name | Type | Notes |
|---|---|---|
| system | forageSystem | The foraging system. |