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.
Called when a biter migration builds a base.
Called when a chunk is generated.
Called when a new force is created using game.create_force()
Called when LuaGuiElement checked state is changed (related to checkboxes and radio buttons)
Called when LuaGuiElement is clicked.
Called when LuaGuiElement element value is changed (related to choose element buttons)
Called when LuaGuiElement selection state is changed (related to drop-downs)
Called when LuaGuiElement text is changed by the player
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 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 the player's driving state has changed, this means a player has either entered or left a vehicle.
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 the player puts equipment in an equipment grid
Called after a players quickbar inventory changed in some way.
Called after the player removes equipment from an equipment grid
Called after a player selects an area with a selection-tool item.
Called after a players tool inventory changed in some way.
Called just before a surface is deleted.
Called when players uses 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 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 when a surface is created.
Called after a surface is deleted.
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"
.