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 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 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 after a player dies.
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 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 before a players dies.
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 when the rocket is launched.
Called when a train changes state (started to stopped and vice versa)
Called when an entity with a trigger prototype (such as capsules) create an entity AND that
trigger prototype defined trigger_createdentity="true"
.