Every event contains at least the name
and tick
attributes. Other events may include
some additional attributes, specific to the event.
It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
A static event ID mods can use to tell other mods they built something with a script.
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it. This is provided as a means for mods needing a similar event to not have to generate their own event name and remote api for it.
A static event ID mods can use to tell other mods they destroyed something with a script.
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it. This is provided as a means for mods needing a similar event to not have to generate their own event name and remote api for it.
A static event ID mods can use to tell other mods they revived something with a script.
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it. This is provided as a means for mods needing a similar event to not have to generate their own event name and remote api for it.
Called when a biter migration builds a base.
Called when player builds something.
Called when a character corpse expires due to timeout or all of the items being removed from it.
Called when a chunk is charted or re-charted.
Called when a chunk is generated.
Called when an entity is damaged.
Called when a new force is created using game.create_force()
Called after two forces have been merged using game.merge_forces()
.
Called when LuaGuiElement checked state is changed (related to checkboxes and radio buttons)
Called when LuaGuiElement is clicked.
Called when the player closes the GUI they have open.
Called when LuaGuiElement element value is changed (related to choose element buttons)
Called when the player opens a GUI.
Called when LuaGuiElement selection state is changed (related to drop-downs)
Called when LuaGuiElement text is changed by the player
Called when LuaGuiElement slider value is changed (related to the slider element)
Called when a land mine is armed.
Called when the player uses the 'Open item GUI' control on an item defined with 'can_be_mod_opened' as true
Called after a player alt-selects an area with a selection-tool item.
Called after a players ammo inventory changed in some way.
Called after a players armor inventory changed in some way.
Called after a player builds tiles.
Called when a player cancels crafting.
Called when the tile position a player is located at changes.
Called when cheat mode is disabled on a player.
Called when cheat mode is enabled on a player.
Called when a player clicks the "confirm" button in the configure Blueprint GUI.
Called when the player crafts an item (upon inserting into player's inventory, not clicking the button to craft). As of 0.11.0, is called for each item crafted as well as what was clicked ("iron-axe" triggers both "iron-stick" with a count of 2 and "iron-axe" with a count of 1, assuming no "iron-sticks" are in the player's inventory)
Called after the player was created.
Called after a players cursorstack changed in some way.
Called when a player selects an area with a deconstruction planner.
Called when a player is demoted.
Called when the display resolution changes for a given player.
Called after a players gun inventory changed in some way.
Called after a player joins the game.
Called after a player leaves the game.
Called after a players main inventory changed in some way.
Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity.
Called when the player mines something.
Called after a player mines tiles.
Called when a player is muted.
Called when a player invokes the "smart pipette" over an entity.
Called after the player puts equipment in an equipment grid
Called when a player is promoted.
Called after a players quickbar inventory changed in some way.
Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
Called after the player removes equipment from an equipment grid
Called after a player selects an area with a selection-tool item.
Called when a player selects an area with a blueprint.
Called after a players tool inventory changed in some way.
Called after a players trash inventory changed in some way.
Called when a player is unmuted.
Called when a player uses a capsule that results in some game action.
Called when a player queues something to be crafted.
Called just before a surface is deleted.
Called when players uses an item to build something. Called before on_built_entity.
Called when a research finishes.
Called when a technology research starts.
Called when a resource entity reaches 0 or its minimum yield for infinite resources.
Called when a construction robot builds an entity.
Called after a robot builds tiles.
Called when a robot mines an entity.
Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity.
Called after a robot mines tiles.
Called when a surface is created.
Called after a surface is deleted.
Called when LuaForce::reset_technology_effects is finished.
Called when a train changes state (started to stopped and vice versa)
Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
Called when an entity with a trigger prototype (such as capsules) create an entity AND that
trigger prototype defined trigger_created_entity="true"
.