{"application":"factorio","application_version":"1.1.74","api_version":3,"stage":"runtime","classes":[{"name":"LuaAISettings","order":0,"description":"Collection of settings for overriding default ai behavior.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"allow_destroy_when_commands_fail","order":0,"description":"If enabled, units that repeatedly fail to succeed at commands will be destroyed.","type":"boolean","optional":false,"read":true,"write":true},{"name":"allow_try_return_to_spawner","order":1,"description":"If enabled, units that have nothing else to do will attempt to return to a spawner.","type":"boolean","optional":false,"read":true,"write":true},{"name":"do_separation","order":2,"description":"If enabled, units will try to separate themselves from nearby friendly units.","type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"path_resolution_modifier","order":3,"description":"The pathing resolution modifier, must be between -8 and 8.","type":"int8","optional":false,"read":true,"write":true},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaAccumulatorControlBehavior","order":1,"description":"Control behavior for accumulators.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"output_signal","order":0,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaAchievementPrototype","order":2,"description":"Prototype of a achievement.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"allowed_without_fight","order":4,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"hidden","order":5,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaAmmoCategoryPrototype","order":3,"description":"Prototype of a ammo category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"bonus_gui_order","order":4,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaArithmeticCombinatorControlBehavior","order":4,"description":"Control behavior for arithmetic combinators.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"parameters","order":0,"description":"This arithmetic combinator's parameters.","notes":["Writing `nil` clears the combinator's parameters."],"type":"ArithmeticCombinatorParameters","optional":false,"read":true,"write":true},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaCombinatorControlBehavior"]},{"name":"LuaAutoplaceControlPrototype","order":5,"description":"Prototype of an autoplace control.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"can_be_disabled","order":5,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"category","order":7,"description":"Category name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"control_order","order":6,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"richness","order":4,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaBootstrap","order":6,"description":"Entry point for registering event handlers. It is accessible through the global object named `script`.","methods":[{"name":"generate_event_name","order":7,"description":"Generate a new, unique event ID that can be used to raise custom events with [LuaBootstrap::raise_event](LuaBootstrap::raise_event).","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The newly generated event ID.","type":"uint","optional":false}]},{"name":"get_event_filter","order":11,"description":"Gets the filters for the given event.","parameters":[{"name":"event","order":0,"description":"ID of the event to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The filters or `nil` if none are defined.","type":"EventFilter","optional":true}]},{"name":"get_event_handler","order":8,"description":"Find the event handler for an event.","parameters":[{"name":"event","order":0,"description":"The event identifier to get a handler for.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Reference to the function currently registered as the handler, if it was found.","type":{"complex_type":"function","parameters":["EventData"]},"optional":true}]},{"name":"get_event_order","order":9,"description":"Gets the mod event order as a string.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"on_configuration_changed","order":3,"description":"Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its [global](global) table or to the game state through [LuaGameScript](LuaGameScript).","notes":["For more context, refer to the [Data Lifecycle](data-lifecycle) page."],"parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["ConfigurationChangedData"]},"nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"on_event","order":4,"description":"Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.","examples":["Register for the [on_tick](on_tick) event to print the current tick to console each tick. \n```\nscript.on_event(defines.events.on_tick,\nfunction(event) game.print(event.tick) end)\n```","Register for the [on_built_entity](on_built_entity) event, limiting it to only be received when a `\"fast-inserter\"` is built. \n```\nscript.on_event(defines.events.on_built_entity,\nfunction(event) game.print(\"Gotta go fast!\") end,\n{{filter = \"name\", name = \"fast-inserter\"}})\n```"],"parameters":[{"name":"event","order":0,"description":"The event(s) or custom-input to invoke the handler on.","type":{"complex_type":"union","options":["defines.events",{"complex_type":"array","value":"defines.events"},"string"],"full_format":false},"optional":false},{"name":"filters","order":2,"description":"The filters for this event. Can only be used when registering for individual events.","type":"EventFilter","optional":true},{"name":"handler","order":1,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["EventData"]},"nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"on_init","order":0,"description":"Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to [LuaGameScript](LuaGameScript) and the [global](global) table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.","notes":["For more context, refer to the [Data Lifecycle](data-lifecycle) page."],"examples":["Initialize a `players` table in `global` for later use. \n```\nscript.on_init(function()\n  global.players = {}\nend)\n```"],"parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":[]},"nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"on_load","order":1,"description":"Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to [LuaGameScript](LuaGameScript) is not available. The [global](global) table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.\n\nThe only legitimate uses of this event are the following:\n- Re-setup [metatables](https://www.lua.org/pil/13.html) as they are not persisted through the save/load cycle.\n- Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.\n- Create local references to data stored in the [global](global) table.\n\nFor all other purposes, [LuaBootstrap::on_init](LuaBootstrap::on_init), [LuaBootstrap::on_configuration_changed](LuaBootstrap::on_configuration_changed) or [migrations](migrations) should be used instead.","notes":["For more context, refer to the [Data Lifecycle](data-lifecycle) page."],"parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":[]},"nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"on_nth_tick","order":5,"description":"Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.","parameters":[{"name":"handler","order":1,"description":"The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["NthTickEventData"]},"nil"],"full_format":false},"optional":false},{"name":"tick","order":0,"description":"The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.","type":{"complex_type":"union","options":["uint",{"complex_type":"array","value":"uint"},"nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"raise_biter_base_built","order":16,"description":"","raises":[{"name":"on_biter_base_built","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was built.","type":"LuaEntity","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_console_chat","order":13,"description":"","raises":[{"name":"on_console_chat","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"message","order":1,"description":"The chat message to send.","type":"string","optional":false},{"name":"player_index","order":0,"description":"The player doing the chatting.","type":"uint","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_event","order":12,"description":"Raise an event. Only events generated with [LuaBootstrap::generate_event_name](LuaBootstrap::generate_event_name) and the following can be raised:\n\n- [on_console_chat](on_console_chat)\n- [on_player_crafted_item](on_player_crafted_item)\n- [on_player_fast_transferred](on_player_fast_transferred)\n- [on_biter_base_built](on_biter_base_built)\n- [on_market_item_purchased](on_market_item_purchased)\n- [script_raised_built](script_raised_built)\n- [script_raised_destroy](script_raised_destroy)\n- [script_raised_revive](script_raised_revive)\n- [script_raised_set_tiles](script_raised_set_tiles)","examples":["Raise the [on_console_chat](on_console_chat) event with the desired message 'from' the first player. \n```\nlocal data = {player_index = 1, message = \"Hello friends!\"}\nscript.raise_event(defines.events.on_console_chat, data)\n```"],"parameters":[{"name":"data","order":1,"description":"Table with extra data that will be passed to the event handler. Any invalid LuaObjects will silently stop the event from being raised.","type":"table","optional":false},{"name":"event","order":0,"description":"ID of the event to raise.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"raise_market_item_purchased","order":17,"description":"","raises":[{"name":"on_market_item_purchased","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"count","order":3,"description":"The amount of offers purchased.","type":"uint","optional":false},{"name":"market","order":1,"description":"The market entity.","type":"LuaEntity","optional":false},{"name":"offer_index","order":2,"description":"The index of the offer purchased.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player who did the purchasing.","type":"uint","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_player_crafted_item","order":14,"description":"","raises":[{"name":"on_player_crafted_item","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"item_stack","order":0,"description":"The item that has been crafted.","type":"LuaItemStack","optional":false},{"name":"player_index","order":1,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe used to craft this item.","type":"LuaRecipe","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_player_fast_transferred","order":15,"description":"","raises":[{"name":"on_player_fast_transferred","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":1,"description":"The entity transferred from or to.","type":"LuaEntity","optional":false},{"name":"from_player","order":2,"description":"Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.","type":"boolean","optional":false},{"name":"player_index","order":0,"description":"The player transferred from or to.","type":"uint","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_script_built","order":18,"description":"","raises":[{"name":"script_raised_built","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that has been built.","type":"LuaEntity","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_script_destroy","order":19,"description":"","raises":[{"name":"script_raised_destroy","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was destroyed.","type":"LuaEntity","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_script_revive","order":20,"description":"","raises":[{"name":"script_raised_revive","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was revived.","type":"LuaEntity","optional":false},{"name":"tags","order":1,"description":"The tags associated with this entity, if any.","type":"Tags","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"raise_script_set_tiles","order":21,"description":"","raises":[{"name":"script_raised_set_tiles","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"surface_index","order":0,"description":"The surface whose tiles have been changed.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The tiles that have been changed.","type":{"complex_type":"array","value":"Tile"},"optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"register_metatable","order":2,"description":"Register a metatable to have linkage recorded and restored when saving/loading. The metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.","notes":["`register_metatable()` can not be used in the console, in event listeners or during a `remote.call()`."],"parameters":[{"name":"metatable","order":1,"description":"The metatable to register.","type":"table","optional":false},{"name":"name","order":0,"description":"The name of this metatable. Names must be unique per mod.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"register_on_entity_destroyed","order":6,"description":"Registers an entity so that after it's destroyed, [on_entity_destroyed](on_entity_destroyed) is called. Once an entity is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an entity, all mods listening to [on_entity_destroyed](on_entity_destroyed) will receive the event when it is destroyed. Registering the same entity multiple times will still only fire the destruction event once, and will return the same registration number.","notes":["Depending on when a given entity is destroyed, [on_entity_destroyed](on_entity_destroyed) will either be fired at the end of the current tick or at the end of the next tick."],"parameters":[{"name":"entity","order":0,"description":"The entity to register.","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The registration number. It is used to identify the entity in the [on_entity_destroyed](on_entity_destroyed) event.","type":"uint64","optional":false}]},{"name":"set_event_filter","order":10,"description":"Sets the filters for the given event. The filters are only retained when set after the actual event registration, because registering for an event with different or no filters will overwrite previously set ones.","examples":["Limit the [on_marked_for_deconstruction](on_marked_for_deconstruction) event to only be received when a non-ghost entity is marked for deconstruction. \n```\nscript.set_event_filter(defines.events.on_marked_for_deconstruction, {{filter = \"ghost\", invert = true}})\n```","Limit the [on_built_entity](on_built_entity) event to only be received when either a `unit` or a `unit-spawner` is built. \n```\nscript.set_event_filter(defines.events.on_built_entity, {{filter = \"type\", type = \"unit\"}, {filter = \"type\", type = \"unit-spawner\"}})\n```","Limit the [on_entity_damaged](on_entity_damaged) event to only be received when a `rail` is damaged by an `acid` attack. \n```\nscript.set_event_filter(defines.events.on_entity_damaged, {{filter = \"rail\"}, {filter = \"damage-type\", type = \"acid\", mode = \"and\"}})\n```"],"parameters":[{"name":"event","order":0,"description":"ID of the event to filter.","type":"uint","optional":false},{"name":"filters","order":1,"description":"The filters or `nil` to clear them.","type":"EventFilter","optional":true}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"active_mods","order":2,"description":"A dictionary listing the names of all currently active mods and mapping them to their version.","examples":["This will print the names and versions of all active mods to the console. \n```\nfor name, version in pairs(script.active_mods) do\n  game.print(name .. \" version \" .. version)\nend\n```"],"type":{"complex_type":"dictionary","key":"string","value":"string"},"optional":false,"read":true,"write":false},{"name":"level","order":1,"description":"Information about the currently running scenario/campaign/tutorial.","type":{"complex_type":"table","parameters":[{"name":"campaign_name","order":2,"description":"The campaign name if any.","type":"string","optional":true},{"name":"is_simulation","order":0,"description":"Is this level a simulation? (The main menu and 'Tips and tricks' use simulations)","type":"boolean","optional":true},{"name":"is_tutorial","order":1,"description":"Is this level a tutorial?","type":"boolean","optional":true},{"name":"level_name","order":3,"description":"The level name.","type":"string","optional":false},{"name":"mod_name","order":4,"description":"The mod name if any.","type":"string","optional":true}]},"optional":false,"read":true,"write":false},{"name":"mod_name","order":0,"description":"The name of the mod from the environment this is used in.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":3,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaBurner","order":7,"description":"A reference to the burner energy source owned by a specific [LuaEntity](LuaEntity) or [LuaEquipment](LuaEquipment).","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"burnt_result_inventory","order":2,"description":"The burnt result inventory.","type":"LuaInventory","optional":false,"read":true,"write":false},{"name":"currently_burning","order":6,"description":"The currently burning item.","notes":["Writing to this automatically handles correcting [LuaBurner::remaining_burning_fuel](LuaBurner::remaining_burning_fuel)."],"type":"LuaItemPrototype","optional":true,"read":true,"write":true},{"name":"fuel_categories","order":7,"description":"The fuel categories this burner uses.","notes":["The value in the dictionary is meaningless and exists just to allow for easy lookup."],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":false,"read":true,"write":false},{"name":"heat","order":3,"description":"The current heat (energy) stored in this burner.","type":"double","optional":false,"read":true,"write":true},{"name":"heat_capacity","order":4,"description":"The maximum heat (maximum energy) that this burner can store.","type":"double","optional":false,"read":true,"write":false},{"name":"inventory","order":1,"description":"The fuel inventory.","type":"LuaInventory","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"owner","order":0,"description":"The owner of this burner energy source","type":{"complex_type":"union","options":["LuaEntity","LuaEquipment"],"full_format":false},"optional":false,"read":true,"write":false},{"name":"remaining_burning_fuel","order":5,"description":"The amount of energy left in the currently-burning fuel item.","notes":["Writing to this will silently do nothing if there's no [LuaBurner::currently_burning](LuaBurner::currently_burning) set."],"type":"double","optional":false,"read":true,"write":true},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaBurnerPrototype","order":8,"description":"Prototype of a burner energy source.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"burnt_inventory_size","order":5,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"effectivity","order":3,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"emissions","order":0,"description":"The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","type":"double","optional":false,"read":true,"write":false},{"name":"fuel_categories","order":8,"description":"","notes":["The value in the dictionary is meaningless and exists just to allow for easy lookup."],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":false,"read":true,"write":false},{"name":"fuel_inventory_size","order":4,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"light_flicker","order":7,"description":"The light flicker definition for this burner prototype.","type":{"complex_type":"table","parameters":[{"name":"border_fix_speed","order":4,"description":"","type":"float","optional":false},{"name":"color","order":7,"description":"","type":"Color","optional":false},{"name":"derivation_change_deviation","order":3,"description":"","type":"float","optional":false},{"name":"derivation_change_frequency","order":2,"description":"","type":"float","optional":false},{"name":"light_intensity_to_size_coefficient","order":6,"description":"","type":"float","optional":false},{"name":"maximum_intensity","order":1,"description":"","type":"float","optional":false},{"name":"minimum_intensity","order":0,"description":"","type":"float","optional":false},{"name":"minimum_light_size","order":5,"description":"","type":"float","optional":false}]},"optional":true,"read":true,"write":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"render_no_network_icon","order":1,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"render_no_power_icon","order":2,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"smoke","order":6,"description":"The smoke sources for this burner prototype.","type":{"complex_type":"array","value":"SmokeSource"},"optional":true,"read":true,"write":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaChunkIterator","order":9,"description":"A chunk iterator can be used for iterating chunks coordinates of a surface.\n\nThe returned type is a [ChunkPositionAndArea](ChunkPositionAndArea) containing the chunk coordinates and its area.","examples":["```\nfor chunk in some_surface.get_chunks() do\n  game.player.print(\"x: \" .. chunk.x .. \", y: \" .. chunk.y)\n  game.player.print(\"area: \" .. serpent.line(chunk.area))\nend\n```"],"methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"call","order":0,"description":"Gets the next chunk position if the iterator is not yet done and increments the it.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"ChunkPositionAndArea","optional":true}]}],"abstract":false},{"name":"LuaCircuitNetwork","order":10,"description":"A circuit network associated with a given entity, connector, and wire type.","methods":[{"name":"get_signal","order":0,"description":"","parameters":[{"name":"signal","order":0,"description":"The signal to read.","type":"SignalID","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The current value of the signal.","type":"int","optional":false}]},{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_connector_id","order":2,"description":"The circuit connector ID on the associated entity this network was gotten from.","type":"defines.circuit_connector_id","optional":false,"read":true,"write":false},{"name":"connected_circuit_count","order":5,"description":"The number of circuits connected to this network.","type":"uint","optional":false,"read":true,"write":false},{"name":"entity","order":0,"description":"The entity this circuit network reference is associated with.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"network_id","order":4,"description":"The circuit networks ID.","type":"uint","optional":false,"read":true,"write":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"signals","order":3,"description":"The circuit network signals last tick. `nil` if there were no signals last tick.","type":{"complex_type":"array","value":"Signal"},"optional":true,"read":true,"write":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"wire_type","order":1,"description":"The wire type this network is associated with.","type":"defines.wire_type","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaCombinatorControlBehavior","order":11,"description":"","methods":[{"name":"get_signal_last_tick","order":0,"description":"Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.","parameters":[{"name":"signal","order":0,"description":"The signal to get","type":"SignalID","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"int","optional":true}]}],"attributes":[{"name":"signals_last_tick","order":0,"description":"The circuit network signals sent by this combinator last tick.","type":{"complex_type":"array","value":"Signal"},"optional":false,"read":true,"write":false}],"operators":[],"abstract":true,"base_classes":["LuaControlBehavior"]},{"name":"LuaCommandProcessor","order":12,"description":"Allows for the registration of custom console commands. Similarly to [event subscriptions](LuaBootstrap::on_event), these don't persist through a save-and-load cycle.","methods":[{"name":"add_command","order":0,"description":"Add a custom console command.","notes":["Trying to add a command with the `name` of a game command or the name of a custom command that is already in use will result in an error."],"examples":["This will register a custom event called `print_tick` that prints the current tick to either the player issuing the command or to everyone on the server, depending on the command parameter. It shows the usage of the table that gets passed to any function handling a custom command. This specific example makes use of the `tick` and the optional `player_index` and `parameter` fields. The user is supposed to either call it without any parameter (`\"/print_tick\"`) or with the `\"me\"` parameter (`\"/print_tick me\"`). \n```\ncommands.add_command(\"print_tick\", nil, function(command)\n  if command.player_index ~= nil and command.parameter == \"me\" then\n    game.get_player(command.player_index).print(command.tick)\n  else\n    game.print(command.tick)\n  end\nend)\n```"],"parameters":[{"name":"function","order":2,"description":"The function that will be called when this command is invoked.","type":{"complex_type":"function","parameters":["CustomCommandData"]},"optional":false},{"name":"help","order":1,"description":"The localised help message. It will be shown to players using the `/help` command.","type":"LocalisedString","optional":false},{"name":"name","order":0,"description":"The desired name of the command (case sensitive).","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"remove_command","order":1,"description":"Remove a custom console command.","parameters":[{"name":"name","order":0,"description":"The name of the command to remove (case sensitive).","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the command was successfully removed. Returns `false` if the command didn't exist.","type":"boolean","optional":false}]}],"attributes":[{"name":"commands","order":0,"description":"Lists the custom commands registered by scripts through `LuaCommandProcessor`.","type":{"complex_type":"dictionary","key":"string","value":"LocalisedString"},"optional":false,"read":true,"write":false},{"name":"game_commands","order":1,"description":"Lists the built-in commands of the core game. The [wiki](https://wiki.factorio.com/Console) has an overview of these.","type":{"complex_type":"dictionary","key":"string","value":"LocalisedString"},"optional":false,"read":true,"write":false},{"name":"object_name","order":2,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaConstantCombinatorControlBehavior","order":13,"description":"Control behavior for constant combinators.","methods":[{"name":"get_signal","order":1,"description":"Gets the signal at the given index. Returned [Signal](Signal) will not contain signal if none is set for the index.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"Signal","optional":false}]},{"name":"help","order":2,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"set_signal","order":0,"description":"Sets the signal at the given index","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false},{"name":"signal","order":1,"description":"","type":"Signal","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"enabled","order":1,"description":"Turns this constant combinator on and off.","type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"parameters","order":0,"description":"This constant combinator's parameters. `nil` if the [item_slot_count](LuaEntityPrototype::item_slot_count) of the combinator's prototype is `0`.\n\nWriting `nil` clears the combinator's parameters.","type":{"complex_type":"array","value":"ConstantCombinatorParameters"},"optional":true,"read":true,"write":true},{"name":"signals_count","order":2,"description":"The number of signals this constant combinator supports","type":"uint","optional":false,"read":true,"write":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaContainerControlBehavior","order":14,"description":"Control behavior for container entities.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaControl","order":15,"description":"This is an abstract base class containing the common functionality between [LuaPlayer](LuaPlayer) and entities (see [LuaEntity](LuaEntity)). When accessing player-related functions through a [LuaEntity](LuaEntity), it must refer to a character entity.","methods":[{"name":"begin_crafting","order":18,"description":"Begins crafting the given count of the given recipe.","raises":[{"name":"on_player_main_inventory_changed","order":1,"description":"Raised if crafting was able to be started.","timeframe":"current_tick","optional":true},{"name":"on_pre_player_crafted_item","order":0,"description":"Raised if crafting was able to be started.","timeframe":"instantly","optional":true}],"parameters":[{"name":"count","order":0,"description":"The count to craft.","type":"uint","optional":false},{"name":"recipe","order":1,"description":"The recipe to craft.","type":{"complex_type":"union","options":["string","LuaRecipe"],"full_format":false},"optional":false},{"name":"silent","order":2,"description":"If false and the recipe can't be crafted the requested number of times printing the failure is skipped.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The count that was actually started crafting.","type":"uint","optional":false}]},{"name":"can_insert","order":2,"description":"Can at least some items be inserted?","parameters":[{"name":"items","order":0,"description":"Items that would be inserted.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if at least a part of the given items could be inserted into this inventory.","type":"boolean","optional":false}]},{"name":"can_reach_entity","order":8,"description":"Can a given entity be opened or accessed?","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_crafting","order":19,"description":"Cancels crafting the given count of the given crafting queue index.","raises":[{"name":"on_player_cancelled_crafting","order":0,"description":"Raised if crafting was able to be cancelled.","timeframe":"instantly","optional":true},{"name":"on_player_main_inventory_changed","order":1,"description":"Raised if crafting was able to be cancelled.","timeframe":"current_tick","optional":true}],"parameters":[{"name":"count","order":1,"description":"The count to cancel crafting.","type":"uint","optional":false},{"name":"index","order":0,"description":"The crafting queue index.","type":"uint","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"clear_gui_arrow","order":5,"description":"Removes the arrow created by `set_gui_arrow`.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_items_inside","order":9,"description":"Remove all items from this entity.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_personal_logistic_slot","order":28,"description":"","notes":["This will silently fail if personal logistics are not researched yet."],"raises":[{"name":"on_entity_logistic_slot_changed","order":0,"description":"Raised if clearing of logistic slot was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"slot_index","order":0,"description":"The slot to clear.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"clear_selected_entity","order":13,"description":"Unselect any selected entity.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised if there is a currently selected entity.","timeframe":"instantly","optional":true}],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_vehicle_logistic_slot","order":29,"description":"","notes":["This will silently fail if the vehicle does not use logistics."],"raises":[{"name":"on_entity_logistic_slot_changed","order":0,"description":"Raised if clearing of logistic slot was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"slot_index","order":0,"description":"The slot to clear.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"disable_flashlight","order":14,"description":"Disable the flashlight.","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_flashlight","order":15,"description":"Enable the flashlight.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_blueprint_entities","order":31,"description":"Gets the entities that are part of the currently selected blueprint, regardless of it being in a blueprint book or picked from the blueprint library.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"Returns `nil` if there is no currently selected blueprint.","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":true}]},{"name":"get_craftable_count","order":17,"description":"Gets the count of the given recipe that can be crafted.","parameters":[{"name":"recipe","order":0,"description":"The recipe.","type":{"complex_type":"union","options":["string","LuaRecipe"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The count that can be crafted.","type":"uint","optional":false}]},{"name":"get_inventory","order":0,"description":"Get an inventory belonging to this entity. This can be either the \"main\" inventory or some auxiliary one, like the module slots or logistic trash slots.","notes":["A given [defines.inventory](defines.inventory) is only meaningful for the corresponding LuaObject type. EG: get_inventory(defines.inventory.character_main) is only meaningful if 'this' is a player character. You may get a value back but if the type of 'this' isn't the type referred to by the [defines.inventory](defines.inventory) it's almost guaranteed to not be the inventory asked for."],"parameters":[{"name":"inventory","order":0,"description":"","type":"defines.inventory","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The inventory or `nil` if none with the given index was found.","type":"LuaInventory","optional":true}]},{"name":"get_item_count","order":6,"description":"Get the number of all or some items in this entity.","parameters":[{"name":"item","order":0,"description":"Prototype name of the item to count. If not specified, count all items.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_main_inventory","order":1,"description":"Gets the main inventory for this character or player if this is a character or player.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The inventory or `nil` if this entity is not a character or player.","type":"LuaInventory","optional":true}]},{"name":"get_personal_logistic_slot","order":26,"description":"Gets the parameters of a personal logistic request and auto-trash slot.","parameters":[{"name":"slot_index","order":0,"description":"The slot to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The logistic parameters. If personal logistics are not researched yet, their `name` will be `nil`.","type":"LogisticParameters","optional":false}]},{"name":"get_vehicle_logistic_slot","order":27,"description":"Gets the parameters of a vehicle logistic request and auto-trash slot. Only used on `spider-vehicle`.","parameters":[{"name":"slot_index","order":0,"description":"The slot to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The logistic parameters. If the vehicle does not use logistics, their `name` will be `nil`.","type":"LogisticParameters","optional":false}]},{"name":"has_items_inside","order":7,"description":"Does this entity have any item inside it?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"insert","order":3,"description":"Insert items into this entity. This works the same way as inserters or shift-clicking: the \"best\" inventory is chosen automatically.","parameters":[{"name":"items","order":0,"description":"The items to insert.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The number of items that were actually inserted.","type":"uint","optional":false}]},{"name":"is_cursor_blueprint","order":30,"description":"Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records from the blueprint library into account.\n\nNote that both this method and [LuaControl::get_blueprint_entities](LuaControl::get_blueprint_entities) refer to the currently selected blueprint, meaning a blueprint book with a selected blueprint will return the information as well.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_cursor_empty","order":32,"description":"Returns whether the player is holding something in the cursor. It takes into account items from the blueprint library, as well as items and ghost cursor.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_flashlight_enabled","order":16,"description":"Is the flashlight enabled.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_player","order":22,"description":"When `true` control adapter is a LuaPlayer object, `false` for entities including characters with players.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"mine_entity","order":20,"description":"Mines the given entity as if this player (or character) mined it.","raises":[{"name":"on_player_mined_entity","order":1,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_player_mined_item","order":2,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_pre_player_mined_item","order":0,"description":"Raised if mining is possible.","timeframe":"instantly","optional":true}],"parameters":[{"name":"entity","order":0,"description":"The entity to mine","type":"LuaEntity","optional":false},{"name":"force","order":1,"description":"Forces mining the entity even if the items can't fit in the player.","type":"boolean","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the mining succeeded.","type":"boolean","optional":false}]},{"name":"mine_tile","order":21,"description":"Mines the given tile as if this player (or character) mined it.","raises":[{"name":"on_player_mined_item","order":0,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_player_mined_tile","order":1,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"tile","order":0,"description":"The tile to mine.","type":"LuaTile","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the mining succeeded.","type":"boolean","optional":false}]},{"name":"open_technology_gui","order":23,"description":"Open the technology GUI and select a given technology.","parameters":[{"name":"technology","order":0,"description":"The technology to select after opening the GUI.","type":"TechnologyIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"remove_item","order":10,"description":"Remove items from this entity.","parameters":[{"name":"items","order":0,"description":"The items to remove.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The number of items that were actually removed.","type":"uint","optional":false}]},{"name":"set_gui_arrow","order":4,"description":"Create an arrow which points at this entity. This is used in the tutorial. For examples, see `control.lua` in the campaign missions.","parameters":[{"name":"type","order":0,"description":"Where to point to. This field determines what other fields are mandatory. May be `\"nowhere\"`, `\"goal\"`, `\"entity_info\"`, `\"active_window\"`, `\"entity\"`, `\"position\"`, `\"crafting_queue\"`, or `\"item_stack\"`.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"crafting_queue","order":2,"parameters":[{"name":"crafting_queueindex","order":0,"description":"","type":"uint","optional":false}]},{"name":"entity","order":0,"parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"item_stack","order":3,"parameters":[{"name":"inventory_index","order":0,"description":"","type":"defines.inventory","optional":false},{"name":"item_stack_index","order":1,"description":"","type":"uint","optional":false},{"name":"source","order":2,"description":"May be either `\"player\"` or `\"target\"`.","type":"string","optional":false}]},{"name":"position","order":1,"parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:","takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"set_personal_logistic_slot","order":24,"description":"Sets a personal logistic request and auto-trash slot to the given value.","notes":["This will silently fail if personal logistics are not researched yet."],"raises":[{"name":"on_entity_logistic_slot_changed","order":0,"description":"Raised if setting of logistic slot was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"slot_index","order":0,"description":"The slot to set.","type":"uint","optional":false},{"name":"value","order":1,"description":"The logistic request parameters.","type":"LogisticParameters","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the slot was set successfully. `false` if personal logistics are not researched yet.","type":"boolean","optional":false}]},{"name":"set_vehicle_logistic_slot","order":25,"description":"Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicle`.","raises":[{"name":"on_entity_logistic_slot_changed","order":0,"description":"Raised if setting of logistic slot was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"slot_index","order":0,"description":"The slot to set.","type":"uint","optional":false},{"name":"value","order":1,"description":"The logistic request parameters.","type":"LogisticParameters","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the slot was set successfully. `false` if the vehicle does not use logistics.","type":"boolean","optional":false}]},{"name":"teleport","order":11,"description":"Teleport the entity to a given position, possibly on another surface.","notes":["Some entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.","You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x."],"raises":[{"name":"on_player_changed_position","order":0,"description":"Raised if the teleported entity is a player character.","timeframe":"instantly","optional":true}],"parameters":[{"name":"position","order":0,"description":"Where to teleport to.","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"Surface to teleport to. If not given, will teleport to the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface.","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if the entity was successfully teleported.","type":"boolean","optional":false}]},{"name":"update_selected_entity","order":12,"description":"Select an entity, as if by hovering the mouse above it.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised if there is an entity at the given position to select.","timeframe":"instantly","optional":true}],"parameters":[{"name":"position","order":0,"description":"Position of the entity to select.","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"build_distance","order":37,"description":"The build distance of this character or max uint when not a character or player connected to a character.","type":"uint","optional":false,"read":true,"write":false},{"name":"character_additional_mining_categories","order":22,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":true},{"name":"character_build_distance_bonus","order":24,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_crafting_speed_modifier","order":20,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"double","optional":false,"read":true,"write":true},{"name":"character_health_bonus","order":33,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"float","optional":false,"read":true,"write":true},{"name":"character_inventory_slots_bonus","order":30,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_item_drop_distance_bonus","order":25,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_item_pickup_distance_bonus","order":28,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_loot_pickup_distance_bonus","order":29,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_maximum_following_robot_count_bonus","order":32,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_mining_progress","order":45,"description":"The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.","type":"double","optional":false,"read":true,"write":false},{"name":"character_mining_speed_modifier","order":21,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"double","optional":false,"read":true,"write":true},{"name":"character_personal_logistic_requests_enabled","order":34,"description":"If personal logistic requests are enabled for this character or players character.","type":"boolean","optional":false,"read":true,"write":true},{"name":"character_reach_distance_bonus","order":26,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_resource_reach_distance_bonus","order":27,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_running_speed","order":44,"description":"The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.","type":"double","optional":false,"read":true,"write":false},{"name":"character_running_speed_modifier","order":23,"description":"Modifies the running speed of this character by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"double","optional":false,"read":true,"write":true},{"name":"character_trash_slot_count_bonus","order":31,"description":"","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character (see [LuaPlayer::character](LuaPlayer::character))."],"type":"uint","optional":false,"read":true,"write":true},{"name":"cheat_mode","order":19,"description":"When `true` hand crafting is free and instant.","type":"boolean","optional":false,"read":true,"write":true},{"name":"crafting_queue","order":17,"description":"The current crafting queue items.","type":{"complex_type":"array","value":"CraftingQueueItem"},"optional":false,"read":true,"write":false},{"name":"crafting_queue_progress","order":7,"description":"The crafting queue progress in the range `[0-1]`. `0` when no recipe is being crafted.","type":"double","optional":false,"read":true,"write":true},{"name":"crafting_queue_size","order":6,"description":"Size of the crafting queue.","type":"uint","optional":false,"read":true,"write":false},{"name":"cursor_ghost","order":15,"description":"The ghost prototype in the player's cursor. When read, it will be a [LuaItemPrototype](LuaItemPrototype).","notes":["Items in the cursor stack will take priority over the cursor ghost."],"type":"ItemPrototypeIdentification","optional":true,"read":true,"write":true},{"name":"cursor_stack","order":14,"description":"The player's cursor stack. `nil` if the player controller is a spectator.","examples":["Even though this property is marked as read-only, it returns a [LuaItemStack](LuaItemStack), meaning it can be manipulated like so: \n```\nplayer.cursor_stack.clear()\n```"],"type":"LuaItemStack","optional":true,"read":true,"write":false},{"name":"driving","order":16,"description":"`true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.","raises":[{"name":"on_player_driving_changed_state","order":0,"description":"Raised if the driving state successfully changed.","timeframe":"instantly","optional":true}],"type":"boolean","optional":false,"read":true,"write":true},{"name":"drop_item_distance","order":38,"description":"The item drop distance of this character or max uint when not a character or player connected to a character.","type":"uint","optional":false,"read":true,"write":false},{"name":"following_robots","order":18,"description":"The current combat robots following the character.","notes":["When called on a [LuaPlayer](LuaPlayer), it must be associated with a character(see [LuaPlayer::character](LuaPlayer::character))."],"type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"force","order":3,"description":"The force of this entity. Reading will always give a [LuaForce](LuaForce), but it is possible to assign either [string](string) or [LuaForce](LuaForce) to this attribute to change the force.","type":"ForceIdentification","optional":false,"read":true,"write":true},{"name":"in_combat","order":43,"description":"Whether this character entity is in combat.","type":"boolean","optional":false,"read":true,"write":false},{"name":"item_pickup_distance","order":40,"description":"The item pickup distance of this character or max double when not a character or player connected to a character.","type":"double","optional":false,"read":true,"write":false},{"name":"loot_pickup_distance","order":41,"description":"The loot pickup distance of this character or max double when not a character or player connected to a character.","type":"double","optional":false,"read":true,"write":false},{"name":"mining_state","order":10,"description":"Current mining state.","notes":["When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](LuaControl::selected) and [LuaControl::update_selected_entity](LuaControl::update_selected_entity)."],"type":{"complex_type":"table","parameters":[{"name":"mining","order":0,"description":"Whether the player is mining at all","type":"boolean","optional":false},{"name":"position","order":1,"description":"What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor).","type":"MapPosition","optional":true}]},"optional":false,"read":true,"write":true},{"name":"opened","order":5,"description":"The GUI the player currently has open.\n\nThis is the GUI that will asked to close (by firing the [on_gui_closed](on_gui_closed) event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.","notes":["Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory`, `technology`, or `nil`."],"raises":[{"name":"on_gui_opened","order":0,"description":"Raised when writing a valid GUI target to this attribute.","timeframe":"instantly","optional":true}],"type":{"complex_type":"union","options":["LuaEntity","LuaItemStack","LuaEquipment","LuaEquipmentGrid","LuaPlayer","LuaGuiElement","LuaInventory","LuaTechnology","defines.gui_type"],"full_format":false},"optional":true,"read":true,"write":true},{"name":"opened_gui_type","order":36,"description":"","type":"defines.gui_type","optional":true,"read":true,"write":false},{"name":"picking_state","order":12,"description":"Current item-picking state.","type":"boolean","optional":false,"read":true,"write":true},{"name":"position","order":1,"description":"The current position of the entity.","type":"MapPosition","optional":false,"read":true,"write":false},{"name":"reach_distance","order":39,"description":"The reach distance of this character or max uint when not a character or player connected to a character.","type":"uint","optional":false,"read":true,"write":false},{"name":"repair_state","order":13,"description":"Current repair state.","type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being repaired","type":"MapPosition","optional":false},{"name":"repairing","order":0,"description":"The current state","type":"boolean","optional":false}]},"optional":false,"read":true,"write":true},{"name":"resource_reach_distance","order":42,"description":"The resource reach distance of this character or max double when not a character or player connected to a character.","type":"double","optional":false,"read":true,"write":false},{"name":"riding_state","order":9,"description":"Current riding state of this car, or of the car this player is riding in.","type":"RidingState","optional":false,"read":true,"write":true},{"name":"selected","order":4,"description":"The currently selected entity. Assigning an entity will select it if is selectable, otherwise the selection is cleared.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised when a selectable entity is written to this attribute.","timeframe":"instantly","optional":true}],"type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"shooting_state","order":11,"description":"Current shooting state.","type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being shot at","type":"MapPosition","optional":false},{"name":"state","order":0,"description":"The current state","type":"defines.shooting","optional":false}]},"optional":false,"read":true,"write":true},{"name":"surface","order":0,"description":"The surface this entity is currently on.","type":"LuaSurface","optional":false,"read":true,"write":false},{"name":"vehicle","order":2,"description":"The vehicle the player is currently sitting in.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"vehicle_logistic_requests_enabled","order":35,"description":"If personal logistic requests are enabled for this vehicle (spidertron).","type":"boolean","optional":false,"read":true,"write":true},{"name":"walking_state","order":8,"description":"Current walking state.","examples":["Make the player go north. Note that a one-shot action like this will only make the player walk for one tick. \n```\ngame.player.walking_state = {walking = true, direction = defines.direction.north}\n```"],"type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"Direction where the player is walking","type":"defines.direction","optional":false},{"name":"walking","order":0,"description":"If `false`, the player is currently not walking; otherwise it's going somewhere","type":"boolean","optional":false}]},"optional":false,"read":true,"write":true}],"operators":[],"abstract":true},{"name":"LuaControlBehavior","order":16,"description":"The control behavior for an entity. Inserters have logistic network and circuit network behavior logic, lamps have circuit logic and so on. This is an abstract base class that concrete control behaviors inherit.","notes":["An control reference becomes invalid once the control behavior is removed or the entity (see [LuaEntity](LuaEntity)) it resides in is destroyed."],"methods":[{"name":"get_circuit_network","order":0,"description":"","parameters":[{"name":"circuit_connector","order":1,"description":"The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.","type":"defines.circuit_connector_id","optional":true},{"name":"wire","order":0,"description":"Wire color of the network connected to this entity.","type":"defines.wire_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The circuit network or nil.","type":"LuaCircuitNetwork","optional":false}]}],"attributes":[{"name":"entity","order":1,"description":"The entity this control behavior belongs to.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"type","order":0,"description":"The concrete type of this control behavior.","type":"defines.control_behavior.type","optional":false,"read":true,"write":false}],"operators":[],"abstract":true},{"name":"LuaCustomChartTag","order":17,"description":"A custom tag that shows on the map view.","methods":[{"name":"destroy","order":0,"description":"Destroys this tag.","parameters":[],"takes_table":false,"return_values":[]},{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"force","order":5,"description":"The force this tag belongs to.","type":"LuaForce","optional":false,"read":true,"write":false},{"name":"icon","order":0,"description":"This tag's icon, if it has one. Writing `nil` removes it.","type":"SignalID","optional":false,"read":true,"write":true},{"name":"last_user","order":1,"description":"The player who last edited this tag.","type":"LuaPlayer","optional":true,"read":true,"write":true},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"position","order":2,"description":"The position of this tag.","type":"MapPosition","optional":false,"read":true,"write":false},{"name":"surface","order":6,"description":"The surface this tag belongs to.","type":"LuaSurface","optional":false,"read":true,"write":false},{"name":"tag_number","order":4,"description":"The unique ID for this tag on this force.","type":"uint","optional":false,"read":true,"write":false},{"name":"text","order":3,"description":"","type":"string","optional":false,"read":true,"write":true},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaCustomInputPrototype","order":18,"description":"Prototype of a custom input.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"action","order":8,"description":"The action that happens when this custom input is triggered.","type":"string","optional":false,"read":true,"write":false},{"name":"alternative_key_sequence","order":5,"description":"The default alternative key sequence for this custom input, if any","type":"string","optional":true,"read":true,"write":false},{"name":"consuming","order":7,"description":"The consuming type: `\"none\"` or `\"game-only\"`.","type":"string","optional":false,"read":true,"write":false},{"name":"enabled","order":9,"description":"Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.","type":"boolean","optional":false,"read":true,"write":false},{"name":"enabled_while_in_cutscene","order":11,"description":"Whether this custom input is enabled while using the cutscene controller.","type":"boolean","optional":false,"read":true,"write":false},{"name":"enabled_while_spectating","order":10,"description":"Whether this custom input is enabled while using the spectator controller.","type":"boolean","optional":false,"read":true,"write":false},{"name":"include_selected_prototype","order":12,"description":"Whether this custom input will include the selected prototype (if any) when triggered.","type":"boolean","optional":false,"read":true,"write":false},{"name":"item_to_spawn","order":13,"description":"The item that gets spawned when this custom input is fired, if any.","type":"LuaItemPrototype","optional":true,"read":true,"write":false},{"name":"key_sequence","order":4,"description":"The default key sequence for this custom input.","type":"string","optional":false,"read":true,"write":false},{"name":"linked_game_control","order":6,"description":"The linked game control name, if any.","type":"string","optional":true,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":15,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":14,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaCustomTable","order":19,"description":"Lazily evaluated table. For performance reasons, we sometimes return a custom table-like type instead of a native Lua table. This custom type lazily constructs the necessary Lua wrappers of the corresponding C++ objects, therefore preventing their unnecessary construction in some cases.\n\nThere are some notable consequences to the usage of a custom table type rather than the native Lua table type: Iterating a custom table is only possible using the `pairs` Lua function; `ipairs` won't work. Another key difference is that custom tables cannot be serialised into a game save file -- if saving the game would require serialisation of a custom table, an error will be displayed and the game will not be saved.","examples":["In previous versions of Factorio, this would create a [LuaPlayer](LuaPlayer) instance for every player in the game, even though only one such wrapper is needed. In the current version, accessing [game.players](LuaGameScript::players) by itself does not create any [LuaPlayer](LuaPlayer) instances; they are created lazily when accessed. Therefore, this example only constructs one [LuaPlayer](LuaPlayer) instance, no matter how many elements there are in `game.players`. \n```\ngame.players[\"Oxyd\"].character.die()\n```","Custom tables may be iterated using `pairs`. \n```\nfor _, p in pairs(game.players) do game.player.print(p.name); end\n```","The following will produce no output because `ipairs` is not supported with custom tables. \n```\nfor _, p in ipairs(game.players) do game.player.print(p.name); end  -- incorrect; use pairs instead\n```","This statement will execute successfully and `global.p` will be useable as one might expect. However, as soon as the user tries to save the game, a \"LuaCustomTable cannot be serialized\" error will be shown. The game will remain unsaveable so long as `global.p` refers to an instance of a custom table. \n```\nglobal.p = game.players  -- This has high potential to make the game unsaveable\n```"],"methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"index","order":0,"description":"Access an element of this custom table.","type":"Any","optional":false,"read":true,"write":true},{"name":"length","order":1,"description":"Number of elements in this table.","type":"uint","optional":false,"read":true,"write":false}],"abstract":false},{"name":"LuaDamagePrototype","order":20,"description":"Prototype of a damage.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"hidden","order":4,"description":"Whether this damage type is hidden from entity tooltips.","type":"boolean","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaDeciderCombinatorControlBehavior","order":21,"description":"Control behavior for decider combinators.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"parameters","order":0,"description":"This decider combinator's parameters.","notes":["Writing `nil` clears the combinator's parameters."],"type":"DeciderCombinatorParameters","optional":false,"read":true,"write":true},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaCombinatorControlBehavior"]},{"name":"LuaDecorativePrototype","order":22,"description":"Prototype of an optimized decorative.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"autoplace_specification","order":7,"description":"Autoplace specification for this decorative prototype, if any.","type":"AutoplaceSpecification","optional":true,"read":true,"write":false},{"name":"collision_box","order":4,"description":"The bounding box used for collision checking.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"collision_mask","order":5,"description":"The collision masks this decorative uses","type":"CollisionMask","optional":false,"read":true,"write":false},{"name":"collision_mask_with_flags","order":6,"description":"","type":"CollisionMaskWithFlags","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaElectricEnergySourcePrototype","order":23,"description":"Prototype of an electric energy source.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"buffer_capacity","order":0,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"drain","order":4,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"emissions","order":5,"description":"The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","type":"double","optional":false,"read":true,"write":false},{"name":"input_flow_limit","order":2,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"output_flow_limit","order":3,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"render_no_network_icon","order":6,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"render_no_power_icon","order":7,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"usage_priority","order":1,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEntity","order":24,"description":"The primary interface for interacting with entities through the Lua API. Entities are everything that exists on the map except for tiles (see [LuaTile](LuaTile)).\n\nMost functions on LuaEntity also work when the entity is contained in a ghost.","methods":[{"name":"add_autopilot_destination","order":112,"description":"Adds the given position to this spidertron's autopilot's queue of destinations.","subclasses":["SpiderVehicle"],"parameters":[{"name":"position","order":0,"description":"The position the spidertron should move to.","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_market_item","order":13,"description":"Offer a thing on the market.","examples":["Adds market offer, 1 copper ore for 10 iron ore. \n```\nmarket.add_market_item{price={{\"iron-ore\", 10}}, offer={type=\"give-item\", item=\"copper-ore\"}}\n```","Adds market offer, 1 copper ore for 5 iron ore and 5 stone ore. \n```\nmarket.add_market_item{price={{\"iron-ore\", 5}, {\"stone\", 5}}, offer={type=\"give-item\", item=\"copper-ore\"}}\n```"],"subclasses":["Market"],"parameters":[{"name":"offer","order":0,"description":"","type":"Offer","optional":false}],"takes_table":false,"return_values":[]},{"name":"can_be_destroyed","order":5,"description":"Checks if the entity can be destroyed","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"Whether the entity can be destroyed.","type":"boolean","optional":false}]},{"name":"can_shoot","order":98,"description":"Whether this character can shoot the given entity or position.","parameters":[{"name":"position","order":1,"description":"","type":"MapPosition","optional":false},{"name":"target","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_wires_reach","order":106,"description":"Can wires reach between these entities.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_deconstruction","order":20,"description":"Cancels deconstruction if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised if the entity's deconstruction was successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the deconstruction order.","type":"ForceIdentification","optional":false},{"name":"player","order":1,"description":"The player to set the `last_user` to if any.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"cancel_upgrade","order":23,"description":"Cancels upgrade if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_upgrade","order":0,"description":"Raised if the entity way previously marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the upgrade order.","type":"ForceIdentification","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the cancel was successful.","type":"boolean","optional":false}]},{"name":"clear_fluid_inside","order":88,"description":"Remove all fluids from this entity.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_market_items","order":16,"description":"Removes all offers from a market.","subclasses":["Market"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_request_slot","order":27,"description":"Clear a logistic requester slot.","notes":["Useable only on entities that have requester slots."],"parameters":[{"name":"slot","order":0,"description":"The slot index.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"clone","order":83,"description":"Clones this entity.","raises":[{"name":"on_entity_cloned","order":0,"description":"Raised if the entity was successfully cloned.","timeframe":"instantly","optional":true}],"parameters":[{"name":"create_build_effect_smoke","order":3,"description":"If false, the building effect smoke will not be shown around the new entity.","type":"boolean","optional":true},{"name":"force","order":2,"description":"","type":"ForceIdentification","optional":true},{"name":"position","order":0,"description":"The destination position","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"The destination surface","type":"LuaSurface","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.","type":"LuaEntity","optional":true}]},{"name":"connect_linked_belts","order":113,"description":"Connects current linked belt with another one.\n\nNeighbours have to be of different type. If given linked belt is connected to something else it will be disconnected first. If provided neighbour is connected to something else it will also be disconnected first. Automatically updates neighbour to be connected back to this one.","notes":["Can also be used on entity ghost if it contains linked-belt"],"subclasses":["LinkedBelt"],"parameters":[{"name":"neighbour","order":0,"description":"Another linked belt or entity ghost containing linked belt to connect or nil to disconnect","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[]},{"name":"connect_neighbour","order":17,"description":"Connect two devices with a circuit wire or copper cable. Depending on which type of connection should be made, there are different procedures:\n\n- To connect two electric poles, `target` must be a [LuaEntity](LuaEntity) that specifies another electric pole. This will connect them with copper cable.\n- To connect two devices with circuit wire, `target` must be a table of type [WireConnectionDefinition](WireConnectionDefinition).","parameters":[{"name":"target","order":0,"description":"The target with which to establish a connection.","type":{"complex_type":"union","options":["LuaEntity","WireConnectionDefinition"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the connection was successfully formed.","type":"boolean","optional":false}]},{"name":"connect_rolling_stock","order":70,"description":"Connects the rolling stock in the given direction.","parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether any connection was made","type":"boolean","optional":false}]},{"name":"copy_settings","order":67,"description":"Copies settings from the given entity onto this entity.","parameters":[{"name":"by_player","order":1,"description":"If provided, the copying is done 'as' this player and [on_entity_settings_pasted](on_entity_settings_pasted) is triggered.","type":"PlayerIdentification","optional":true},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Any items removed from this entity as a result of copying the settings.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"create_build_effect_smoke","order":95,"description":"Creates the same smoke that is created when you place a building by hand. You can play the building sound to go with it by using [LuaSurface::play_sound](LuaSurface::play_sound), eg: entity.surface.play_sound{path=\"entity-build/\"..entity.prototype.name, position=entity.position}","parameters":[],"takes_table":false,"return_values":[]},{"name":"damage","order":4,"description":"Damages the entity.","raises":[{"name":"on_entity_damaged","order":0,"description":"","timeframe":"instantly","optional":false}],"subclasses":["EntityWithHealth"],"parameters":[{"name":"damage","order":0,"description":"The amount of damage to be done.","type":"float","optional":false},{"name":"dealer","order":3,"description":"The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.","type":"LuaEntity","optional":true},{"name":"force","order":1,"description":"The force that will be doing the damage.","type":"ForceIdentification","optional":false},{"name":"type","order":2,"description":"The type of damage to be done, defaults to \"impact\". Can't be `nil`.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"the total damage actually applied after resistances.","type":"float","optional":false}]},{"name":"deplete","order":103,"description":"Depletes and destroys this resource entity.","raises":[{"name":"on_resource_depleted","order":0,"description":"","timeframe":"instantly","optional":false}],"subclasses":["ResourceEntity"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"destroy","order":6,"description":"Destroys the entity.","notes":["Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed."],"raises":[{"name":"script_raised_destroy","order":0,"description":"Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.","timeframe":"instantly","optional":true}],"parameters":[{"name":"do_cliff_correction","order":0,"description":"Whether neighbouring cliffs should be corrected. Defaults to `false`.","type":"boolean","optional":true},{"name":"raise_destroy","order":1,"description":"If `true`, [script_raised_destroy](script_raised_destroy) will be called. Defaults to `false`.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"Returns `false` if the entity was valid and destruction failed, `true` in all other cases.","type":"boolean","optional":false}]},{"name":"die","order":10,"description":"Immediately kills the entity. Does nothing if the entity doesn't have health.\n\nUnlike [LuaEntity::destroy](LuaEntity::destroy), `die` will trigger the [on_entity_died](on_entity_died) event and the entity will produce a corpse and drop loot if it has any.","examples":["This function can be called with only the `cause` argument and no `force`: \n```\nentity.die(nil, killer_entity)\n```"],"raises":[{"name":"on_entity_died","order":0,"description":"Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `\"neutral\"` force.","timeframe":"instantly","optional":true},{"name":"on_post_entity_died","order":1,"description":"Raised if the entity was successfully killed.","timeframe":"instantly","optional":true}],"parameters":[{"name":"cause","order":1,"description":"The cause to attribute the kill to.","type":"LuaEntity","optional":true},{"name":"force","order":0,"description":"The force to attribute the kill to.","type":"ForceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the entity was successfully killed.","type":"boolean","optional":false}]},{"name":"disconnect_linked_belts","order":114,"description":"Disconnects linked belt from its neighbour.","notes":["Can also be used on entity ghost if it contains linked-belt"],"subclasses":["LinkedBelt"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"disconnect_neighbour","order":18,"description":"Disconnect circuit wires or copper cables between devices. Depending on which type of connection should be cut, there are different procedures:\n\n- To remove all copper cables, leave the `target` parameter blank: `pole.disconnect_neighbour()`.\n- To remove all wires of a specific color, set `target` to [defines.wire_type.red](defines.wire_type.red) or [defines.wire_type.green](defines.wire_type.green).\n- To remove a specific copper cable between two electric poles, `target` must be a [LuaEntity](LuaEntity) that specifies the other pole: `pole1.disconnect_neighbour(pole2)`.\n- To remove a specific circuit wire, `target` must be a table of type [WireConnectionDefinition](WireConnectionDefinition).","parameters":[{"name":"target","order":0,"description":"The target with which to cut a connection.","type":{"complex_type":"union","options":["defines.wire_type","LuaEntity","WireConnectionDefinition"],"full_format":false},"optional":true}],"takes_table":false,"return_values":[]},{"name":"disconnect_rolling_stock","order":71,"description":"Tries to disconnect this rolling stock in the given direction.","parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"If anything was disconnected","type":"boolean","optional":false}]},{"name":"get_beam_source","order":89,"description":"Get the source of this beam.","subclasses":["Beam"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"BeamTarget","optional":true}]},{"name":"get_beam_target","order":91,"description":"Get the target of this beam.","subclasses":["Beam"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"BeamTarget","optional":true}]},{"name":"get_burnt_result_inventory","order":3,"description":"The burnt result inventory for this entity or `nil` if this entity doesn't have a burnt result inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_child_signals","order":50,"description":"Returns all child signals. Child signals can be either RailSignal or RailChainSignal. Child signals are signals which are checked by this signal to determine a chain state.","subclasses":["RailChainSignal"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_circuit_network","order":63,"description":"","parameters":[{"name":"circuit_connector","order":1,"description":"The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.","type":"defines.circuit_connector_id","optional":true},{"name":"wire","order":0,"description":"Wire color of the network connected to this entity.","type":"defines.wire_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The circuit network or nil.","type":"LuaCircuitNetwork","optional":true}]},{"name":"get_connected_rail","order":40,"description":"","subclasses":["Rail"],"parameters":[{"name":"rail_connection_direction","order":1,"description":"","type":"defines.rail_connection_direction","optional":false},{"name":"rail_direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Rail connected in the specified manner to this one, `nil` if unsuccessful.","type":"LuaEntity","optional":true},{"order":1,"description":"Rail direction of the returned rail which points to origin rail","type":"defines.rail_direction","optional":true},{"order":2,"description":"Turn to be taken when going back from returned rail to origin rail","type":"defines.rail_connection_direction","optional":true}]},{"name":"get_connected_rails","order":41,"description":"Get the rails that this signal is connected to.","subclasses":["RailSignal","RailChainSignal"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_connected_rolling_stock","order":107,"description":"Gets rolling stock connected to the given end of this stock.","parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The rolling stock connected at the given end, `nil` if none is connected there.","type":"LuaEntity","optional":true},{"order":1,"description":"The rail direction of the connected rolling stock if any.","type":"defines.rail_direction","optional":true}]},{"name":"get_control_behavior","order":61,"description":"Gets the control behavior of the entity (if any).","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The control behavior or `nil`.","type":"LuaControlBehavior","optional":true}]},{"name":"get_damage_to_be_taken","order":102,"description":"Returns the amount of damage to be taken by this entity.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this entity does not have health.","type":"float","optional":true}]},{"name":"get_driver","order":76,"description":"Gets the driver of this vehicle if any.","subclasses":["Vehicle"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the vehicle contains no driver. To check if there's a passenger see [LuaEntity::get_passenger](LuaEntity::get_passenger).","type":{"complex_type":"union","options":["LuaEntity","LuaPlayer"],"full_format":false},"optional":true}]},{"name":"get_filter","order":53,"description":"Get the filter for a slot in an inserter, loader, or logistic storage container.","notes":["The entity must allow filters."],"parameters":[{"name":"slot_index","order":0,"description":"Index of the slot to get the filter for.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Prototype name of the item being filtered. `nil` if the given slot has no filter.","type":"string","optional":true}]},{"name":"get_fluid_contents","order":85,"description":"Get amounts of all fluids in this entity.","notes":["If information about fluid temperatures is required, [LuaEntity::fluidbox](LuaEntity::fluidbox) should be used instead."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The amounts, indexed by fluid names.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false}]},{"name":"get_fluid_count","order":84,"description":"Get the amount of all or some fluid in this entity.","notes":["If information about fluid temperatures is required, [LuaEntity::fluidbox](LuaEntity::fluidbox) should be used instead."],"parameters":[{"name":"fluid","order":0,"description":"Prototype name of the fluid to count. If not specified, count all fluids.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_fuel_inventory","order":2,"description":"The fuel inventory for this entity or `nil` if this entity doesn't have a fuel inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_health_ratio","order":94,"description":"The health ratio of this entity between 1 and 0 (for full health and no health respectively).","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this entity doesn't have health.","type":"float","optional":true}]},{"name":"get_heat_setting","order":59,"description":"Gets the heat setting for this heat interface.","subclasses":["HeatInterface"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"HeatSetting","optional":false}]},{"name":"get_inbound_signals","order":51,"description":"Returns all signals guarding entrance to a rail block this rail belongs to.","subclasses":["Rail"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_infinity_container_filter","order":55,"description":"Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.","subclasses":["InfinityContainer"],"parameters":[{"name":"index","order":0,"description":"The index to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"InfinityInventoryFilter","optional":true}]},{"name":"get_infinity_pipe_filter","order":57,"description":"Gets the filter for this infinity pipe, or `nil` if the filter is empty.","subclasses":["InfinityPipe"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"InfinityPipeFilter","optional":true}]},{"name":"get_logistic_point","order":68,"description":"Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.","notes":["When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more."],"parameters":[{"name":"index","order":0,"description":"If provided, only returns the `LuaLogisticPoint` specified by this index.","type":"defines.logistic_member_index","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["LuaLogisticPoint",{"complex_type":"array","value":"LuaLogisticPoint"}],"full_format":false},"optional":true}]},{"name":"get_market_items","order":15,"description":"Get all offers in a market as an array.","subclasses":["Market"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"Offer"},"optional":false}]},{"name":"get_max_transport_line_index","order":36,"description":"Get the maximum transport line index of a belt or belt connectable entity.","subclasses":["TransportBeltConnectable"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_merged_signal","order":64,"description":"Read a single signal from the combined circuit networks.","parameters":[{"name":"circuit_connector","order":1,"description":"The connector to get signals for. Must be specified for entities with more than one circuit network connector.","type":"defines.circuit_connector_id","optional":true},{"name":"signal","order":0,"description":"The signal to read.","type":"SignalID","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The current value of the signal.","type":"int","optional":false}]},{"name":"get_merged_signals","order":65,"description":"The merged circuit network signals or `nil` if there are no signals.","parameters":[{"name":"circuit_connector","order":0,"description":"The connector to get signals for. Must be specified for entities with more than one circuit network connector.","type":"defines.circuit_connector_id","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"The sum of signals on both the red and green networks, or `nil` if it doesn't have a circuit connector.","type":{"complex_type":"array","value":"Signal"},"optional":true}]},{"name":"get_module_inventory","order":1,"description":"Inventory for storing modules of this entity; `nil` if this entity has no module inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_or_create_control_behavior","order":62,"description":"Gets (and or creates if needed) the control behavior of the entity.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The control behavior or `nil`.","type":"LuaControlBehavior","optional":true}]},{"name":"get_outbound_signals","order":52,"description":"Returns all signals guarding exit from a rail block this rail belongs to.","subclasses":["Rail"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_output_inventory","order":0,"description":"Gets the entity's output inventory if it has one.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"A reference to the entity's output inventory.","type":"LuaInventory","optional":true}]},{"name":"get_parent_signals","order":49,"description":"Returns all parent signals. Parent signals are always RailChainSignal. Parent signals are those signals that are checking state of this signal to determine their own chain state.","subclasses":["RailSignal","RailChainSignal"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_passenger","order":78,"description":"Gets the passenger of this car or spidertron if any.","notes":["This differs over [LuaEntity::get_driver](LuaEntity::get_driver) in that the passenger can't drive the car."],"subclasses":["Car","SpiderVehicle"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the vehicle contains no passenger. To check if there's a driver see [LuaEntity::get_driver](LuaEntity::get_driver).","type":{"complex_type":"union","options":["LuaEntity","LuaPlayer"],"full_format":false},"optional":true}]},{"name":"get_radius","order":93,"description":"The radius of this entity.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_rail_segment_end","order":43,"description":"Get the rail at the end of the rail segment this rail is in.","notes":["A rail segment is a continuous section of rail with no branches, signals, nor train stops."],"subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The rail entity.","type":"LuaEntity","optional":false},{"order":1,"description":"A rail direction pointing out of the rail segment from the end rail.","type":"defines.rail_direction","optional":false}]},{"name":"get_rail_segment_entity","order":42,"description":"Get the rail signal or train stop at the start/end of the rail segment this rail is in.","notes":["A rail segment is a continuous section of rail with no branches, signals, nor train stops."],"subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"The direction of travel relative to this rail.","type":"defines.rail_direction","optional":false},{"name":"in_else_out","order":1,"description":"If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment.","type":"boolean","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the rail segment doesn't start/end with a signal nor a train stop.","type":"LuaEntity","optional":true}]},{"name":"get_rail_segment_length","order":45,"description":"Get the length of the rail segment this rail is in.","notes":["A rail segment is a continuous section of rail with no branches, signals, nor train stops."],"subclasses":["Rail"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_rail_segment_overlaps","order":46,"description":"Get a rail from each rail segment that overlaps with this rail's rail segment.","notes":["A rail segment is a continuous section of rail with no branches, signals, nor train stops."],"subclasses":["Rail"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_rail_segment_rails","order":44,"description":"Get all rails of a rail segment this rail is in","notes":["A rail segment is a continuous section of rail with no branches, signals, nor train stops."],"subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"Selects end of this rail that points to a rail segment end from which to start returning rails","type":"defines.rail_direction","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Rails of this rail segment","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_recipe","order":73,"description":"Current recipe being assembled by this machine or `nil` if no recipe is set.","subclasses":["CraftingMachine"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaRecipe","optional":true}]},{"name":"get_request_slot","order":25,"description":"Get a logistic requester slot.","notes":["Useable only on entities that have requester slots."],"parameters":[{"name":"slot","order":0,"description":"The slot index.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Contents of the specified slot; `nil` if the given slot contains no request.","type":"SimpleItemStack","optional":true}]},{"name":"get_spider_legs","order":115,"description":"Gets legs of given SpiderVehicle.","subclasses":["SpiderVehicle"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_stopped_train","order":82,"description":"The train currently stopped at this train stop, if any.","subclasses":["TrainStop"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaTrain","optional":true}]},{"name":"get_train_stop_trains","order":81,"description":"The trains scheduled to stop at this train stop.","subclasses":["TrainStop"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTrain"},"optional":false}]},{"name":"get_transport_line","order":35,"description":"Get a transport line of a belt or belt connectable entity.","subclasses":["TransportBeltConnectable"],"parameters":[{"name":"index","order":0,"description":"Index of the requested transport line. Transport lines are 1-indexed.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaTransportLine","optional":false}]},{"name":"get_upgrade_direction","order":101,"description":"Returns the new entity direction after upgrading.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this entity is not marked for upgrade.","type":"defines.direction","optional":true}]},{"name":"get_upgrade_target","order":100,"description":"Returns the new entity prototype.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this entity is not marked for upgrade.","type":"LuaEntityPrototype","optional":true}]},{"name":"ghost_has_flag","order":12,"description":"Same as [LuaEntity::has_flag](LuaEntity::has_flag), but targets the inner entity on a entity ghost.","subclasses":["EntityGhost"],"parameters":[{"name":"flag","order":0,"description":"The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if the entity has the given flag set.","type":"boolean","optional":false}]},{"name":"has_command","order":9,"description":"Has this unit been assigned a command?","subclasses":["Unit"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"has_flag","order":11,"description":"Test whether this entity's prototype has a certain flag set.","notes":["`entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`."],"parameters":[{"name":"flag","order":0,"description":"The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this entity has the given flag set.","type":"boolean","optional":false}]},{"name":"help","order":117,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"insert_fluid","order":87,"description":"Insert fluid into this entity. Fluidbox is chosen automatically.","parameters":[{"name":"fluid","order":0,"description":"Fluid to insert.","type":"Fluid","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Amount of fluid actually inserted.","type":"double","optional":false}]},{"name":"is_closed","order":31,"description":"","subclasses":["Gate"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this gate is currently closed.","type":"boolean","optional":false}]},{"name":"is_closing","order":32,"description":"","subclasses":["Gate"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this gate is currently closing","type":"boolean","optional":false}]},{"name":"is_connected_to_electric_network","order":80,"description":"Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_crafting","order":28,"description":"Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.","subclasses":["CraftingMachine"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_opened","order":29,"description":"","subclasses":["Gate"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this gate is currently opened.","type":"boolean","optional":false}]},{"name":"is_opening","order":30,"description":"","subclasses":["Gate"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this gate is currently opening.","type":"boolean","optional":false}]},{"name":"is_rail_in_same_rail_block_as","order":48,"description":"Checks if this rail and other rail both belong to the same rail block.","subclasses":["Rail"],"parameters":[{"name":"other_rail","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_rail_in_same_rail_segment_as","order":47,"description":"Checks if this rail and other rail both belong to the same rail segment.","subclasses":["Rail"],"parameters":[{"name":"other_rail","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_construction","order":108,"description":"Is this entity or tile ghost or item request proxy registered for construction? If false, it means a construction robot has been dispatched to build the entity, or it is not an entity that can be constructed.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_deconstruction","order":109,"description":"Is this entity registered for deconstruction with this force? If false, it means a construction robot has been dispatched to deconstruct it, or it is not marked for deconstruction. The complexity is effectively O(1) - it depends on the number of objects targeting this entity which should be small enough.","parameters":[{"name":"force","order":0,"description":"The force construction manager to check.","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_repair","order":111,"description":"Is this entity registered for repair? If false, it means a construction robot has been dispatched to upgrade it, or it is not damaged. This is worst-case O(N) complexity where N is the current number of things in the repair queue.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_upgrade","order":110,"description":"Is this entity registered for upgrade? If false, it means a construction robot has been dispatched to upgrade it, or it is not marked for upgrade. This is worst-case O(N) complexity where N is the current number of things in the upgrade queue.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"launch_rocket","order":37,"description":"","raises":[{"name":"on_rocket_launch_ordered","order":0,"description":"Raised if the rocket launch was successfully initiated.","timeframe":"instantly","optional":true}],"subclasses":["RocketSilo"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"`true` if the rocket was successfully launched. Return value of `false` means the silo is not ready for launch.","type":"boolean","optional":false}]},{"name":"mine","order":104,"description":"Mines this entity.","notes":["'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.","The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory."],"raises":[{"name":"script_raised_destroy","order":0,"description":"Raised if the `raise_destroyed` flag was set and the entity was successfully mined.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":1,"description":"If true, when the item(s) don't fit into the given inventory the entity is force mined. If false, the mining operation fails when there isn't enough room to transfer all of the items into the inventory. Defaults to false. This is ignored and acts as `true` if no inventory is provided.","type":"boolean","optional":true},{"name":"ignore_minable","order":3,"description":"If true, the minable state of the entity is ignored. Defaults to `false`. If false, an entity that isn't minable (set as not-minable in the prototype or isn't minable for other reasons) will fail to be mined.","type":"boolean","optional":true},{"name":"inventory","order":0,"description":"If provided the item(s) will be transferred into this inventory. If provided, this must be an inventory created with [LuaGameScript::create_inventory](LuaGameScript::create_inventory) or be a basic inventory owned by some entity.","type":"LuaInventory","optional":true},{"name":"raise_destroyed","order":2,"description":"If true, [script_raised_destroy](script_raised_destroy) will be raised. Defaults to `true`.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"Whether mining succeeded.","type":"boolean","optional":false}]},{"name":"order_deconstruction","order":19,"description":"Sets the entity to be deconstructed by construction robots.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised if the entity way successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force whose robots are supposed to do the deconstruction.","type":"ForceIdentification","optional":false},{"name":"player","order":1,"description":"The player to set the `last_user` to if any.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"if the entity was marked for deconstruction.","type":"boolean","optional":false}]},{"name":"order_upgrade","order":22,"description":"Sets the entity to be upgraded by construction robots.","raises":[{"name":"on_marked_for_upgrade","order":0,"description":"Raised if the entity way successfully marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"direction","order":3,"description":"The new direction if any.","type":"defines.direction","optional":true},{"name":"force","order":0,"description":"The force whose robots are supposed to do the upgrade.","type":"ForceIdentification","optional":false},{"name":"player","order":2,"description":"","type":"PlayerIdentification","optional":true},{"name":"target","order":1,"description":"The prototype of the entity to upgrade to.","type":"EntityPrototypeIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Whether the entity was marked for upgrade.","type":"boolean","optional":false}]},{"name":"play_note","order":69,"description":"Plays a note with the given instrument and note.","subclasses":["ProgrammableSpeaker"],"parameters":[{"name":"instrument","order":0,"description":"","type":"uint","optional":false},{"name":"note","order":1,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the request is valid. The sound may or may not be played depending on polyphony settings.","type":"boolean","optional":false}]},{"name":"release_from_spawner","order":96,"description":"Release the unit from the spawner which spawned it. This allows the spawner to continue spawning additional units.","subclasses":["Unit"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"remove_fluid","order":86,"description":"Remove fluid from this entity.","notes":["If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed."],"parameters":[{"name":"amount","order":1,"description":"Amount to remove","type":"double","optional":false},{"name":"maximum_temperature","order":3,"description":"","type":"double","optional":true},{"name":"minimum_temperature","order":2,"description":"","type":"double","optional":true},{"name":"name","order":0,"description":"Fluid prototype name.","type":"string","optional":false},{"name":"temperature","order":4,"description":"","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Amount of fluid actually removed.","type":"double","optional":false}]},{"name":"remove_market_item","order":14,"description":"Remove an offer from a market.","notes":["The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array."],"subclasses":["Market"],"parameters":[{"name":"offer","order":0,"description":"Index of offer to remove.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if the offer was successfully removed; `false` when the given index was not valid.","type":"boolean","optional":false}]},{"name":"request_to_close","order":34,"description":"","subclasses":["Gate"],"parameters":[{"name":"force","order":0,"description":"The force that requests the gate to be closed.","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"request_to_open","order":33,"description":"","subclasses":["Gate"],"parameters":[{"name":"extra_time","order":1,"description":"Extra ticks to stay open.","type":"uint","optional":true},{"name":"force","order":0,"description":"The force that requests the gate to be open.","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"revive","order":38,"description":"Revive a ghost. I.e. turn it from a ghost to a real entity or tile.","raises":[{"name":"script_raised_revive","order":0,"description":"Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.","timeframe":"instantly","optional":true},{"name":"script_raised_set_tiles","order":1,"description":"Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.","timeframe":"instantly","optional":true}],"parameters":[{"name":"raise_revive","order":1,"description":"If true, and an entity ghost; [script_raised_revive](script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](script_raised_set_tiles) will be called.","type":"boolean","optional":true},{"name":"return_item_request_proxy","order":0,"description":"If `true` the function will return item request proxy as the third return value.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"Any items the new real entity collided with or `nil` if the ghost could not be revived.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true},{"order":1,"description":"The revived entity if an entity ghost was successfully revived.","type":"LuaEntity","optional":true},{"order":2,"description":"The item request proxy if it was requested with `return_item_request_proxy`.","type":"LuaEntity","optional":true}]},{"name":"rotate","order":75,"description":"Rotates this entity as if the player rotated it.","raises":[{"name":"on_player_rotated_entity","order":0,"description":"Raised if the `by_player` argument was given and the rotation was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"by_player","order":1,"description":"If not specified, the [on_player_rotated_entity](on_player_rotated_entity) event will not be fired.","type":"PlayerIdentification","optional":true},{"name":"enable_looted","order":3,"description":"When true, each spilled item will be flagged with the [LuaEntity::to_be_looted](LuaEntity::to_be_looted) flag.","type":"boolean","optional":true},{"name":"force","order":4,"description":"When provided the spilled items will be marked for deconstruction by this force.","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"reverse","order":0,"description":"If `true`, rotate the entity in the counter-clockwise direction.","type":"boolean","optional":true},{"name":"spill_items","order":2,"description":"If the player is not given should extra items be spilled or returned as a second return value from this.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"Whether the rotation was successful.","type":"boolean","optional":false},{"order":1,"description":"Count of spilled items indexed by their prototype names if `spill_items` was `true`.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true}]},{"name":"set_beam_source","order":90,"description":"Set the source of this beam.","subclasses":["Beam"],"parameters":[{"name":"source","order":0,"description":"","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_beam_target","order":92,"description":"Set the target of this beam.","subclasses":["Beam"],"parameters":[{"name":"target","order":0,"description":"","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_command","order":7,"description":"Give the entity a command.","subclasses":["Unit"],"parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_distraction_command","order":8,"description":"Give the entity a distraction command.","subclasses":["Unit"],"parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_driver","order":77,"description":"Sets the driver of this vehicle.","notes":["This differs over [LuaEntity::set_passenger](LuaEntity::set_passenger) in that the passenger can't drive the vehicle."],"raises":[{"name":"on_player_driving_changed_state","order":0,"description":"","timeframe":"instantly","optional":true}],"subclasses":["Vehicle"],"parameters":[{"name":"driver","order":0,"description":"The new driver or `nil` to eject the current driver if any.","type":{"complex_type":"union","options":["LuaEntity","PlayerIdentification"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_filter","order":54,"description":"Set the filter for a slot in an inserter, loader, or logistic storage container.","notes":["The entity must allow filters."],"parameters":[{"name":"item","order":1,"description":"Prototype name of the item to filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["string","nil"],"full_format":false},"optional":false},{"name":"slot_index","order":0,"description":"Index of the slot to set the filter for.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_heat_setting","order":60,"description":"Sets the heat setting for this heat interface.","subclasses":["HeatInterface"],"parameters":[{"name":"filter","order":0,"description":"The new setting.","type":"HeatSetting","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_infinity_container_filter","order":56,"description":"Sets the filter for this infinity container at the given index.","subclasses":["InfinityContainer"],"parameters":[{"name":"filter","order":1,"description":"The new filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityInventoryFilter","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index to set.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_infinity_pipe_filter","order":58,"description":"Sets the filter for this infinity pipe.","subclasses":["InfinityPipe"],"parameters":[{"name":"filter","order":0,"description":"The new filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityPipeFilter","nil"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_passenger","order":79,"description":"Sets the passenger of this car or spidertron.","notes":["This differs over [LuaEntity::get_driver](LuaEntity::get_driver) in that the passenger can't drive the car."],"raises":[{"name":"on_player_driving_changed_state","order":0,"description":"","timeframe":"instantly","optional":true}],"subclasses":["Car","SpiderVehicle"],"parameters":[{"name":"passenger","order":0,"description":"","type":{"complex_type":"union","options":["LuaEntity","PlayerIdentification"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_recipe","order":74,"description":"Sets the current recipe in this assembly machine.","subclasses":["AssemblingMachine"],"parameters":[{"name":"recipe","order":0,"description":"The new recipe or `nil` to clear the recipe.","type":{"complex_type":"union","options":["string","LuaRecipe"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Any items removed from this entity as a result of setting the recipe.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"set_request_slot","order":26,"description":"Set a logistic requester slot.","notes":["Useable only on entities that have requester slots."],"parameters":[{"name":"request","order":0,"description":"What to request.","type":"ItemStackIdentification","optional":false},{"name":"slot","order":1,"description":"The slot index.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the slot was set.","type":"boolean","optional":false}]},{"name":"silent_revive","order":39,"description":"Revives a ghost silently.","raises":[{"name":"script_raised_revive","order":0,"description":"Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.","timeframe":"instantly","optional":true},{"name":"script_raised_set_tiles","order":1,"description":"Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.","timeframe":"instantly","optional":true}],"parameters":[{"name":"raise_revive","order":1,"description":"If true, and an entity ghost; [script_raised_revive](script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](script_raised_set_tiles) will be called.","type":"boolean","optional":true},{"name":"return_item_request_proxy","order":0,"description":"If `true` the function will return item request proxy as the third parameter.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"Any items the new real entity collided with or `nil` if the ghost could not be revived.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true},{"order":1,"description":"The revived entity if an entity ghost was successfully revived.","type":"LuaEntity","optional":true},{"order":2,"description":"The item request proxy if it was requested with `return_item_request_proxy`.","type":"LuaEntity","optional":true}]},{"name":"spawn_decorations","order":105,"description":"Triggers spawn_decoration actions defined in the entity prototype or does nothing if entity is not \"turret\" or \"unit-spawner\".","parameters":[],"takes_table":false,"return_values":[]},{"name":"start_fading_out","order":99,"description":"Only works if the entity is a speech-bubble, with an \"effect\" defined in its wrapper_flow_style. Starts animating the opacity of the speech bubble towards zero, and destroys the entity when it hits zero.","parameters":[],"takes_table":false,"return_values":[]},{"name":"stop_spider","order":116,"description":"Sets the [speed](LuaEntity::speed) of the given SpiderVehicle to zero. Notably does not clear its [autopilot_destination](LuaEntity::autopilot_destination), which it will continue moving towards if set.","subclasses":["SpiderVehicle"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"supports_backer_name","order":66,"description":"Whether this entity supports a backer name.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"to_be_deconstructed","order":21,"description":"Is this entity marked for deconstruction?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"to_be_upgraded","order":24,"description":"Is this entity marked for upgrade?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"toggle_equipment_movement_bonus","order":97,"description":"Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.","notes":["This property can also be read and written on the equipment grid of this entity."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"update_connections","order":72,"description":"Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. The game doesn't do this automatically as we don't want to loose performance by checking this in normal games.","parameters":[],"takes_table":false,"return_values":[]}],"attributes":[{"name":"active","order":8,"description":"Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).","notes":["Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)","Ghosts, simple smoke, and corpses can't be modified at this time.","It is even possible to set the character to not be active, so he can't move and perform most of the tasks."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"ai_settings","order":134,"description":"The ai settings of this unit.","subclasses":["Unit"],"type":"LuaAISettings","optional":false,"read":true,"write":false},{"name":"alert_parameters","order":107,"description":"","subclasses":["ProgrammableSpeaker"],"type":"ProgrammableSpeakerAlertParameters","optional":false,"read":true,"write":true},{"name":"allow_dispatching_robots","order":144,"description":"Whether this character's personal roboports are allowed to dispatch robots.","subclasses":["Character"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"amount","order":20,"description":"Count of resource units contained.","subclasses":["ResourceEntity"],"type":"uint","optional":false,"read":true,"write":true},{"name":"armed","order":127,"description":"Whether this land mine is armed.","subclasses":["LandMine"],"type":"boolean","optional":false,"read":true,"write":false},{"name":"associated_player","order":120,"description":"The player this character is associated with, if any. Set to `nil` to clear.\n\nThe player will be automatically disassociated when a controller is set on the character. Also, all characters associated to a player will be logged off when the player logs off in multiplayer.\n\nReading this property will return a [LuaPlayer](LuaPlayer), while [PlayerIdentification](PlayerIdentification) can be used when writing.","notes":["A character associated with a player is not directly controlled by any player."],"subclasses":["Character"],"type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true,"read":true,"write":true},{"name":"auto_launch","order":145,"description":"Whether this rocket silo automatically launches the rocket when cargo is inserted.","subclasses":["RocketSilo"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"autopilot_destination","order":155,"description":"Destination of this spidertron's autopilot, if any.","subclasses":["SpiderVehicle"],"type":"MapPosition","optional":true,"read":true,"write":true},{"name":"autopilot_destinations","order":156,"description":"The queued destination positions of spidertron's autopilot.","subclasses":["SpiderVehicle"],"type":{"complex_type":"array","value":"MapPosition"},"optional":false,"read":true,"write":false},{"name":"backer_name","order":46,"description":"The backer name assigned to this entity. Entities that support backer names are labs, locomotives, radars, roboports, and train stops. `nil` if this entity doesn't support backer names.","notes":["While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity."],"type":"string","optional":true,"read":true,"write":true},{"name":"belt_neighbours","order":44,"description":"The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see [LuaEntity::neighbours](LuaEntity::neighbours) for that. This is a dictionary with `\"inputs\"`, `\"outputs\"` entries that are arrays of transport belt connectable entities, or empty tables if no entities.","subclasses":["TransportBeltConnectable"],"type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaEntity"}},"optional":false,"read":true,"write":false},{"name":"belt_to_ground_type","order":61,"description":"`\"input\"` or `\"output\"`, depending on whether this underground belt goes down or up.","subclasses":["TransportBeltToGround"],"type":"string","optional":false,"read":true,"write":false},{"name":"bonus_mining_progress","order":80,"description":"The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.","type":"double","optional":true,"read":true,"write":true},{"name":"bonus_progress","order":56,"description":"The current productivity bonus progress, as a number in range [0, 1].","subclasses":["CraftingMachine"],"type":"double","optional":false,"read":true,"write":true},{"name":"bounding_box","order":83,"description":"[LuaEntityPrototype::collision_box](LuaEntityPrototype::collision_box) around entity's given position and respecting the current entity orientation.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"burner","order":101,"description":"The burner energy source for this entity, if any.","type":"LuaBurner","optional":true,"read":true,"write":false},{"name":"chain_signal_state","order":52,"description":"The state of this chain signal.","subclasses":["RailChainSignal"],"type":"defines.chain_signal_state","optional":false,"read":true,"write":false},{"name":"character_corpse_death_cause","order":119,"description":"The reason this character corpse character died. `\"\"` if there is no reason.","subclasses":["CharacterCorpse"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"character_corpse_player_index","order":117,"description":"The player index associated with this character corpse.","notes":["The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists."],"subclasses":["CharacterCorpse"],"type":"uint","optional":false,"read":true,"write":true},{"name":"character_corpse_tick_of_death","order":118,"description":"The tick this character corpse died at.","subclasses":["CharacterCorpse"],"type":"uint","optional":false,"read":true,"write":true},{"name":"circuit_connected_entities","order":88,"description":"Entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network.","type":{"complex_type":"table","parameters":[{"name":"green","order":1,"description":"Entities connected via the green wire.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"red","order":0,"description":"Entities connected via the red wire.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},"optional":true,"read":true,"write":false},{"name":"circuit_connection_definitions","order":89,"description":"The connection definition for entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network.","type":{"complex_type":"array","value":"CircuitConnectionDefinition"},"optional":true,"read":true,"write":false},{"name":"cliff_orientation","order":17,"description":"The orientation of this cliff.","type":"CliffOrientation","optional":false,"read":true,"write":false},{"name":"color","order":49,"description":"The color of this character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. `nil` if this entity doesn't use custom colors.","notes":["Car color is overridden by the color of the current driver/passenger, if there is one."],"type":"Color","optional":true,"read":true,"write":true},{"name":"combat_robot_owner","order":163,"description":"The owner of this combat robot, if any.","type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"command","order":152,"description":"The command given to this unit, if any.","subclasses":["Unit"],"type":"Command","optional":true,"read":true,"write":false},{"name":"connected_rail","order":129,"description":"The rail entity this train stop is connected to, if any.","subclasses":["TrainStop"],"type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"connected_rail_direction","order":130,"description":"Rail direction to which this train stop is binding. This returns a value even when no rails are present.","subclasses":["TrainStop"],"type":"defines.rail_direction","optional":false,"read":true,"write":false},{"name":"consumption_bonus","order":60,"description":"The consumption bonus of this entity.","type":"double","optional":false,"read":true,"write":false},{"name":"consumption_modifier","order":23,"description":"Multiplies the energy consumption.","subclasses":["Car"],"type":"float","optional":false,"read":true,"write":true},{"name":"corpse_expires","order":149,"description":"Whether this corpse will ever fade away.","notes":["Useable only on corpses."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"corpse_immune_to_entity_placement","order":150,"description":"If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of CorpsePrototype::remove_on_entity_placement.","notes":["Useable only on corpses."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"crafting_progress","order":55,"description":"The current crafting progress, as a number in range [0, 1].","subclasses":["CraftingMachine"],"type":"float","optional":false,"read":true,"write":true},{"name":"crafting_speed","order":54,"description":"The current crafting speed, including speed bonuses from modules and beacons.","subclasses":["CraftingMachine"],"type":"double","optional":false,"read":true,"write":false},{"name":"damage_dealt","order":69,"description":"The damage dealt by this turret, artillery turret, or artillery wagon.","subclasses":["Turret"],"type":"double","optional":false,"read":true,"write":true},{"name":"destructible","order":9,"description":"If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.","notes":["Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"direction","order":14,"description":"The current direction this entity is facing.","type":"defines.direction","optional":false,"read":true,"write":true},{"name":"distraction_command","order":153,"description":"The distraction command given to this unit, if any.","subclasses":["Unit"],"type":"Command","optional":true,"read":true,"write":false},{"name":"driver_is_gunner","order":25,"description":"Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.","subclasses":["Car","SpiderVehicle"],"type":"boolean","optional":true,"read":true,"write":true},{"name":"drop_position","order":32,"description":"Position where the entity puts its stuff.","notes":["Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position."],"type":"MapPosition","optional":false,"read":true,"write":true},{"name":"drop_target","order":34,"description":"The entity this entity is putting its items to. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position. `nil` if there is no entity to put items to, or if this is not an entity that puts items somewhere.","type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"effective_speed","order":28,"description":"The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. `nil` if this is not a unit.","subclasses":["Unit"],"type":"float","optional":true,"read":true,"write":false},{"name":"effectivity_modifier","order":22,"description":"Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.","subclasses":["Car"],"type":"float","optional":false,"read":true,"write":true},{"name":"effects","order":114,"description":"The effects being applied to this entity, if any. For beacons, this is the effect the beacon is broadcasting.","type":"ModuleEffects","optional":true,"read":true,"write":false},{"name":"electric_buffer_size","order":72,"description":"The buffer size for the electric energy source. `nil` if the entity doesn't have an electric energy source.","notes":["Write access is limited to the ElectricEnergyInterface type"],"type":"double","optional":true,"read":true,"write":true},{"name":"electric_drain","order":75,"description":"The electric drain for the electric energy source. `nil` if the entity doesn't have an electric energy source.","type":"double","optional":true,"read":true,"write":false},{"name":"electric_emissions","order":76,"description":"The emissions for the electric energy source. `nil` if the entity doesn't have an electric energy source.","type":"double","optional":true,"read":true,"write":false},{"name":"electric_input_flow_limit","order":73,"description":"The input flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.","type":"double","optional":true,"read":true,"write":false},{"name":"electric_network_id","order":143,"description":"Returns the id of the electric network that this entity is connected to, if any.","type":"uint","optional":true,"read":true,"write":false},{"name":"electric_network_statistics","order":108,"description":"The electric network statistics for this electric pole.","subclasses":["ElectricPole"],"type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"electric_output_flow_limit","order":74,"description":"The output flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.","type":"double","optional":true,"read":true,"write":false},{"name":"enable_logistics_while_moving","order":138,"description":"Whether equipment grid logistics are enabled while this vehicle is moving.","subclasses":["Vehicle"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"energy","order":37,"description":"Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.). always 0 for entities that don't have the concept of energy stored inside.","examples":["```\ngame.player.print(\"Machine energy: \" .. game.player.selected.energy .. \"J\")\ngame.player.selected.energy = 3000\n```"],"type":"double","optional":false,"read":true,"write":true},{"name":"energy_generated_last_tick","order":146,"description":"How much energy this generator generated in the last tick.","subclasses":["Generator"],"type":"double","optional":false,"read":true,"write":false},{"name":"entity_label","order":47,"description":"The label on this entity, if any. `nil` if this is not a spider-vehicule.","raises":[{"name":"on_entity_renamed","order":0,"description":"","timeframe":"instantly","optional":false}],"type":"string","optional":true,"read":true,"write":true},{"name":"filter_slot_count","order":91,"description":"The number of filter slots this inserter, loader, or logistic storage container has. 0 if not one of those entities.","type":"uint","optional":false,"read":true,"write":false},{"name":"fluidbox","order":45,"description":"Fluidboxes of this entity.","type":"LuaFluidBox","optional":false,"read":true,"write":true},{"name":"follow_offset","order":166,"description":"The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.","subclasses":["SpiderVehicle"],"type":"Vector","optional":true,"read":true,"write":true},{"name":"follow_target","order":165,"description":"The follow target of this spidertron, if any.","subclasses":["SpiderVehicle"],"type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"friction_modifier","order":24,"description":"Multiplies the car friction rate.","examples":["This will allow the car to go much faster \n```\ngame.player.vehicle.friction_modifier = 0.5\n```"],"subclasses":["Car"],"type":"float","optional":false,"read":true,"write":true},{"name":"ghost_localised_description","order":5,"description":"","subclasses":["Ghost"],"type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"ghost_localised_name","order":4,"description":"Localised name of the entity or tile contained in this ghost.","subclasses":["Ghost"],"type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"ghost_name","order":1,"description":"Name of the entity or tile contained in this ghost","subclasses":["Ghost"],"type":"string","optional":false,"read":true,"write":false},{"name":"ghost_prototype","order":31,"description":"The prototype of the entity or tile contained in this ghost.","subclasses":["Ghost"],"type":{"complex_type":"union","options":["LuaEntityPrototype","LuaTilePrototype"],"full_format":false},"optional":false,"read":true,"write":false},{"name":"ghost_type","order":7,"description":"The prototype type of the entity or tile contained in this ghost.","subclasses":["Ghost"],"type":"string","optional":false,"read":true,"write":false},{"name":"ghost_unit_number","order":78,"description":"The [unit_number](LuaEntity::unit_number) of the entity contained in this ghost. It is the same as the unit number of the [EntityWithOwner](https://wiki.factorio.com/Prototype/EntityWithOwner) that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`.","subclasses":["EntityGhost"],"type":"uint","optional":true,"read":true,"write":false},{"name":"graphics_variation","order":94,"description":"The graphics variation for this entity. `nil` if this entity doesn't use graphics variations.","type":"uint8","optional":true,"read":true,"write":true},{"name":"grid","order":93,"description":"This entity's equipment grid, if any.","type":"LuaEquipmentGrid","optional":true,"read":true,"write":false},{"name":"health","order":13,"description":"The current health of the entity, if any. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.","notes":["To get the maximum possible health of this entity, see [LuaEntityPrototype::max_health](LuaEntityPrototype::max_health) on its prototype."],"type":"float","optional":true,"read":true,"write":true},{"name":"held_stack","order":40,"description":"The item stack currently held in an inserter's hand.","subclasses":["Inserter"],"type":"LuaItemStack","optional":false,"read":true,"write":false},{"name":"held_stack_position","order":41,"description":"Current position of the inserter's \"hand\".","subclasses":["Inserter"],"type":"MapPosition","optional":false,"read":true,"write":false},{"name":"highlight_box_blink_interval","order":136,"description":"The blink interval of this highlight box entity. 0 indicates no blink.","subclasses":["HighlightBox"],"type":"uint","optional":false,"read":true,"write":true},{"name":"highlight_box_type","order":135,"description":"The hightlight box type of this highlight box entity.","subclasses":["HighlightBox"],"type":"string","optional":false,"read":true,"write":true},{"name":"infinity_container_filters","order":115,"description":"The filters for this infinity container.","subclasses":["InfinityContainer"],"type":{"complex_type":"array","value":"InfinityInventoryFilter"},"optional":false,"read":true,"write":true},{"name":"initial_amount","order":21,"description":"Count of initial resource units contained. `nil` if this is not an infinite resource.","notes":["If this is not an infinite resource, writing will produce an error."],"subclasses":["ResourceEntity"],"type":"uint","optional":true,"read":true,"write":true},{"name":"inserter_filter_mode","order":124,"description":"The filter mode for this filter inserter. Either `\"whitelist\"` or `\"blacklist\"`. `nil` if this inserter doesn't use filters.","subclasses":["Inserter"],"type":"string","optional":true,"read":true,"write":true},{"name":"inserter_stack_size_override","order":109,"description":"Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.","notes":["Set to 0 to reset."],"type":"uint","optional":false,"read":true,"write":true},{"name":"is_entity_with_force","order":159,"description":"(deprecated by 1.1.51) If this entity is a MilitaryTarget. Returns same value as LuaEntity::is_military_target","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_entity_with_health","order":162,"description":"If this entity is EntityWithHealth","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_entity_with_owner","order":161,"description":"If this entity is EntityWithOwner","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_military_target","order":160,"description":"Whether this entity is a MilitaryTarget. Can be written to if [LuaEntityPrototype::allow_run_time_change_of_is_military_target](LuaEntityPrototype::allow_run_time_change_of_is_military_target) returns `true`.","type":"boolean","optional":false,"read":true,"write":true},{"name":"item_requests","order":66,"description":"Items this ghost will request when revived or items this item request proxy is requesting. Result is a dictionary mapping each item prototype name to the required count.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false,"read":true,"write":true},{"name":"kills","order":70,"description":"The number of units killed by this turret, artillery turret, or artillery wagon.","subclasses":["Turret"],"type":"uint","optional":false,"read":true,"write":true},{"name":"last_user","order":71,"description":"The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. `nil` if the last user is not part of the save anymore.\n\nReading this property will return a [LuaPlayer](LuaPlayer), while [PlayerIdentification](PlayerIdentification) can be used when writing.","subclasses":["EntityWithOwner"],"type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true,"read":true,"write":true},{"name":"link_id","order":164,"description":"The link ID this linked container is using.","type":"uint","optional":false,"read":true,"write":true},{"name":"linked_belt_neighbour","order":168,"description":"Neighbour to which this linked belt is connected to, if any.","notes":["Can also be used on entity ghost if it contains linked-belt","May return entity ghost which contains linked belt to which connection is made"],"subclasses":["LinkedBelt"],"type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"linked_belt_type","order":167,"description":"Type of linked belt: it is either `\"input\"` or `\"output\"`. Changing type will also flip direction so the belt is out of the same side","notes":["Can only be changed when linked belt is disconnected (has no neighbour set)","Can also be used on entity ghost if it contains linked-belt"],"subclasses":["LinkedBelt"],"type":"string","optional":false,"read":true,"write":true},{"name":"loader_container","order":92,"description":"The container entity this loader is pointing at/pulling from depending on the [LuaEntity::loader_type](LuaEntity::loader_type), if any.","subclasses":["Loader"],"type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"loader_type","order":62,"description":"`\"input\"` or `\"output\"`, depending on whether this loader puts to or gets from a container.","subclasses":["Loader"],"type":"string","optional":false,"read":true,"write":true},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"Localised name of the entity.","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"logistic_cell","order":65,"description":"The logistic cell this entity is a part of. Will be `nil` if this entity is not a part of any logistic cell.","type":"LuaLogisticCell","optional":false,"read":true,"write":false},{"name":"logistic_network","order":64,"description":"The logistic network this entity is a part of, or `nil` if this entity is not a part of any logistic network.","type":"LuaLogisticNetwork","optional":false,"read":true,"write":true},{"name":"minable","order":10,"description":"","notes":["Not minable entities can still be destroyed.","Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"mining_progress","order":79,"description":"The mining progress for this mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.","type":"double","optional":true,"read":true,"write":true},{"name":"mining_target","order":87,"description":"The mining target, if any.","subclasses":["MiningDrill"],"type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"moving","order":142,"description":"Returns true if this unit is moving.","subclasses":["Unit"],"type":"boolean","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of the entity prototype. E.g. \"inserter\" or \"filter-inserter\".","type":"string","optional":false,"read":true,"write":false},{"name":"neighbour_bonus","order":133,"description":"The current total neighbour bonus of this reactor.","subclasses":["Reactor"],"type":"double","optional":false,"read":true,"write":false},{"name":"neighbours","order":43,"description":"A list of neighbours for certain types of entities. Applies to electric poles, power switches, underground belts, walls, gates, reactors, cliffs, and pipe-connectable entities.\n\n- When called on an electric pole, this is a dictionary of all connections, indexed by the strings `\"copper\"`, `\"red\"`, and `\"green\"`.\n- When called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to.\n- When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none.\n- When called on a wall-connectable entity or reactor, this is a dictionary of all connections indexed by the connection direction \"north\", \"south\", \"east\", and \"west\".\n- When called on a cliff entity, this is a dictionary of all connections indexed by the connection direction \"north\", \"south\", \"east\", and \"west\".","type":{"complex_type":"union","options":[{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaEntity"}},{"complex_type":"array","value":{"complex_type":"array","value":"LuaEntity"}},"LuaEntity"],"full_format":false},"optional":false,"read":true,"write":false},{"name":"object_name","order":174,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"operable","order":12,"description":"Player can't open gui of this entity and he can't quick insert/input stuff in to the entity when it is not operable.","type":"boolean","optional":false,"read":true,"write":true},{"name":"orientation","order":16,"description":"The smooth orientation of this entity.","type":"RealOrientation","optional":false,"read":true,"write":true},{"name":"parameters","order":106,"description":"","subclasses":["ProgrammableSpeaker"],"type":"ProgrammableSpeakerParameters","optional":false,"read":true,"write":true},{"name":"pickup_position","order":33,"description":"Where the inserter will pick up items from.","notes":["Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position."],"subclasses":["Inserter"],"type":"MapPosition","optional":false,"read":true,"write":true},{"name":"pickup_target","order":35,"description":"The entity this inserter will attempt to pick up items from. If there are multiple possible entities at the pick-up point, writing to this attribute allows a mod to choose which one to pick up items from. The entity needs to collide with the tile box under the pick-up position. `nil` if there is no entity to pull items from.","subclasses":["Inserter"],"type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"player","order":67,"description":"The player connected to this character, if any.","subclasses":["Character"],"type":"LuaPlayer","optional":true,"read":true,"write":false},{"name":"pollution_bonus","order":58,"description":"The pollution bonus of this entity.","type":"double","optional":false,"read":true,"write":false},{"name":"power_production","order":81,"description":"The power production specific to the ElectricEnergyInterface entity type.","subclasses":["ElectricEnergyInterface"],"type":"double","optional":false,"read":true,"write":true},{"name":"power_switch_state","order":113,"description":"The state of this power switch.","type":"boolean","optional":false,"read":true,"write":true},{"name":"power_usage","order":82,"description":"The power usage specific to the ElectricEnergyInterface entity type.","subclasses":["ElectricEnergyInterface"],"type":"double","optional":false,"read":true,"write":true},{"name":"previous_recipe","order":39,"description":"The previous recipe this furnace was using, if any.","subclasses":["Furnace"],"type":"LuaRecipe","optional":true,"read":true,"write":false},{"name":"productivity_bonus","order":57,"description":"The productivity bonus of this entity.","notes":["This includes force based bonuses as well as beacon/module bonuses."],"type":"double","optional":false,"read":true,"write":false},{"name":"products_finished","order":110,"description":"The number of products this machine finished crafting in its lifetime.","subclasses":["CraftingMachine"],"type":"uint","optional":false,"read":true,"write":true},{"name":"prototype","order":30,"description":"The entity prototype of this entity.","type":"LuaEntityPrototype","optional":false,"read":true,"write":false},{"name":"proxy_target","order":103,"description":"The target entity for this item-request-proxy, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"pump_rail_target","order":141,"description":"The rail target of this pump, if any.","subclasses":["Pump"],"type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"radar_scan_progress","order":169,"description":"The current radar scan progress, as a number in range [0, 1].","subclasses":["Radar"],"type":"float","optional":false,"read":true,"write":false},{"name":"recipe_locked","order":128,"description":"When locked; the recipe in this assembling machine can't be changed by the player.","subclasses":["AssemblingMachine"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"relative_turret_orientation","order":18,"description":"The relative orientation of the vehicle turret, artillery turret, artillery wagon. `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.","notes":["Writing does nothing if the vehicle doesn't have a turret."],"type":"RealOrientation","optional":true,"read":true,"write":true},{"name":"remove_unfiltered_items","order":116,"description":"Whether items not included in this infinity container filters should be removed from the container.","subclasses":["InfinityContainer"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"render_player","order":139,"description":"The player that this `simple-entity-with-owner`, `simple-entity-with-force`, `flying-text`, or `highlight-box` is visible to. `nil` when this entity is rendered for all players.\n\nReading this property will return a [LuaPlayer](LuaPlayer), while [PlayerIdentification](PlayerIdentification) can be used when writing.","type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true,"read":true,"write":true},{"name":"render_to_forces","order":140,"description":"The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array when this entity is rendered for all forces.","notes":["Reading will always give an array of [LuaForce](LuaForce)"],"type":{"complex_type":"array","value":"ForceIdentification"},"optional":true,"read":true,"write":true},{"name":"request_from_buffers","order":148,"description":"Whether this requester chest is set to also request from buffer chests.","notes":["Useable only on entities that have requester slots."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"request_slot_count","order":90,"description":"The index of the configured request with the highest index for this entity. This means 0 if no requests are set and e.g. 20 if the 20th request slot is configured.","type":"uint","optional":false,"read":true,"write":false},{"name":"rocket_parts","order":63,"description":"Number of rocket parts in the silo.","subclasses":["RocketSilo"],"type":"uint","optional":false,"read":true,"write":true},{"name":"rocket_silo_status","order":170,"description":"The status of this rocket silo entity.","type":"defines.rocket_silo_status","optional":false,"read":true,"write":false},{"name":"rotatable","order":11,"description":"When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.","notes":["Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"secondary_bounding_box","order":84,"description":"The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.","type":"BoundingBox","optional":true,"read":true,"write":false},{"name":"secondary_selection_box","order":86,"description":"The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.","type":"BoundingBox","optional":true,"read":true,"write":false},{"name":"selected_gun_index","order":36,"description":"Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.","subclasses":["Character","Car","SpiderVehicle"],"type":"uint","optional":true,"read":true,"write":true},{"name":"selection_box","order":85,"description":"[LuaEntityPrototype::selection_box](LuaEntityPrototype::selection_box) around entity's given position and respecting the current entity orientation.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"shooting_target","order":102,"description":"The shooting target for this turret, if any. Can't be set to `nil` via script.","type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"signal_state","order":51,"description":"The state of this rail signal.","subclasses":["RailSignal","RailChainSignal"],"type":"defines.signal_state","optional":false,"read":true,"write":false},{"name":"spawner","order":111,"description":"The spawner associated with this unit entity, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"speed","order":27,"description":"The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron.\n\nOnly the speed of units, cars, and projectiles are writable.","type":"float","optional":true,"read":true,"write":true},{"name":"speed_bonus","order":59,"description":"The speed bonus of this entity.","notes":["This includes force based bonuses as well as beacon/module bonuses."],"type":"double","optional":false,"read":true,"write":false},{"name":"splitter_filter","order":123,"description":"The filter for this splitter, if any is set.","subclasses":["Splitter"],"type":"LuaItemPrototype","optional":true,"read":true,"write":true},{"name":"splitter_input_priority","order":125,"description":"The input priority for this splitter. Either `\"left\"`, `\"none\"`, or `\"right\"`.","subclasses":["Splitter"],"type":"string","optional":false,"read":true,"write":true},{"name":"splitter_output_priority","order":126,"description":"The output priority for this splitter. Either `\"left\"`, `\"none\"`, or `\"right\"`.","subclasses":["Splitter"],"type":"string","optional":false,"read":true,"write":true},{"name":"stack","order":29,"description":"","subclasses":["ItemEntity"],"type":"LuaItemStack","optional":false,"read":true,"write":false},{"name":"status","order":137,"description":"The status of this entity, if any.","type":"defines.entity_status","optional":true,"read":true,"write":false},{"name":"sticked_to","order":105,"description":"The entity this sticker is sticked to.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"stickers","order":104,"description":"The sticker entities attached to this entity, if any.","type":{"complex_type":"array","value":"LuaEntity"},"optional":true,"read":true,"write":false},{"name":"storage_filter","order":147,"description":"The storage filter for this logistic storage container.","type":"LuaItemPrototype","optional":false,"read":true,"write":true},{"name":"supports_direction","order":15,"description":"Whether the entity has direction. When it is false for this entity, it will always return north direction when asked for.","type":"boolean","optional":false,"read":true,"write":false},{"name":"tags","order":151,"description":"The tags associated with this entity ghost. `nil` if this is not an entity ghost.","type":"Tags","optional":true,"read":true,"write":true},{"name":"temperature","order":38,"description":"The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source.","type":"double","optional":true,"read":true,"write":true},{"name":"text","order":50,"description":"The text of this flying-text entity.","subclasses":["FlyingText"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"tick_of_last_attack","order":121,"description":"The last tick this character entity was attacked.","subclasses":["Character"],"type":"uint","optional":false,"read":true,"write":true},{"name":"tick_of_last_damage","order":122,"description":"The last tick this character entity was damaged.","subclasses":["Character"],"type":"uint","optional":false,"read":true,"write":true},{"name":"tile_height","order":172,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.","type":"uint","optional":false,"read":true,"write":false},{"name":"tile_width","order":171,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.","type":"uint","optional":false,"read":true,"write":false},{"name":"time_to_live","order":48,"description":"The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed.\n\n- for ghosts set to uint32 max (4,294,967,295) to never expire.\n- for ghosts Cannot be set higher than [LuaForce::ghost_time_to_live](LuaForce::ghost_time_to_live) of the entity's force.","type":"uint","optional":false,"read":true,"write":true},{"name":"time_to_next_effect","order":154,"description":"The ticks until the next trigger effect of this smoke-with-trigger.","subclasses":["SmokeWithTrigger"],"type":"uint","optional":false,"read":true,"write":true},{"name":"timeout","order":132,"description":"The timeout that's left on this landmine in ticks. It describes the time between the landmine being placed and it being armed.","subclasses":["LandMine"],"type":"uint","optional":false,"read":true,"write":true},{"name":"to_be_looted","order":53,"description":"Will this entity be picked up automatically when the player walks over it?","subclasses":["ItemEntity"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"torso_orientation","order":19,"description":"The torso orientation of this spider vehicle.","subclasses":["SpiderVehicle"],"type":"RealOrientation","optional":false,"read":true,"write":true},{"name":"train","order":42,"description":"The train this rolling stock belongs to, if any. `nil` if this is not a rolling stock.","type":"LuaTrain","optional":true,"read":true,"write":false},{"name":"trains_count","order":157,"description":"Amount of trains related to this particular train stop. Includes train stopped at this train stop (until it finds a path to next target) and trains having this train stop as goal or waypoint.","notes":["Train may be included multiple times when braking distance covers this train stop multiple times","Value may be read even when train stop has no control behavior"],"subclasses":["TrainStop"],"type":"uint","optional":false,"read":true,"write":false},{"name":"trains_in_block","order":131,"description":"The number of trains in this rail block for this rail entity.","subclasses":["Rail"],"type":"uint","optional":false,"read":true,"write":false},{"name":"trains_limit","order":158,"description":"Amount of trains above which no new trains will be sent to this train stop. Writing nil will disable the limit (will set a maximum possible value).","notes":["When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it"],"subclasses":["TrainStop"],"type":"uint","optional":false,"read":true,"write":true},{"name":"tree_color_index","order":95,"description":"Index of the tree color.","type":"uint8","optional":false,"read":true,"write":true},{"name":"tree_color_index_max","order":96,"description":"Maximum index of the tree colors.","type":"uint8","optional":false,"read":true,"write":false},{"name":"tree_gray_stage_index","order":99,"description":"Index of the tree gray stage","type":"uint8","optional":false,"read":true,"write":true},{"name":"tree_gray_stage_index_max","order":100,"description":"Maximum index of the tree gray stages.","type":"uint8","optional":false,"read":true,"write":false},{"name":"tree_stage_index","order":97,"description":"Index of the tree stage.","type":"uint8","optional":false,"read":true,"write":true},{"name":"tree_stage_index_max","order":98,"description":"Maximum index of the tree stages.","type":"uint8","optional":false,"read":true,"write":false},{"name":"type","order":6,"description":"The entity prototype type of this entity.","type":"string","optional":false,"read":true,"write":false},{"name":"unit_group","order":68,"description":"The unit group this unit is a member of, if any.","subclasses":["Unit"],"type":"LuaUnitGroup","optional":true,"read":true,"write":false},{"name":"unit_number","order":77,"description":"A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from [EntityWithOwner](https://wiki.factorio.com/Prototype/EntityWithOwner), as well as [ItemRequestProxy](https://wiki.factorio.com/Prototype/ItemRequestProxy) and [EntityGhost](https://wiki.factorio.com/Prototype/EntityGhost) are assigned a unit number. `nil` if this entity doesn't have a unit number.","type":"uint","optional":true,"read":true,"write":false},{"name":"units","order":112,"description":"The units associated with this spawner entity.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"valid","order":173,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"vehicle_automatic_targeting_parameters","order":26,"description":"Read when this spidertron auto-targets enemies","subclasses":["SpiderVehicle"],"type":"VehicleAutomaticTargetingParameters","optional":false,"read":true,"write":true}],"operators":[],"abstract":false,"base_classes":["LuaControl"]},{"name":"LuaEntityPrototype","order":25,"description":"Prototype of an entity.","methods":[{"name":"get_inventory_size","order":1,"description":"Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.","parameters":[{"name":"index","order":0,"description":"","type":"defines.inventory","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"has_flag","order":0,"description":"Test whether this entity prototype has a certain flag set.","parameters":[{"name":"flag","order":0,"description":"The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if this prototype has the given flag set.","type":"boolean","optional":false}]},{"name":"help","order":2,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"active_energy_usage","order":211,"description":"The active energy usage of this rocket silo or combinator prototype.","subclasses":["RocketSilo","Combinator"],"type":"double","optional":true,"read":true,"write":false},{"name":"additional_pastable_entities","order":49,"description":"Entities this entity can be pasted onto in addition to the normal allowed ones.","type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":false,"read":true,"write":false},{"name":"adjacent_tile_collision_box","order":189,"description":"The bounding box that specifies which tiles adjacent to the offshore pump should be checked.","subclasses":["OffshorePump"],"type":"BoundingBox","optional":true,"read":true,"write":false},{"name":"adjacent_tile_collision_mask","order":190,"description":"Tiles adjacent to the offshore pump must not collide with this collision mask.","subclasses":["OffshorePump"],"type":"CollisionMask","optional":true,"read":true,"write":false},{"name":"adjacent_tile_collision_test","order":191,"description":"If this mask is not empty, tiles adjacent to the offshore pump must not collide with this collision mask.","subclasses":["OffshorePump"],"type":"CollisionMask","optional":true,"read":true,"write":false},{"name":"affected_by_tiles","order":175,"description":"Whether this unit prototype is affected by tile walking speed modifiers.","subclasses":["Unit"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"air_resistance","order":75,"description":"The air resistance of this rolling stock prototype.","subclasses":["RollingStock"],"type":"double","optional":true,"read":true,"write":false},{"name":"alert_icon_shift","order":178,"description":"The alert icon shift of this entity prototype.","type":"Vector","optional":false,"read":true,"write":false},{"name":"alert_when_attacking","order":123,"description":"Whether this turret raises an alert when attacking","subclasses":["Turret"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"alert_when_damaged","order":122,"description":"Whether this entity raises an alert when damaged.","subclasses":["EntityWithHealth"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allow_access_to_all_forces","order":183,"description":"Whether this market allows access to all forces or just friendly ones.","subclasses":["Market"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allow_burner_leech","order":109,"description":"Whether this inserter allows burner leeching.","subclasses":["Inserter"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allow_copy_paste","order":50,"description":"When false copy-paste is not allowed for this entity.","type":"boolean","optional":false,"read":true,"write":false},{"name":"allow_custom_vectors","order":108,"description":"Whether this inserter allows custom pickup and drop vectors.","subclasses":["Inserter"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allow_passengers","order":186,"description":"Whether this vehicle allows passengers.","subclasses":["Vehicle"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allow_run_time_change_of_is_military_target","order":200,"description":"True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)","subclasses":["EntityWithOwner"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"allowed_effects","order":128,"description":"The allowed module effects for this entity, if any.","type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"always_on","order":156,"description":"Whether the lamp is always on (except when out of power or turned off by the circuit network).","subclasses":["Lamp"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"ammo_category","order":143,"description":"Name of the ammo category of this land mine.","subclasses":["LandMine"],"type":"string","optional":true,"read":true,"write":false},{"name":"animation_speed_coefficient","order":208,"description":"The animation speed coefficient of this belt connectable prototype.","subclasses":["BeltConnectable"],"type":"double","optional":true,"read":true,"write":false},{"name":"attack_parameters","order":41,"description":"The attack parameters for this entity, if any.","type":"AttackParameters","optional":true,"read":true,"write":false},{"name":"attack_result","order":39,"description":"The attack result of this entity, if any.","type":{"complex_type":"array","value":"TriggerItem"},"optional":true,"read":true,"write":false},{"name":"automated_ammo_count","order":152,"description":"The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.","subclasses":["ArtilleryTurret","AmmoTurret"],"type":"uint","optional":true,"read":true,"write":false},{"name":"automatic_weapon_cycling","order":205,"description":"Whether this spider vehicle prototype automatically cycles weapons.","subclasses":["SpiderVehicle"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"autoplace_specification","order":36,"description":"Autoplace specification for this entity prototype, if any.","type":"AutoplaceSpecification","optional":true,"read":true,"write":false},{"name":"base_productivity","order":182,"description":"The base productivity of this crafting machine, lab, or mining drill.","subclasses":["CraftingMachine","Lab","MiningDrill"],"type":"double","optional":true,"read":true,"write":false},{"name":"belt_distance","order":149,"description":"","subclasses":["Loader"],"type":"double","optional":true,"read":true,"write":false},{"name":"belt_length","order":150,"description":"","subclasses":["Loader"],"type":"double","optional":true,"read":true,"write":false},{"name":"belt_speed","order":37,"description":"The speed of this transport belt.","subclasses":["TransportBeltConnectable"],"type":"double","optional":true,"read":true,"write":false},{"name":"braking_force","order":74,"description":"The braking force of this vehicle prototype.","subclasses":["Vehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"build_base_evolution_requirement","order":57,"description":"The evolution requirement to build this entity as a base when expanding enemy bases.","type":"double","optional":false,"read":true,"write":false},{"name":"build_distance","order":219,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"building_grid_bit_shift","order":96,"description":"The log2 of grid size of the building","type":"uint","optional":false,"read":true,"write":false},{"name":"burner_prototype","order":90,"description":"The burner energy source prototype this entity uses, if any.","type":"LuaBurnerPrototype","optional":true,"read":true,"write":false},{"name":"burns_fluid","order":99,"description":"Whether this generator prototype burns fluid.","subclasses":["Generator"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"call_for_help_radius","order":159,"description":"","subclasses":["Spawner"],"type":"double","optional":true,"read":true,"write":false},{"name":"can_open_gates","order":174,"description":"Whether this unit prototype can open gates.","subclasses":["Unit"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"center_collision_mask","order":192,"description":"The collision mask used only for collision test with tile directly at offshore pump position.","subclasses":["OffshorePump"],"type":"CollisionMask","optional":true,"read":true,"write":false},{"name":"chain_shooting_cooldown_modifier","order":206,"description":"The chain shooting cooldown modifier of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"character_corpse","order":231,"description":"","subclasses":["Character"],"type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"chunk_exploration_radius","order":207,"description":"The chunk exploration radius of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"cliff_explosive_prototype","order":165,"description":"The item prototype name used to destroy this cliff.","subclasses":["Cliff"],"type":"string","optional":true,"read":true,"write":false},{"name":"collision_box","order":12,"description":"The bounding box used for collision checking.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"collision_mask","order":18,"description":"The collision masks this entity uses","type":"CollisionMask","optional":false,"read":true,"write":false},{"name":"collision_mask_collides_with_self","order":125,"description":"Does this prototype collision mask collide with itself?","type":"boolean","optional":false,"read":true,"write":false},{"name":"collision_mask_collides_with_tiles_only","order":126,"description":"Does this prototype collision mask collide with tiles only?","type":"boolean","optional":false,"read":true,"write":false},{"name":"collision_mask_considers_tile_transitions","order":127,"description":"Does this prototype collision mask consider tile transitions?","type":"boolean","optional":false,"read":true,"write":false},{"name":"collision_mask_with_flags","order":19,"description":"","type":"CollisionMaskWithFlags","optional":false,"read":true,"write":false},{"name":"color","order":124,"description":"The color of the prototype, if any.","type":"Color","optional":true,"read":true,"write":false},{"name":"construction_radius","order":139,"description":"The construction radius for this roboport prototype.","subclasses":["Roboport"],"type":"double","optional":true,"read":true,"write":false},{"name":"consumption","order":72,"description":"The energy consumption of this car prototype.","subclasses":["Car"],"type":"double","optional":true,"read":true,"write":false},{"name":"container_distance","order":148,"description":"","subclasses":["Loader"],"type":"double","optional":true,"read":true,"write":false},{"name":"corpses","order":26,"description":"Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototype name.","subclasses":["EntityWithHealth"],"type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true,"read":true,"write":false},{"name":"count_as_rock_for_filtered_deconstruction","order":115,"description":"If this simple-entity is counted as a rock for the deconstruction planner \"trees and rocks only\" filter.","subclasses":["SimpleEntity"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"crafting_categories","order":63,"description":"The crafting categories this entity prototype supports.","notes":["The value in the dictionary is meaningless and exists just to allow for easy lookup."],"subclasses":["CraftingMachine Character"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"crafting_speed","order":62,"description":"The crafting speed..","subclasses":["CraftingMachine"],"type":"double","optional":true,"read":true,"write":false},{"name":"create_ghost_on_death","order":142,"description":"If this prototype will attempt to create a ghost of itself on death.","notes":["If this is false then a ghost will never be made, if it's true a ghost may be made."],"type":"boolean","optional":false,"read":true,"write":false},{"name":"created_effect","order":53,"description":"The trigger to run when this entity is created, if any.","type":{"complex_type":"array","value":"TriggerItem"},"optional":true,"read":true,"write":false},{"name":"created_smoke","order":52,"description":"The smoke trigger run when this entity is built, if any.","type":{"complex_type":"table","parameters":[{"name":"initial_height","order":3,"description":"","type":"float","optional":false},{"name":"max_radius","order":4,"description":"","type":"float","optional":true},{"name":"offset_deviation","order":2,"description":"","type":"BoundingBox","optional":false},{"name":"offsets","order":1,"description":"","type":{"complex_type":"array","value":"Vector"},"optional":false},{"name":"smoke_name","order":0,"description":"","type":"string","optional":false},{"name":"speed","order":5,"description":"","type":"Vector","optional":false},{"name":"speed_from_center","order":12,"description":"","type":"float","optional":false},{"name":"speed_from_center_deviation","order":13,"description":"","type":"float","optional":false},{"name":"speed_multiplier","order":6,"description":"","type":"float","optional":false},{"name":"speed_multiplier_deviation","order":7,"description":"","type":"float","optional":false},{"name":"starting_frame","order":8,"description":"","type":"float","optional":false},{"name":"starting_frame_deviation","order":9,"description":"","type":"float","optional":false},{"name":"starting_frame_speed","order":10,"description":"","type":"float","optional":false},{"name":"starting_frame_speed_deviation","order":11,"description":"","type":"float","optional":false}]},"optional":true,"read":true,"write":false},{"name":"damage_hit_tint","order":230,"description":"","subclasses":["Character"],"type":"Color","optional":true,"read":true,"write":false},{"name":"darkness_for_all_lamps_off","order":155,"description":"Value between 0 and 1 darkness where all lamps of this lamp prototype are off.","subclasses":["Lamp"],"type":"float","optional":true,"read":true,"write":false},{"name":"darkness_for_all_lamps_on","order":154,"description":"Value between 0 and 1 darkness where all lamps of this lamp prototype are on.","subclasses":["Lamp"],"type":"float","optional":true,"read":true,"write":false},{"name":"default_collision_mask_with_flags","order":20,"description":"The hardcoded default collision mask (with flags) for this entity prototype type.","type":"CollisionMaskWithFlags","optional":false,"read":true,"write":false},{"name":"destroy_non_fuel_fluid","order":101,"description":"Whether this generator prototype destroys non-fuel fluids.","subclasses":["Generator"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"distraction_cooldown","order":176,"description":"The distraction cooldown of this unit prototype.","subclasses":["Unit"],"type":"uint","optional":true,"read":true,"write":false},{"name":"distribution_effectivity","order":118,"description":"The distribution effectivity for this beacon prototype.","subclasses":["Beacon"],"type":"double","optional":true,"read":true,"write":false},{"name":"door_opening_speed","order":133,"description":"The door opening speed for this rocket silo prototype.","subclasses":["RocketSilo"],"type":"double","optional":true,"read":true,"write":false},{"name":"draw_cargo","order":84,"description":"Whether this logistics or construction robot renders its cargo when flying.","subclasses":["RobotWithLogisticsInterface"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"drawing_box","order":16,"description":"The bounding box used for drawing the entity icon.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"drop_item_distance","order":220,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"dying_speed","order":210,"description":"The dying time of this corpse prototype.","subclasses":["Corpse"],"type":"float","optional":true,"read":true,"write":false},{"name":"effectivity","order":71,"description":"The effectivity of this car prototype, generator prototype.","subclasses":["Car","Generator"],"type":"double","optional":true,"read":true,"write":false},{"name":"electric_energy_source_prototype","order":91,"description":"The electric energy source prototype this entity uses, if any.","type":"LuaElectricEnergySourcePrototype","optional":true,"read":true,"write":false},{"name":"emissions_per_second","order":25,"description":"Amount of pollution emissions per second this entity will create.","type":"double","optional":false,"read":true,"write":false},{"name":"enemy_map_color","order":56,"description":"The enemy map color used when charting this entity.","type":"Color","optional":false,"read":true,"write":false},{"name":"energy_per_hit_point","order":141,"description":"The energy used per hitpoint taken for this vehicle during collisions.","subclasses":["Vehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"energy_per_move","order":85,"description":"The energy consumed per tile moved for this flying robot.","subclasses":["FlyingRobot"],"type":"double","optional":true,"read":true,"write":false},{"name":"energy_per_tick","order":86,"description":"The energy consumed per tick for this flying robot.","subclasses":["FlyingRobot"],"type":"double","optional":true,"read":true,"write":false},{"name":"energy_usage","order":68,"description":"The direct energy usage of this entity, if any.","type":"double","optional":true,"read":true,"write":false},{"name":"engine_starting_speed","order":135,"description":"The engine starting speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"type":"double","optional":true,"read":true,"write":false},{"name":"enter_vehicle_distance","order":225,"description":"","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"explosion_beam","order":119,"description":"Whether this explosion has a beam.","subclasses":["Explosion"],"type":"double","optional":true,"read":true,"write":false},{"name":"explosion_rotate","order":120,"description":"Whether this explosion rotates.","subclasses":["Explosion"],"type":"double","optional":true,"read":true,"write":false},{"name":"fast_replaceable_group","order":31,"description":"The group of mutually fast-replaceable entities, if any.","type":"string","optional":true,"read":true,"write":false},{"name":"filter_count","order":116,"description":"The filter count of this inserter, loader, or logistic chest. For logistic containers, `nil` means no limit.","subclasses":["Inserter","Loader","LogisticContainer"],"type":"uint","optional":true,"read":true,"write":false},{"name":"final_attack_result","order":40,"description":"The final attack result for this projectile.","subclasses":["Projectile"],"type":{"complex_type":"array","value":"TriggerItem"},"optional":true,"read":true,"write":false},{"name":"fixed_recipe","order":138,"description":"The fixed recipe name for this assembling machine prototype, if any.","subclasses":["AssemblingMachine"],"type":"string","optional":true,"read":true,"write":false},{"name":"flags","order":47,"description":"The flags for this entity prototype.","type":"EntityPrototypeFlags","optional":false,"read":true,"write":false},{"name":"fluid","order":104,"description":"The fluid this offshore pump produces.","subclasses":["OffshorePump"],"type":"LuaFluidPrototype","optional":true,"read":true,"write":false},{"name":"fluid_capacity","order":105,"description":"The fluid capacity of this entity or 0 if this entity doesn't support fluids.","notes":["Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs."],"type":"double","optional":false,"read":true,"write":false},{"name":"fluid_energy_source_prototype","order":93,"description":"The fluid energy source prototype this entity uses, if any.","type":"LuaFluidEnergySourcePrototype","optional":true,"read":true,"write":false},{"name":"fluid_usage_per_tick","order":97,"description":"The fluid usage of this generator prototype.","subclasses":["Generator"],"type":"double","optional":true,"read":true,"write":false},{"name":"fluidbox_prototypes","order":146,"description":"The fluidbox prototypes for this entity.","type":{"complex_type":"array","value":"LuaFluidBoxPrototype"},"optional":false,"read":true,"write":false},{"name":"flying_acceleration","order":137,"description":"The flying acceleration for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"type":"double","optional":true,"read":true,"write":false},{"name":"flying_speed","order":136,"description":"The flying speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"type":"double","optional":true,"read":true,"write":false},{"name":"friction_force","order":73,"description":"The friction of this vehicle prototype.","subclasses":["Vehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"friendly_map_color","order":55,"description":"The friendly map color used when charting this entity.","type":"Color","optional":false,"read":true,"write":false},{"name":"grid_prototype","order":193,"description":"The equipment grid prototype for this entity, if any.","type":"LuaEquipmentGridPrototype","optional":true,"read":true,"write":false},{"name":"group","order":22,"description":"Group of this entity.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"guns","order":79,"description":"A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.","type":{"complex_type":"dictionary","key":"string","value":"LuaItemPrototype"},"optional":true,"read":true,"write":false},{"name":"has_belt_immunity","order":167,"description":"Whether this unit, car, or character prototype has belt immunity.","subclasses":["Unit","Car","Character"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"healing_per_tick","order":24,"description":"Amount this entity can heal per tick, if any.","type":"float","optional":true,"read":true,"write":false},{"name":"heat_buffer_prototype","order":95,"description":"The heat buffer prototype this entity uses, if any.","type":"LuaHeatBufferPrototype","optional":true,"read":true,"write":false},{"name":"heat_energy_source_prototype","order":92,"description":"The heat energy source prototype this entity uses, if any.","type":"LuaHeatEnergySourcePrototype","optional":true,"read":true,"write":false},{"name":"height","order":202,"description":"The height of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"idle_energy_usage","order":212,"description":"The idle energy usage of this rocket silo prototype.","subclasses":["RocketSilo"],"type":"double","optional":true,"read":true,"write":false},{"name":"indexed_guns","order":80,"description":"A vector of the gun prototypes of this car, spider vehicule, or artillery wagon or turret.","subclasses":["Car","SpiderVehicle","ArtilleryTurret","ArtilleryWagon"],"type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true,"read":true,"write":false},{"name":"infinite_depletion_resource_amount","order":8,"description":"Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource.","subclasses":["ResourceEntity"],"type":"uint","optional":true,"read":true,"write":false},{"name":"infinite_resource","order":5,"description":"Whether this resource is infinite.","subclasses":["ResourceEntity"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"ingredient_count","order":61,"description":"The max number of ingredients this crafting machine prototype supports.","subclasses":["CraftingMachine"],"type":"uint","optional":true,"read":true,"write":false},{"name":"inserter_chases_belt_items","order":114,"description":"True if this inserter chases items on belts for pickup.","subclasses":["Inserter"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"inserter_drop_position","order":113,"description":"The drop position for this inserter.","subclasses":["Inserter"],"type":"Vector","optional":true,"read":true,"write":false},{"name":"inserter_extension_speed","order":110,"description":"The extension speed of this inserter.","subclasses":["Inserter"],"type":"double","optional":true,"read":true,"write":false},{"name":"inserter_pickup_position","order":112,"description":"The pickup position for this inserter.","subclasses":["Inserter"],"type":"Vector","optional":true,"read":true,"write":false},{"name":"inserter_rotation_speed","order":111,"description":"The rotation speed of this inserter.","subclasses":["Inserter"],"type":"double","optional":true,"read":true,"write":false},{"name":"inserter_stack_size_bonus","order":196,"description":"The built-in stack size bonus of this inserter prototype.","subclasses":["Inserter"],"type":"double","optional":true,"read":true,"write":false},{"name":"instruments","order":58,"description":"The instruments for this programmable speaker.","subclasses":["ProgrammableSpeaker"],"type":{"complex_type":"array","value":"ProgrammableSpeakerInstrument"},"optional":true,"read":true,"write":false},{"name":"is_building","order":151,"description":"Everything in the following list is considered a building.\n\n- AccumulatorPrototype\n- ArtilleryTurretPrototype\n- BeaconPrototype\n- BoilerPrototype\n- BurnerGeneratorPrototype\n- CombinatorPrototype \u2192 ArithmeticCombinator, DeciderCombinator\n- ConstantCombinatorPrototype\n- ContainerPrototype \u2192 LogisticContainer, InfinityContainer\n- CraftingMachinePrototype \u2192 AssemblingMachine, RocketSilo, Furnace\n- ElectricEnergyInterfacePrototype\n- ElectricPolePrototype\n- EnemySpawnerPrototype\n- GatePrototype\n- GeneratorPrototype\n- HeatInterfacePrototype\n- HeatPipePrototype\n- InserterPrototype\n- LabPrototype\n- LampPrototype\n- LinkedContainerPrototype\n- MarketPrototype\n- MiningDrillPrototype\n- OffshorePumpPrototype\n- PipePrototype \u2192 InfinityPipe\n- PipeToGroundPrototype\n- PlayerPortPrototype\n- PowerSwitchPrototype\n- ProgrammableSpeakerPrototype\n- PumpPrototype\n- RadarPrototype\n- RailPrototype \u2192 CurvedRail, StraightRail\n- RailSignalBasePrototype \u2192 RailChainSignal, RailSignal\n- ReactorPrototype\n- RoboportPrototype\n- SimpleEntityPrototype\n- SimpleEntityWithOwnerPrototype \u2192 SimpleEntityWithForce\n- SolarPanelPrototype\n- StorageTankPrototype\n- TrainStopPrototype\n- TransportBeltConnectablePrototype \u2192 LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt\n- TurretPrototype \u2192 AmmoTurret, ElectricTurret, FluidTurret\n- WallPrototype","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_entity_with_owner","order":198,"description":"True if this is entity-with-owner","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_military_target","order":199,"description":"True if this entity-with-owner is military target","subclasses":["EntityWithOwner"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"item_pickup_distance","order":223,"description":"","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"item_slot_count","order":181,"description":"The item slot count of this constant combinator prototype.","subclasses":["ConstantCombinator"],"type":"uint","optional":true,"read":true,"write":false},{"name":"items_to_place_this","order":11,"description":"Items that when placed will produce this entity, if any. Construction bots will always choose the first item in this list to build this entity.","type":{"complex_type":"array","value":"SimpleItemStack"},"optional":true,"read":true,"write":false},{"name":"lab_inputs","order":179,"description":"The item prototype names that are the inputs of this lab prototype.","subclasses":["Lab"],"type":{"complex_type":"array","value":"string"},"optional":true,"read":true,"write":false},{"name":"lamp_energy_usage","order":213,"description":"The lamp energy usage of this rocket silo prototype.","subclasses":["RocketSilo"],"type":"double","optional":true,"read":true,"write":false},{"name":"launch_wait_time","order":131,"description":"The rocket launch delay for this rocket silo prototype.","subclasses":["RocketSilo"],"type":"uint8","optional":true,"read":true,"write":false},{"name":"light_blinking_speed","order":132,"description":"The light blinking speed for this rocket silo prototype.","subclasses":["RocketSilo"],"type":"double","optional":true,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"logistic_mode","order":45,"description":"The logistic mode of this logistic container. One of `\"requester\"`, `\"active-provider\"`, `\"passive-provider\"`, `\"buffer\"`, `\"storage\"`, `\"none\"`.","subclasses":["LogisticContainer"],"type":"string","optional":true,"read":true,"write":false},{"name":"logistic_parameters","order":201,"description":"The logistic parameters for this roboport.","notes":["Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array."],"subclasses":["Roboport"],"type":{"complex_type":"table","parameters":[{"name":"charge_approach_distance","order":2,"description":"","type":"float","optional":false},{"name":"charging_distance","order":6,"description":"","type":"float","optional":false},{"name":"charging_energy","order":8,"description":"","type":"double","optional":false},{"name":"charging_station_count","order":5,"description":"","type":"uint","optional":false},{"name":"charging_station_shift","order":7,"description":"","type":"Vector","optional":false},{"name":"charging_threshold_distance","order":9,"description":"","type":"float","optional":false},{"name":"construction_radius","order":4,"description":"","type":"float","optional":false},{"name":"logistic_radius","order":3,"description":"","type":"float","optional":false},{"name":"logistics_connection_distance","order":13,"description":"","type":"float","optional":false},{"name":"robot_limit","order":12,"description":"","type":"uint","optional":false},{"name":"robot_vertical_acceleration","order":10,"description":"","type":"float","optional":false},{"name":"robots_shrink_when_entering_and_exiting","order":14,"description":"","type":"boolean","optional":false},{"name":"spawn_and_station_height","order":0,"description":"","type":"float","optional":false},{"name":"spawn_and_station_shadow_height_offset","order":1,"description":"","type":"float","optional":false},{"name":"stationing_offset","order":11,"description":"","type":"Vector","optional":false}]},"optional":true,"read":true,"write":false},{"name":"logistic_radius","order":140,"description":"The logistic radius for this roboport prototype.","subclasses":["Roboport"],"type":"double","optional":true,"read":true,"write":false},{"name":"loot","order":33,"description":"Loot that will be dropped when this entity is killed, if any.","subclasses":["EntityWithHealth"],"type":{"complex_type":"array","value":"Loot"},"optional":true,"read":true,"write":false},{"name":"loot_pickup_distance","order":224,"description":"","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"manual_range_modifier","order":209,"description":"The manual range modifier for this artillery turret or wagon prototype.\n\nsubclass(ArtilleryWagon, ArtilleryTurret)","type":"double","optional":true,"read":true,"write":false},{"name":"map_color","order":54,"description":"The map color used when charting this entity if a friendly or enemy color isn't defined, if any.","type":"Color","optional":true,"read":true,"write":false},{"name":"map_generator_bounding_box","order":14,"description":"The bounding box used for map generator collision checking.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"max_circuit_wire_distance","order":67,"description":"The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.","type":"double","optional":false,"read":true,"write":false},{"name":"max_count_of_owned_units","order":160,"description":"Count of enemies this spawner can sustain.","subclasses":["Spawner"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_darkness_to_spawn","order":158,"description":"The maximum darkness at which this unit spawner can spawn entities.","subclasses":["Spawner"],"type":"float","optional":true,"read":true,"write":false},{"name":"max_distance_of_nearby_sector_revealed","order":188,"description":"The radius of the area constantly revealed by this radar, in chunks.","subclasses":["Radar"],"type":"uint","optional":true,"read":true,"write":false},{"name":"max_distance_of_sector_revealed","order":187,"description":"The radius of the area this radar can chart, in chunks.","subclasses":["Radar"],"type":"uint","optional":true,"read":true,"write":false},{"name":"max_energy","order":87,"description":"The max energy for this flying robot.","subclasses":["FlyingRobot"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_energy_production","order":70,"description":"The theoretical maximum energy production for this this entity.","type":"double","optional":false,"read":true,"write":false},{"name":"max_energy_usage","order":69,"description":"The theoretical maximum energy usage for this entity.","type":"double","optional":false,"read":true,"write":false},{"name":"max_friends_around_to_spawn","order":161,"description":"How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.","subclasses":["Spawner"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_health","order":4,"description":"Max health of this entity. Will be `0` if this is not an entity with health.","type":"float","optional":false,"read":true,"write":false},{"name":"max_payload_size","order":83,"description":"The max payload size of this logistics or construction robot.","subclasses":["RobotWithLogisticsInterface"],"type":"uint","optional":true,"read":true,"write":false},{"name":"max_polyphony","order":59,"description":"The maximum polyphony for this programmable speaker.","subclasses":["ProgrammableSpeaker"],"type":"uint","optional":true,"read":true,"write":false},{"name":"max_power_output","order":102,"description":"The default maximum power output of this generator prototype.","subclasses":["Generator"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_pursue_distance","order":171,"description":"The maximum pursue distance of this unit prototype.","subclasses":["Unit"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_speed","order":153,"description":"The max speed of this projectile or flying robot prototype.","subclasses":["Projectile","FlyingRobot"],"type":"double","optional":true,"read":true,"write":false},{"name":"max_to_charge","order":89,"description":"The maximum energy for this flying robot above which it won't try to recharge when stationing.","subclasses":["FlyingRobot"],"type":"float","optional":true,"read":true,"write":false},{"name":"max_underground_distance","order":46,"description":"The max underground distance for underground belts and underground pipes.","subclasses":["UndergroundBelt","PipeToGround"],"type":"uint8","optional":true,"read":true,"write":false},{"name":"max_wire_distance","order":66,"description":"The maximum wire distance for this entity. 0 if the entity doesn't support wires.","type":"double","optional":false,"read":true,"write":false},{"name":"maximum_corner_sliding_distance","order":218,"description":"","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"maximum_temperature","order":98,"description":"The maximum fluid temperature of this generator prototype.","subclasses":["Generator"],"type":"double","optional":true,"read":true,"write":false},{"name":"min_darkness_to_spawn","order":157,"description":"The minimum darkness at which this unit spawner can spawn entities.","subclasses":["Spawner"],"type":"float","optional":true,"read":true,"write":false},{"name":"min_pursue_time","order":170,"description":"The minimum pursue time of this unit prototype.","subclasses":["Unit"],"type":"uint","optional":true,"read":true,"write":false},{"name":"min_to_charge","order":88,"description":"The minimum energy for this flying robot before it tries to recharge.","subclasses":["FlyingRobot"],"type":"float","optional":true,"read":true,"write":false},{"name":"mineable_properties","order":10,"description":"Whether this entity is minable and what can be obtained by mining it.","type":{"complex_type":"table","parameters":[{"name":"fluid_amount","order":4,"description":"The required fluid amount if any.","type":"double","optional":true},{"name":"minable","order":0,"description":"Is this entity mineable at all?","type":"boolean","optional":false},{"name":"mining_particle","order":2,"description":"Prototype name of the particle produced when mining this entity. Will only be present if this entity produces any particle during mining.","type":"string","optional":true},{"name":"mining_time","order":1,"description":"Energy required to mine an entity.","type":"double","optional":false},{"name":"mining_trigger","order":6,"description":"The mining trigger if any.","type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"products","order":3,"description":"Products obtained by mining this entity.","type":{"complex_type":"array","value":"Product"},"optional":true},{"name":"required_fluid","order":5,"description":"The prototype name of the required fluid if any.","type":"string","optional":true}]},"optional":false,"read":true,"write":false},{"name":"minimum_resource_amount","order":6,"description":"Minimum amount of this resource.","subclasses":["ResourceEntity"],"type":"uint","optional":true,"read":true,"write":false},{"name":"mining_drill_radius","order":43,"description":"The mining radius of this mining drill prototype.","subclasses":["MiningDrill"],"type":"double","optional":true,"read":true,"write":false},{"name":"mining_speed","order":44,"description":"The mining speed of this mining drill/character prototype.","subclasses":["MiningDrill","Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"module_inventory_size","order":60,"description":"The module inventory size. `nil` if this entity doesn't support modules.","type":"uint","optional":true,"read":true,"write":false},{"name":"move_while_shooting","order":173,"description":"Whether this unit prototype can move while shooting.","subclasses":["Unit"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"name","order":1,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"neighbour_bonus","order":147,"description":"","subclasses":["Reactor"],"type":"double","optional":true,"read":true,"write":false},{"name":"next_upgrade","order":32,"description":"The next upgrade for this entity, if any.","type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"normal_resource_amount","order":7,"description":"The normal amount for this resource.","subclasses":["ResourceEntity"],"type":"uint","optional":true,"read":true,"write":false},{"name":"object_name","order":233,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":21,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"pollution_to_join_attack","order":169,"description":"The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution.","subclasses":["Unit"],"type":"float","optional":true,"read":true,"write":false},{"name":"protected_from_tile_building","order":197,"description":"True if this entity prototype should be included during tile collision checks with [LuaTilePrototype::check_collision_with_entities](LuaTilePrototype::check_collision_with_entities) enabled.","type":"boolean","optional":false,"read":true,"write":false},{"name":"pumping_speed","order":106,"description":"The pumping speed of this offshore or normal pump.","subclasses":["OffshorePump","Pump"],"type":"double","optional":true,"read":true,"write":false},{"name":"radar_range","order":172,"description":"The radar range of this unit prototype.","subclasses":["Unit"],"type":"uint","optional":true,"read":true,"write":false},{"name":"radius","order":164,"description":"The radius of this entity prototype.","type":"double","optional":false,"read":true,"write":false},{"name":"reach_distance","order":221,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"reach_resource_distance","order":222,"description":"","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"related_underground_belt","order":195,"description":"","subclasses":["TransportBelt"],"type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"remains_when_mined","order":48,"description":"The remains left behind when this entity is mined.","type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":false,"read":true,"write":false},{"name":"remove_decoratives","order":194,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"repair_speed_modifier","order":34,"description":"Repair-speed modifier for this entity, if any. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`.","subclasses":["EntityWithHealth"],"type":"uint","optional":true,"read":true,"write":false},{"name":"researching_speed","order":180,"description":"The base researching speed of this lab prototype.","subclasses":["Lab"],"type":"double","optional":true,"read":true,"write":false},{"name":"resistances","order":30,"description":"List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`).","subclasses":["EntityWithHealth"],"type":{"complex_type":"dictionary","key":"string","value":"Resistance"},"optional":true,"read":true,"write":false},{"name":"resource_categories","order":64,"description":"The resource categories this character or mining drill supports.","notes":["The value in the dictionary is meaningless and exists just to allow for easy lookup."],"subclasses":["MiningDrill","Character"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"resource_category","order":9,"description":"Name of the category of this resource.","notes":["During data stage, this property is named \"category\"."],"subclasses":["ResourceEntity"],"type":"string","optional":true,"read":true,"write":false},{"name":"respawn_time","order":229,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"result_units","order":38,"description":"The result units and spawn points with weight and evolution factor for a biter spawner entity.","subclasses":["Spawner"],"type":{"complex_type":"array","value":"UnitSpawnDefinition"},"optional":true,"read":true,"write":false},{"name":"rising_speed","order":134,"description":"The rising speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"type":"double","optional":true,"read":true,"write":false},{"name":"rocket_entity_prototype","order":166,"description":"The rocket entity prototype associated with this rocket silo prototype.","subclasses":["RocketSilo"],"type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"rocket_parts_required","order":129,"description":"The rocket parts required for this rocket silo prototype.","subclasses":["RocketSilo"],"type":"uint","optional":true,"read":true,"write":false},{"name":"rocket_rising_delay","order":130,"description":"The rocket rising delay for this rocket silo prototype.","subclasses":["RocketSilo"],"type":"uint8","optional":true,"read":true,"write":false},{"name":"rotation_speed","order":77,"description":"The rotation speed of this car prototype.","subclasses":["Car"],"type":"double","optional":true,"read":true,"write":false},{"name":"running_speed","order":217,"description":"The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.","subclasses":["Character"],"type":"double","optional":true,"read":true,"write":false},{"name":"scale_fluid_usage","order":100,"description":"Whether this generator prototype scales fluid usage.","subclasses":["Generator"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"secondary_collision_box","order":13,"description":"The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.","type":"BoundingBox","optional":true,"read":true,"write":false},{"name":"selectable_in_game","order":27,"description":"Is this entity selectable?","type":"boolean","optional":false,"read":true,"write":false},{"name":"selection_box","order":15,"description":"The bounding box used for drawing selection.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"selection_priority","order":28,"description":"The selection priority of this entity - a value between 0 and 255","type":"uint","optional":false,"read":true,"write":false},{"name":"shooting_cursor_size","order":51,"description":"The cursor size used when shooting at this entity.","type":"double","optional":false,"read":true,"write":false},{"name":"spawn_cooldown","order":42,"description":"The spawning cooldown for this enemy spawner prototype.","subclasses":["Spawner"],"type":{"complex_type":"table","parameters":[{"name":"max","order":1,"description":"","type":"double","optional":false},{"name":"min","order":0,"description":"","type":"double","optional":false}]},"optional":true,"read":true,"write":false},{"name":"spawning_radius","order":162,"description":"How far from the spawner can the units be spawned.","subclasses":["Spawner"],"type":"double","optional":true,"read":true,"write":false},{"name":"spawning_spacing","order":163,"description":"What spaces should be between the spawned units.","subclasses":["Spawner"],"type":"double","optional":true,"read":true,"write":false},{"name":"spawning_time_modifier","order":177,"description":"The spawning time modifier of this unit prototype.","subclasses":["Unit"],"type":"double","optional":true,"read":true,"write":false},{"name":"speed","order":81,"description":"The default speed of this flying robot, rolling stock or unit. For rolling stocks, this is their `max_speed`.","subclasses":["FlyingRobot","RollingStock","Unit"],"type":"double","optional":true,"read":true,"write":false},{"name":"speed_multiplier_when_out_of_energy","order":82,"description":"The speed multiplier when this flying robot is out of energy.","subclasses":["FlyingRobot"],"type":"float","optional":true,"read":true,"write":false},{"name":"stack","order":107,"description":"Whether this inserter is a stack-type.","subclasses":["Inserter"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"sticker_box","order":17,"description":"The bounding box used to attach sticker type entities.","type":"BoundingBox","optional":false,"read":true,"write":false},{"name":"subgroup","order":23,"description":"Subgroup of this entity.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"supply_area_distance","order":65,"description":"The supply area of this electric pole or beacon prototype.","subclasses":["ElectricPole","Beacon"],"type":"double","optional":true,"read":true,"write":false},{"name":"supports_direction","order":184,"description":"Whether this entity prototype could possibly ever be rotated.","type":"boolean","optional":false,"read":true,"write":false},{"name":"tank_driving","order":76,"description":"If this car prototype uses tank controls to drive.","subclasses":["Car"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"target_temperature","order":103,"description":"The target temperature of this boiler prototype.","subclasses":["Boiler"],"type":"double","optional":true,"read":true,"write":false},{"name":"terrain_friction_modifier","order":185,"description":"The terrain friction modifier for this vehicle.","subclasses":["Vehicle"],"type":"float","optional":true,"read":true,"write":false},{"name":"ticks_to_keep_aiming_direction","order":227,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"ticks_to_keep_gun","order":226,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"ticks_to_stay_in_combat","order":228,"description":"","subclasses":["Character"],"type":"uint","optional":true,"read":true,"write":false},{"name":"tile_height","order":216,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)","type":"uint","optional":false,"read":true,"write":false},{"name":"tile_width","order":215,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)","type":"uint","optional":false,"read":true,"write":false},{"name":"time_to_live","order":117,"description":"The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.","type":"uint","optional":false,"read":true,"write":false},{"name":"timeout","order":144,"description":"The time it takes this land mine to arm.","subclasses":["LandMine"],"type":"uint","optional":true,"read":true,"write":false},{"name":"torso_bob_speed","order":204,"description":"The torso bob speed of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"torso_rotation_speed","order":203,"description":"The torso rotation speed of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"type":"double","optional":true,"read":true,"write":false},{"name":"tree_color_count","order":121,"description":"If it is a tree, return the number of colors it supports.","subclasses":["Tree"],"type":"uint8","optional":true,"read":true,"write":false},{"name":"trigger_collision_mask","order":145,"description":"The collision mask entities must collide with to make this landmine blow up.","subclasses":["LandMine"],"type":"CollisionMaskWithFlags","optional":true,"read":true,"write":false},{"name":"turret_range","order":35,"description":"The range of this turret.","subclasses":["Turret"],"type":"uint","optional":true,"read":true,"write":false},{"name":"turret_rotation_speed","order":78,"description":"The turret rotation speed of this car prototype.","subclasses":["Car"],"type":"double","optional":true,"read":true,"write":false},{"name":"type","order":0,"description":"Type of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"use_exact_mode","order":214,"description":"Whether this logistic container prototype uses exact mode","subclasses":["LogisticContainer"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"valid","order":232,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"vision_distance","order":168,"description":"The vision distance of this unit prototype.","subclasses":["Unit"],"type":"double","optional":true,"read":true,"write":false},{"name":"void_energy_source_prototype","order":94,"description":"The void energy source prototype this entity uses, if any.","type":"LuaVoidEnergySourcePrototype","optional":true,"read":true,"write":false},{"name":"weight","order":29,"description":"The weight of this vehicle prototype.","subclasses":["Vehicle"],"type":"double","optional":true,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEquipment","order":26,"description":"An item in a [LuaEquipmentGrid](LuaEquipmentGrid), for example a fusion reactor placed in one's power armor.\n\nAn equipment reference becomes invalid once the equipment is removed or the equipment grid it resides in is destroyed.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"burner","order":12,"description":"The burner energy source for this equipment, if any.","type":"LuaBurner","optional":true,"read":true,"write":false},{"name":"energy","order":9,"description":"Current available energy.","type":"double","optional":false,"read":true,"write":true},{"name":"generator_power","order":8,"description":"Energy generated per tick.","type":"double","optional":false,"read":true,"write":false},{"name":"max_energy","order":10,"description":"Maximum amount of energy that can be stored in this equipment.","type":"double","optional":false,"read":true,"write":false},{"name":"max_shield","order":5,"description":"Maximum shield value.","type":"double","optional":false,"read":true,"write":false},{"name":"max_solar_power","order":6,"description":"Maximum solar power generated.","type":"double","optional":false,"read":true,"write":false},{"name":"movement_bonus","order":7,"description":"Movement speed bonus.","type":"double","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this equipment.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"position","order":2,"description":"Position of this equipment in the equipment grid.","type":"EquipmentPosition","optional":false,"read":true,"write":false},{"name":"prototype","order":11,"description":"","type":"LuaEquipmentPrototype","optional":false,"read":true,"write":false},{"name":"shape","order":3,"description":"Shape of this equipment.","type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"width","order":0,"description":"","type":"uint","optional":false}]},"optional":false,"read":true,"write":false},{"name":"shield","order":4,"description":"Current shield value of the equipment.","notes":["Can't be set higher than [LuaEquipment::max_shield](LuaEquipment::max_shield)."],"type":"double","optional":false,"read":true,"write":true},{"name":"type","order":1,"description":"Type of this equipment.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEquipmentCategoryPrototype","order":27,"description":"Prototype of an equipment category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEquipmentGrid","order":28,"description":"An equipment grid is for example the inside of a power armor.","methods":[{"name":"can_move","order":4,"description":"Check whether moving an equipment would succeed.","parameters":[{"name":"equipment","order":0,"description":"The equipment to move","type":"LuaEquipment","optional":false},{"name":"position","order":1,"description":"Where to put it","type":"EquipmentPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":2,"description":"Clear all equipment from the grid, removing it without actually returning it.","parameters":[{"name":"by_player","order":0,"description":"If provided, the action is done 'as' this player and [on_player_removed_equipment](on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"count","order":9,"description":"Get the number of all or some equipment in this grid.","parameters":[{"name":"equipment","order":0,"description":"Prototype name of the equipment to count. If not specified, count all equipment.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"find","order":8,"description":"Find equipment by name.","parameters":[{"name":"equipment","order":0,"description":"Prototype name of the equipment to find.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The first found equipment, or `nil` if equipment could not be found.","type":"LuaEquipment","optional":true}]},{"name":"get","order":6,"description":"Find equipment in the Equipment Grid based off a position.","parameters":[{"name":"position","order":0,"description":"The position","type":"EquipmentPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The found equipment, or `nil` if equipment could not be found at the given position.","type":"LuaEquipment","optional":true}]},{"name":"get_contents","order":7,"description":"Get counts of all equipment in this grid.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The counts, indexed by equipment names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"help","order":10,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"move","order":5,"description":"Move an equipment within this grid.","parameters":[{"name":"equipment","order":0,"description":"The equipment to move","type":"LuaEquipment","optional":false},{"name":"position","order":1,"description":"Where to put it","type":"EquipmentPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"`true` if the equipment was successfully moved.","type":"boolean","optional":false}]},{"name":"put","order":3,"description":"Insert an equipment into the grid.","parameters":[{"name":"by_player","order":2,"description":"If provided the action is done 'as' this player and [on_player_placed_equipment](on_player_placed_equipment) is triggered.","type":"PlayerIdentification","optional":true},{"name":"name","order":0,"description":"Equipment prototype name","type":"string","optional":false},{"name":"position","order":1,"description":"Grid position to put the equipment in.","type":"EquipmentPosition","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The newly-added equipment, or `nil` if the equipment could not be added.","type":"LuaEquipment","optional":true}]},{"name":"take","order":0,"description":"Remove an equipment from the grid.","parameters":[{"name":"by_player","order":2,"description":"If provided the action is done 'as' this player and [on_player_removed_equipment](on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true},{"name":"equipment","order":1,"description":"Take this exact equipment.","type":"LuaEquipment","optional":true},{"name":"position","order":0,"description":"Take the equipment that contains this position in the grid.","type":"EquipmentPosition","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The removed equipment, or `nil` if no equipment was removed.","type":"SimpleItemStack","optional":true}]},{"name":"take_all","order":1,"description":"Remove all equipment from the grid.","parameters":[{"name":"by_player","order":0,"description":"If provided, the action is done 'as' this player and [on_player_removed_equipment](on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Count of each removed equipment, indexed by their prototype names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]}],"attributes":[{"name":"available_in_batteries","order":6,"description":"The total energy stored in all batteries in the equipment grid.","type":"double","optional":false,"read":true,"write":false},{"name":"battery_capacity","order":7,"description":"Total energy storage capacity of all batteries in the equipment grid.","type":"double","optional":false,"read":true,"write":false},{"name":"equipment","order":3,"description":"All the equipment in this grid.","type":{"complex_type":"array","value":"LuaEquipment"},"optional":false,"read":true,"write":false},{"name":"generator_energy","order":4,"description":"Total energy per tick generated by the equipment inside this grid.","type":"double","optional":false,"read":true,"write":false},{"name":"height","order":2,"description":"Height of the equipment grid.","type":"uint","optional":false,"read":true,"write":false},{"name":"inhibit_movement_bonus","order":10,"description":"True if this movement bonus equipment is turned off, otherwise false.","type":"boolean","optional":false,"read":true,"write":true},{"name":"max_shield","order":9,"description":"The maximum amount of shields this equipment grid has.","type":"float","optional":false,"read":true,"write":false},{"name":"max_solar_energy","order":5,"description":"Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generated energy varies depending on the daylight levels.","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"prototype","order":0,"description":"","type":"LuaEquipmentGridPrototype","optional":false,"read":true,"write":false},{"name":"shield","order":8,"description":"The amount of shields this equipment grid has.","type":"float","optional":false,"read":true,"write":false},{"name":"unique_id","order":11,"description":"Unique identifier of this equipment grid.","type":"uint","optional":false,"read":true,"write":false},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"width","order":1,"description":"Width of the equipment grid.","type":"uint","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEquipmentGridPrototype","order":29,"description":"Prototype of an equipment grid.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"equipment_categories","order":4,"description":"Equipment category names for the [categories](LuaEquipmentPrototype::equipment_categories) that may be inserted into this equipment grid. The grid will accept any equipment that has at least one category in this list.","type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":false},{"name":"height","order":6,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"locked","order":7,"description":"If the player can move equipment into or out of this grid.","type":"boolean","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"width","order":5,"description":"","type":"uint","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaEquipmentPrototype","order":30,"description":"Prototype of a modular equipment.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"attack_parameters","order":18,"description":"The equipment attack parameters.","subclasses":["ActiveDefenseEquipment"],"type":"AttackParameters","optional":true,"read":true,"write":false},{"name":"automatic","order":19,"description":"Whether this active defense equipment is automatic. Returns false if not active defense equipment.","type":"boolean","optional":false,"read":true,"write":false},{"name":"background_color","order":17,"description":"The background color of this equipment prototype.","type":"Color","optional":false,"read":true,"write":false},{"name":"burner_prototype","order":15,"description":"The burner energy source prototype this equipment uses, if any.","type":"LuaBurnerPrototype","optional":true,"read":true,"write":false},{"name":"electric_energy_source_prototype","order":16,"description":"The electric energy source prototype this equipment uses, if any.","type":"LuaElectricEnergySourcePrototype","optional":true,"read":true,"write":false},{"name":"energy_consumption","order":11,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"energy_per_shield","order":9,"description":"The energy per shield point restored. 0 for non-shield equipment.","type":"double","optional":false,"read":true,"write":false},{"name":"energy_production","order":7,"description":"The max power generated by this equipment.","type":"double","optional":false,"read":true,"write":false},{"name":"energy_source","order":13,"description":"The energy source prototype for the equipment.","type":"LuaElectricEnergySourcePrototype","optional":false,"read":true,"write":false},{"name":"equipment_categories","order":14,"description":"Category names for this equipment. These [categories](LuaEquipmentGridPrototype::equipment_categories) will be used to determine whether this equipment is allowed in a particular equipment grid.","type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":false},{"name":"localised_description","order":4,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"logistic_parameters","order":10,"description":"The logistic parameters for this roboport equipment.","notes":["Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array."],"subclasses":["RoboportEquipment"],"type":{"complex_type":"table","parameters":[{"name":"charge_approach_distance","order":2,"description":"","type":"float","optional":false},{"name":"charging_distance","order":6,"description":"","type":"float","optional":false},{"name":"charging_energy","order":8,"description":"","type":"double","optional":false},{"name":"charging_station_count","order":5,"description":"","type":"uint","optional":false},{"name":"charging_station_shift","order":7,"description":"","type":"Vector","optional":false},{"name":"charging_threshold_distance","order":9,"description":"","type":"float","optional":false},{"name":"construction_radius","order":4,"description":"","type":"float","optional":false},{"name":"logistic_radius","order":3,"description":"","type":"float","optional":false},{"name":"logistics_connection_distance","order":13,"description":"","type":"float","optional":false},{"name":"robot_limit","order":12,"description":"","type":"uint","optional":false},{"name":"robot_vertical_acceleration","order":10,"description":"","type":"float","optional":false},{"name":"robots_shrink_when_entering_and_exiting","order":14,"description":"","type":"boolean","optional":false},{"name":"spawn_and_station_height","order":0,"description":"","type":"float","optional":false},{"name":"spawn_and_station_shadow_height_offset","order":1,"description":"","type":"float","optional":false},{"name":"stationing_offset","order":11,"description":"","type":"Vector","optional":false}]},"optional":true,"read":true,"write":false},{"name":"movement_bonus","order":12,"description":"","subclasses":["MovementBonusEquipment"],"type":"float","optional":true,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":21,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":2,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"shape","order":5,"description":"Shape of this equipment prototype.","type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"points","order":2,"description":"Only set when the shape is \"manual\"","type":{"complex_type":"array","value":"EquipmentPoint"},"optional":true},{"name":"width","order":0,"description":"","type":"uint","optional":false}]},"optional":false,"read":true,"write":false},{"name":"shield","order":8,"description":"The shield value of this equipment. 0 for non-shield equipment.","type":"float","optional":false,"read":true,"write":false},{"name":"take_result","order":6,"description":"The result item when taking this equipment out of an equipment grid, if any.","type":"LuaItemPrototype","optional":true,"read":true,"write":false},{"name":"type","order":1,"description":"Type of this equipment prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":20,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaFlowStatistics","order":31,"description":"Encapsulates statistic data for different parts of the game. In the context of flow statistics, `input` and `output` describe on which side of the associated GUI the values are shown. Input values are shown on the left side, output values on the right side.\n\nExamples:\n- The item production GUI shows \"consumption\" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.\n- The kills GUI shows \"losses\" on the right, so `output` describes how many of the force's entities were killed by enemies.\n- The electric network GUI shows \"power consumption\" on the left side, so in this case `input` describes the power consumption numbers.","methods":[{"name":"clear","order":6,"description":"Reset all the statistics data to 0.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_flow_count","order":4,"description":"Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.\n\nUse `sample_index` to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.\n\nAll return values are normalized to be per-tick for electric networks and per-minute for all other types.","parameters":[{"name":"count","order":4,"description":"If true, the count of items/fluids/entities is returned instead of the per-time-frame value.","type":"boolean","optional":true},{"name":"input","order":1,"description":"Read the input values or the output values","type":"boolean","optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false},{"name":"precision_index","order":2,"description":"The precision range to read.","type":"defines.flow_precision_index","optional":false},{"name":"sample_index","order":3,"description":"The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.","type":"uint16","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_input_count","order":0,"description":"Gets the total input count for a given prototype.","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false}]},{"name":"get_output_count","order":2,"description":"Gets the total output count for a given prototype.","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false}]},{"name":"help","order":7,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"on_flow","order":5,"description":"Adds a value to this flow statistics.","parameters":[{"name":"count","order":1,"description":"The count: positive or negative determines if the value goes in the input or output statistics.","type":"float","optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_input_count","order":1,"description":"Sets the total input count for a given prototype.","parameters":[{"name":"count","order":1,"description":"The new count. The type depends on the instance of the statistics.","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_output_count","order":3,"description":"Sets the total output count for a given prototype.","parameters":[{"name":"count","order":1,"description":"The new count. The type depends on the instance of the statistics.","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"force","order":2,"description":"The force these statistics belong to. `nil` for pollution statistics.","type":"LuaForce","optional":true,"read":true,"write":false},{"name":"input_counts","order":0,"description":"List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"union","options":["uint64","double"],"full_format":false}},"optional":false,"read":true,"write":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"output_counts","order":1,"description":"List of output counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for the given statistics.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"union","options":["uint64","double"],"full_format":false}},"optional":false,"read":true,"write":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaFluidBox","order":32,"description":"An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe. See [Fluid](Fluid).\n\nDo note that reading from a [LuaFluidBox](LuaFluidBox) creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.","examples":["Double the temperature of the fluid in `entity`'s first fluid box. \n```\nfluid = entity.fluidbox[1]\nfluid.temperature = fluid.temperature * 2\nentity.fluidbox[1] = fluid\n```"],"methods":[{"name":"flush","order":8,"description":"Flushes all fluid from this fluidbox and its fluid system.","parameters":[{"name":"fluid","order":1,"description":"If provided, only this fluid is flushed.","type":"FluidIdentification","optional":true},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The removed fluid.","type":{"complex_type":"dictionary","key":"string","value":"float"},"optional":false}]},{"name":"get_capacity","order":1,"description":"The capacity of the given fluidbox index.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_connections","order":2,"description":"The fluidboxes to which the fluidbox at the given index is connected.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaFluidBox"},"optional":false}]},{"name":"get_filter","order":3,"description":"Get a fluid box filter","parameters":[{"name":"index","order":0,"description":"The index of the filter to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The filter at the requested index, or `nil` if there isn't one.","type":"FluidBoxFilter","optional":true}]},{"name":"get_flow","order":5,"description":"Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.","notes":["Fluid wagons do not track it and will return 0."],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_fluid_system_id","order":7,"description":"Gets unique fluid system identifier of selected fluid box. May return nil for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid system","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_locked_fluid","order":6,"description":"Returns the fluid the fluidbox is locked onto","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the fluidbox is not locked to any fluid.","type":"string","optional":true}]},{"name":"get_prototype","order":0,"description":"The prototype of this fluidbox index.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaFluidBoxPrototype","optional":false}]},{"name":"help","order":9,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"set_filter","order":4,"description":"Set a fluid box filter.","notes":["Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines."],"parameters":[{"name":"filter","order":1,"description":"The filter to set. Setting `nil` clears the filter.","type":{"complex_type":"union","options":["FluidBoxFilterSpec","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index of the filter to set.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the filter was set successfully.","type":"boolean","optional":false}]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"owner","order":0,"description":"The entity that owns this fluidbox.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"index","order":1,"description":"Access, set or clear a fluid box. The index must always be in bounds (see [LuaFluidBox::length_operator](LuaFluidBox::length_operator)). New fluidboxes may not be added or removed using this operator.\n\nIs `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.","type":"Fluid","optional":true,"read":true,"write":false},{"name":"length","order":0,"description":"Number of fluid boxes.","type":"uint","optional":false,"read":true,"write":false}],"abstract":false},{"name":"LuaFluidBoxPrototype","order":33,"description":"A prototype of a fluidbox owned by some [LuaEntityPrototype](LuaEntityPrototype).","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"base_area","order":4,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"base_level","order":5,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"entity","order":0,"description":"The entity that this belongs to.","type":"LuaEntityPrototype","optional":false,"read":true,"write":false},{"name":"filter","order":8,"description":"The filter, if any is set.","type":"LuaFluidPrototype","optional":true,"read":true,"write":false},{"name":"height","order":6,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"index","order":1,"description":"The index of this fluidbox prototype in the owning entity.","type":"uint","optional":false,"read":true,"write":false},{"name":"maximum_temperature","order":10,"description":"The maximum temperature, if any is set.","type":"double","optional":true,"read":true,"write":false},{"name":"minimum_temperature","order":9,"description":"The minimum temperature, if any is set.","type":"double","optional":true,"read":true,"write":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"pipe_connections","order":2,"description":"The pipe connection points.","type":{"complex_type":"array","value":"FluidBoxConnection"},"optional":false,"read":true,"write":false},{"name":"production_type","order":3,"description":"The production type. \"input\", \"output\", \"input-output\", or \"none\".","type":"string","optional":false,"read":true,"write":false},{"name":"render_layer","order":12,"description":"The render layer.","type":"string","optional":false,"read":true,"write":false},{"name":"secondary_draw_orders","order":11,"description":"The secondary draw orders for the 4 possible connection directions.","type":{"complex_type":"array","value":"int"},"optional":false,"read":true,"write":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"volume","order":7,"description":"","type":"double","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaFluidEnergySourcePrototype","order":34,"description":"Prototype of a fluid energy source.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"burns_fluid","order":4,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"destroy_non_fuel_fluid","order":6,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"effectivity","order":3,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"emissions","order":0,"description":"The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","type":"double","optional":false,"read":true,"write":false},{"name":"fluid_box","order":10,"description":"The fluid box for this energy source.","type":"LuaFluidBoxPrototype","optional":false,"read":true,"write":false},{"name":"fluid_usage_per_tick","order":7,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"maximum_temperature","order":9,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":12,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"render_no_network_icon","order":1,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"render_no_power_icon","order":2,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"scale_fluid_usage","order":5,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"smoke","order":8,"description":"The smoke sources for this prototype, if any.","type":{"complex_type":"array","value":"SmokeSource"},"optional":false,"read":true,"write":false},{"name":"valid","order":11,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaFluidPrototype","order":35,"description":"Prototype of a fluid.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"base_color","order":9,"description":"","type":"Color","optional":false,"read":true,"write":false},{"name":"default_temperature","order":3,"description":"Default temperature of this fluid.","type":"double","optional":false,"read":true,"write":false},{"name":"emissions_multiplier","order":12,"description":"A multiplier on the amount of emissions produced when this fluid is burnt in a generator. A value above `1.0` increases emissions and vice versa. The multiplier can't be negative.","type":"double","optional":false,"read":true,"write":false},{"name":"flow_color","order":10,"description":"","type":"Color","optional":false,"read":true,"write":false},{"name":"fuel_value","order":13,"description":"The amount of energy in Joules one unit of this fluid will produce when burnt in a generator. A value of `0` means this fluid can't be used for energy generation. The value can't be negative.","type":"double","optional":false,"read":true,"write":false},{"name":"gas_temperature","order":11,"description":"The temperature above which this fluid will be shown as gaseous inside tanks and pipes.","type":"double","optional":false,"read":true,"write":false},{"name":"group","order":7,"description":"Group of this prototype.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"heat_capacity","order":5,"description":"The amount of energy in Joules required to heat one unit of this fluid by 1\u00b0C.","type":"double","optional":false,"read":true,"write":false},{"name":"hidden","order":14,"description":"Whether this fluid is hidden from the fluid and signal selectors.","type":"boolean","optional":false,"read":true,"write":false},{"name":"localised_description","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":1,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"max_temperature","order":4,"description":"Maximum temperature this fluid can reach.","type":"double","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":16,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":6,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"subgroup","order":8,"description":"Subgroup of this prototype.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"valid","order":15,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaFontPrototype","order":36,"description":"Prototype of a font.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"border","order":4,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"border_color","order":6,"description":"The border color, if any.","type":"Color","optional":true,"read":true,"write":false},{"name":"filtered","order":5,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"from","order":1,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"size","order":2,"description":"","type":"int","optional":false,"read":true,"write":false},{"name":"spacing","order":3,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaForce","order":37,"description":"`LuaForce` encapsulates data local to each \"force\" or \"faction\" of the game. Default forces are player, enemy and neutral. Players and mods can create additional forces (up to 64 total).","methods":[{"name":"add_chart_tag","order":39,"description":"Adds a custom chart tag to the given surface and returns the new tag or `nil` if the given position isn't valid for a chart tag.","notes":["The chunk must be charted for a tag to be valid at that location."],"raises":[{"name":"on_chart_tag_added","order":0,"description":"Raised if the chart tag was successfully added.","timeframe":"instantly","optional":true}],"parameters":[{"name":"surface","order":0,"description":"Which surface to add the tag to.","type":"SurfaceIdentification","optional":false},{"name":"tag","order":1,"description":"The tag to add.","type":"ChartTagSpec","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaCustomChartTag","optional":true}]},{"name":"add_research","order":48,"description":"Add this technology to the back of the research queue if the queue is enabled. Otherwise, set this technology to be researched now.","raises":[{"name":"on_research_started","order":0,"description":"Raised if the technology was successfully added.","timeframe":"instantly","optional":true}],"parameters":[{"name":"technology","order":0,"description":"","type":"TechnologyIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the technology was successfully added.","type":"boolean","optional":false}]},{"name":"cancel_charting","order":18,"description":"Cancels pending chart requests for the given surface or all surfaces.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"cancel_current_research","order":49,"description":"Stop the research currently in progress. This will remove any dependent technologies from the research queue.","parameters":[],"takes_table":false,"return_values":[]},{"name":"chart","order":12,"description":"Chart a portion of the map. The chart for the given area is refreshed; it creates chart for any parts of the given area that haven't been charted yet.","examples":["Charts a 2048x2048 rectangle centered around the origin. \n```\ngame.player.force.chart(game.player.surface, {{x = -1024, y = -1024}, {x = 1024, y = 1024}})\n```"],"parameters":[{"name":"area","order":1,"description":"The area on the given surface to chart.","type":"BoundingBox","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"chart_all","order":15,"description":"Chart all generated chunks.","parameters":[{"name":"surface","order":0,"description":"Which surface to chart or all if not given.","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"clear_chart","order":13,"description":"Erases chart data for this force.","parameters":[{"name":"surface","order":0,"description":"Which surface to erase chart data for or if not provided all surfaces charts are erased.","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"disable_all_prototypes","order":3,"description":"Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.","parameters":[],"takes_table":false,"return_values":[]},{"name":"disable_research","order":1,"description":"Disable research for this force.","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_all_prototypes","order":4,"description":"Enables all recipes and technologies. The opposite of [LuaForce::disable_all_prototypes](LuaForce::disable_all_prototypes)","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_all_recipes","order":6,"description":"Unlock all recipes.","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_all_technologies","order":7,"description":"Unlock all technologies.","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_research","order":2,"description":"Enable research for this force.","parameters":[],"takes_table":false,"return_values":[]},{"name":"find_chart_tags","order":40,"description":"Finds all custom chart tags within the given bounding box on the given surface.","parameters":[{"name":"area","order":1,"description":"","type":"BoundingBox","optional":true},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaCustomChartTag"},"optional":false}]},{"name":"find_logistic_network_by_position","order":31,"description":"","parameters":[{"name":"position","order":0,"description":"Position to find a network for","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"Surface to search on","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The found network or `nil`.","type":"LuaLogisticNetwork","optional":true}]},{"name":"get_ammo_damage_modifier","order":19,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_cease_fire","order":26,"description":"Is `other` force in this force's cease fire list?","parameters":[{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_entity_count","order":0,"description":"Count entities of given type.","notes":["This function has O(1) time complexity as entity counts are kept and maintained in the game engine."],"parameters":[{"name":"name","order":0,"description":"Prototype name of the entity.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Number of entities of given prototype belonging to this force.","type":"uint","optional":false}]},{"name":"get_friend","order":28,"description":"Is `other` force in this force's friends list.","parameters":[{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_gun_speed_modifier","order":21,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_hand_crafting_disabled_for_recipe","order":46,"description":"Gets if the given recipe is explicitly disabled from being hand crafted.","parameters":[{"name":"recipe","order":0,"description":"","type":{"complex_type":"union","options":["string","LuaRecipe"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_item_launched","order":35,"description":"Gets the count of a given item launched in rockets.","parameters":[{"name":"item","order":0,"description":"The item to get","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The count of the item that has been launched.","type":"uint","optional":false}]},{"name":"get_linked_inventory","order":50,"description":"Gets the linked inventory for the given prototype and link ID if it exists or `nil`.","parameters":[{"name":"link_id","order":1,"description":"","type":"uint","optional":false},{"name":"prototype","order":0,"description":"","type":"EntityPrototypeIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_saved_technology_progress","order":41,"description":"Gets the saved progress for the given technology or `nil` if there is no saved progress.","parameters":[{"name":"technology","order":0,"description":"The technology","type":"TechnologyIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The progress as a percent.","type":"double","optional":true}]},{"name":"get_spawn_position","order":33,"description":"","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"MapPosition","optional":false}]},{"name":"get_train_stops","order":45,"description":"Gets train stops matching the given filters.","parameters":[{"name":"name","order":0,"description":"The name(s) of the train stops. Not providing names will match any stop.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"surface","order":1,"description":"The surface to search. Not providing a surface will match stops on any surface.","type":"SurfaceIdentification","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_trains","order":38,"description":"","parameters":[{"name":"surface","order":0,"description":"The surface to search. Not providing a surface will match trains on any surface.","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTrain"},"optional":false}]},{"name":"get_turret_attack_modifier","order":23,"description":"","parameters":[{"name":"turret","order":0,"description":"Turret prototype name","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"help","order":53,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"is_chunk_charted","order":16,"description":"Has a chunk been charted?","parameters":[{"name":"position","order":1,"description":"Position of the chunk.","type":"ChunkPosition","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_chunk_visible","order":17,"description":"Is the given chunk currently charted and visible (not covered by fog of war) on the map.","parameters":[{"name":"position","order":1,"description":"","type":"ChunkPosition","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_enemy","order":52,"description":"Is this force an enemy? This differs from `get_cease_fire` in that it is always false for neutral force. This is equivalent to checking the `enemy` ForceCondition.","parameters":[{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_friend","order":51,"description":"Is this force a friend? This differs from `get_friend` in that it is always true for neutral force. This is equivalent to checking the `friend` ForceCondition.","parameters":[{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_pathfinder_busy","order":29,"description":"Is pathfinder busy? When the pathfinder is busy, it won't accept any more pathfinding requests.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"kill_all_units","order":30,"description":"Kill all units and flush the pathfinder.","parameters":[],"takes_table":false,"return_values":[]},{"name":"play_sound","order":44,"description":"Play a sound for every player in this force.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"print","order":37,"description":"Print text to the chat console of all players on this force.","notes":["Messages that are identical to a message sent in the last 60 ticks are not printed again."],"parameters":[{"name":"color","order":1,"description":"","type":"Color","optional":true},{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"rechart","order":14,"description":"Force a rechart of the whole chart.","parameters":[],"takes_table":false,"return_values":[]},{"name":"research_all_technologies","order":8,"description":"Research all technologies.","raises":[{"name":"on_research_finished","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"include_disabled_prototypes","order":0,"description":"Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.","type":"boolean","optional":true}],"takes_table":false,"return_values":[]},{"name":"reset","order":10,"description":"Reset everything. All technologies are set to not researched, all modifiers are set to default values.","raises":[{"name":"on_force_reset","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[],"takes_table":false,"return_values":[]},{"name":"reset_evolution","order":43,"description":"Resets evolution for this force to zero.","parameters":[],"takes_table":false,"return_values":[]},{"name":"reset_recipes","order":5,"description":"Load the original version of all recipes from the prototypes.","parameters":[],"takes_table":false,"return_values":[]},{"name":"reset_technologies","order":9,"description":"Load the original versions of technologies from prototypes. Preserves research state of technologies.","parameters":[],"takes_table":false,"return_values":[]},{"name":"reset_technology_effects","order":11,"description":"Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.","raises":[{"name":"on_technology_effects_reset","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[],"takes_table":false,"return_values":[]},{"name":"set_ammo_damage_modifier","order":20,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false},{"name":"modifier","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_cease_fire","order":25,"description":"Add `other` force to this force's cease fire list. Forces on the cease fire list won't be targeted for attack.","raises":[{"name":"on_force_cease_fire_changed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"cease_fire","order":1,"description":"","type":"boolean","optional":false},{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_friend","order":27,"description":"Add `other` force to this force's friends list. Friends have unrestricted access to buildings and turrets won't fire at them.","raises":[{"name":"on_force_friends_changed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"friend","order":1,"description":"","type":"boolean","optional":false},{"name":"other","order":0,"description":"","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_gun_speed_modifier","order":22,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false},{"name":"modifier","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_hand_crafting_disabled_for_recipe","order":47,"description":"Sets if the given recipe can be hand-crafted. This is used to explicitly disable hand crafting a recipe - it won't allow hand-crafting otherwise not hand-craftable recipes.","parameters":[{"name":"hand_crafting_disabled","order":1,"description":"","type":"boolean","optional":false},{"name":"recipe","order":0,"description":"","type":{"complex_type":"union","options":["string","LuaRecipe"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_item_launched","order":36,"description":"Sets the count of a given item launched in rockets.","parameters":[{"name":"count","order":1,"description":"The count to set","type":"uint","optional":false},{"name":"item","order":0,"description":"The item to set","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_saved_technology_progress","order":42,"description":"Sets the saved progress for the given technology. The technology must not be in progress, must not be completed, and the new progress must be < 100%.","parameters":[{"name":"progress","order":1,"description":"Progress as a percent. Set to `nil` to remove the saved progress.","type":"double","optional":false},{"name":"technology","order":0,"description":"The technology","type":"TechnologyIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_spawn_position","order":32,"description":"","parameters":[{"name":"position","order":0,"description":"The new position on the given surface.","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"Surface to set the spawn position for.","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_turret_attack_modifier","order":24,"description":"","parameters":[{"name":"modifier","order":1,"description":"","type":"double","optional":false},{"name":"turret","order":0,"description":"Turret prototype name","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"unchart_chunk","order":34,"description":"","parameters":[{"name":"position","order":0,"description":"The chunk position to unchart.","type":"ChunkPosition","optional":false},{"name":"surface","order":1,"description":"Surface to unchart on.","type":"SurfaceIdentification","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"ai_controllable","order":20,"description":"Enables some higher-level AI behaviour for this force. When set to `true`, biters belonging to this force will automatically expand into new territories, build new spawners, and form unit groups. By default, this value is `true` for the enemy force and `false` for all others.","notes":["Setting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.","It is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"artillery_range_modifier","order":27,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"character_build_distance_bonus","order":28,"description":"","type":"uint","optional":false,"read":true,"write":true},{"name":"character_health_bonus","order":36,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"character_inventory_slots_bonus","order":34,"description":"the number of additional inventory slots the character main inventory has.","type":"uint","optional":false,"read":true,"write":true},{"name":"character_item_drop_distance_bonus","order":29,"description":"","type":"uint","optional":false,"read":true,"write":true},{"name":"character_item_pickup_distance_bonus","order":32,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"character_logistic_requests","order":44,"description":"`true` if character requester logistics is enabled.","type":"boolean","optional":false,"read":true,"write":true},{"name":"character_loot_pickup_distance_bonus","order":33,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"character_reach_distance_bonus","order":30,"description":"","type":"uint","optional":false,"read":true,"write":true},{"name":"character_resource_reach_distance_bonus","order":31,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"character_running_speed_modifier","order":26,"description":"Modifies the running speed of all characters in this force by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.","type":"double","optional":false,"read":true,"write":true},{"name":"character_trash_slot_count","order":15,"description":"Number of character trash slots.","type":"double","optional":false,"read":true,"write":true},{"name":"color","order":61,"description":"Effective color of this force.","type":"Color","optional":false,"read":true,"write":false},{"name":"connected_players","order":47,"description":"The connected players belonging to this force.\n\nThis is primarily useful when you want to do some action against all online players of this force.","notes":["This does *not* index using player index. See [LuaPlayer::index](LuaPlayer::index) on each player instance for the player index."],"type":{"complex_type":"array","value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"current_research","order":10,"description":"The currently ongoing technology research, if any.","type":"LuaTechnology","optional":true,"read":true,"write":false},{"name":"custom_color","order":60,"description":"Custom color for this force. If specified, will take priority over other sources of the force color. Writing nil clears custom color. Will return nil if it was not specified or if was set to {0,0,0,0}","type":"Color","optional":true,"read":true,"write":true},{"name":"deconstruction_time_to_live","order":35,"description":"The time, in ticks, before a deconstruction order is removed.","type":"uint","optional":false,"read":true,"write":true},{"name":"entity_build_count_statistics","order":25,"description":"The entity build statistics for this force (built and mined)","type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"evolution_factor","order":50,"description":"Evolution factor of this force.","type":"double","optional":false,"read":true,"write":true},{"name":"evolution_factor_by_killing_spawners","order":53,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"evolution_factor_by_pollution","order":51,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"evolution_factor_by_time","order":52,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"fluid_production_statistics","order":23,"description":"The fluid production statistics for this force.","type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"following_robots_lifetime_modifier","order":17,"description":"Additional lifetime for following robots.","type":"double","optional":false,"read":true,"write":true},{"name":"friendly_fire","order":54,"description":"If friendly fire is enabled for this force.","type":"boolean","optional":false,"read":true,"write":true},{"name":"ghost_time_to_live","order":18,"description":"The time, in ticks, before a placed ghost disappears.","type":"uint","optional":false,"read":true,"write":true},{"name":"index","order":57,"description":"Unique ID associated with this force.","type":"uint","optional":false,"read":true,"write":false},{"name":"inserter_stack_size_bonus","order":13,"description":"The inserter stack size bonus for non stack inserters","type":"double","optional":false,"read":true,"write":true},{"name":"item_production_statistics","order":22,"description":"The item production statistics for this force.","type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"items_launched","order":46,"description":"All of the items that have been launched in rockets. The attribute is a dictionary mapping the item prototype names to the launched amounts.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false,"read":true,"write":false},{"name":"kill_count_statistics","order":24,"description":"The kill counter statistics for this force.","type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"laboratory_productivity_bonus","order":6,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"laboratory_speed_modifier","order":5,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"logistic_networks","order":21,"description":"List of logistic networks, grouped by surface.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaLogisticNetwork"}},"optional":false,"read":true,"write":false},{"name":"manual_crafting_speed_modifier","order":4,"description":"Multiplier of the manual crafting speed. Default value is `0`. The actual crafting speed will be multiplied by `1 + manual_crafting_speed_modifier`.","examples":["Double the player's crafting speed \n```\ngame.player.force.manual_crafting_speed_modifier = 1\n```"],"type":"double","optional":false,"read":true,"write":true},{"name":"manual_mining_speed_modifier","order":3,"description":"Multiplier of the manual mining speed. Default value is `0`. The actual mining speed will be multiplied by `1 + manual_mining_speed_modifier`.","examples":["Double the player's mining speed \n```\ngame.player.force.manual_mining_speed_modifier = 1\n```"],"type":"double","optional":false,"read":true,"write":true},{"name":"max_failed_attempts_per_tick_per_construction_queue","order":38,"description":"","type":"uint","optional":false,"read":true,"write":true},{"name":"max_successful_attempts_per_tick_per_construction_queue","order":37,"description":"","type":"uint","optional":false,"read":true,"write":true},{"name":"maximum_following_robot_count","order":16,"description":"Maximum number of follower robots.","type":"uint","optional":false,"read":true,"write":true},{"name":"mining_drill_productivity_bonus","order":48,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"name","order":0,"description":"Name of the force.","examples":["Prints \"`player`\" \n```\ngame.player.print(game.player.force.name)\n```"],"type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":63,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"players","order":19,"description":"Players belonging to this force.","type":{"complex_type":"array","value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"previous_research","order":12,"description":"The previous research, if any.","type":"LuaTechnology","optional":true,"read":true,"write":true},{"name":"recipes","order":2,"description":"Recipes available to this force, indexed by `name`.","examples":["Prints the category of the given recipe \n```\ngame.player.print(game.player.force.recipes[\"transport-belt\"].category)\n```"],"type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipe"},"optional":false,"read":true,"write":false},{"name":"research_enabled","order":59,"description":"Whether research is enabled for this force, see [LuaForce::enable_research](LuaForce::enable_research) and [LuaForce::disable_research](LuaForce::disable_research)","type":"boolean","optional":false,"read":true,"write":false},{"name":"research_progress","order":11,"description":"Progress of current research, as a number in range [0, 1].","type":"double","optional":false,"read":true,"write":true},{"name":"research_queue","order":58,"description":"The research queue of this force. The first technology in the array is the currently active one. Reading this attribute gives an array of [LuaTechnology](LuaTechnology).\n\nTo write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research. Writing to this when the research queue is disabled will simply set the last research in the table as the current research.","notes":["This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead."],"type":{"complex_type":"array","value":"TechnologyIdentification"},"optional":false,"read":true,"write":true},{"name":"research_queue_enabled","order":56,"description":"Whether the research queue is available for this force.","type":"boolean","optional":false,"read":true,"write":true},{"name":"rockets_launched","order":45,"description":"The number of rockets launched.","type":"uint","optional":false,"read":true,"write":true},{"name":"share_chart","order":55,"description":"If sharing chart data is enabled for this force.","type":"boolean","optional":false,"read":true,"write":true},{"name":"stack_inserter_capacity_bonus","order":14,"description":"Number of items that can be transferred by stack inserters. When writing to this value, it must be >= 0 and <= 254.","type":"uint","optional":false,"read":true,"write":true},{"name":"technologies","order":1,"description":"Technologies owned by this force, indexed by `name`.","examples":["Researches the technology for the player's force \n```\ngame.player.force.technologies[\"steel-processing\"].researched = true\n```"],"type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnology"},"optional":false,"read":true,"write":false},{"name":"train_braking_force_bonus","order":49,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"valid","order":62,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"worker_robots_battery_modifier","order":8,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"worker_robots_speed_modifier","order":7,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"worker_robots_storage_bonus","order":9,"description":"","type":"double","optional":false,"read":true,"write":true},{"name":"zoom_to_world_blueprint_enabled","order":41,"description":"Ability to create new blueprints using empty blueprint item when using zoom-to-world.","type":"boolean","optional":false,"read":true,"write":true},{"name":"zoom_to_world_deconstruction_planner_enabled","order":42,"description":"Ability to use deconstruction planner when using zoom-to-world.","type":"boolean","optional":false,"read":true,"write":true},{"name":"zoom_to_world_enabled","order":39,"description":"Ability to use zoom-to-world on map.","type":"boolean","optional":false,"read":true,"write":true},{"name":"zoom_to_world_ghost_building_enabled","order":40,"description":"Ability to build ghosts through blueprint or direct ghost placement, or \"mine\" ghosts when using zoom-to-world.","type":"boolean","optional":false,"read":true,"write":true},{"name":"zoom_to_world_selection_tool_enabled","order":43,"description":"Ability to use custom selection tools when using zoom-to-world.","type":"boolean","optional":false,"read":true,"write":true}],"operators":[],"abstract":false},{"name":"LuaFuelCategoryPrototype","order":38,"description":"Prototype of a fuel category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaGameScript","order":39,"description":"Main toplevel type, provides access to most of the API though its members. An instance of LuaGameScript is available as the global object named `game`.","methods":[{"name":"auto_save","order":23,"description":"Instruct the game to perform an auto-save.","notes":["Only the server will save in multiplayer. In single player a standard auto-save is triggered."],"parameters":[{"name":"name","order":0,"description":"The autosave name if any. Saves will be named _autosave-*name* when provided.","type":"string","optional":true}],"takes_table":false,"return_values":[]},{"name":"ban_player","order":35,"description":"Bans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_banned","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to ban.","type":"PlayerIdentification","optional":false},{"name":"reason","order":1,"description":"The reason given if any.","type":"LocalisedString","optional":true}],"takes_table":false,"return_values":[]},{"name":"check_consistency","order":8,"description":"Run internal consistency checks. Allegedly prints any errors it finds.","notes":["Exists mainly for debugging reasons."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"check_prototype_translations","order":30,"description":"Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect.","notes":["Also prints true/false if called from the console."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"count_pipe_groups","order":40,"description":"Counts how many distinct groups of pipes exist in the world.","parameters":[],"takes_table":false,"return_values":[]},{"name":"create_force","order":19,"description":"Create a new force.","notes":["The game currently supports a maximum of 64 forces, including the three built-in forces. This means that a maximum of 61 new forces may be created.","Force names must be unique."],"raises":[{"name":"on_force_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"force","order":0,"description":"Name of the new force","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The force that was just created","type":"LuaForce","optional":false}]},{"name":"create_inventory","order":60,"description":"Creates an inventory that is not owned by any game object. It can be resized later with [LuaInventory::resize](LuaInventory::resize).","notes":["Make sure to destroy it when you are done with it using [LuaInventory::destroy](LuaInventory::destroy)."],"parameters":[{"name":"size","order":0,"description":"The number of slots the inventory initially has.","type":"uint16","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":false}]},{"name":"create_profiler","order":48,"description":"Creates a [LuaProfiler](LuaProfiler), which is used for measuring script performance.","notes":["LuaProfiler cannot be serialized."],"parameters":[{"name":"stopped","order":0,"description":"Create the timer stopped","type":"boolean","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaProfiler","optional":false}]},{"name":"create_random_generator","order":29,"description":"Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.","notes":["*Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...)."],"parameters":[{"name":"seed","order":0,"description":"","type":"uint","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaRandomGenerator","optional":false}]},{"name":"create_surface","order":21,"description":"Create a new surface.","notes":["The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.","Surface names must be unique."],"raises":[{"name":"on_surface_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"name","order":0,"description":"Name of the new surface.","type":"string","optional":false},{"name":"settings","order":1,"description":"Map generation settings.","type":"MapGenSettings","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"The surface that was just created.","type":"LuaSurface","optional":false}]},{"name":"decode_string","order":64,"description":"Base64 decodes and inflates the given string.","parameters":[{"name":"string","order":0,"description":"The string to decode.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The decoded string or `nil` if the decode failed.","type":"string","optional":true}]},{"name":"delete_surface","order":24,"description":"Deletes the given surface and all entities on it.","raises":[{"name":"on_pre_surface_deleted","order":0,"description":"","timeframe":"future_tick","optional":false},{"name":"on_surface_deleted","order":1,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"surface","order":0,"description":"The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.","type":{"complex_type":"union","options":["string","LuaSurface"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"direction_to_string","order":27,"description":"Converts the given direction into the string version of the direction.","parameters":[{"name":"direction","order":0,"description":"","type":"defines.direction","optional":false}],"takes_table":false,"return_values":[]},{"name":"disable_replay","order":25,"description":"Disables replay saving for the current save file. Once done there's no way to re-enable replay saving for the save file without loading an old save.","parameters":[],"takes_table":false,"return_values":[]},{"name":"disable_tutorial_triggers","order":26,"description":"Disables tutorial triggers, that unlock new tutorials and show notices about unlocked tutorials.","parameters":[],"takes_table":false,"return_values":[]},{"name":"encode_string","order":63,"description":"Deflates and base64 encodes the given string.","parameters":[{"name":"string","order":0,"description":"The string to encode.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The encoded string or `nil` if the encode failed.","type":"string","optional":true}]},{"name":"evaluate_expression","order":49,"description":"Evaluate an expression, substituting variables as provided. For details on the formula, see the relevant page on the [Factorio wiki](https://wiki.factorio.com/Prototype/Technology#unit).","examples":["Calculate the number of research units required to unlock mining productivity level 10. \n```\nlocal formula = game.forces[\"player\"].technologies[\"mining-productivity-4\"].research_unit_count_formula\nlocal units = game.evaluate_expression(formula, { L = 10, l = 10 })\n```"],"parameters":[{"name":"expression","order":0,"description":"The expression to evaluate.","type":"string","optional":false},{"name":"variables","order":1,"description":"Variables to be substituted.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"force_crc","order":18,"description":"Force a CRC check. Tells all peers to calculate their current map CRC; these CRC are then compared against each other. If a mismatch is detected, the game is desynced and some peers are forced to reconnect.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_active_entities_count","order":42,"description":"Gets the number of entities that are active (updated each tick).","notes":["This is very expensive to determine."],"parameters":[{"name":"surface","order":0,"description":"If given, only the entities active on this surface are counted.","type":"SurfaceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_entity_by_tag","order":2,"description":"","parameters":[{"name":"tag","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaEntity","optional":true}]},{"name":"get_filtered_achievement_prototypes","order":54,"description":"Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every achievement prototype that is not allowed to be completed on the peaceful difficulty setting. \n```\nlocal prototypes = game.get_filtered_achievement_prototypes{{filter=\"allowed-without-fight\", invert=true}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"AchievementPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAchievementPrototype"},"optional":false}]},{"name":"get_filtered_decorative_prototypes","order":56,"description":"Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every decorative prototype that is auto-placed. \n```\nlocal prototypes = game.get_filtered_decorative_prototypes{{filter=\"autoplace\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"DecorativePrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDecorativePrototype"},"optional":false}]},{"name":"get_filtered_entity_prototypes","order":50,"description":"Returns a dictionary of all LuaEntityPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every entity prototype that can craft recipes involving fluids in the way some assembling machines can. \n```\nlocal prototypes = game.get_filtered_entity_prototypes{{filter=\"crafting-category\", crafting_category=\"crafting-with-fluid\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"EntityPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEntityPrototype"},"optional":false}]},{"name":"get_filtered_equipment_prototypes","order":52,"description":"Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every equipment prototype that functions as a battery. \n```\nlocal prototypes = game.get_filtered_equipment_prototypes{{filter=\"type\", type=\"battery-equipment\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"EquipmentPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentPrototype"},"optional":false}]},{"name":"get_filtered_fluid_prototypes","order":57,"description":"Returns a dictionary of all LuaFluidPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every fluid prototype that has a heat capacity of exactly `100`. \n```\nlocal prototypes = game.get_filtered_fluid_prototypes{{filter=\"heat-capacity\", comparison=\"=\", value=100}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFluidPrototype"},"optional":false}]},{"name":"get_filtered_item_prototypes","order":51,"description":"Returns a dictionary of all LuaItemPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every item prototype that, when launched with a rocket, produces a result. \n```\nlocal prototypes = game.get_filtered_item_prototypes{{filter=\"has-rocket-launch-products\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaItemPrototype"},"optional":false}]},{"name":"get_filtered_mod_setting_prototypes","order":53,"description":"Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every mod setting prototype that belongs to the specified mod. \n```\nlocal prototypes = game.get_filtered_mod_setting_prototypes{{filter=\"mod\", mod=\"space-exploration\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"ModSettingPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModSettingPrototype"},"optional":false}]},{"name":"get_filtered_recipe_prototypes","order":58,"description":"Returns a dictionary of all LuaRecipePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every recipe prototype that takes less than half a second to craft (at crafting speed `1`). \n```\nlocal prototypes = game.get_filtered_recipe_prototypes{{filter=\"energy\", comparison=\"<\", value=0.5}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"RecipePrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipePrototype"},"optional":false}]},{"name":"get_filtered_technology_prototypes","order":59,"description":"Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every technology prototype that can be researched at the start of the game. \n```\nlocal prototypes = game.get_filtered_technology_prototypes{{filter=\"has-prerequisites\", invert=true}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"TechnologyPrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnologyPrototype"},"optional":false}]},{"name":"get_filtered_tile_prototypes","order":55,"description":"Returns a dictionary of all LuaTilePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["Get every tile prototype that improves a player's walking speed by at least 50%. \n```\nlocal prototypes = game.get_filtered_tile_prototypes{{filter=\"walking-speed-modifier\", comparison=\"\u2265\", value=1.5}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"TilePrototypeFilter"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTilePrototype"},"optional":false}]},{"name":"get_map_exchange_string","order":43,"description":"Gets the map exchange string for the map generation settings that were used to create this map.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_player","order":46,"description":"Gets the given player or returns `nil` if no player is found.","parameters":[{"name":"player","order":0,"description":"The player index or name.","type":{"complex_type":"union","options":["uint","string"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaPlayer","optional":true}]},{"name":"get_script_inventories","order":61,"description":"Gets the inventories created through [LuaGameScript::create_inventory](LuaGameScript::create_inventory)","notes":["Inventories created through console commands will be owned by `\"core\"`."],"parameters":[{"name":"mod","order":0,"description":"The mod who's inventories to get. If not provided all inventories are returned.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"A mapping of mod name to array of inventories owned by that mod.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaInventory"}},"optional":false}]},{"name":"get_surface","order":47,"description":"Gets the given surface or returns `nil` if no surface is found.","notes":["This is a shortcut for game.surfaces[...]"],"parameters":[{"name":"surface","order":0,"description":"The surface index or name.","type":{"complex_type":"union","options":["uint","string"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaSurface","optional":true}]},{"name":"get_train_stops","order":45,"description":"Gets train stops matching the given filters.","parameters":[{"name":"force","order":2,"description":"The force to search. Not providing a force will match stops in any force.","type":"ForceIdentification","optional":true},{"name":"name","order":0,"description":"The name(s) of the train stops. Not providing names will match any stop.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"surface","order":1,"description":"The surface to search. Not providing a surface will match stops on any surface.","type":"SurfaceIdentification","optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"is_demo","order":4,"description":"Is this the demo version of Factorio?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_multiplayer","order":41,"description":"Is the map loaded is multiplayer?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_valid_sound_path","order":32,"description":"Checks if the given SoundPath is valid.","parameters":[{"name":"sound_path","order":0,"description":"Path to the sound.","type":"SoundPath","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_valid_sprite_path","order":33,"description":"Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`.","parameters":[{"name":"sprite_path","order":0,"description":"Path to the image.","type":"SpritePath","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"json_to_table","order":14,"description":"Convert a JSON string to a table.","parameters":[{"name":"json","order":0,"description":"The string to convert.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The returned object, or `nil` if the JSON string was invalid.","type":"AnyBasic","optional":true}]},{"name":"kick_player","order":34,"description":"Kicks the given player from this multiplayer game. Does nothing if this is a single player game or if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_kicked","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to kick.","type":"PlayerIdentification","optional":false},{"name":"reason","order":1,"description":"The reason given if any.","type":"LocalisedString","optional":true}],"takes_table":false,"return_values":[]},{"name":"merge_forces","order":20,"description":"Marks two forces to be merged together. All players and entities in the source force will be reassigned to the target force. The source force will then be destroyed. Importantly, this does not merge technologies or bonuses, which are instead retained from the target force.","notes":["The three built-in forces (player, enemy and neutral) can't be destroyed, meaning they can't be used as the source argument to this function.","The source force is not removed until the end of the current tick, or if called during the [on_forces_merging](on_forces_merging) or [on_forces_merged](on_forces_merged) event, the end of the next tick."],"raises":[{"name":"on_forces_merged","order":1,"description":"","timeframe":"future_tick","optional":false},{"name":"on_forces_merging","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"destination","order":1,"description":"The force to reassign all entities to.","type":"ForceIdentification","optional":false},{"name":"source","order":0,"description":"The force to remove.","type":"ForceIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"mute_player","order":38,"description":"Mutes the given player. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_muted","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to mute.","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"parse_map_exchange_string","order":44,"description":"Convert a map exchange string to map gen settings and map settings.","parameters":[{"name":"map_exchange_string","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"MapExchangeStringData","optional":false}]},{"name":"play_sound","order":31,"description":"Play a sound for every player in the game.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"print","order":28,"description":"Print text to the chat console all players.","notes":["Messages that are identical to a message sent in the last 60 ticks are not printed again."],"parameters":[{"name":"color","order":1,"description":"","type":"Color","optional":true},{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"purge_player","order":37,"description":"Purges the given players messages from the game. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to purge.","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"regenerate_entity","order":9,"description":"Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities.","notes":["All specified entity prototypes must be autoplacable."],"parameters":[{"name":"entities","order":0,"description":"Prototype names of entity or entities to autoplace.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"reload_mods","order":6,"description":"Forces a reload of all mods.","notes":["This will act like saving and loading from the mod(s) perspective.","This will do nothing if run in multiplayer.","This disables the replay if replay is enabled."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"reload_script","order":5,"description":"Forces a reload of the scenario script from the original scenario location.","notes":["This disables the replay if replay is enabled."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"remove_offline_players","order":17,"description":"Remove players who are currently not connected from the map.","raises":[{"name":"on_player_removed","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_pre_player_removed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"players","order":0,"description":"List of players to remove. If not specified, remove all offline players.","type":{"complex_type":"array","value":{"complex_type":"union","options":["LuaPlayer","string"],"full_format":false}},"optional":true}],"takes_table":false,"return_values":[]},{"name":"remove_path","order":16,"description":"Remove a file or directory in the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). Can be used to remove files created by [LuaGameScript::write_file](LuaGameScript::write_file).","parameters":[{"name":"path","order":0,"description":"The path to the file or directory to remove, relative to `script-output`.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"reset_game_state","order":1,"description":"Reset scenario state (game_finished, player_won, etc.).","parameters":[],"takes_table":false,"return_values":[]},{"name":"reset_time_played","order":62,"description":"Resets the amount of time played for this map.","parameters":[],"takes_table":false,"return_values":[]},{"name":"save_atlas","order":7,"description":"Saves the current configuration of Atlas to a file. This will result in huge file containing all of the game graphics moved to as small space as possible.","notes":["Exists mainly for debugging reasons."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"server_save","order":22,"description":"Instruct the server to save the map.","parameters":[{"name":"name","order":0,"description":"Save name. If not specified, writes into the currently-running save.","type":"string","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_game_state","order":0,"description":"Set scenario state. Any parameters not provided do not change the current state.","parameters":[{"name":"can_continue","order":3,"description":"","type":"boolean","optional":true},{"name":"game_finished","order":0,"description":"","type":"boolean","optional":true},{"name":"next_level","order":2,"description":"","type":"string","optional":true},{"name":"player_won","order":1,"description":"","type":"boolean","optional":true},{"name":"victorious_force","order":4,"description":"","type":"ForceIdentification","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"set_wait_for_screenshots_to_finish","order":11,"description":"Forces the screenshot saving system to wait until all queued screenshots have been written to disk.","parameters":[],"takes_table":false,"return_values":[]},{"name":"show_message_dialog","order":3,"description":"Show an in-game message dialog.","notes":["Can only be used when the map contains exactly one player."],"parameters":[{"name":"image","order":1,"description":"Path to an image to show on the dialog","type":"string","optional":true},{"name":"point_to","order":2,"description":"If specified, dialog will show an arrow pointing to this place. When not specified, the arrow will point to the player's position. (Use `point_to={type=\"nowhere\"}` to remove the arrow entirely.) The dialog itself will be placed near the arrow's target.","type":"GuiArrowSpecification","optional":true},{"name":"style","order":3,"description":"The gui style to use for this speech bubble. Must be of type speech_bubble.","type":"string","optional":true},{"name":"text","order":0,"description":"What the dialog should say","type":"LocalisedString","optional":false},{"name":"wrapper_frame_style","order":4,"description":"Must be of type flow_style.","type":"string","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"table_to_json","order":13,"description":"Convert a table to a JSON string","parameters":[{"name":"data","order":0,"description":"","type":"table","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"take_screenshot","order":10,"description":"Take a screenshot of the game and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter.","notes":["If Factorio is running headless, this function will do nothing."],"parameters":[{"name":"allow_in_replay","order":12,"description":"Whether to save the screenshot even during replay playback. Defaults to `false`.","type":"boolean","optional":true},{"name":"anti_alias","order":10,"description":"Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.","type":"boolean","optional":true},{"name":"by_player","order":1,"description":"If defined, the screenshot will only be taken for this player.","type":"PlayerIdentification","optional":true},{"name":"daytime","order":13,"description":"Overrides the current surface daytime for the duration of screenshot rendering.","type":"double","optional":true},{"name":"force_render","order":15,"description":"Screenshot requests are processed in between game update and render. The game may skip rendering (ie. drop frames) if the previous frame has not finished rendering or the game simulation starts to fall below 60 updates per second. If `force_render` is set to `true`, the game won't drop frames and process the screenshot request at the end of the update in which the request was created. This is not honored on multiplayer clients that are catching up to server. Defaults to `false`.","type":"boolean","optional":true},{"name":"path","order":6,"description":"The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `\"save/here/screenshot.png\"`) will create the necessary folder structure in `script-output`. Defaults to `\"screenshot.png\"`.","type":"string","optional":true},{"name":"player","order":0,"description":"The player to focus on. Defaults to the local player.","type":"PlayerIdentification","optional":true},{"name":"position","order":3,"description":"If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.","type":"MapPosition","optional":true},{"name":"quality","order":11,"description":"The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.","type":"int","optional":true},{"name":"resolution","order":4,"description":"The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048).","type":"TilePosition","optional":true},{"name":"show_cursor_building_preview","order":9,"description":"When `true` and when `player` is specified, the building preview for the item in the player's cursor will also be rendered. Defaults to `false`.","type":"boolean","optional":true},{"name":"show_entity_info","order":8,"description":"Whether to include entity info (\"Alt mode\") or not. Defaults to `false`.","type":"boolean","optional":true},{"name":"show_gui","order":7,"description":"Whether to include GUIs in the screenshot or not. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":2,"description":"If defined, the screenshot will be taken on this surface.","type":"SurfaceIdentification","optional":true},{"name":"water_tick","order":14,"description":"Overrides the tick of water animation, if animated water is enabled.","type":"uint","optional":true},{"name":"zoom","order":5,"description":"The map zoom to take the screenshot at. Defaults to `1`.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"take_technology_screenshot","order":12,"description":"Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter.","parameters":[{"name":"by_player","order":2,"description":"If given, the screenshot will only be taken for this player.","type":"PlayerIdentification","optional":true},{"name":"force","order":0,"description":"The force whose technology to screenshot. If not given, the `\"player`\" force is used.","type":"ForceIdentification","optional":true},{"name":"path","order":1,"description":"The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `\"save/here/screenshot.png\"`) will create the necessary folder structure in `script-output`. Defaults to `\"technology-screenshot.png\"`.","type":"string","optional":true},{"name":"quality","order":5,"description":"The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.","type":"int","optional":true},{"name":"selected_technology","order":3,"description":"The technology to highlight.","type":"TechnologyIdentification","optional":true},{"name":"skip_disabled","order":4,"description":"If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"unban_player","order":36,"description":"Unbans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_unbanned","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to unban.","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"unmute_player","order":39,"description":"Unmutes the given player. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_unmuted","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to unmute.","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"write_file","order":15,"description":"Write a file to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name and file extension of the file can be specified via the `filename` parameter.","parameters":[{"name":"append","order":2,"description":"If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.","type":"boolean","optional":true},{"name":"data","order":1,"description":"The content to write to the file.","type":"LocalisedString","optional":false},{"name":"filename","order":0,"description":"The name of the file. Providing a directory path (ex. `\"save/here/example.txt\"`) will create the necessary folder structure in `script-output`.","type":"string","optional":false},{"name":"for_player","order":3,"description":"If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.","type":"uint","optional":true}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"achievement_prototypes","order":29,"description":"A dictionary containing every LuaAchievementPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAchievementPrototype"},"optional":false,"read":true,"write":false},{"name":"active_mods","order":46,"description":"The active mods versions. The keys are mod names, the values are the versions.","examples":["This will print the names and versions of active mods to player p's console. \n```\nfor name, version in pairs(game.active_mods) do\n  p.print(name .. \" version \" .. version)\nend\n```"],"type":{"complex_type":"dictionary","key":"string","value":"string"},"optional":false,"read":true,"write":false},{"name":"ammo_category_prototypes","order":23,"description":"A dictionary containing every LuaAmmoCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAmmoCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"autoplace_control_prototypes","order":19,"description":"A dictionary containing every LuaAutoplaceControlPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAutoplaceControlPrototype"},"optional":false,"read":true,"write":false},{"name":"autosave_enabled","order":52,"description":"True by default. Can be used to disable autosaving. Make sure to turn it back on soon after.","type":"boolean","optional":false,"read":true,"write":true},{"name":"backer_names","order":49,"description":"Array of the names of all the backers that supported the game development early on. These are used as names for labs, locomotives, radars, roboports, and train stops.","type":{"complex_type":"LuaCustomTable","key":"uint","value":"string"},"optional":false,"read":true,"write":false},{"name":"connected_players","order":47,"description":"The players that are currently online.\n\nThis is primarily useful when you want to do some action against all online players.","notes":["This does *not* index using player index. See [LuaPlayer::index](LuaPlayer::index) on each player instance for the player index."],"type":{"complex_type":"array","value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"custom_input_prototypes","order":22,"description":"A dictionary containing every LuaCustomInputPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaCustomInputPrototype"},"optional":false,"read":true,"write":false},{"name":"damage_prototypes","order":12,"description":"A dictionary containing every LuaDamagePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDamagePrototype"},"optional":false,"read":true,"write":false},{"name":"decorative_prototypes","order":17,"description":"A dictionary containing every LuaDecorativePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDecorativePrototype"},"optional":false,"read":true,"write":false},{"name":"default_map_gen_settings","order":50,"description":"The default map gen settings for this save.","type":"MapGenSettings","optional":false,"read":true,"write":false},{"name":"difficulty","order":5,"description":"Current scenario difficulty.","type":"defines.difficulty","optional":false,"read":true,"write":false},{"name":"difficulty_settings","order":4,"description":"The currently active set of difficulty settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game. This is however not recommended as different difficulties can have differing technology and recipe trees, which can cause problems for players.","examples":["This will set the technology price multiplier to 12. \n```\ngame.difficulty_settings.technology_price_multiplier = 12\n```"],"type":"DifficultySettings","optional":false,"read":true,"write":false},{"name":"draw_resource_selection","order":53,"description":"True by default. Can be used to disable the highlighting of resource patches when they are hovered on the map.","type":"boolean","optional":false,"read":true,"write":true},{"name":"enemy_has_vision_on_land_mines","order":51,"description":"Determines if enemy land mines are completely invisible or not.","type":"boolean","optional":false,"read":true,"write":true},{"name":"entity_prototypes","order":7,"description":"A dictionary containing every LuaEntityPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEntityPrototype"},"optional":false,"read":true,"write":false},{"name":"equipment_category_prototypes","order":31,"description":"A dictionary containing every LuaEquipmentCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"equipment_grid_prototypes","order":14,"description":"A dictionary containing every LuaEquipmentGridPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentGridPrototype"},"optional":false,"read":true,"write":false},{"name":"equipment_prototypes","order":11,"description":"A dictionary containing every LuaEquipmentPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentPrototype"},"optional":false,"read":true,"write":false},{"name":"finished","order":42,"description":"True while the victory screen is shown.","type":"boolean","optional":false,"read":true,"write":false},{"name":"finished_but_continuing","order":43,"description":"True after players finished the game and clicked \"continue\".","type":"boolean","optional":false,"read":true,"write":false},{"name":"fluid_prototypes","order":9,"description":"A dictionary containing every LuaFluidPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFluidPrototype"},"optional":false,"read":true,"write":false},{"name":"font_prototypes","order":35,"description":"A dictionary containing every LuaFontPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFontPrototype"},"optional":false,"read":true,"write":false},{"name":"forces","order":6,"description":"Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.","type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaForce"},"optional":false,"read":true,"write":false},{"name":"fuel_category_prototypes","order":27,"description":"A dictionary containing every LuaFuelCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFuelCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"item_group_prototypes","order":26,"description":"A dictionary containing every ItemGroup indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaGroup"},"optional":false,"read":true,"write":false},{"name":"item_prototypes","order":8,"description":"A dictionary containing every LuaItemPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaItemPrototype"},"optional":false,"read":true,"write":false},{"name":"item_subgroup_prototypes","order":25,"description":"A dictionary containing every ItemSubgroup indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaGroup"},"optional":false,"read":true,"write":false},{"name":"map_gen_presets","order":36,"description":"A dictionary containing every MapGenPreset indexed by `name`.","notes":["A MapGenPreset is an exact copy of the prototype table provided from the data stage."],"type":{"complex_type":"LuaCustomTable","key":"string","value":"MapGenPreset"},"optional":false,"read":true,"write":false},{"name":"map_settings","order":3,"description":"The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.","notes":["This does not contain difficulty settings, use [LuaGameScript::difficulty_settings](LuaGameScript::difficulty_settings) instead."],"type":"MapSettings","optional":false,"read":true,"write":false},{"name":"max_beacon_supply_area_distance","order":59,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_electric_pole_connection_distance","order":58,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_electric_pole_supply_area_distance","order":57,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"max_force_distraction_chunk_distance","order":56,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"max_force_distraction_distance","order":55,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_gate_activation_distance","order":60,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_inserter_reach_distance","order":61,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_pipe_to_ground_distance","order":62,"description":"","type":"uint8","optional":false,"read":true,"write":false},{"name":"max_underground_belt_distance","order":63,"description":"","type":"uint8","optional":false,"read":true,"write":false},{"name":"mod_setting_prototypes","order":21,"description":"A dictionary containing every LuaModSettingPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModSettingPrototype"},"optional":false,"read":true,"write":false},{"name":"module_category_prototypes","order":30,"description":"A dictionary containing every LuaModuleCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModuleCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"named_noise_expressions","order":24,"description":"A dictionary containing every LuaNamedNoiseExpression indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaNamedNoiseExpression"},"optional":false,"read":true,"write":false},{"name":"noise_layer_prototypes","order":20,"description":"A dictionary containing every LuaNoiseLayerPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaNoiseLayerPrototype"},"optional":false,"read":true,"write":false},{"name":"object_name","order":0,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false},{"name":"particle_prototypes","order":18,"description":"A dictionary containing every LuaParticlePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaParticlePrototype"},"optional":false,"read":true,"write":false},{"name":"permissions","order":48,"description":"","type":"LuaPermissionGroups","optional":false,"read":true,"write":false},{"name":"player","order":1,"description":"This property is only populated inside [custom command](LuaCommandProcessor) handlers and when writing [Lua console commands](https://wiki.factorio.com/Console#Scripting_and_cheat_commands). Returns the player that is typing the command, `nil` in all other instances.\n\nSee [LuaGameScript::players](LuaGameScript::players) for accessing all players.","type":"LuaPlayer","optional":true,"read":true,"write":false},{"name":"players","order":2,"description":"Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.\n\nIf only a single player is required, [LuaGameScript::get_player](LuaGameScript::get_player) should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua.","type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"pollution_statistics","order":54,"description":"The pollution statistics for this map.","type":"LuaFlowStatistics","optional":false,"read":true,"write":false},{"name":"recipe_category_prototypes","order":34,"description":"A dictionary containing every LuaRecipeCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipeCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"recipe_prototypes","order":15,"description":"A dictionary containing every LuaRecipePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipePrototype"},"optional":false,"read":true,"write":false},{"name":"resource_category_prototypes","order":28,"description":"A dictionary containing every LuaResourceCategoryPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaResourceCategoryPrototype"},"optional":false,"read":true,"write":false},{"name":"shortcut_prototypes","order":33,"description":"A dictionary containing every LuaShortcutPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaShortcutPrototype"},"optional":false,"read":true,"write":false},{"name":"speed","order":44,"description":"Speed to update the map at. 1.0 is normal speed -- 60 UPS.","notes":["Minimum value is 0.01."],"type":"float","optional":false,"read":true,"write":true},{"name":"styles","order":37,"description":"The styles that [LuaGuiElement](LuaGuiElement) can use, indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"string"},"optional":false,"read":true,"write":false},{"name":"surfaces","order":45,"description":"Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.","type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaSurface"},"optional":false,"read":true,"write":false},{"name":"technology_prototypes","order":16,"description":"A dictionary containing every [LuaTechnologyPrototype](LuaTechnologyPrototype) indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnologyPrototype"},"optional":false,"read":true,"write":false},{"name":"tick","order":38,"description":"Current map tick.","type":"uint","optional":false,"read":true,"write":false},{"name":"tick_paused","order":40,"description":"If the tick has been paused. This means that entity update has been paused.","type":"boolean","optional":false,"read":true,"write":true},{"name":"ticks_played","order":39,"description":"The number of ticks since this game was 'created'. A game is 'created' either by using \"new game\" or \"new game from scenario\".","notes":["This differs over [LuaGameScript::tick](LuaGameScript::tick) in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the [LuaGameScript::tick](LuaGameScript::tick) is > 0.","This value has no relation with [LuaGameScript::tick](LuaGameScript::tick) and can be completely different values."],"type":"uint","optional":false,"read":true,"write":false},{"name":"ticks_to_run","order":41,"description":"The number of ticks to be run while the tick is paused. When [LuaGameScript::tick_paused](LuaGameScript::tick_paused) is true, ticks_to_run behaves the following way: While this is > 0, the entity update is running normally and this value is decremented every tick. When this reaches 0, the game will pause again.","type":"uint","optional":false,"read":true,"write":true},{"name":"tile_prototypes","order":10,"description":"A dictionary containing every LuaTilePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTilePrototype"},"optional":false,"read":true,"write":false},{"name":"trivial_smoke_prototypes","order":32,"description":"A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTrivialSmokePrototype"},"optional":false,"read":true,"write":false},{"name":"virtual_signal_prototypes","order":13,"description":"A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaVirtualSignalPrototype"},"optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaGenericOnOffControlBehavior","order":40,"description":"An abstract base class for behaviors that support switching the entity on or off based on some condition.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_condition","order":1,"description":"The circuit condition. Writing `nil` clears the circuit condition.","examples":["Tell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 chain signals. \n```\na_behavior.circuit_condition = {condition={comparator=\">\",\n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"},\n                                           constant=4}}\n```"],"type":"CircuitConditionDefinition","optional":false,"read":true,"write":true},{"name":"connect_to_logistic_network","order":3,"description":"`true` if this should connect to the logistic network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"disabled","order":0,"description":"If the entity is currently disabled because of the control behavior.","type":"boolean","optional":false,"read":true,"write":false},{"name":"logistic_condition","order":2,"description":"The logistic condition. Writing `nil` clears the logistic condition.","examples":["Tell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more than four chain signals. \n```\na_behavior.logistic_condition = {condition={comparator=\">\",\n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"},\n                                            constant=4}}\n```"],"type":"CircuitConditionDefinition","optional":false,"read":true,"write":true},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":true,"base_classes":["LuaControlBehavior"]},{"name":"LuaGroup","order":41,"description":"Item group or subgroup.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"group","order":3,"description":"The parent group, if any.","type":"LuaGroup","optional":true,"read":true,"write":false},{"name":"localised_name","order":1,"description":"Localised name of the group.","type":"LocalisedString","optional":true,"read":true,"write":false},{"name":"name","order":0,"description":"","type":"string","optional":true,"read":true,"write":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":6,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"order_in_recipe","order":5,"description":"The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.","type":"string","optional":true,"read":true,"write":false},{"name":"subgroups","order":4,"description":"Subgroups of this group. Can only be used on groups, not on subgroups.","type":{"complex_type":"array","value":"LuaGroup"},"optional":true,"read":true,"write":false},{"name":"type","order":2,"description":"","type":"string","optional":true,"read":true,"write":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaGui","order":42,"description":"The root of the GUI. This type houses the root elements, `top`, `left`, `center`, `goal`, and `screen`, to which other elements can be added to be displayed on screen.","notes":["Every player can have a different GUI state."],"methods":[{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"is_valid_sprite_path","order":0,"description":"Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.\n\nIf you want to avoid needing a LuaGui object, [LuaGameScript::is_valid_sprite_path](LuaGameScript::is_valid_sprite_path) can be used instead.","parameters":[{"name":"sprite_path","order":0,"description":"Path to a image.","type":"SpritePath","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"center","order":4,"description":"The center part of the GUI. It is a flow element.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"children","order":1,"description":"The children GUI elements mapped by name <> element.","type":{"complex_type":"dictionary","key":"string","value":"LuaGuiElement"},"optional":false,"read":true,"write":false},{"name":"goal","order":5,"description":"The flow used in the objectives window. It is a flow element. The objectives window is only visible when the flow is not empty or the objective text is set.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"left","order":3,"description":"The left part of the GUI. It is a flow element inside a scroll pane element.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"player","order":0,"description":"The player who owns this gui.","type":"LuaPlayer","optional":false,"read":true,"write":false},{"name":"relative","order":7,"description":"For showing a GUI somewhere relative to one of the game GUIs. It is an empty-widget element.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"screen","order":6,"description":"For showing a GUI somewhere on the entire screen. It is an empty-widget element.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"top","order":2,"description":"The top part of the GUI. It is a flow element inside a scroll pane element.","type":"LuaGuiElement","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaGuiElement","order":43,"description":"An element of a custom GUI. This type is used to represent any kind of a GUI element - labels, buttons and frames are all instances of this type. Just like [LuaEntity](LuaEntity), different kinds of elements support different attributes; attempting to access an attribute on an element that doesn't support it (for instance, trying to access the `column_count` of a `textfield`) will result in a runtime error.\n\nThe following types of GUI element are supported:\n\n- `\"button\"`: A clickable element. Relevant event: [on_gui_click](on_gui_click)\n- `\"sprite-button\"`: A `button` that displays a sprite rather than text. Relevant event: [on_gui_click](on_gui_click)\n- `\"checkbox\"`: A clickable element with a check mark that can be turned off or on. Relevant event: [on_gui_checked_state_changed](on_gui_checked_state_changed)\n- `\"flow\"`: An invisible container that lays out its children either horizontally or vertically.\n- `\"frame\"`: A non-transparent box that contains other elements. It can have a title (set via the `caption` attribute). Just like a `flow`, it lays out its children either horizontally or vertically. Relevant event: [on_gui_location_changed](on_gui_location_changed)\n- `\"label\"`: A piece of text.\n- `\"line\"`: A horizontal or vertical separation line.\n- `\"progressbar\"`: A partially filled bar that can be used to indicate progress.\n- `\"table\"`: An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains.\n- `\"textfield\"`: A single-line box the user can type into. Relevant events: [on_gui_text_changed](on_gui_text_changed), [on_gui_confirmed](on_gui_confirmed)\n- `\"radiobutton\"`: A clickable element that is functionally identical to a `checkbox`, but has a circular appearance. Relevant event: [on_gui_checked_state_changed](on_gui_checked_state_changed)\n- `\"sprite\"`: An element that shows an image.\n- `\"scroll-pane\"`: An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars.\n- `\"drop-down\"`: A drop-down containing strings of text. Relevant event: [on_gui_selection_state_changed](on_gui_selection_state_changed)\n- `\"list-box\"`: A list of strings, only one of which can be selected at a time. Shows a scroll bar if necessary. Relevant event: [on_gui_selection_state_changed](on_gui_selection_state_changed)\n- `\"camera\"`: A camera that shows the game at the given position on the given surface. It can visually track an [entity](LuaGuiElement::entity) that is set after the element has been created.\n- `\"choose-elem-button\"`: A button that lets the player pick from a certain kind of prototype, with optional filtering. Relevant event: [on_gui_elem_changed](on_gui_elem_changed)\n- `\"text-box\"`: A multi-line `textfield`. Relevant event: [on_gui_text_changed](on_gui_text_changed)\n- `\"slider\"`: A horizontal number line which can be used to choose a number. Relevant event: [on_gui_value_changed](on_gui_value_changed)\n- `\"minimap\"`: A minimap preview, similar to the normal player minimap. It can visually track an [entity](LuaGuiElement::entity) that is set after the element has been created.\n- `\"entity-preview\"`: A preview of an entity. The [entity](LuaGuiElement::entity) has to be set after the element has been created.\n- `\"empty-widget\"`: An empty element that just exists. The root GUI elements `screen` and `relative` are `empty-widget`s.\n- `\"tabbed-pane\"`: A collection of `tab`s and their contents. Relevant event: [on_gui_selected_tab_changed](on_gui_selected_tab_changed)\n- `\"tab\"`: A tab for use in a `tabbed-pane`.\n- `\"switch\"`: A switch with three possible states. Can have labels attached to either side. Relevant event: [on_gui_switch_state_changed](on_gui_switch_state_changed)\n\nEach GUI element allows access to its children by having them as attributes. Thus, one can use the `parent.child` syntax to refer to children. Lua also supports the `parent[\"child\"]` syntax to refer to the same element. This can be used in cases where the child has a name that isn't a valid Lua identifier.","examples":["This will add a label called `greeting` to the top flow. Immediately after, it will change its text to illustrate accessing child elements. \n```\ngame.player.gui.top.add{type=\"label\", name=\"greeting\", caption=\"Hi\"}\ngame.player.gui.top.greeting.caption = \"Hello there!\"\ngame.player.gui.top[\"greeting\"].caption = \"Actually, never mind, I don't like your face\"\n```","This will add a tabbed-pane and 2 tabs with contents. \n```\nlocal tabbed_pane = game.player.gui.top.add{type=\"tabbed-pane\"}\nlocal tab1 = tabbed_pane.add{type=\"tab\", caption=\"Tab 1\"}\nlocal tab2 = tabbed_pane.add{type=\"tab\", caption=\"Tab 2\"}\nlocal label1 = tabbed_pane.add{type=\"label\", caption=\"Label 1\"}\nlocal label2 = tabbed_pane.add{type=\"label\", caption=\"Label 2\"}\ntabbed_pane.add_tab(tab1, label1)\ntabbed_pane.add_tab(tab2, label2)\n```"],"methods":[{"name":"add","order":0,"description":"Add a new child element to this GuiElement.","parameters":[{"name":"anchor","order":10,"description":"Where to position the child element when in the `relative` element.","type":"GuiAnchor","optional":true},{"name":"caption","order":2,"description":"Text displayed on the child element. For frames, this is their title. For other elements, like buttons or labels, this is the content. Whilst this attribute may be used on all elements, it doesn't make sense for tables and flows as they won't display it.","type":"LocalisedString","optional":true},{"name":"enabled","order":4,"description":"Whether the child element is enabled. Defaults to `true`.","type":"boolean","optional":true},{"name":"ignored_by_interaction","order":6,"description":"Whether the child element is ignored by interaction. Defaults to `false`.","type":"boolean","optional":true},{"name":"index","order":9,"description":"Location in its parent that the child element should slot into. By default, the child will be appended onto the end.","type":"uint","optional":true},{"name":"name","order":1,"description":"Name of the child element. It must be unique within the parent element.","type":"string","optional":true},{"name":"style","order":7,"description":"The name of the style prototype to apply to the new element.","type":"string","optional":true},{"name":"tags","order":8,"description":"[Tags](Tags) associated with the child element.","type":"Tags","optional":true},{"name":"tooltip","order":3,"description":"Tooltip of the child element.","type":"LocalisedString","optional":true},{"name":"type","order":0,"description":"The kind of element to add. Has to be one of the GUI element types listed at the top of this page.","type":"string","optional":false},{"name":"visible","order":5,"description":"Whether the child element is visible. Defaults to `true`.","type":"boolean","optional":true}],"variant_parameter_groups":[{"name":"button","order":0,"parameters":[{"name":"mouse_button_filter","order":0,"description":"Which mouse buttons the button responds to. Defaults to `\"left-and-right\"`.","type":"MouseButtonFlags","optional":true}]},{"name":"camera","order":14,"parameters":[{"name":"position","order":0,"description":"The position the camera centers on.","type":"MapPosition","optional":false},{"name":"surface_index","order":1,"description":"The surface that the camera will render. Defaults to the player's current surface.","type":"uint","optional":true},{"name":"zoom","order":2,"description":"The initial camera zoom. Defaults to `0.75`.","type":"double","optional":true}]},{"name":"checkbox","order":6,"parameters":[{"name":"state","order":0,"description":"The initial checked-state of the checkbox.","type":"boolean","optional":false}]},{"name":"choose-elem-button","order":15,"parameters":[{"name":"achievement","order":9,"description":"If type is `\"achievement\"` - the default value for the button.","type":"string","optional":true},{"name":"decorative","order":7,"description":"If type is `\"decorative\"` - the default value for the button.","type":"string","optional":true},{"name":"elem_filters","order":12,"description":"Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.","type":"PrototypeFilter","optional":true},{"name":"elem_type","order":0,"description":"The type of the button - one of the following values.","type":"string","optional":false},{"name":"entity","order":3,"description":"If type is `\"entity\"` - the default value for the button.","type":"string","optional":true},{"name":"equipment","order":10,"description":"If type is `\"equipment\"` - the default value for the button.","type":"string","optional":true},{"name":"fluid","order":5,"description":"If type is `\"fluid\"` - the default value for the button.","type":"string","optional":true},{"name":"item","order":1,"description":"If type is `\"item\"` - the default value for the button.","type":"string","optional":true},{"name":"item-group","order":8,"description":"If type is `\"item-group\"` - the default value for the button.","type":"string","optional":true},{"name":"recipe","order":6,"description":"If type is `\"recipe\"` - the default value for the button.","type":"string","optional":true},{"name":"signal","order":4,"description":"If type is `\"signal\"` - the default value for the button.","type":"SignalID","optional":true},{"name":"technology","order":11,"description":"If type is `\"technology\"` - the default value for the button.","type":"string","optional":true},{"name":"tile","order":2,"description":"If type is `\"tile\"` - the default value for the button.","type":"string","optional":true}]},{"name":"drop-down","order":11,"parameters":[{"name":"items","order":0,"description":"The initial items in the dropdown.","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"selected_index","order":1,"description":"The index of the initially selected item. Defaults to 0.","type":"uint","optional":true}]},{"name":"flow","order":1,"parameters":[{"name":"direction","order":0,"description":"The initial direction of the flow's layout. See [LuaGuiElement::direction](LuaGuiElement::direction). Defaults to `\"horizontal\"`.","type":"string","optional":true}]},{"name":"frame","order":2,"parameters":[{"name":"direction","order":0,"description":"The initial direction of the frame's layout. See [LuaGuiElement::direction](LuaGuiElement::direction). Defaults to `\"horizontal\"`.","type":"string","optional":true}]},{"name":"line","order":12,"parameters":[{"name":"direction","order":0,"description":"The initial direction of the line. Defaults to `\"horizontal\"`.","type":"string","optional":true}]},{"name":"list-box","order":13,"parameters":[{"name":"items","order":0,"description":"The initial items in the listbox.","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"selected_index","order":1,"description":"The index of the initially selected item. Defaults to 0.","type":"uint","optional":true}]},{"name":"minimap","order":18,"parameters":[{"name":"chart_player_index","order":2,"description":"The player index the map should use. Defaults to the current player.","type":"uint","optional":true},{"name":"force","order":3,"description":"The force this minimap should use. Defaults to the player's current force.","type":"string","optional":true},{"name":"position","order":0,"description":"The position the minimap centers on. Defaults to the player's current position.","type":"MapPosition","optional":true},{"name":"surface_index","order":1,"description":"The surface the camera will render. Defaults to the player's current surface.","type":"uint","optional":true},{"name":"zoom","order":4,"description":"The initial camera zoom. Defaults to `0.75`.","type":"double","optional":true}]},{"name":"progressbar","order":5,"parameters":[{"name":"value","order":0,"description":"The initial value of the progressbar, in the range [0, 1]. Defaults to `0`.","type":"double","optional":true}]},{"name":"radiobutton","order":7,"parameters":[{"name":"state","order":0,"description":"The initial checked-state of the radiobutton.","type":"boolean","optional":false}]},{"name":"scroll-pane","order":10,"parameters":[{"name":"horizontal_scroll_policy","order":0,"description":"Policy of the horizontal scroll bar. Possible values are `\"auto\"`, `\"never\"`, `\"always\"`, `\"auto-and-reserve-space\"`, `\"dont-show-but-allow-scrolling\"`. Defaults to `\"auto\"`.","type":"string","optional":true},{"name":"vertical_scroll_policy","order":1,"description":"Policy of the vertical scroll bar. Possible values are `\"auto\"`, `\"never\"`, `\"always\"`, `\"auto-and-reserve-space\"`, `\"dont-show-but-allow-scrolling\"`. Defaults to `\"auto\"`.","type":"string","optional":true}]},{"name":"slider","order":17,"parameters":[{"name":"discrete_slider","order":4,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"discrete_values","order":5,"description":"Defaults to `true`.","type":"boolean","optional":true},{"name":"maximum_value","order":1,"description":"The maximum value for the slider. Defaults to `30`.","type":"double","optional":true},{"name":"minimum_value","order":0,"description":"The minimum value for the slider. Defaults to `0`.","type":"double","optional":true},{"name":"value","order":2,"description":"The initial value for the slider. Defaults to `minimum_value`.","type":"double","optional":true},{"name":"value_step","order":3,"description":"The minimum value the slider can move. Defaults to `1`.","type":"double","optional":true}]},{"name":"sprite","order":9,"parameters":[{"name":"resize_to_sprite","order":1,"description":"Whether the widget should resize according to the sprite in it. Defaults to `true`.","type":"boolean","optional":true},{"name":"sprite","order":0,"description":"Path to the image to display.","type":"SpritePath","optional":true}]},{"name":"sprite-button","order":8,"parameters":[{"name":"clicked_sprite","order":2,"description":"Path to the image to display on the button when it is clicked.","type":"SpritePath","optional":true},{"name":"hovered_sprite","order":1,"description":"Path to the image to display on the button when it is hovered.","type":"SpritePath","optional":true},{"name":"mouse_button_filter","order":5,"description":"The mouse buttons that the button responds to. Defaults to `\"left-and-right\"`.","type":"MouseButtonFlags","optional":true},{"name":"number","order":3,"description":"The number shown on the button.","type":"double","optional":true},{"name":"show_percent_for_small_numbers","order":4,"description":"Formats small numbers as percentages. Defaults to `false`.","type":"boolean","optional":true},{"name":"sprite","order":0,"description":"Path to the image to display on the button.","type":"SpritePath","optional":true}]},{"name":"switch","order":20,"parameters":[{"name":"allow_none_state","order":1,"description":"Whether the switch can be set to a middle state. Defaults to `false`.","type":"boolean","optional":true},{"name":"left_label_caption","order":2,"description":"","type":"LocalisedString","optional":true},{"name":"left_label_tooltip","order":3,"description":"","type":"LocalisedString","optional":true},{"name":"right_label_caption","order":4,"description":"","type":"LocalisedString","optional":true},{"name":"right_label_tooltip","order":5,"description":"","type":"LocalisedString","optional":true},{"name":"switch_state","order":0,"description":"Possible values are `\"left\"`, `\"right\"`, or `\"none\"`. If set to \"none\", `allow_none_state` must be `true`. Defaults to `\"left\"`.","type":"string","optional":true}]},{"name":"tab","order":19,"parameters":[{"name":"badge_text","order":0,"description":"The text to display after the normal tab text (designed to work with numbers).","type":"LocalisedString","optional":true}]},{"name":"table","order":3,"parameters":[{"name":"column_count","order":0,"description":"Number of columns. This can't be changed after the table is created.","type":"uint","optional":false},{"name":"draw_horizontal_line_after_headers","order":3,"description":"Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`.","type":"boolean","optional":true},{"name":"draw_horizontal_lines","order":2,"description":"Whether the table should draw horizontal grid lines. Defaults to `false`.","type":"boolean","optional":true},{"name":"draw_vertical_lines","order":1,"description":"Whether the table should draw vertical grid lines. Defaults to `false`.","type":"boolean","optional":true},{"name":"vertical_centering","order":4,"description":"Whether the content of the table should be vertically centered. Defaults to `true`.","type":"boolean","optional":true}]},{"name":"text-box","order":16,"parameters":[{"name":"clear_and_focus_on_right_click","order":1,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The initial text contained in the text-box.","type":"string","optional":true}]},{"name":"textfield","order":4,"parameters":[{"name":"allow_decimal","order":2,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"allow_negative","order":3,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"clear_and_focus_on_right_click","order":6,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"is_password","order":4,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"lose_focus_on_confirm","order":5,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"numeric","order":1,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The initial text contained in the textfield.","type":"string","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:","takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The GUI element that was added.","type":"LuaGuiElement","optional":false}]},{"name":"add_item","order":9,"description":"Inserts a string at the end or at the given index of this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":1,"description":"The index at which to insert the item.","type":"uint","optional":true},{"name":"string","order":0,"description":"The text to insert.","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_tab","order":28,"description":"Adds the given tab and content widgets to this tabbed pane as a new tab.","subclasses":["tabbed-pane"],"parameters":[{"name":"content","order":1,"description":"The content to show when this tab is selected. Can be any type of GUI element.","type":"LuaGuiElement","optional":false},{"name":"tab","order":0,"description":"The tab to add, must be a GUI element of type \"tab\".","type":"LuaGuiElement","optional":false}],"takes_table":false,"return_values":[]},{"name":"bring_to_front","order":32,"description":"Moves this GUI element to the \"front\" so it will draw over other elements.","notes":["Only works for elements in [LuaGui::screen](LuaGui::screen)"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear","order":1,"description":"Remove children of this element. Any [LuaGuiElement](LuaGuiElement) objects referring to the destroyed elements become invalid after this operation.","examples":["```\ngame.player.gui.top.clear()\n```"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_items","order":6,"description":"Removes the items in this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"close_dropdown","order":33,"description":"Closes the dropdown list if this is a dropdown and it is open.","parameters":[],"takes_table":false,"return_values":[]},{"name":"destroy","order":2,"description":"Remove this element, along with its children. Any [LuaGuiElement](LuaGuiElement) objects referring to the destroyed elements become invalid after this operation.","notes":["The top-level GUI elements - [LuaGui::top](LuaGui::top), [LuaGui::left](LuaGui::left), [LuaGui::center](LuaGui::center) and [LuaGui::screen](LuaGui::screen) - can't be destroyed."],"examples":["```\ngame.player.gui.top.greeting.destroy()\n```"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"focus","order":20,"description":"Focuses this GUI element if possible.","parameters":[],"takes_table":false,"return_values":[]},{"name":"force_auto_center","order":30,"description":"Forces this frame to re-auto-center. Only works on frames stored directly in [LuaGui::screen](LuaGui::screen).","raises":[{"name":"on_gui_location_changed","order":0,"description":"","timeframe":"future_tick","optional":false}],"subclasses":["frame"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"get_index_in_parent","order":4,"description":"Gets the index that this element has in its parent element.","notes":["This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_item","order":7,"description":"Gets the item at the given index from this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index to get","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"get_mod","order":3,"description":"The mod that owns this Gui element or `nil` if it's owned by the scenario script.","notes":["This has a not-super-expensive, but non-free cost to get."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"get_slider_discrete_slider","order":15,"description":"Returns whether this slider only allows being moved to discrete positions.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_slider_discrete_values","order":16,"description":"Returns whether this slider only allows discrete values.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_slider_maximum","order":12,"description":"Gets this sliders maximum value.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_slider_minimum","order":11,"description":"Gets this sliders minimum value.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_slider_value_step","order":14,"description":"Gets the minimum distance this slider can move.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"help","order":34,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"remove_item","order":10,"description":"Removes the item at the given index from this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"remove_tab","order":29,"description":"Removes the given tab and its associated content from this tabbed pane.","notes":["Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.","When removing tabs, [LuaGuiElement::selected_tab_index](LuaGuiElement::selected_tab_index) needs to be manually updated."],"subclasses":["tabbed-pane"],"parameters":[{"name":"tab","order":0,"description":"The tab to remove. If not given, it removes all tabs.","type":"LuaGuiElement","optional":false}],"takes_table":false,"return_values":[]},{"name":"scroll_to_bottom","order":22,"description":"Scrolls this scroll bar to the bottom.","subclasses":["scroll-pane","text-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"scroll_to_element","order":25,"description":"Scrolls this scroll bar such that the specified GUI element is visible to the player.","subclasses":["scroll-pane"],"parameters":[{"name":"element","order":0,"description":"The element to scroll to.","type":"LuaGuiElement","optional":false},{"name":"scroll_mode","order":1,"description":"Where the element should be positioned in the scroll-pane. Must be either `\"in-view\"` or `\"top-third\"`. Defaults to `\"in-view\"`.","type":"string","optional":true}],"takes_table":false,"return_values":[]},{"name":"scroll_to_item","order":31,"description":"Scrolls the scroll bar such that the specified listbox item is visible to the player.","subclasses":["list-box"],"parameters":[{"name":"index","order":0,"description":"The item index to scroll to.","type":"int","optional":false},{"name":"scroll_mode","order":1,"description":"Where the item should be positioned in the list-box. Must be either `\"in-view\"` or `\"top-third\"`. Defaults to `\"in-view\"`.","type":"string","optional":true}],"takes_table":false,"return_values":[]},{"name":"scroll_to_left","order":23,"description":"Scrolls this scroll bar to the left.","subclasses":["scroll-pane","text-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"scroll_to_right","order":24,"description":"Scrolls this scroll bar to the right.","subclasses":["scroll-pane","text-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"scroll_to_top","order":21,"description":"Scrolls this scroll bar to the top.","subclasses":["scroll-pane","text-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"select","order":27,"description":"Selects a range of text in this textbox.","examples":["Select the characters `amp` from `example`: \n```\ntextbox.select(3, 5)\n```","Move the cursor to the start of the text box: \n```\ntextbox.select(1, 0)\n```"],"subclasses":["textfield","text-box"],"parameters":[{"name":"end","order":1,"description":"The index of the last character to select","type":"int","optional":false},{"name":"start","order":0,"description":"The index of the first character to select","type":"int","optional":false}],"takes_table":false,"return_values":[]},{"name":"select_all","order":26,"description":"Selects all the text in this textbox.","subclasses":["textfield","text-box"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"set_item","order":8,"description":"Sets the given string at the given index in this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index whose text to replace.","type":"uint","optional":false},{"name":"string","order":1,"description":"The text to set at the given index.","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_slider_discrete_slider","order":18,"description":"Sets whether this slider only allows being moved to discrete positions.","parameters":[{"name":"value","order":0,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_slider_discrete_values","order":19,"description":"Sets whether this slider only allows discrete values.","parameters":[{"name":"value","order":0,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_slider_minimum_maximum","order":13,"description":"Sets this sliders minimum and maximum values.","notes":["The minimum can't be >= the maximum."],"parameters":[{"name":"maximum","order":1,"description":"","type":"double","optional":false},{"name":"minimum","order":0,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_slider_value_step","order":17,"description":"Sets the minimum distance this slider can move.","notes":["The minimum distance can't be > (max - min)."],"parameters":[{"name":"value","order":0,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"swap_children","order":5,"description":"Swaps the children at the given indices in this element.","parameters":[{"name":"index_1","order":0,"description":"The index of the first child.","type":"uint","optional":false},{"name":"index_2","order":1,"description":"The index of the second child.","type":"uint","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"allow_decimal","order":51,"description":"Whether this textfield (when in numeric mode) allows decimal numbers.","subclasses":["textfield"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"allow_negative","order":52,"description":"Whether this textfield (when in numeric mode) allows negative numbers.","subclasses":["textfield"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"allow_none_state","order":63,"description":"Whether the `\"none\"` state is allowed for this switch.","notes":["This can't be set to false if the current switch_state is 'none'."],"subclasses":["switch"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"anchor","order":60,"description":"The anchor for this relative widget, if any. Setting `nil` clears the anchor.","type":"GuiAnchor","optional":true,"read":true,"write":true},{"name":"auto_center","order":27,"description":"Whether this frame auto-centers on window resize when stored in [LuaGui::screen](LuaGui::screen).","subclasses":["frame"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"badge_text","order":28,"description":"The text to display after the normal tab text (designed to work with numbers)","subclasses":["tab"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"caption","order":4,"description":"The text displayed on this element. For frames, this is the \"heading\". For other elements, like buttons or labels, this is the content.","notes":["Whilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it."],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"children","order":21,"description":"The child-elements of this GUI element.","type":{"complex_type":"array","value":"LuaGuiElement"},"optional":false,"read":true,"write":false},{"name":"children_names","order":10,"description":"Names of all the children of this element. These are the identifiers that can be used to access the child as an attribute of this element.","type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":false},{"name":"clear_and_focus_on_right_click","order":55,"description":"Makes it so right-clicking on this textfield clears and focuses it.","subclasses":["textfield","text-box"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"clicked_sprite","order":16,"description":"The sprite to display on this sprite-button when it is clicked.","subclasses":["sprite-button"],"type":"SpritePath","optional":false,"read":true,"write":true},{"name":"column_count","order":46,"description":"The number of columns in this table.","subclasses":["table"],"type":"uint","optional":false,"read":true,"write":false},{"name":"direction","order":6,"description":"Direction of this element's layout. May be either `\"horizontal\"` or `\"vertical\"`.","subclasses":["frame","flow","line"],"type":"string","optional":false,"read":true,"write":false},{"name":"drag_target","order":56,"description":"The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level.","notes":["Only top-level elements in [LuaGui::screen](LuaGui::screen) can be `drag_target`s."],"examples":["This creates a frame that contains a dragging handle which can move the frame. \n```\nlocal frame = player.gui.screen.add{type=\"frame\", direction=\"vertical\"}\nlocal dragger = frame.add{type=\"empty-widget\", style=\"draggable_space\"}\ndragger.style.size = {128, 24}\ndragger.drag_target = frame\n```"],"subclasses":["flow","frame","label","table","empty-widget"],"type":"LuaGuiElement","optional":true,"read":true,"write":true},{"name":"draw_horizontal_line_after_headers","order":45,"description":"Whether this table should draw a horizontal grid line below the first table row.","subclasses":["table"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"draw_horizontal_lines","order":44,"description":"Whether this table should draw horizontal grid lines.","subclasses":["table"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"draw_vertical_lines","order":43,"description":"Whether this table should draw vertical grid lines.","subclasses":["table"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"elem_filters","order":36,"description":"The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`.","notes":["Writing to this field does not change or clear the currently selected element."],"examples":["This will configure a choose-elem-button of type `\"entity\"` to only show items of type `\"furnace\"`. \n```\nbutton.elem_filters = {{filter = \"type\", type = \"furnace\"}}\n```","Then, there are some types of filters that work on a specific kind of attribute. The following will configure a choose-elem-button of type `\"entity\"` to only show entities that have their `\"hidden\"` [flags](EntityPrototypeFlags) set. \n```\nbutton.elem_filters = {{filter = \"hidden\"}}\n```","Lastly, these filters can be combined at will, taking care to specify how they should be combined (either `\"and\"` or `\"or\"`. The following will filter for any `\"entities\"` that are `\"furnaces\"` and that are not `\"hidden\"`. \n```\nbutton.elem_filters = {{filter = \"type\", type = \"furnace\"}, {filter = \"hidden\", invert = true, mode = \"and\"}}\n```"],"subclasses":["choose-elem-button"],"type":"PrototypeFilter","optional":true,"read":true,"write":true},{"name":"elem_type","order":34,"description":"The elem type of this choose-elem-button.","subclasses":["choose-elem-button"],"type":"string","optional":false,"read":true,"write":false},{"name":"elem_value","order":35,"description":"The elem value of this choose-elem-button, if any.","notes":["The `\"signal\"` type operates with [SignalID](SignalID), while all other types use strings."],"subclasses":["choose-elem-button"],"type":{"complex_type":"union","options":["string","SignalID"],"full_format":false},"optional":true,"read":true,"write":true},{"name":"enabled","order":40,"description":"Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked.","type":"boolean","optional":false,"read":true,"write":true},{"name":"entity","order":59,"description":"The entity associated with this entity-preview, camera, minimap, if any.","subclasses":["entity-preview","camera","minimap"],"type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"force","order":33,"description":"The force this minimap is using, if any.","subclasses":["minimap"],"type":"string","optional":true,"read":true,"write":true},{"name":"gui","order":1,"description":"The GUI this element is a child of.","type":"LuaGui","optional":false,"read":true,"write":false},{"name":"horizontal_scroll_policy","order":18,"description":"Policy of the horizontal scroll bar. Possible values are `\"auto\"`, `\"never\"`, `\"always\"`, `\"auto-and-reserve-space\"`, `\"dont-show-but-allow-scrolling\"`.","subclasses":["scroll-pane"],"type":"string","optional":false,"read":true,"write":true},{"name":"hovered_sprite","order":15,"description":"The sprite to display on this sprite-button when it is hovered.","subclasses":["sprite-button"],"type":"SpritePath","optional":false,"read":true,"write":true},{"name":"ignored_by_interaction","order":41,"description":"Whether this GUI element is ignored by interaction. This makes clicks on this element 'go through' to the GUI element or even the game surface below it.","type":"boolean","optional":false,"read":true,"write":true},{"name":"index","order":0,"description":"The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).","type":"uint","optional":false,"read":true,"write":false},{"name":"is_password","order":53,"description":"Whether this textfield displays as a password field, which renders all characters as `*`.","subclasses":["textfield"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"items","order":22,"description":"The items in this dropdown or listbox.","subclasses":["drop-down","list-box"],"type":{"complex_type":"array","value":"LocalisedString"},"optional":false,"read":true,"write":true},{"name":"left_label_caption","order":64,"description":"The text shown for the left switch label.","subclasses":["switch"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"left_label_tooltip","order":65,"description":"The tooltip shown on the left switch label.","subclasses":["switch"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"location","order":26,"description":"The location of this widget when stored in [LuaGui::screen](LuaGui::screen). `nil` if not set or not in [LuaGui::screen](LuaGui::screen).","type":"GuiLocation","optional":true,"read":true,"write":true},{"name":"locked","order":42,"description":"Whether this choose-elem-button can be changed by the player.","subclasses":["choose-elem-button"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"lose_focus_on_confirm","order":54,"description":"Whether this textfield loses focus after [defines.events.on_gui_confirmed](defines.events.on_gui_confirmed) is fired.","subclasses":["textfield"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"minimap_player_index","order":32,"description":"The player index this minimap is using.","subclasses":["minimap"],"type":"uint","optional":false,"read":true,"write":true},{"name":"mouse_button_filter","order":49,"description":"The mouse button filters for this button or sprite-button.","subclasses":["button","sprite-button"],"type":"MouseButtonFlags","optional":false,"read":true,"write":true},{"name":"name","order":3,"description":"The name of this element. `\"\"` if no name was set.","examples":["```\ngame.player.gui.top.greeting.name == \"greeting\"\n```"],"type":"string","optional":false,"read":true,"write":true},{"name":"number","order":24,"description":"The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.","subclasses":["sprite-button"],"type":"double","optional":false,"read":true,"write":true},{"name":"numeric","order":50,"description":"Whether this textfield is limited to only numberic characters.","subclasses":["textfield"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":69,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"parent","order":2,"description":"The direct parent of this element. `nil` if this is a top-level element.","type":"LuaGuiElement","optional":true,"read":true,"write":false},{"name":"player_index","order":12,"description":"Index into [LuaGameScript::players](LuaGameScript::players) specifying the player who owns this element.","type":"uint","optional":false,"read":true,"write":false},{"name":"position","order":29,"description":"The position this camera or minimap is focused on, if any.","subclasses":["camera","minimap"],"type":"MapPosition","optional":false,"read":true,"write":true},{"name":"read_only","order":39,"description":"Whether this text-box is read-only. Defaults to `false`.","subclasses":["text-box"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"resize_to_sprite","order":14,"description":"Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.","subclasses":["sprite"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"right_label_caption","order":66,"description":"The text shown for the right switch label.","subclasses":["switch"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"right_label_tooltip","order":67,"description":"The tooltip shown on the right switch label.","subclasses":["switch"],"type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"selectable","order":37,"description":"Whether the contents of this text-box are selectable. Defaults to `true`.","subclasses":["text-box"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"selected_index","order":23,"description":"The selected index for this dropdown or listbox. Returns `0` if none is selected.","subclasses":["drop-down","list-box"],"type":"uint","optional":false,"read":true,"write":true},{"name":"selected_tab_index","order":57,"description":"The selected tab index for this tabbed pane, if any.","subclasses":["tabbed-pane"],"type":"uint","optional":true,"read":true,"write":true},{"name":"show_percent_for_small_numbers","order":25,"description":"Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.","subclasses":["sprite-button"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"slider_value","order":48,"description":"The value of this slider element.","subclasses":["slider"],"type":"double","optional":false,"read":true,"write":true},{"name":"sprite","order":13,"description":"The sprite to display on this sprite-button or sprite in the default state.","subclasses":["sprite-button","sprite"],"type":"SpritePath","optional":false,"read":true,"write":true},{"name":"state","order":11,"description":"Is this checkbox or radiobutton checked?","subclasses":["checkbox","radiobutton"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"style","order":7,"description":"The style of this element. When read, this evaluates to a [LuaStyle](LuaStyle). For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style.","type":{"complex_type":"union","options":["LuaStyle","string"],"full_format":false},"optional":false,"read":true,"write":true},{"name":"surface_index","order":30,"description":"The surface index this camera or minimap is using.","subclasses":["camera","minimap"],"type":"uint","optional":false,"read":true,"write":true},{"name":"switch_state","order":62,"description":"The switch state (left, none, right) for this switch.","notes":["If [LuaGuiElement::allow_none_state](LuaGuiElement::allow_none_state) is false this can't be set to `\"none\"`."],"subclasses":["switch"],"type":"string","optional":false,"read":true,"write":true},{"name":"tabs","order":58,"description":"The tabs and contents being shown in this tabbed-pane.","subclasses":["tabbed-pane"],"type":{"complex_type":"array","value":"TabAndContent"},"optional":false,"read":true,"write":false},{"name":"tags","order":61,"description":"The tags associated with this LuaGuiElement.","type":"Tags","optional":false,"read":true,"write":true},{"name":"text","order":9,"description":"The text contained in this textfield or text-box.","subclasses":["textfield","text-box"],"type":"string","optional":false,"read":true,"write":true},{"name":"tooltip","order":17,"description":"","type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"type","order":20,"description":"The type of this GUI element.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":68,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"value","order":5,"description":"How much this progress bar is filled. It is a value in the range [0, 1].","subclasses":["progressbar"],"type":"double","optional":false,"read":true,"write":true},{"name":"vertical_centering","order":47,"description":"Whether the content of this table should be vertically centered. Overrides [LuaStyle::column_alignments](LuaStyle::column_alignments). Defaults to `true`.","subclasses":["table"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"vertical_scroll_policy","order":19,"description":"Policy of the vertical scroll bar. Possible values are `\"auto\"`, `\"never\"`, `\"always\"`, `\"auto-and-reserve-space\"`, `\"dont-show-but-allow-scrolling\"`.","subclasses":["scroll-pane"],"type":"string","optional":false,"read":true,"write":true},{"name":"visible","order":8,"description":"Sets whether this GUI element is visible or completely hidden, taking no space in the layout.","type":"boolean","optional":false,"read":true,"write":true},{"name":"word_wrap","order":38,"description":"Whether this text-box will word-wrap automatically. Defaults to `false`.","subclasses":["text-box"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"zoom","order":31,"description":"The zoom this camera or minimap is using. This value must be positive.","subclasses":["camera","minimap"],"type":"double","optional":false,"read":true,"write":true}],"operators":[{"name":"index","order":0,"description":"The indexing operator. Gets children by name.","type":"LuaGuiElement","optional":true,"read":true,"write":false}],"abstract":false},{"name":"LuaHeatBufferPrototype","order":44,"description":"Prototype of a heat buffer.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"connections","order":7,"description":"","type":{"complex_type":"array","value":"HeatConnection"},"optional":false,"read":true,"write":false},{"name":"default_temperature","order":1,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_temperature","order":0,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_transfer","order":3,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"min_temperature_gradient","order":4,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"min_working_temperature","order":5,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"minimum_glow_temperature","order":6,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"specific_heat","order":2,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaHeatEnergySourcePrototype","order":45,"description":"Prototype of a heat energy source.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"connections","order":10,"description":"","type":{"complex_type":"array","value":"HeatConnection"},"optional":false,"read":true,"write":false},{"name":"default_temperature","order":4,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"emissions","order":0,"description":"The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","type":"double","optional":false,"read":true,"write":false},{"name":"heat_buffer_prototype","order":11,"description":"","type":"LuaHeatBufferPrototype","optional":false,"read":true,"write":false},{"name":"max_temperature","order":3,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"max_transfer","order":6,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"min_temperature_gradient","order":7,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"min_working_temperature","order":8,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"minimum_glow_temperature","order":9,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"render_no_network_icon","order":1,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"render_no_power_icon","order":2,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"specific_heat","order":5,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaInserterControlBehavior","order":46,"description":"Control behavior for inserters.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_hand_read_mode","order":2,"description":"The hand read mode for the inserter.","type":"defines.control_behavior.inserter.hand_read_mode","optional":false,"read":true,"write":true},{"name":"circuit_mode_of_operation","order":1,"description":"The circuit mode of operations for the inserter.","type":"defines.control_behavior.inserter.circuit_mode_of_operation","optional":false,"read":true,"write":true},{"name":"circuit_read_hand_contents","order":0,"description":"`true` if the contents of the inserter hand should be sent to the circuit network","type":"boolean","optional":false,"read":true,"write":true},{"name":"circuit_set_stack_size","order":3,"description":"If the stack size of the inserter is set through the circuit network or not.","type":"boolean","optional":false,"read":true,"write":true},{"name":"circuit_stack_control_signal","order":4,"description":"The signal used to set the stack size of the inserter.","type":"SignalID","optional":false,"read":true,"write":true},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaGenericOnOffControlBehavior"]},{"name":"LuaInventory","order":47,"description":"A storage of item stacks.","methods":[{"name":"can_insert","order":1,"description":"Can at least some items be inserted?","parameters":[{"name":"items","order":0,"description":"Items that would be inserted.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if at least a part of the given items could be inserted into this inventory.","type":"boolean","optional":false}]},{"name":"can_set_filter","order":13,"description":"If the given inventory slot filter can be set to the given filter.","parameters":[{"name":"filter","order":1,"description":"The item name of the filter","type":"string","optional":false},{"name":"index","order":0,"description":"The item stack index","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":0,"description":"Make this inventory empty.","parameters":[],"takes_table":false,"return_values":[]},{"name":"count_empty_stacks","order":18,"description":"Counts the number of empty stacks.","parameters":[{"name":"include_bar","order":1,"description":"If true, slots blocked by the current bar will be included. Defaults to true.","type":"boolean","optional":true},{"name":"include_filtered","order":0,"description":"If true, filtered slots will be included. Defaults to false.","type":"boolean","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"destroy","order":22,"description":"Destroys this inventory.","notes":["Only inventories created by [LuaGameScript::create_inventory](LuaGameScript::create_inventory) can be destroyed this way."],"parameters":[],"takes_table":false,"return_values":[]},{"name":"find_empty_stack","order":17,"description":"Finds the first empty stack. Filtered slots are excluded unless a filter item is given.","parameters":[{"name":"item","order":0,"description":"If given, empty stacks that are filtered for this item will be included.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"The first empty stack, or `nil` if there aren't any empty stacks.","type":"LuaItemStack","optional":true},{"order":1,"description":"The stack index of the matching stack, if any is found.","type":"uint","optional":true}]},{"name":"find_item_stack","order":16,"description":"Finds the first LuaItemStack in the inventory that matches the given item name.","parameters":[{"name":"item","order":0,"description":"The item name to find","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The first matching stack, or `nil` if none match.","type":"LuaItemStack","optional":true},{"order":1,"description":"The stack index of the matching stack, if any is found.","type":"uint","optional":true}]},{"name":"get_bar","order":9,"description":"Get the current bar. This is the index at which the red area starts.","notes":["Only useable if this inventory supports having a bar."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_contents","order":7,"description":"Get counts of all items in this inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The counts, indexed by item names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_filter","order":14,"description":"Gets the filter for the given item stack index.","parameters":[{"name":"index","order":0,"description":"The item stack index","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The current filter or `nil` if none.","type":"string","optional":true}]},{"name":"get_insertable_count","order":19,"description":"Gets the number of the given item that can be inserted into this inventory.","notes":["This is a \"best guess\" number; things like assembling machine filtered slots, module slots, items with durability, and items with mixed health will cause the result to be inaccurate.","The main use for this is in checking how many of a basic item can fit into a basic inventory.","This accounts for the 'bar' on the inventory."],"parameters":[{"name":"item","order":0,"description":"The item to check.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"get_item_count","order":4,"description":"Get the number of all or some items in this inventory.","parameters":[{"name":"item","order":0,"description":"Prototype name of the item to count. If not specified, count all items.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"help","order":23,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"insert","order":2,"description":"Insert items into this inventory.","parameters":[{"name":"items","order":0,"description":"Items to insert.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items actually inserted.","type":"uint","optional":false}]},{"name":"is_empty","order":5,"description":"Does this inventory contain nothing?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_filtered","order":12,"description":"If this inventory supports filters and has at least 1 filter set.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_full","order":6,"description":"Is every stack in this inventory full? Ignores stacks blocked by the current bar.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove","order":3,"description":"Remove items from this inventory.","parameters":[{"name":"items","order":0,"description":"Items to remove.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]},{"name":"resize","order":21,"description":"Resizes the inventory.","notes":["Items in slots beyond the new capacity are deleted.","Only inventories created by [LuaGameScript::create_inventory](LuaGameScript::create_inventory) can be resized."],"raises":[{"name":"on_pre_script_inventory_resized","order":0,"description":"","timeframe":"instantly","optional":false},{"name":"on_script_inventory_resized","order":1,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"size","order":0,"description":"New size of a inventory","type":"uint16","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_bar","order":10,"description":"Set the current bar.","notes":["Only useable if this inventory supports having a bar."],"parameters":[{"name":"bar","order":0,"description":"The new limit. Omitting this parameter will clear the limit.","type":"uint","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_filter","order":15,"description":"Sets the filter for the given item stack index.","notes":["Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo)."],"parameters":[{"name":"filter","order":1,"description":"The new filter. `nil` erases any existing filter.","type":{"complex_type":"union","options":["string","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The item stack index.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"If the filter was allowed to be set.","type":"boolean","optional":false}]},{"name":"sort_and_merge","order":20,"description":"Sorts and merges the items in this inventory.","parameters":[],"takes_table":false,"return_values":[]},{"name":"supports_bar","order":8,"description":"Does this inventory support a bar? Bar is the draggable red thing, found for example on chests, that limits the portion of the inventory that may be manipulated by machines.","notes":["\"Supporting a bar\" doesn't mean that the bar is set to some nontrivial value. Supporting a bar means the inventory supports having this limit at all. The character's inventory is an example of an inventory without a bar; the wooden chest's inventory is an example of one with a bar."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"supports_filters","order":11,"description":"If this inventory supports filters.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"entity_owner","order":1,"description":"The entity that owns this inventory, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"equipment_owner","order":3,"description":"The equipment that owns this inventory, if any.","type":"LuaEquipment","optional":true,"read":true,"write":false},{"name":"index","order":0,"description":"The inventory index this inventory uses, if any.","type":"defines.inventory","optional":true,"read":true,"write":false},{"name":"mod_owner","order":4,"description":"The mod that owns this inventory, if any.","type":"string","optional":true,"read":true,"write":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"player_owner","order":2,"description":"The player that owns this inventory, if any.","type":"LuaPlayer","optional":true,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"index","order":1,"description":"The indexing operator.","examples":["Will get the first item in the player's inventory. \n```\ngame.player.get_main_inventory()[1]\n```"],"type":"LuaItemStack","optional":false,"read":true,"write":false},{"name":"length","order":0,"description":"Get the number of slots in this inventory.","examples":["Will print the number of slots in the player's main inventory. \n```\ngame.player.print(#game.player.get_main_inventory())\n```"],"type":"uint","optional":false,"read":true,"write":false}],"abstract":false},{"name":"LuaItemPrototype","order":48,"description":"Prototype of an item.","examples":["```\ngame.item_prototypes[\"iron-plate\"]\n```"],"methods":[{"name":"get_ammo_type","order":1,"description":"The type of this ammo prototype.","subclasses":["AmmoItem"],"parameters":[{"name":"ammo_source_type","order":0,"description":"One of `\"default\"`, `\"player\"`, `\"turret\"`, or `\"vehicle\"`. Defaults to `\"default\"`.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"AmmoType","optional":true}]},{"name":"has_flag","order":0,"description":"Does this prototype have a flag enabled?","parameters":[{"name":"flag","order":0,"description":"The flag to check. Can be one of [ItemPrototypeFlags](ItemPrototypeFlags). Any other value will cause an error.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"help","order":2,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"alt_entity_filter_mode","order":63,"description":"The alt entity filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_entity_filters","order":71,"description":"The alt entity filters used by this selection tool indexed by entity name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true,"read":true,"write":false},{"name":"alt_entity_type_filters","order":75,"description":"The alt entity type filters used by this selection tool indexed by entity type.","notes":["The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary."],"subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"alt_reverse_alt_entity_filter_mode","order":65,"description":"The alt reverse entity filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_reverse_entity_filters","order":73,"description":"The alt reverse entity filters used by this selection tool indexed by entity name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true,"read":true,"write":false},{"name":"alt_reverse_entity_type_filters","order":77,"description":"The alt reverse entity type filters used by this selection tool indexed by entity type.","notes":["The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary."],"subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"alt_reverse_selection_border_color","order":52,"description":"The color used when doing alt reverse selection with this selection tool prototype.","subclasses":["SelectionTool"],"type":"Color","optional":true,"read":true,"write":false},{"name":"alt_reverse_selection_cursor_box_type","order":60,"description":"","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_reverse_selection_mode_flags","order":56,"description":"Flags that affect which entities will be selected during alt reverse selection.","subclasses":["SelectionTool"],"type":"SelectionModeFlags","optional":true,"read":true,"write":false},{"name":"alt_reverse_tile_filter_mode","order":69,"description":"The alt reverse tile filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_reverse_tile_filters","order":81,"description":"The alt reverse tile filters used by this selection tool indexed by tile name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":true,"read":true,"write":false},{"name":"alt_selection_border_color","order":50,"description":"The color used when doing alt selection with this selection tool prototype.","subclasses":["SelectionTool"],"type":"Color","optional":true,"read":true,"write":false},{"name":"alt_selection_cursor_box_type","order":58,"description":"","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_selection_mode_flags","order":54,"description":"Flags that affect which entities will be selected during alternate selection.","subclasses":["SelectionTool"],"type":"SelectionModeFlags","optional":true,"read":true,"write":false},{"name":"alt_tile_filter_mode","order":67,"description":"The alt tile filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"alt_tile_filters","order":79,"description":"The alt tile filters used by this selection tool indexed by tile name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":true,"read":true,"write":false},{"name":"always_include_tiles","order":61,"description":"If tiles area always included when doing selection with this selection tool prototype.","subclasses":["SelectionTool"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"attack_parameters","order":29,"description":"The gun attack parameters.","subclasses":["Gun"],"type":"AttackParameters","optional":true,"read":true,"write":false},{"name":"burnt_result","order":13,"description":"The result of burning this item as fuel, if any.","type":"LuaItemPrototype","optional":true,"read":true,"write":false},{"name":"can_be_mod_opened","order":22,"description":"If this item can be mod-opened.","type":"boolean","optional":false,"read":true,"write":false},{"name":"capsule_action","order":28,"description":"The capsule action for this capsule item prototype.","subclasses":["Capsule"],"type":"CapsuleAction","optional":true,"read":true,"write":false},{"name":"category","order":42,"description":"The name of a [LuaModuleCategoryPrototype](LuaModuleCategoryPrototype). Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.","subclasses":["ModuleItem"],"type":"string","optional":true,"read":true,"write":false},{"name":"curved_rail","order":47,"description":"The curved rail prototype used for this rail planner prototype.","subclasses":["RailPlanner"],"type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"default_label_color","order":38,"description":"The default label color used for this item with label, if any.","subclasses":["ItemWithLabel"],"type":"Color","optional":true,"read":true,"write":false},{"name":"default_request_amount","order":9,"description":"The default request value.","type":"uint","optional":false,"read":true,"write":false},{"name":"draw_label_for_cursor_render","order":39,"description":"If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor.","subclasses":["ItemWithLabel"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"durability","order":85,"description":"The durability of this tool item.","subclasses":["ToolItem"],"type":"double","optional":true,"read":true,"write":false},{"name":"durability_description_key","order":84,"description":"The durability message key used when displaying the durability of this tool.","subclasses":["ToolItem"],"type":"string","optional":true,"read":true,"write":false},{"name":"entity_filter_mode","order":62,"description":"The entity filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"entity_filter_slots","order":82,"description":"The number of entity filters this deconstruction item has.","subclasses":["DeconstructionItem"],"type":"uint","optional":true,"read":true,"write":false},{"name":"entity_filters","order":70,"description":"The entity filters used by this selection tool indexed by entity name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true,"read":true,"write":false},{"name":"entity_type_filters","order":74,"description":"The entity type filters used by this selection tool indexed by entity type.","notes":["The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary."],"subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"equipment_grid","order":25,"description":"The prototype of this armor equipment grid, if any.","subclasses":["Armor"],"type":"LuaEquipmentGridPrototype","optional":true,"read":true,"write":false},{"name":"extend_inventory_by_default","order":37,"description":"If this item with inventory extends the inventory it resides in by default.","subclasses":["ItemWithInventory"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"filter_mode","order":34,"description":"The filter mode used by this item with inventory.","subclasses":["ItemWithInventory"],"type":"string","optional":true,"read":true,"write":false},{"name":"flags","order":20,"description":"The flags for this item prototype.","type":"ItemPrototypeFlags","optional":false,"read":true,"write":false},{"name":"fuel_acceleration_multiplier","order":15,"description":"The acceleration multiplier when this item is used as fuel in a vehicle.","type":"double","optional":false,"read":true,"write":false},{"name":"fuel_category","order":12,"description":"The fuel category of this item prototype, if any.","type":"string","optional":true,"read":true,"write":false},{"name":"fuel_emissions_multiplier","order":17,"description":"The emissions multiplier if this is used as fuel.","type":"double","optional":false,"read":true,"write":false},{"name":"fuel_top_speed_multiplier","order":16,"description":"The fuel top speed multiplier when this item is used as fuel in a vehicle.","type":"double","optional":false,"read":true,"write":false},{"name":"fuel_value","order":14,"description":"Fuel value when burned.","type":"float","optional":false,"read":true,"write":false},{"name":"group","order":19,"description":"The group this prototype belongs to.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"infinite","order":86,"description":"If this tool item has infinite durability.","subclasses":["ToolItem"],"type":"boolean","optional":true,"read":true,"write":false},{"name":"insertion_priority_mode","order":35,"description":"The insertion priority mode used by this item with inventory.","subclasses":["ItemWithInventory"],"type":"string","optional":true,"read":true,"write":false},{"name":"inventory_size","order":30,"description":"The main inventory size for item-with-inventory-prototype.","subclasses":["ItemWithInventoryPrototype"],"type":"uint","optional":true,"read":true,"write":false},{"name":"inventory_size_bonus","order":27,"description":"The inventory size bonus for this armor prototype.","subclasses":["ArmorPrototype"],"type":"uint","optional":true,"read":true,"write":false},{"name":"item_filters","order":31,"description":"","subclasses":["ItemWithInventory"],"type":{"complex_type":"dictionary","key":"string","value":"LuaItemPrototype"},"optional":true,"read":true,"write":false},{"name":"item_group_filters","order":32,"description":"","subclasses":["ItemWithInventory"],"type":{"complex_type":"dictionary","key":"string","value":"LuaGroup"},"optional":true,"read":true,"write":false},{"name":"item_subgroup_filters","order":33,"description":"","subclasses":["ItemWithInventory"],"type":{"complex_type":"dictionary","key":"string","value":"LuaGroup"},"optional":true,"read":true,"write":false},{"name":"limitation_message_key","order":45,"description":"The limitation message key used when the player attempts to use this modules in some place it's not allowed.","subclasses":["ModuleItem"],"type":"string","optional":true,"read":true,"write":false},{"name":"limitations","order":44,"description":"An array of recipe names this module is allowed to work with. Empty when all recipes are allowed.","subclasses":["ModuleItem"],"type":{"complex_type":"array","value":"string"},"optional":true,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_filter_message","order":36,"description":"The localised string used when the player attempts to put items into this item with inventory that aren't allowed.","subclasses":["ItemWithInventory"],"type":"LocalisedString","optional":true,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"magazine_size","order":23,"description":"Size of full magazine.","subclasses":["AmmoItem"],"type":"float","optional":true,"read":true,"write":false},{"name":"mapper_count","order":87,"description":"How many filters an upgrade item has.","subclasses":["UpgradeItem"],"type":"uint","optional":true,"read":true,"write":false},{"name":"module_effects","order":41,"description":"Effects of this module.","subclasses":["ModuleItem"],"type":"ModuleEffects","optional":true,"read":true,"write":false},{"name":"name","order":1,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":89,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":4,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"place_as_equipment_result","order":6,"description":"Prototype of the equipment that will be created by placing this item in an equipment grid, if any.","type":"LuaEquipmentPrototype","optional":true,"read":true,"write":false},{"name":"place_as_tile_result","order":7,"description":"The place-as-tile result if one is defined, if any.","type":"PlaceAsTileResult","optional":true,"read":true,"write":false},{"name":"place_result","order":5,"description":"Prototype of the entity that will be created by placing this item, if any.","type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"reload_time","order":24,"description":"Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.","subclasses":["AmmoItem"],"type":"float","optional":true,"read":true,"write":false},{"name":"repair_result","order":48,"description":"The repair result of this repair tool prototype.","subclasses":["RepairTool"],"type":{"complex_type":"array","value":"TriggerItem"},"optional":true,"read":true,"write":false},{"name":"resistances","order":26,"description":"Resistances of this armor item, if any, indexed by damage type name.","subclasses":["Armor"],"type":{"complex_type":"dictionary","key":"string","value":"Resistance"},"optional":true,"read":true,"write":false},{"name":"reverse_alt_entity_filter_mode","order":64,"description":"The reverse entity filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"reverse_entity_filters","order":72,"description":"The reverse entity filters used by this selection tool indexed by entity name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true,"read":true,"write":false},{"name":"reverse_entity_type_filters","order":76,"description":"The reverse entity type filters used by this selection tool indexed by entity type.","notes":["The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary."],"subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true,"read":true,"write":false},{"name":"reverse_selection_border_color","order":51,"description":"The color used when doing reverse selection with this selection tool prototype.","subclasses":["SelectionTool"],"type":"Color","optional":true,"read":true,"write":false},{"name":"reverse_selection_cursor_box_type","order":59,"description":"","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"reverse_selection_mode_flags","order":55,"description":"Flags that affect which entities will be selected during reverse selection.","subclasses":["SelectionTool"],"type":"SelectionModeFlags","optional":true,"read":true,"write":false},{"name":"reverse_tile_filter_mode","order":68,"description":"The reverse tile filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"reverse_tile_filters","order":80,"description":"The reverse tile filters used by this selection tool indexed by tile name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":true,"read":true,"write":false},{"name":"rocket_launch_products","order":21,"description":"The results of launching this item in a rocket.","type":{"complex_type":"array","value":"Product"},"optional":false,"read":true,"write":false},{"name":"selection_border_color","order":49,"description":"The color used when doing normal selection with this selection tool prototype.","subclasses":["SelectionTool"],"type":"Color","optional":true,"read":true,"write":false},{"name":"selection_cursor_box_type","order":57,"description":"","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"selection_mode_flags","order":53,"description":"Flags that affect which entities will be selected.","subclasses":["SelectionTool"],"type":"SelectionModeFlags","optional":true,"read":true,"write":false},{"name":"speed","order":40,"description":"The repairing speed if this is a repairing tool.","subclasses":["RepairTool"],"type":"float","optional":true,"read":true,"write":false},{"name":"stack_size","order":10,"description":"Maximum stack size of the item specified by this prototype.","type":"uint","optional":false,"read":true,"write":false},{"name":"stackable","order":8,"description":"Is this item allowed to stack at all?","type":"boolean","optional":false,"read":true,"write":false},{"name":"straight_rail","order":46,"description":"The straight rail prototype used for this rail planner prototype.","subclasses":["RailPlanner"],"type":"LuaEntityPrototype","optional":true,"read":true,"write":false},{"name":"subgroup","order":18,"description":"The subgroup this prototype belongs to.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"tier","order":43,"description":"Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.","subclasses":["ModuleItem"],"type":"uint","optional":true,"read":true,"write":false},{"name":"tile_filter_mode","order":66,"description":"The tile filter mode used by this selection tool.","subclasses":["SelectionTool"],"type":"string","optional":true,"read":true,"write":false},{"name":"tile_filter_slots","order":83,"description":"The number of tile filters this deconstruction item has.","subclasses":["DeconstructionItem"],"type":"uint","optional":true,"read":true,"write":false},{"name":"tile_filters","order":78,"description":"The tile filters used by this selection tool indexed by tile name.","subclasses":["SelectionTool"],"type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":true,"read":true,"write":false},{"name":"type","order":0,"description":"Type of this prototype. E.g. `\"gun\"` or `\"mining-tool\"`.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":88,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"wire_count","order":11,"description":"The number of items needed to connect two entities with this as wire.","type":"uint","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaItemStack","order":49,"description":"A reference to an item and count owned by some external entity.","notes":["In most instances this is a simple reference as in: it points at a specific slot in an inventory and not the item in the slot.","In the instance this references an item on a [LuaTransportLine](LuaTransportLine) the reference is only guaranteed to stay valid (and refer to the same item) as long as nothing changes the transport line."],"methods":[{"name":"add_ammo","order":3,"description":"Add ammo to this ammo item.","subclasses":["AmmoItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of ammo to add.","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_durability","order":5,"description":"Add durability to this tool item.","subclasses":["ToolItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of durability to add.","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"build_blueprint","order":17,"description":"","notes":["Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity."],"parameters":[{"name":"by_player","order":6,"description":"The player to use if any. If provided [defines.events.on_built_entity](defines.events.on_built_entity) will also be fired on successful entity creation.","type":"PlayerIdentification","optional":true},{"name":"direction","order":4,"description":"The direction to use when building","type":"defines.direction","optional":true},{"name":"force","order":1,"description":"Force to use for the building","type":"ForceIdentification","optional":false},{"name":"force_build","order":3,"description":"When true, anything that can be built is else nothing is built if any one thing can't be built","type":"boolean","optional":true},{"name":"position","order":2,"description":"The position to build at","type":"MapPosition","optional":false},{"name":"raise_built","order":7,"description":"If true; [defines.events.script_raised_built](defines.events.script_raised_built) will be fired on successful entity creation. Note: this is ignored if by_player is provided.","type":"boolean","optional":true},{"name":"skip_fog_of_war","order":5,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to build on","type":"SurfaceIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Array of created ghosts","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"can_set_stack","order":7,"description":"Would a call to [LuaItemStack::set_stack](LuaItemStack::set_stack) succeed?","parameters":[{"name":"stack","order":0,"description":"Stack that would be set, possibly `nil`.","type":"ItemStackIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_deconstruct_area","order":19,"description":"Cancel deconstruct the given area with this deconstruction item.","parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for canceling deconstruction","type":"ForceIdentification","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to cancel deconstruct on","type":"SurfaceIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"clear","order":13,"description":"Clear this item stack.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_blueprint","order":24,"description":"Clears this blueprint item.","subclasses":["BlueprintItem"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_deconstruction_item","order":29,"description":"Clears all settings/filters on this deconstruction item resetting it to default values.","subclasses":["DeconstructionItem"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_upgrade_item","order":30,"description":"Clears all settings/filters on this upgrade item resetting it to default values.","subclasses":["UpgradeItem"],"parameters":[],"takes_table":false,"return_values":[]},{"name":"create_blueprint","order":20,"description":"Sets up this blueprint using the found blueprintable entities/tiles on the surface.","parameters":[{"name":"always_include_tiles","order":3,"description":"When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.","type":"boolean","optional":true},{"name":"area","order":2,"description":"The bounding box","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"Force to use for the creation","type":"ForceIdentification","optional":false},{"name":"include_entities","order":4,"description":"When true, entities are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_fuel","order":8,"description":"When true, train fuel is included in the blueprint, Defaults to true.","type":"boolean","optional":true},{"name":"include_modules","order":5,"description":"When true, modules are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_station_names","order":6,"description":"When true, station names are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"include_trains","order":7,"description":"When true, trains are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to create from","type":"SurfaceIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The blueprint entity index to source entity mapping.","type":{"complex_type":"dictionary","key":"uint","value":"LuaEntity"},"optional":false}]},{"name":"create_grid","order":38,"description":"Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grids.","subclasses":["ItemWithEntityData"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaEquipmentGrid","optional":false}]},{"name":"deconstruct_area","order":18,"description":"Deconstruct the given area with this deconstruction item.","parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for the deconstruction","type":"ForceIdentification","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to deconstruct on","type":"SurfaceIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"drain_ammo","order":4,"description":"Remove ammo from this ammo item.","subclasses":["AmmoItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of ammo to remove.","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"drain_durability","order":6,"description":"Remove durability from this tool item.","subclasses":["ToolItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of durability to remove.","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"export_stack","order":10,"description":"Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The exported string","type":"string","optional":false}]},{"name":"get_blueprint_entities","order":1,"description":"The entities in this blueprint.","subclasses":["BlueprintItem"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":true}]},{"name":"get_blueprint_entity_count","order":33,"description":"Gets the number of entities in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_blueprint_entity_tag","order":36,"description":"Gets the given tag on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to get.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":true}]},{"name":"get_blueprint_entity_tags","order":34,"description":"Gets the tags for the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"Tags","optional":false}]},{"name":"get_blueprint_tiles","order":14,"description":"A list of the tiles in this blueprint.","subclasses":["BlueprintItem"],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"Tile"},"optional":true}]},{"name":"get_entity_filter","order":25,"description":"Gets the entity filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"get_inventory","order":16,"description":"Access the inner inventory of an item.","parameters":[{"name":"inventory","order":0,"description":"Index of the inventory to access, which can only be [defines.inventory.item_main](defines.inventory.item_main).","type":"defines.inventory","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if there is no inventory with the given index.","type":"LuaInventory","optional":true}]},{"name":"get_mapper","order":31,"description":"Gets the filter at the given index for this upgrade item.","subclasses":["UpgradeItem"],"parameters":[{"name":"index","order":0,"description":"The index of the mapper to read.","type":"uint","optional":false},{"name":"type","order":1,"description":"`\"from\"` or `\"to\"`.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"UpgradeFilter","optional":false}]},{"name":"get_tag","order":21,"description":"Gets the tag with the given name or returns `nil` if it doesn't exist.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag_name","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":true}]},{"name":"get_tile_filter","order":27,"description":"Gets the tile filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"help","order":39,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"import_stack","order":11,"description":"Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.","parameters":[{"name":"data","order":0,"description":"The string to import","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.","type":"int","optional":false}]},{"name":"is_blueprint_setup","order":0,"description":"Is this blueprint item setup? I.e. is it a non-empty blueprint?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove_tag","order":23,"description":"Removes a tag with the given name.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"If the tag existed and was removed.","type":"boolean","optional":false}]},{"name":"set_blueprint_entities","order":2,"description":"Set new entities to be a part of this blueprint.","subclasses":["BlueprintItem"],"parameters":[{"name":"entities","order":0,"description":"The new blueprint entities.","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_blueprint_entity_tag","order":37,"description":"Sets the given tag on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to set.","type":"string","optional":false},{"name":"value","order":2,"description":"The tag value to set or `nil` to clear the tag.","type":"AnyBasic","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_blueprint_entity_tags","order":35,"description":"Sets the tags on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index","type":"uint","optional":false},{"name":"tags","order":1,"description":"","type":"Tags","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_blueprint_tiles","order":15,"description":"Set specific tiles in this blueprint.","subclasses":["BlueprintItem"],"parameters":[{"name":"tiles","order":0,"description":"Tiles to be a part of the blueprint.","type":{"complex_type":"array","value":"Tile"},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_entity_filter","order":26,"description":"Sets the entity filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"filter","order":1,"description":"Writing `nil` removes the filter.","type":{"complex_type":"union","options":["string","LuaEntityPrototype","LuaEntity","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the new filter was successfully set (ie. was valid).","type":"boolean","optional":false}]},{"name":"set_mapper","order":32,"description":"Sets the module filter at the given index for this upgrade item.","subclasses":["UpgradeItem"],"parameters":[{"name":"filter","order":2,"description":"The filter to set or `nil`","type":"UpgradeFilter","optional":false},{"name":"index","order":0,"description":"The index of the mapper to set.","type":"uint","optional":false},{"name":"type","order":1,"description":"`from` or `to`.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_stack","order":8,"description":"Set this item stack to another item stack.","parameters":[{"name":"stack","order":0,"description":"Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if [LuaItemStack::clear](LuaItemStack::clear) was called.","type":"ItemStackIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the stack was set successfully. Returns `false` if this stack was not [valid for write](LuaItemStack::can_set_stack).","type":"boolean","optional":false}]},{"name":"set_tag","order":22,"description":"Sets the tag with the given name and value.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag","order":1,"description":"","type":"AnyBasic","optional":false},{"name":"tag_name","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_tile_filter","order":28,"description":"Sets the tile filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"filter","order":1,"description":"Setting to nil erases the filter.","type":{"complex_type":"union","options":["string","LuaTilePrototype","LuaTile"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the new filter was successfully set (ie. was valid).","type":"boolean","optional":false}]},{"name":"swap_stack","order":12,"description":"Swaps this item stack with the given item stack if allowed.","parameters":[{"name":"stack","order":0,"description":"","type":"LuaItemStack","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the 2 stacks were swapped successfully.","type":"boolean","optional":false}]},{"name":"transfer_stack","order":9,"description":"Transfers the given item stack into this item stack.","parameters":[{"name":"stack","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`true` if the full stack was transferred.","type":"boolean","optional":false}]}],"attributes":[{"name":"active_index","order":30,"description":"The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.","subclasses":["BlueprintBookItem"],"type":"uint","optional":true,"read":true,"write":true},{"name":"allow_manual_label_change","order":15,"description":"Whether the label for this item can be manually changed. When false the label can only be changed through the API.","subclasses":["ItemWithLabel"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"ammo","order":8,"description":"Number of bullets left in the magazine.","subclasses":["AmmoItem"],"type":"uint","optional":false,"read":true,"write":true},{"name":"blueprint_absolute_snapping","order":12,"description":"If absolute snapping is enabled on this blueprint item.","subclasses":["BlueprintItem"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"blueprint_icons","order":9,"description":"Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. An item that doesn't have icons returns `nil` on read and throws error on write.","subclasses":["BlueprintItem"],"type":{"complex_type":"array","value":"BlueprintSignalIcon"},"optional":true,"read":true,"write":true},{"name":"blueprint_position_relative_to_grid","order":11,"description":"The offset from the absolute grid. `nil` if absolute snapping is not enabled.","subclasses":["BlueprintItem"],"type":"TilePosition","optional":true,"read":true,"write":true},{"name":"blueprint_snap_to_grid","order":10,"description":"The snapping grid size in this blueprint item. `nil` if snapping is not enabled.","subclasses":["BlueprintItem"],"type":"TilePosition","optional":true,"read":true,"write":true},{"name":"connected_entity","order":32,"description":"If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity.","subclasses":["SpidertronRemote"],"type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"cost_to_build","order":16,"description":"Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype name to the required count.","subclasses":["BlueprintItem"],"type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false,"read":true,"write":false},{"name":"count","order":4,"description":"Number of items in this stack.","type":"uint","optional":false,"read":true,"write":true},{"name":"custom_description","order":21,"description":"The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty value.","type":"LocalisedString","optional":false,"read":true,"write":true},{"name":"default_icons","order":19,"description":"The default icons for a blueprint item.","subclasses":["BlueprintItem"],"type":{"complex_type":"array","value":"BlueprintItemIcon"},"optional":false,"read":true,"write":false},{"name":"durability","order":7,"description":"Durability of the contained item. Automatically capped at the item's maximum durability.","subclasses":["Tool"],"type":"double","optional":true,"read":true,"write":true},{"name":"entity_filter_count","order":28,"description":"The number of entity filters this deconstruction item supports.","subclasses":["DeconstructionItem"],"type":"uint","optional":false,"read":true,"write":false},{"name":"entity_filter_mode","order":24,"description":"The blacklist/whitelist entity filter mode for this deconstruction item.","subclasses":["DeconstructionItem"],"type":"defines.deconstruction_item.entity_filter_mode","optional":false,"read":true,"write":true},{"name":"entity_filters","order":22,"description":"The entity filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be entity prototype names that don't have the `\"not-deconstructable\"` flag set and are either a `cliff` or marked as `minable`.","type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":true},{"name":"extends_inventory","order":17,"description":"If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). Only callable on items with inventories.","subclasses":["ItemWithInventory"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"grid","order":5,"description":"The equipment grid of this item, if any.","type":"LuaEquipmentGrid","optional":true,"read":true,"write":false},{"name":"health","order":6,"description":"How much health the item has, as a number in range [0, 1].","type":"float","optional":false,"read":true,"write":true},{"name":"is_armor","order":38,"description":"If this is an armor item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_blueprint","order":33,"description":"If this is a blueprint item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_blueprint_book","order":34,"description":"If this is a blueprint book item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_deconstruction_item","order":45,"description":"If this is a deconstruction tool item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_item_with_entity_data","order":42,"description":"If this is an item with entity data item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_item_with_inventory","order":41,"description":"If this is an item with inventory item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_item_with_label","order":40,"description":"If this is an item with label item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_item_with_tags","order":44,"description":"If this is an item with tags item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_mining_tool","order":37,"description":"If this is a mining tool item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_module","order":35,"description":"If this is a module item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_repair_tool","order":39,"description":"If this is a repair tool item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_selection_tool","order":43,"description":"If this is a selection tool item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_tool","order":36,"description":"If this is a tool item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"is_upgrade_item","order":46,"description":"If this is a upgrade item.","type":"boolean","optional":false,"read":true,"write":false},{"name":"item_number","order":31,"description":"The unique identifier for this item , if any. Note that this ID stays the same no matter where the item is moved to.\n\nOnly these types of items have unique IDs:\n- `\"armor\"`\n- `\"spidertron-remote\"`\n- `\"selection-tool\"`\n- `\"copy-paste-tool\"`\n- `\"upgrade-item\"`\n- `\"deconstruction-item\"`\n- `\"blueprint\"`\n- `\"blueprint-book\"`\n- `\"item-with-entity-data\"`\n- `\"item-with-inventory\"`\n- `\"item-with-tags\"`","type":"uint","optional":true,"read":true,"write":false},{"name":"label","order":13,"description":"The current label for this item, if any.","subclasses":["ItemWithLabel"],"type":"string","optional":true,"read":true,"write":true},{"name":"label_color","order":14,"description":"The current label color for this item, if any.","subclasses":["ItemWithLabel"],"type":"Color","optional":true,"read":true,"write":true},{"name":"name","order":2,"description":"Prototype name of the item held in this stack.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":48,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"prioritize_insertion_mode","order":18,"description":"The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. Only callable on items with inventories.","subclasses":["ItemWithInventory"],"type":"string","optional":false,"read":true,"write":true},{"name":"prototype","order":1,"description":"Prototype of the item held in this stack.","type":"LuaItemPrototype","optional":false,"read":true,"write":false},{"name":"tags","order":20,"description":"","subclasses":["ItemWithTags"],"type":"Tags","optional":false,"read":true,"write":true},{"name":"tile_filter_count","order":29,"description":"The number of tile filters this deconstruction item supports.","subclasses":["DeconstructionItem"],"type":"uint","optional":false,"read":true,"write":false},{"name":"tile_filter_mode","order":25,"description":"The blacklist/whitelist tile filter mode for this deconstruction item.","subclasses":["DeconstructionItem"],"type":"defines.deconstruction_item.tile_filter_mode","optional":false,"read":true,"write":true},{"name":"tile_filters","order":23,"description":"The tile filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be tile prototype names.","type":{"complex_type":"array","value":"string"},"optional":false,"read":true,"write":true},{"name":"tile_selection_mode","order":26,"description":"The tile selection mode for this deconstruction item.","subclasses":["DeconstructionItem"],"type":"defines.deconstruction_item.tile_selection_mode","optional":false,"read":true,"write":true},{"name":"trees_and_rocks_only","order":27,"description":"If this deconstruction item is set to allow trees and rocks only.","subclasses":["DeconstructionItem"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"type","order":3,"description":"Type of the item prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":47,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid_for_read","order":0,"description":"Is this valid for reading? Differs from the usual `valid` in that `valid` will be `true` even if the item stack is blank but the entity that holds it is still valid.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaLampControlBehavior","order":50,"description":"Control behavior for lamps.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"color","order":1,"description":"The color the lamp is showing, if any.","type":"Color","optional":true,"read":true,"write":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"use_colors","order":0,"description":"`true` if the lamp should set the color from the circuit network signals.","type":"boolean","optional":false,"read":true,"write":true},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaGenericOnOffControlBehavior"]},{"name":"LuaLazyLoadedValue","order":51,"description":"A lazily loaded value. For performance reasons, we sometimes return a custom lazily-loaded value type instead of the native Lua value. This custom type lazily constructs the necessary value when [LuaLazyLoadedValue::get](LuaLazyLoadedValue::get) is called, therefore preventing its unnecessary construction in some cases.\n\nAn instance of LuaLazyLoadedValue is only valid during the event it was created from and cannot be saved.","methods":[{"name":"get","order":0,"description":"Gets the value of this lazy loaded value.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"Any","optional":false}]},{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaLogisticCell","order":52,"description":"Logistic cell of a particular [LuaEntity](LuaEntity). A \"Logistic Cell\" is the given name for settings and properties used by what would normally be seen as a \"Roboport\". A logistic cell however doesn't have to be attached to the roboport entity (the character has one for the personal roboport).","methods":[{"name":"help","order":3,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"is_in_construction_range","order":1,"description":"Is a given position within the construction range of this cell?","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_in_logistic_range","order":0,"description":"Is a given position within the logistic range of this cell?","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_neighbour_with","order":2,"description":"Are two cells neighbours?","parameters":[{"name":"other","order":0,"description":"","type":"LuaLogisticCell","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"charge_approach_distance","order":7,"description":"Radius at which the robots hover when waiting to be charged.","type":"float","optional":false,"read":true,"write":false},{"name":"charging_robot_count","order":8,"description":"Number of robots currently charging.","type":"uint","optional":false,"read":true,"write":false},{"name":"charging_robots","order":13,"description":"Robots currently being charged.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"construction_radius","order":2,"description":"Construction radius of this cell.","type":"float","optional":false,"read":true,"write":false},{"name":"logistic_network","order":11,"description":"The network that owns this cell, if any.","type":"LuaLogisticNetwork","optional":true,"read":true,"write":false},{"name":"logistic_radius","order":0,"description":"Logistic radius of this cell.","type":"float","optional":false,"read":true,"write":false},{"name":"logistics_connection_distance","order":1,"description":"Logistic connection distance of this cell.","type":"float","optional":false,"read":true,"write":false},{"name":"mobile","order":5,"description":"`true` if this is a mobile cell. In vanilla, only the logistic cell created by a character's personal roboport is mobile.","type":"boolean","optional":false,"read":true,"write":false},{"name":"neighbours","order":12,"description":"Neighbouring cells.","type":{"complex_type":"array","value":"LuaLogisticCell"},"optional":false,"read":true,"write":false},{"name":"object_name","order":16,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"owner","order":10,"description":"This cell's owner.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"stationed_construction_robot_count","order":4,"description":"Number of stationed construction robots in this cell.","type":"uint","optional":false,"read":true,"write":false},{"name":"stationed_logistic_robot_count","order":3,"description":"Number of stationed logistic robots in this cell.","type":"uint","optional":false,"read":true,"write":false},{"name":"to_charge_robot_count","order":9,"description":"Number of robots waiting to charge.","type":"uint","optional":false,"read":true,"write":false},{"name":"to_charge_robots","order":14,"description":"Robots waiting to charge.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"transmitting","order":6,"description":"`true` if this cell is active.","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":15,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaLogisticContainerControlBehavior","order":53,"description":"Control behavior for logistic chests.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_mode_of_operation","order":0,"description":"The circuit mode of operations for the logistic container. Can only be set on containers whose [logistic_mode](LuaEntityPrototype::logistic_mode) is set to \"requester\".","type":"defines.control_behavior.logistic_container.circuit_mode_of_operation","optional":false,"read":true,"write":true},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaLogisticNetwork","order":54,"description":"A single logistic network of a given force on a given surface.","methods":[{"name":"can_satisfy_request","order":7,"description":"Can the network satisfy a request for a given item and count.","parameters":[{"name":"count","order":1,"description":"Count to check. Defaults to 1.","type":"uint","optional":true},{"name":"include_buffers","order":2,"description":"Should buffers be considered? Defaults to false.","type":"boolean","optional":true},{"name":"item","order":0,"description":"Item name to check.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the network can satisfy the request.","type":"boolean","optional":false}]},{"name":"find_cell_closest_to","order":4,"description":"Find logistic cell closest to a given position.","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if no cell was found.","type":"LuaLogisticCell","optional":true}]},{"name":"get_contents","order":1,"description":"Get item counts for the entire network, similar to how [LuaInventory::get_contents](LuaInventory::get_contents) does.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"A mapping of item prototype names to the number available in the network.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_item_count","order":0,"description":"Count given or all items in the network or given members.","parameters":[{"name":"item","order":0,"description":"Item name to count. If not given, gives counts of all items in the network.","type":"string","optional":true},{"name":"member","order":1,"description":"Logistic members to check, must be either `\"storage\"` or `\"providers\"`. If not given, gives count in the entire network.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"int","optional":false}]},{"name":"get_supply_counts","order":8,"description":"Get the amount of items of the given type indexed by the storage member.","parameters":[{"name":"item","order":0,"description":"Item name to check.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"A mapping of member types (\"storage\", \"passive-provider\", \"buffer\", \"active-provider\") to the number available in the members.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_supply_points","order":9,"description":"Gets the logistic points with of the given type indexed by the storage member.","parameters":[{"name":"item","order":0,"description":"Item name to check.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"A mapping of member types (\"storage\", \"passive-provider\", \"buffer\", \"active-provider\") to an array of LuaLogisticPoint.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaLogisticPoint"}},"optional":false}]},{"name":"help","order":10,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"insert","order":3,"description":"Insert items into the logistic network. This will actually insert the items into some logistic chests.","parameters":[{"name":"item","order":0,"description":"What to insert.","type":"ItemStackIdentification","optional":false},{"name":"members","order":1,"description":"Which logistic members to insert the items to. Must be `\"storage\"`, `\"storage-empty\"` (storage chests that are completely empty), `\"storage-empty-slot\"` (storage chests that have an empty slot), or `\"requester\"`. If not specified, inserts items into the logistic network in the usual order.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items actually inserted.","type":"uint","optional":false}]},{"name":"remove_item","order":2,"description":"Remove items from the logistic network. This will actually remove the items from some logistic chests.","parameters":[{"name":"item","order":0,"description":"What to remove.","type":"ItemStackIdentification","optional":false},{"name":"members","order":1,"description":"Which logistic members to remove from. Must be `\"storage\"`, `\"passive-provider\"`, `\"buffer\"`, or `\"active-provider\"`. If not specified, removes from the network in the usual order.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items removed.","type":"uint","optional":false}]},{"name":"select_drop_point","order":6,"description":"Find a logistic point to drop the specific item stack.","parameters":[{"name":"members","order":1,"description":"When given, it will find from only the specific type of member. Must be `\"storage\"`, `\"storage-empty\"`, `\"storage-empty-slot\"` or `\"requester\"`. If not specified, selects with normal priorities.","type":"string","optional":true},{"name":"stack","order":0,"description":"Name of the item to select.","type":"ItemStackIdentification","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"`nil` if no point was found.","type":"LuaLogisticPoint","optional":true}]},{"name":"select_pickup_point","order":5,"description":"Find the 'best' logistic point with this item ID and from the given position or from given chest type.","parameters":[{"name":"include_buffers","order":2,"description":"Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position.","type":"boolean","optional":true},{"name":"members","order":3,"description":"When given, it will find from only the specific type of member. Must be `\"storage\"`, `\"passive-provider\"`, `\"buffer\"` or `\"active-provider\"`. If not specified, selects with normal priorities. Not considered if position is specified.","type":"string","optional":true},{"name":"name","order":0,"description":"Name of the item to select.","type":"string","optional":false},{"name":"position","order":1,"description":"When given, it will find the storage 'best' storage point from this position.","type":"MapPosition","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"`nil` if no point was found.","type":"LuaLogisticPoint","optional":true}]}],"attributes":[{"name":"active_provider_points","order":14,"description":"All active provider points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"all_construction_robots","order":4,"description":"The total number of construction robots in the network (idle and active + in roboports).","type":"uint","optional":false,"read":true,"write":false},{"name":"all_logistic_robots","order":2,"description":"The total number of logistic robots in the network (idle and active + in roboports).","type":"uint","optional":false,"read":true,"write":false},{"name":"available_construction_robots","order":3,"description":"Number of construction robots available for a job.","type":"uint","optional":false,"read":true,"write":false},{"name":"available_logistic_robots","order":1,"description":"Number of logistic robots available for a job.","type":"uint","optional":false,"read":true,"write":false},{"name":"cells","order":6,"description":"All cells in this network.","type":{"complex_type":"array","value":"LuaLogisticCell"},"optional":false,"read":true,"write":false},{"name":"construction_robots","order":19,"description":"All construction robots in this logistic network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"empty_provider_points","order":15,"description":"All things that have empty provider points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"empty_providers","order":8,"description":"All entities that have empty logistic provider points in this network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"force","order":0,"description":"The force this logistic network belongs to.","type":"LuaForce","optional":false,"read":true,"write":false},{"name":"logistic_members","order":11,"description":"All other entities that have logistic points in this network (inserters mostly).","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"logistic_robots","order":20,"description":"All logistic robots in this logistic network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"object_name","order":22,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"passive_provider_points","order":13,"description":"All passive provider points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"provider_points","order":12,"description":"All things that have provider points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"providers","order":7,"description":"All entities that have logistic provider points in this network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"requester_points","order":16,"description":"All things that have requester points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"requesters","order":9,"description":"All entities that have logistic requester points in this network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"robot_limit","order":5,"description":"Maximum number of robots the network can work with. Currently only used for the personal roboport.","type":"uint","optional":false,"read":true,"write":false},{"name":"robots","order":18,"description":"All robots in this logistic network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"storage_points","order":17,"description":"All things that have storage points in this network.","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false,"read":true,"write":false},{"name":"storages","order":10,"description":"All entities that have logistic storage points in this network.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"valid","order":21,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaLogisticPoint","order":55,"description":"Logistic point of a particular [LuaEntity](LuaEntity). A \"Logistic point\" is the name given for settings and properties used by requester, provider, and storage points in a given logistic network. These \"points\" don't have to be a logistic container but often are. One other entity that can own several points is the \"character\" character type entity.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"exact","order":8,"description":"If this logistic point is using the exact mode. In exact mode robots never over-deliver requests.","type":"boolean","optional":false,"read":true,"write":false},{"name":"filters","order":3,"description":"The logistic filters for this logistic point, if this uses any.","notes":["The returned array will always have an entry for each filter and will be indexed in sequence when not nil."],"type":{"complex_type":"array","value":"LogisticFilter"},"optional":true,"read":true,"write":false},{"name":"force","order":5,"description":"The force of this logistic point.","notes":["This will always be the same as the [LuaLogisticPoint::owner](LuaLogisticPoint::owner) force."],"type":"LuaForce","optional":false,"read":true,"write":false},{"name":"logistic_member_index","order":2,"description":"The Logistic member index of this logistic point.","type":"uint","optional":false,"read":true,"write":false},{"name":"logistic_network","order":1,"description":"","type":"LuaLogisticNetwork","optional":false,"read":true,"write":false},{"name":"mode","order":4,"description":"The logistic mode.","type":"defines.logistic_mode","optional":false,"read":true,"write":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"owner","order":0,"description":"The [LuaEntity](LuaEntity) owner of this [LuaLogisticPoint](LuaLogisticPoint).","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"targeted_items_deliver","order":7,"description":"Items targeted to be dropped off into this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false,"read":true,"write":false},{"name":"targeted_items_pickup","order":6,"description":"Items targeted to be picked up from this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false,"read":true,"write":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaMiningDrillControlBehavior","order":56,"description":"Control behavior for mining drills.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_enable_disable","order":0,"description":"`true` if this drill is enabled or disabled using the logistics or circuit condition.","type":"boolean","optional":false,"read":true,"write":true},{"name":"circuit_read_resources","order":1,"description":"`true` if this drill should send the resources in the field to the circuit network. Which resources depends on [LuaMiningDrillControlBehavior::resource_read_mode](LuaMiningDrillControlBehavior::resource_read_mode)","type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"resource_read_mode","order":2,"description":"If the mining drill should send just the resources in its area or the entire field it's on to the circuit network.","type":"defines.control_behavior.mining_drill.resource_read_mode","optional":false,"read":true,"write":true},{"name":"resource_read_targets","order":3,"description":"The resource entities that the mining drill will send information about to the circuit network or an empty array.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaGenericOnOffControlBehavior"]},{"name":"LuaModSettingPrototype","order":57,"description":"Prototype of a mod setting.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"allow_blank","order":10,"description":"Whether this string setting allows blank values. `nil` if not a string setting.","type":"boolean","optional":true,"read":true,"write":false},{"name":"allowed_values","order":9,"description":"The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.","type":{"complex_type":"union","options":[{"complex_type":"array","value":"string"},{"complex_type":"array","value":"int"},{"complex_type":"array","value":"double"}],"full_format":false},"optional":true,"read":true,"write":false},{"name":"auto_trim","order":11,"description":"Whether this string setting auto-trims values. `nil` if not a string setting","type":"boolean","optional":true,"read":true,"write":false},{"name":"default_value","order":6,"description":"The default value of this setting.","type":{"complex_type":"union","options":["boolean","double","int","string"],"full_format":false},"optional":false,"read":true,"write":false},{"name":"hidden","order":12,"description":"Whether this setting is hidden from the GUI.","type":"boolean","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"maximum_value","order":8,"description":"The maximum value for this setting. `nil` if this setting type doesn't support a maximum.","type":{"complex_type":"union","options":["double","int"],"full_format":false},"optional":true,"read":true,"write":false},{"name":"minimum_value","order":7,"description":"The minimum value for this setting. `nil` if this setting type doesn't support a minimum.","type":{"complex_type":"union","options":["double","int"],"full_format":false},"optional":true,"read":true,"write":false},{"name":"mod","order":4,"description":"The mod that owns this setting.","type":"string","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"setting_type","order":5,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaModuleCategoryPrototype","order":58,"description":"Prototype of a module category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaNamedNoiseExpression","order":59,"description":"Prototype of a named noise expression.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"expression","order":5,"description":"The expression itself.","type":"NoiseExpression","optional":false,"read":true,"write":false},{"name":"intended_property","order":4,"description":"Name of the property that this expression is intended to provide a value for, if any.","type":"string","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaNoiseLayerPrototype","order":60,"description":"Prototype of a noise layer.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaParticlePrototype","order":61,"description":"Prototype of an optimized particle.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"ended_in_water_trigger_effect","order":5,"description":"","type":"TriggerEffectItem","optional":false,"read":true,"write":false},{"name":"life_time","order":8,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"mining_particle_frame_speed","order":12,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"movement_modifier","order":11,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"movement_modifier_when_on_ground","order":10,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"regular_trigger_effect","order":4,"description":"","type":"TriggerEffectItem","optional":false,"read":true,"write":false},{"name":"regular_trigger_effect_frequency","order":9,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"render_layer","order":6,"description":"","type":"RenderLayer","optional":false,"read":true,"write":false},{"name":"render_layer_when_on_ground","order":7,"description":"","type":"RenderLayer","optional":false,"read":true,"write":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaPermissionGroup","order":62,"description":"A permission group that defines what players in this group are allowed to do.","methods":[{"name":"add_player","order":0,"description":"Adds the given player to this group.","parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the player was added.","type":"boolean","optional":false}]},{"name":"allows_action","order":2,"description":"Whether this group allows the given action.","parameters":[{"name":"action","order":0,"description":"The action in question.","type":"defines.input_action","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"destroy","order":4,"description":"Destroys this group.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"Whether the group was successfully destroyed.","type":"boolean","optional":false}]},{"name":"help","order":5,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"remove_player","order":1,"description":"Removes the given player from this group.","parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the player was removed.","type":"boolean","optional":false}]},{"name":"set_allows_action","order":3,"description":"Sets whether this group allows the performance the given action.","parameters":[{"name":"action","order":0,"description":"The action in question.","type":"defines.input_action","optional":false},{"name":"allow_action","order":1,"description":"Whether to allow the specified action.","type":"boolean","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the value was successfully applied.","type":"boolean","optional":false}]}],"attributes":[{"name":"group_id","order":2,"description":"The group ID","type":"uint","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"The name of this group.","notes":["Setting the name to `nil` or an empty string sets the name to the default value."],"type":"string","optional":false,"read":true,"write":true},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"players","order":1,"description":"The players in this group.","type":{"complex_type":"array","value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaPermissionGroups","order":63,"description":"All permission groups.","methods":[{"name":"create_group","order":0,"description":"Creates a new permission group.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the calling player doesn't have permission to make groups.","type":"LuaPermissionGroup","optional":true}]},{"name":"get_group","order":1,"description":"Gets the permission group with the given name or group ID.","parameters":[{"name":"group","order":0,"description":"","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if there is no matching group.","type":"LuaPermissionGroup","optional":true}]},{"name":"help","order":2,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"groups","order":0,"description":"All of the permission groups.","type":{"complex_type":"array","value":"LuaPermissionGroup"},"optional":false,"read":true,"write":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaPlayer","order":64,"description":"A player in the game. Pay attention that a player may or may not have a character, which is the [LuaEntity](LuaEntity) of the little guy running around the world doing things.","methods":[{"name":"activate_paste","order":61,"description":"Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.","parameters":[],"takes_table":false,"return_values":[]},{"name":"add_alert","order":19,"description":"Adds an alert to this player for the given entity of the given alert type.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"type","order":1,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_custom_alert","order":20,"description":"Adds a custom alert to this player.","parameters":[{"name":"entity","order":0,"description":"If the alert is clicked, the map will open at the position of this entity.","type":"LuaEntity","optional":false},{"name":"icon","order":1,"description":"","type":"SignalID","optional":false},{"name":"message","order":2,"description":"","type":"LocalisedString","optional":false},{"name":"show_on_map","order":3,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_recipe_notification","order":59,"description":"Adds the given recipe to the list of recipe notifications for this player.","parameters":[{"name":"recipe","order":0,"description":"Name of the recipe prototype to add.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"add_to_clipboard","order":60,"description":"Adds the given blueprint to this player's clipboard queue.","parameters":[{"name":"blueprint","order":0,"description":"The blueprint to add.","type":"LuaItemStack","optional":false}],"takes_table":false,"return_values":[]},{"name":"associate_character","order":36,"description":"Associates a character with this player.","notes":["The character must not be connected to any controller.","If this player is currently disconnected (see [LuaPlayer::connected](LuaPlayer::connected)) the character will be immediately \"logged off\".","See [LuaPlayer::get_associated_characters](LuaPlayer::get_associated_characters) for more information."],"parameters":[{"name":"character","order":0,"description":"The character entity.","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[]},{"name":"build_from_cursor","order":32,"description":"Builds what ever is in the cursor on the surface the player is on.","notes":["Anything built will fire normal player-built events.","The cursor stack will automatically be reduced as if the player built normally."],"parameters":[{"name":"alt","order":2,"description":"If alt build should be used instead of normal build. Defaults to normal.","type":"boolean","optional":true},{"name":"direction","order":1,"description":"Direction the entity would be placed","type":"defines.direction","optional":true},{"name":"position","order":0,"description":"Where the entity would be placed","type":"MapPosition","optional":false},{"name":"skip_fog_of_war","order":4,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"terrain_building_size","order":3,"description":"The size for building terrain if building terrain. Defaults to 2.","type":"uint","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"can_build_from_cursor","order":31,"description":"Checks if this player can build what ever is in the cursor on the surface the player is on.","raises":[{"name":"on_built_entity","order":1,"description":"Raised if the cursor was successfully built.","timeframe":"instantly","optional":true},{"name":"on_pre_build","order":0,"description":"Raised if the cursor was successfully built.","timeframe":"instantly","optional":true}],"parameters":[{"name":"alt","order":2,"description":"If alt build should be used instead of normal build. Defaults to normal.","type":"boolean","optional":true},{"name":"direction","order":1,"description":"Direction the entity would be placed","type":"defines.direction","optional":true},{"name":"position","order":0,"description":"Where the entity would be placed","type":"MapPosition","optional":false},{"name":"skip_fog_of_war","order":4,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"terrain_building_size","order":3,"description":"The size for building terrain if building terrain. Defaults to 2.","type":"uint","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_place_entity","order":30,"description":"Checks if this player can build the given entity at the given location on the surface the player is on.","parameters":[{"name":"direction","order":2,"description":"Direction the entity would be placed. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"name","order":0,"description":"Name of the entity to check.","type":"string","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear_console","order":2,"description":"Clear the chat console.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_cursor","order":17,"description":"Invokes the \"clear cursor\" action on the player as if the user pressed it.","raises":[{"name":"on_player_cursor_stack_changed","order":0,"description":"Raised when the cursor was successfully cleared.","timeframe":"current_tick","optional":true}],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"Whether the cursor is now empty.","type":"boolean","optional":false}]},{"name":"clear_recipe_notifications","order":58,"description":"Clears all recipe notifications for this player.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_selection","order":63,"description":"Clears the players selection tool selection position.","parameters":[],"takes_table":false,"return_values":[]},{"name":"close_map","order":47,"description":"Queues request to switch to the normal game view from the map or zoom to world view. Render mode change requests are processed before rendering of the next frame.","parameters":[],"takes_table":false,"return_values":[]},{"name":"connect_to_server","order":52,"description":"Asks the player if they would like to connect to the given server.","notes":["This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt."],"parameters":[{"name":"address","order":0,"description":"The server (address:port) if port is not given the default Factorio port is used.","type":"string","optional":false},{"name":"description","order":2,"description":"","type":"LocalisedString","optional":true},{"name":"name","order":1,"description":"The name of the server.","type":"LocalisedString","optional":true},{"name":"password","order":3,"description":"The password if different from the one used to join this game. Note, if the current password is not empty but the one required to join the new server is an empty string should be given for this field.","type":"string","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"create_character","order":18,"description":"Creates and attaches a character entity to this player.","notes":["The player must not have a character already connected and must be online (see [LuaPlayer::connected](LuaPlayer::connected))."],"parameters":[{"name":"character","order":0,"description":"The character to create else the default is used.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the character was created.","type":"boolean","optional":false}]},{"name":"create_local_flying_text","order":38,"description":"Spawn flying text that is only visible to this player. Either `position` or `create_at_cursor` are required. When `create_at_cursor` is `true`, all parameters other than `text` are ignored.","notes":["If no custom `speed` is set and the text is longer than 25 characters, its `time_to_live` and `speed` are dynamically adjusted to give players more time to read it.","Local flying text is not saved, which means it will disappear after a save/load-cycle."],"parameters":[{"name":"color","order":3,"description":"The color of the flying text. Defaults to white text.","type":"Color","optional":true},{"name":"create_at_cursor","order":2,"description":"If `true`, the flying text is created at the player's cursor. Defaults to `false`.","type":"boolean","optional":true},{"name":"position","order":1,"description":"The location on the map at which to show the flying text.","type":"MapPosition","optional":true},{"name":"speed","order":5,"description":"The speed at which the text rises upwards in tiles/second. Can't be a negative value.","type":"double","optional":true},{"name":"text","order":0,"description":"The flying text to show.","type":"LocalisedString","optional":false},{"name":"time_to_live","order":4,"description":"The amount of ticks that the flying text will be shown for. Defaults to `80`.","type":"uint","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"disable_alert","order":27,"description":"Disables alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the alert type was disabled (false if it was already disabled).","type":"boolean","optional":false}]},{"name":"disable_recipe_groups","order":7,"description":"Disable recipe groups.","parameters":[],"takes_table":false,"return_values":[]},{"name":"disable_recipe_subgroups","order":9,"description":"Disable recipe subgroups.","parameters":[],"takes_table":false,"return_values":[]},{"name":"disassociate_character","order":37,"description":"Disassociates a character from this player. This is functionally the same as setting [LuaEntity::associated_player](LuaEntity::associated_player) to `nil`.","notes":["See [LuaPlayer::get_associated_characters](LuaPlayer::get_associated_characters) for more information."],"parameters":[{"name":"character","order":0,"description":"The character entity","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[]},{"name":"drag_wire","order":6,"description":"Start/end wire dragging at the specified location, wire type is based on the cursor contents","parameters":[{"name":"position","order":0,"description":"Position at which cursor was clicked. Used only to decide which side of arithmetic combinator, decider combinator or power switch is to be connected. Entity itself to be connected is based on the player's selected entity.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"`true` if the action did something","type":"boolean","optional":false}]},{"name":"enable_alert","order":26,"description":"Enables alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the alert type was enabled (false if it was already enabled).","type":"boolean","optional":false}]},{"name":"enable_recipe_groups","order":8,"description":"Enable recipe groups.","parameters":[],"takes_table":false,"return_values":[]},{"name":"enable_recipe_subgroups","order":10,"description":"Enable recipe subgroups.","parameters":[],"takes_table":false,"return_values":[]},{"name":"exit_cutscene","order":44,"description":"Exit the current cutscene. Errors if not in a cutscene.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_active_quick_bar_page","order":41,"description":"Gets which quick bar page is being used for the given screen page or `nil` if not known.","parameters":[{"name":"index","order":0,"description":"The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint8","optional":true}]},{"name":"get_alerts","order":22,"description":"Get all alerts matching the given filters, or all alerts if no filters are given.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":1,"description":"","type":"LuaEntityPrototype","optional":true},{"name":"surface","order":4,"description":"","type":"SurfaceIdentification","optional":true},{"name":"type","order":3,"description":"","type":"defines.alert_type","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"A mapping of surface index to an array of arrays of [alerts](Alert) indexed by the [alert type](defines.alert_type).","type":{"complex_type":"dictionary","key":"uint","value":{"complex_type":"dictionary","key":"defines.alert_type","value":{"complex_type":"array","value":"Alert"}}},"optional":false}]},{"name":"get_associated_characters","order":35,"description":"The characters associated with this player.","notes":["The array will always be empty when the player is disconnected (see [LuaPlayer::connected](LuaPlayer::connected)) regardless of there being associated characters.","Characters associated with this player will be logged off when this player disconnects but are not controlled by any player."],"parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_goal_description","order":3,"description":"Get the current goal description, as a localised string.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"get_infinity_inventory_filter","order":56,"description":"Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.","parameters":[{"name":"index","order":0,"description":"The index to get.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"InfinityInventoryFilter","optional":true}]},{"name":"get_quick_bar_slot","order":39,"description":"Gets the quick bar filter for the given slot or `nil`.","parameters":[{"name":"index","order":0,"description":"The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaItemPrototype","optional":true}]},{"name":"help","order":64,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"is_alert_enabled","order":28,"description":"If the given alert type is currently enabled.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_alert_muted","order":25,"description":"If the given alert type is currently muted.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_shortcut_available","order":49,"description":"Is a custom Lua shortcut currently available?","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_shortcut_toggled","order":48,"description":"Is a custom Lua shortcut currently toggled?","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"jump_to_cutscene_waypoint","order":43,"description":"Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscene.","parameters":[{"name":"waypoint_index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"log_active_entity_chunk_counts","order":14,"description":"Logs a dictionary of chunks -> active entities for the surface this player is on.","parameters":[],"takes_table":false,"return_values":[]},{"name":"log_active_entity_counts","order":15,"description":"Logs a dictionary of active entities -> count for the surface this player is on.","parameters":[],"takes_table":false,"return_values":[]},{"name":"mute_alert","order":23,"description":"Mutes alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the alert type was muted (false if it was already muted).","type":"boolean","optional":false}]},{"name":"open_map","order":45,"description":"Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"scale","order":1,"description":"","type":"double","optional":true}],"takes_table":false,"return_values":[]},{"name":"pipette_entity","order":29,"description":"Invokes the \"smart pipette\" action on the player as if the user pressed it.","raises":[{"name":"on_player_pipette","order":0,"description":"Raised if the entity was successfully pipetted.","timeframe":"instantly","optional":true}],"parameters":[{"name":"entity","order":0,"description":"","type":{"complex_type":"union","options":["string","LuaEntity","LuaEntityPrototype"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the smart pipette found something to place.","type":"boolean","optional":false}]},{"name":"play_sound","order":34,"description":"Play a sound for this player.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of the player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"print","order":1,"description":"Print text to the chat console.","notes":["Messages that are identical to a message sent in the last 60 ticks are not printed again."],"parameters":[{"name":"color","order":1,"description":"","type":"Color","optional":true},{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"print_entity_statistics","order":11,"description":"Print entity statistics to the player's console.","parameters":[{"name":"entities","order":0,"description":"Entity prototypes to get statistics for. If not specified or empty, display statistics for all entities.","type":{"complex_type":"array","value":"string"},"optional":true}],"takes_table":false,"return_values":[]},{"name":"print_lua_object_statistics","order":13,"description":"Print LuaObject counts per mod.","parameters":[],"takes_table":false,"return_values":[]},{"name":"print_robot_jobs","order":12,"description":"Print construction robot job counts to the players console.","parameters":[],"takes_table":false,"return_values":[]},{"name":"remove_alert","order":21,"description":"Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"icon","order":5,"description":"","type":"SignalID","optional":true},{"name":"message","order":6,"description":"","type":"LocalisedString","optional":true},{"name":"position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":1,"description":"","type":{"complex_type":"union","options":["LuaEntityPrototype","string"],"full_format":false},"optional":true},{"name":"surface","order":4,"description":"","type":"SurfaceIdentification","optional":true},{"name":"type","order":3,"description":"","type":"defines.alert_type","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"request_translation","order":54,"description":"Requests a translation for the given localised string. If the request is successful the [on_string_translated](on_string_translated) event will be fired at a later time with the results.","notes":["Does nothing if this player is not connected. (see [LuaPlayer::connected](LuaPlayer::connected))."],"raises":[{"name":"on_string_translated","order":0,"description":"Raised if the request was successfully sent.","timeframe":"future_tick","optional":true}],"parameters":[{"name":"localised_string","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The unique id for the requested translation.","type":"uint","optional":true}]},{"name":"request_translations","order":55,"description":"Requests a translation for the given localised strings. If the request is successful the [on_string_translated](on_string_translated) event will be fired at a later time with the results.","notes":["Does nothing if this player is not connected. (see [LuaPlayer::connected](LuaPlayer::connected))."],"raises":[{"name":"on_string_translated","order":0,"description":"Raised if the request was successfully sent.","timeframe":"future_tick","optional":true}],"parameters":[{"name":"localised_strings","order":0,"description":"","type":{"complex_type":"array","value":"LocalisedString"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The unique id for the requested translation.","type":{"complex_type":"array","value":"uint"},"optional":true}]},{"name":"set_active_quick_bar_page","order":42,"description":"Sets which quick bar page is being used for the given screen page.","parameters":[{"name":"page_index","order":1,"description":"The new quick bar page.","type":"uint","optional":false},{"name":"screen_index","order":0,"description":"The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_controller","order":5,"description":"Set the controller type of the player.","notes":["Setting a player to [defines.controllers.editor](defines.controllers.editor) auto promotes the player to admin and enables cheat mode.","Setting a player to [defines.controllers.editor](defines.controllers.editor) also requires the calling player be an admin."],"parameters":[{"name":"character","order":1,"description":"Entity to control. Mandatory when `type` is [defines.controllers.character](defines.controllers.character), ignored otherwise.","type":"LuaEntity","optional":true},{"name":"chart_mode_cutoff","order":6,"description":"If specified and `type` is [defines.controllers.cutscene](defines.controllers.cutscene), the game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value.","type":"double","optional":true},{"name":"final_transition_time","order":5,"description":"If specified and `type` is [defines.controllers.cutscene](defines.controllers.cutscene), it is the time in ticks it will take for the camera to pan from the final waypoint back to the starting position. If not given the camera will not pan back to the start position/zoom.","type":"uint","optional":true},{"name":"start_position","order":3,"description":"If specified and `type` is [defines.controllers.cutscene](defines.controllers.cutscene), the cutscene will start at this position. If not given the start position will be the player position.","type":"MapPosition","optional":true},{"name":"start_zoom","order":4,"description":"If specified and `type` is [defines.controllers.cutscene](defines.controllers.cutscene), the cutscene will start at this zoom level. If not given the start zoom will be the players zoom.","type":"double","optional":true},{"name":"type","order":0,"description":"Which controller to use.","type":"defines.controllers","optional":false},{"name":"waypoints","order":2,"description":"List of waypoints for the cutscene controller. This parameter is mandatory when `type` is [defines.controllers.cutscene](defines.controllers.cutscene).","type":"CutsceneWaypoint","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"set_ending_screen_data","order":0,"description":"Setup the screen to be shown when the game is finished.","parameters":[{"name":"file","order":1,"description":"Path to image to be shown.","type":"string","optional":true},{"name":"message","order":0,"description":"Message to be shown.","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_goal_description","order":4,"description":"Set the text in the goal window (top left).","parameters":[{"name":"only_update","order":1,"description":"When `true`, won't play the \"goal updated\" sound.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The text to display. Lines can be delimited with `\\n`. Passing an empty string or omitting this parameter entirely will make the goal window disappear.","type":"LocalisedString","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_infinity_inventory_filter","order":57,"description":"Sets the filter for this map editor infinity filters at the given index.","parameters":[{"name":"filter","order":1,"description":"The new filter or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityInventoryFilter","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index to set.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_quick_bar_slot","order":40,"description":"Sets the quick bar filter for the given slot.","parameters":[{"name":"filter","order":1,"description":"The filter or `nil`.","type":{"complex_type":"union","options":["string","LuaItemPrototype","LuaItemStack"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_shortcut_available","order":51,"description":"Make a custom Lua shortcut available or unavailable.","parameters":[{"name":"available","order":1,"description":"","type":"boolean","optional":false},{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_shortcut_toggled","order":50,"description":"Toggle or untoggle a custom Lua shortcut","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false},{"name":"toggled","order":1,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"start_selection","order":62,"description":"Starts selection with selection tool from the specified position. Does nothing if the players cursor is not a selection tool.","parameters":[{"name":"position","order":0,"description":"The position to start selection from.","type":"MapPosition","optional":false},{"name":"selection_mode","order":1,"description":"The type of selection to start. Can be `select`, `alternative-select`, `reverse-select`.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"toggle_map_editor","order":53,"description":"Toggles this player into or out of the map editor. Does nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.","raises":[{"name":"on_player_toggled_map_editor","order":1,"description":"Raised if the map editor was successfully toggled.","timeframe":"instantly","optional":true},{"name":"on_pre_player_toggled_map_editor","order":0,"description":"Raised if the map editor was successfully toggled.","timeframe":"instantly","optional":true}],"parameters":[],"takes_table":false,"return_values":[]},{"name":"unlock_achievement","order":16,"description":"Unlock the achievements of the given player. This has any effect only when this is the local player, the achievement isn't unlocked so far and the achievement is of the type \"achievement\".","parameters":[{"name":"name","order":0,"description":"name of the achievement to unlock","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"unmute_alert","order":24,"description":"Unmutes alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the alert type was unmuted (false if it was wasn't muted).","type":"boolean","optional":false}]},{"name":"use_from_cursor","order":33,"description":"Uses the current item in the cursor if it's a capsule or does nothing if not.","parameters":[{"name":"position","order":0,"description":"Where the item would be used.","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[]},{"name":"zoom_to_world","order":46,"description":"Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"scale","order":1,"description":"","type":"double","optional":true}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"admin","order":14,"description":"`true` if the player is an admin.","notes":["Trying to change player admin status from the console when you aren't an admin does nothing."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"afk_time","order":16,"description":"How many ticks since the last action of this player","type":"uint","optional":false,"read":true,"write":false},{"name":"auto_sort_main_inventory","order":30,"description":"If the main inventory will be auto sorted.","type":"boolean","optional":false,"read":true,"write":false},{"name":"blueprint_to_setup","order":24,"description":"The item stack containing a blueprint to be setup.","type":"LuaItemStack","optional":false,"read":true,"write":false},{"name":"character","order":0,"description":"The character attached to this player, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](LuaPlayer::connected)).","type":"LuaEntity","optional":true,"read":true,"write":true},{"name":"chat_color","order":10,"description":"The color used when this player talks in game.","type":"Color","optional":false,"read":true,"write":true},{"name":"color","order":9,"description":"The color associated with the player. This will be used to tint the player's character as well as their buildings and vehicles.","type":"Color","optional":false,"read":true,"write":true},{"name":"connected","order":13,"description":"`true` if the player is currently connected to the game.","type":"boolean","optional":false,"read":true,"write":false},{"name":"controller_type","order":5,"description":"","type":"defines.controllers","optional":false,"read":true,"write":false},{"name":"cursor_stack_temporary","order":32,"description":"Returns true if the current item stack in cursor will be destroyed after clearing the cursor. Manually putting it into inventory still preserves the item. If the cursor stack is not one of the supported types (blueprint, blueprint-book, deconstruction-planner, upgrade-planner), write operation will be silently ignored.","type":"boolean","optional":false,"read":true,"write":true},{"name":"cutscene_character","order":1,"description":"When in a cutscene; the character this player would be using once the cutscene is over, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](LuaPlayer::connected)).","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"display_resolution","order":22,"description":"The display resolution for this player.","notes":["During [on_player_created](on_player_created), this attribute will always return a resolution of `{width=1920, height=1080}`. To get the actual resolution, listen to the [on_player_display_resolution_changed](on_player_display_resolution_changed) event raised shortly afterwards."],"type":"DisplayResolution","optional":false,"read":true,"write":false},{"name":"display_scale","order":23,"description":"The display scale for this player.","notes":["During [on_player_created](on_player_created), this attribute will always return a scale of `1`. To get the actual scale, listen to the [on_player_display_scale_changed](on_player_display_scale_changed) event raised shortly afterwards."],"type":"double","optional":false,"read":true,"write":false},{"name":"entity_copy_source","order":15,"description":"The source entity used during entity settings copy-paste, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"game_view_settings","order":7,"description":"The player's game view settings.","type":"GameViewSettings","optional":false,"read":true,"write":true},{"name":"gui","order":3,"description":"","type":"LuaGui","optional":false,"read":true,"write":false},{"name":"hand_location","order":31,"description":"The original location of the item in the cursor, marked with a hand. `nil` if the cursor stack is empty. When writing, the specified inventory slot must be empty and the cursor stack must not be empty.","type":"ItemStackLocation","optional":true,"read":true,"write":true},{"name":"index","order":2,"description":"This player's unique index in [LuaGameScript::players](LuaGameScript::players). It is given to them when they are [created](on_player_created) and remains assigned to them until they are [removed](on_player_removed).","type":"uint","optional":false,"read":true,"write":false},{"name":"infinity_inventory_filters","order":29,"description":"The filters for this map editor infinity inventory settings.","type":{"complex_type":"array","value":"InfinityInventoryFilter"},"optional":false,"read":true,"write":true},{"name":"last_online","order":18,"description":"At what tick this player was last online.","type":"uint","optional":false,"read":true,"write":false},{"name":"map_view_settings","order":34,"description":"The player's map view settings. To write to this, use a table containing the fields that should be changed.","type":"MapViewSettings","optional":false,"read":false,"write":true},{"name":"minimap_enabled","order":8,"description":"`true` if the minimap is visible.","type":"boolean","optional":false,"read":true,"write":true},{"name":"mod_settings","order":20,"description":"The current per-player settings for the this player, indexed by prototype name. Returns the same structure as [LuaSettings::get_player_settings](LuaSettings::get_player_settings).","notes":["This table will become invalid if its associated player does."],"type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false,"read":true,"write":false},{"name":"name","order":11,"description":"The player's username.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":36,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"online_time","order":17,"description":"How many ticks did this player spend playing this save (all sessions combined)","type":"uint","optional":false,"read":true,"write":false},{"name":"opened_self","order":4,"description":"`true` if the player opened itself. I.e. if they opened the character or god-controller GUI.","type":"boolean","optional":false,"read":true,"write":false},{"name":"permission_group","order":19,"description":"The permission group this player is part of, if any.","type":"LuaPermissionGroup","optional":true,"read":true,"write":true},{"name":"remove_unfiltered_items","order":28,"description":"If items not included in this map editor infinity inventory filters should be removed.","type":"boolean","optional":false,"read":true,"write":true},{"name":"render_mode","order":25,"description":"The render mode of the player, like map or zoom to world. The render mode can be set using [LuaPlayer::open_map](LuaPlayer::open_map), [LuaPlayer::zoom_to_world](LuaPlayer::zoom_to_world) and [LuaPlayer::close_map](LuaPlayer::close_map).","type":"defines.render_mode","optional":false,"read":true,"write":false},{"name":"show_on_map","order":27,"description":"If `true`, circle and name of given player is rendered on the map/chart.","type":"boolean","optional":false,"read":true,"write":true},{"name":"spectator","order":26,"description":"If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.","type":"boolean","optional":false,"read":true,"write":true},{"name":"stashed_controller_type","order":6,"description":"The stashed controller type, if any.","notes":["This is mainly useful when a player is in the map editor."],"type":"defines.controllers","optional":true,"read":true,"write":false},{"name":"tag","order":12,"description":"The tag that is shown after the player in chat and on the map.","type":"string","optional":false,"read":true,"write":true},{"name":"ticks_to_respawn","order":21,"description":"The number of ticks until this player will respawn. `nil` if this player is not waiting to respawn.\n\nSet to `nil` to immediately respawn the player.","notes":["Set to any positive value to trigger the respawn state for this player."],"type":"uint","optional":true,"read":true,"write":true},{"name":"valid","order":35,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"zoom","order":33,"description":"The player's zoom-level.","type":"double","optional":false,"read":false,"write":true}],"operators":[],"abstract":false,"base_classes":["LuaControl"]},{"name":"LuaProfiler","order":65,"description":"An object used to measure script performance.","notes":["Since performance is non-deterministic, these objects don't allow reading the raw time values from Lua. They can be used anywhere a [LocalisedString](LocalisedString) is used, except for [LuaGuiElement::add](LuaGuiElement::add)'s LocalisedString arguments, [LuaSurface::create_entity](LuaSurface::create_entity)'s `text` argument, and [LuaEntity::add_market_item](LuaEntity::add_market_item)."],"methods":[{"name":"add","order":3,"description":"Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at once.","notes":["If other is running, the time to now will be added."],"parameters":[{"name":"other","order":0,"description":"The timer to add to this timer.","type":"LuaProfiler","optional":false}],"takes_table":false,"return_values":[]},{"name":"divide","order":4,"description":"Divides the current duration by a set value. Useful for calculating the average of many iterations.","notes":["Does nothing if this isn't stopped."],"parameters":[{"name":"number","order":0,"description":"The number to divide by. Must be > 0.","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"help","order":5,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"reset","order":0,"description":"Resets the clock, also restarting it.","parameters":[],"takes_table":false,"return_values":[]},{"name":"restart","order":2,"description":"Start the clock again, without resetting it.","parameters":[],"takes_table":false,"return_values":[]},{"name":"stop","order":1,"description":"Stops the clock.","parameters":[],"takes_table":false,"return_values":[]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaProgrammableSpeakerControlBehavior","order":66,"description":"Control behavior for programmable speakers.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_condition","order":1,"description":"","type":"CircuitConditionDefinition","optional":false,"read":true,"write":true},{"name":"circuit_parameters","order":0,"description":"","type":"ProgrammableSpeakerCircuitParameters","optional":false,"read":true,"write":true},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaRCON","order":67,"description":"An interface to send messages to the calling RCON interface.","methods":[{"name":"print","order":0,"description":"Print text to the calling RCON interface if any.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"object_name","order":0,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRailChainSignalControlBehavior","order":68,"description":"Control behavior for rail chain signals.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"blue_signal","order":3,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"green_signal","order":2,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"orange_signal","order":1,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"red_signal","order":0,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaRailPath","order":69,"description":"A rail path.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"current","order":1,"description":"The current rail index.","type":"uint","optional":false,"read":true,"write":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"rails","order":4,"description":"Array of the rails that this path travels over.","type":{"complex_type":"LuaCustomTable","key":"uint","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"size","order":0,"description":"The total number of rails in this path.","type":"uint","optional":false,"read":true,"write":false},{"name":"total_distance","order":2,"description":"The total path distance.","type":"double","optional":false,"read":true,"write":false},{"name":"travelled_distance","order":3,"description":"The total distance travelled.","type":"double","optional":false,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRailSignalControlBehavior","order":70,"description":"Control behavior for rail signals.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_condition","order":5,"description":"The circuit condition when controlling the signal through the circuit network.","type":"CircuitConditionDefinition","optional":false,"read":true,"write":true},{"name":"close_signal","order":3,"description":"If this will close the rail signal based off the circuit condition.","type":"boolean","optional":false,"read":true,"write":true},{"name":"green_signal","order":2,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"orange_signal","order":1,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"read_signal","order":4,"description":"If this will read the rail signal state.","type":"boolean","optional":false,"read":true,"write":true},{"name":"red_signal","order":0,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaRandomGenerator","order":71,"description":"A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. This random generator can be saved and loaded and will maintain its state. Note this is entirely different from calling [math.random](Libraries.html#math.random)() and you should be sure you actually want to use this over calling `math.random()`. If you aren't sure if you need to use this over calling `math.random()` then you probably don't need to use this.","examples":["Create a generator and use it to print a random number. \n```\nglobal.generator = game.create_random_generator()\ngame.player.print(global.generator())\n```"],"methods":[{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"re_seed","order":0,"description":"Re-seeds the random generator with the given value.","notes":["Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results."],"parameters":[{"name":"seed","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"call","order":0,"description":"Generates a random number. If no parameters are given a number in the [0, 1) range is returned. If a single parameter is given a floored number in the [1, N] range is returned. If 2 parameters are given a floored number in the [N1, N2] range is returned.","parameters":[{"name":"lower","order":0,"description":"Inclusive lower bound on the result","type":"int","optional":true},{"name":"upper","order":1,"description":"Inclusive upper bound on the result","type":"int","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]}],"abstract":false},{"name":"LuaRecipe","order":72,"description":"A crafting recipe. Recipes belong to forces (see [LuaForce](LuaForce)) because some recipes are unlocked by research, and researches are per-force.","methods":[{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"reload","order":0,"description":"Reload the recipe from the prototype.","parameters":[],"takes_table":false,"return_values":[]}],"attributes":[{"name":"category","order":5,"description":"Category of the recipe.","type":"string","optional":false,"read":true,"write":false},{"name":"enabled","order":4,"description":"Can the recipe be used?","type":"boolean","optional":false,"read":true,"write":true},{"name":"energy","order":10,"description":"Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.","type":"double","optional":false,"read":true,"write":false},{"name":"force","order":14,"description":"The force that owns this recipe.","type":"LuaForce","optional":false,"read":true,"write":false},{"name":"group","order":12,"description":"Group of this recipe.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"hidden","order":8,"description":"Is the recipe hidden? Hidden recipe don't show up in the crafting menu.","type":"boolean","optional":false,"read":true,"write":false},{"name":"hidden_from_flow_stats","order":9,"description":"Is the recipe hidden from flow statistics?","type":"boolean","optional":false,"read":true,"write":true},{"name":"ingredients","order":6,"description":"Ingredients for this recipe.","examples":["What the \"steel-chest\" recipe would return \n```\n{{type=\"item\", name=\"steel-plate\", amount=8}}\n```","What the \"advanced-oil-processing\" recipe would return \n```\n{{type=\"fluid\", name=\"crude-oil\", amount=10}, {type=\"fluid\", name=\"water\", amount=5}}\n```"],"type":{"complex_type":"array","value":"Ingredient"},"optional":false,"read":true,"write":false},{"name":"localised_description","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":1,"description":"Localised name of the recipe.","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":16,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":11,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"products","order":7,"description":"The results of this recipe.","type":{"complex_type":"array","value":"Product"},"optional":false,"read":true,"write":false},{"name":"prototype","order":3,"description":"The prototype for this recipe.","type":"LuaRecipePrototype","optional":false,"read":true,"write":false},{"name":"subgroup","order":13,"description":"Subgroup of this recipe.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"valid","order":15,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRecipeCategoryPrototype","order":73,"description":"Prototype of a recipe category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRecipePrototype","order":74,"description":"A crafting recipe prototype.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"allow_as_intermediate","order":19,"description":"If this recipe is enabled for the purpose of intermediate hand-crafting.","type":"boolean","optional":false,"read":true,"write":false},{"name":"allow_decomposition","order":24,"description":"Is this recipe allowed to be broken down for the recipe tooltip \"Total raw\" calculations?","type":"boolean","optional":false,"read":true,"write":false},{"name":"allow_inserter_overload","order":18,"description":"If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).","type":"boolean","optional":false,"read":true,"write":false},{"name":"allow_intermediates","order":20,"description":"If this recipe is allowed to use intermediate recipes when hand-crafting.","type":"boolean","optional":false,"read":true,"write":false},{"name":"always_show_made_in","order":11,"description":"Should this recipe always show \"Made in\" in the tooltip?","type":"boolean","optional":false,"read":true,"write":false},{"name":"always_show_products","order":22,"description":"If the products are always shown in the recipe tooltip.","type":"boolean","optional":false,"read":true,"write":false},{"name":"category","order":4,"description":"Category of the recipe.","type":"string","optional":false,"read":true,"write":false},{"name":"emissions_multiplier","order":23,"description":"The emissions multiplier for this recipe.","type":"double","optional":false,"read":true,"write":false},{"name":"enabled","order":0,"description":"If this recipe prototype is enabled by default (enabled at the beginning of a game).","type":"boolean","optional":false,"read":true,"write":false},{"name":"energy","order":12,"description":"Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.","type":"double","optional":false,"read":true,"write":false},{"name":"group","order":14,"description":"Group of this recipe.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"hidden","order":8,"description":"Is the recipe hidden? Hidden recipe don't show up in the crafting menu.","type":"boolean","optional":false,"read":true,"write":false},{"name":"hidden_from_flow_stats","order":9,"description":"Is the recipe hidden from flow statistics (item/fluid production statistics)?","type":"boolean","optional":false,"read":true,"write":false},{"name":"hidden_from_player_crafting","order":10,"description":"Is the recipe hidden from player crafting? The recipe will still show up for selection in machines.","type":"boolean","optional":false,"read":true,"write":false},{"name":"ingredients","order":5,"description":"Ingredients for this recipe.","type":{"complex_type":"array","value":"Ingredient"},"optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"Localised name of the recipe.","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"main_product","order":7,"description":"The main product of this recipe, if any.","type":"Product","optional":true,"read":true,"write":false},{"name":"name","order":1,"description":"Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":27,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":13,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"overload_multiplier","order":17,"description":"Used to determine how many extra items are put into an assembling machine before it's considered \"full enough\".","type":"uint","optional":false,"read":true,"write":false},{"name":"products","order":6,"description":"The results of this recipe.","type":{"complex_type":"array","value":"Product"},"optional":false,"read":true,"write":false},{"name":"request_paste_multiplier","order":16,"description":"The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.","type":"uint","optional":false,"read":true,"write":false},{"name":"show_amount_in_title","order":21,"description":"If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.","type":"boolean","optional":false,"read":true,"write":false},{"name":"subgroup","order":15,"description":"Subgroup of this recipe.","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"unlock_results","order":25,"description":"Is this recipe unlocks the result item(s) so they're shown in filter-select GUIs.","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":26,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRemote","order":75,"description":"Registry of interfaces between scripts. An interface is simply a dictionary mapping names to functions. A script or mod can then register an interface with [LuaRemote](LuaRemote), after that any script can call the registered functions, provided it knows the interface name and the desired function name. An instance of LuaRemote is available through the global object named `remote`.","examples":["Will register a remote interface containing two functions. Later, it will call these functions through `remote`. \n```\nremote.add_interface(\"human interactor\",\n                     {hello = function() game.player.print(\"Hi!\") end,\n                      bye = function(name) game.player.print(\"Bye \" .. name) end})\n-- Some time later, possibly in a different mod...\nremote.call(\"human interactor\", \"hello\")\nremote.call(\"human interactor\", \"bye\", \"dear reader\")\n```"],"methods":[{"name":"add_interface","order":0,"description":"Add a remote interface.","parameters":[{"name":"functions","order":1,"description":"List of functions that are members of the new interface.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"function","parameters":[]}},"optional":false},{"name":"name","order":0,"description":"Name of the interface. If the name matches any existing interface, an error is thrown.","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"call","order":2,"description":"Call a function of an interface.","parameters":[{"name":"function","order":1,"description":"Function name that belongs to the `interface`.","type":"string","optional":false},{"name":"interface","order":0,"description":"Interface to look up `function` in.","type":"string","optional":false}],"variadic_type":"Any","variadic_description":"Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.","takes_table":false,"return_values":[{"order":0,"description":"","type":"Any","optional":true}]},{"name":"remove_interface","order":1,"description":"Removes an interface with the given name.","parameters":[{"name":"name","order":0,"description":"Name of the interface.","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Whether the interface was removed. `False` if the interface didn't exist.","type":"boolean","optional":false}]}],"attributes":[{"name":"interfaces","order":1,"description":"List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.","examples":["Assuming the \"human interactor\" interface is registered as above \n```\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"hello\"]))        -- prints true\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"nonexistent\"]))  -- prints nil\n```"],"type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}}},"optional":false,"read":true,"write":false},{"name":"object_name","order":0,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRendering","order":76,"description":"Allows rendering of geometric shapes, text and sprites in the game world. Each render object is identified by an id that is universally unique for the lifetime of a whole game.","notes":["If an entity target of an object is destroyed or changes surface, then the object is also destroyed."],"methods":[{"name":"bring_to_front","order":15,"description":"Reorder this object so that it is drawn in front of the already existing objects.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"clear","order":13,"description":"Destroys all render objects.","parameters":[{"name":"mod_name","order":0,"description":"If provided, only the render objects created by this mod are destroyed.","type":"string","optional":true}],"takes_table":false,"return_values":[]},{"name":"destroy","order":9,"description":"Destroy the object with the given id.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"draw_animation","order":8,"description":"Create an animation.","parameters":[{"name":"animation","order":0,"description":"Name of an [animation prototype](https://wiki.factorio.com/Prototype/Animation).","type":"string","optional":false},{"name":"animation_offset","order":7,"description":"Offset of the animation in frames. Default is 0.","type":"double","optional":true},{"name":"animation_speed","order":6,"description":"How many frames the animation goes forward per tick. Default is 1.","type":"double","optional":true},{"name":"forces","order":15,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"only_in_alt_mode","order":18,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the animation. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":8,"description":"If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":true},{"name":"orientation_target_offset","order":9,"description":"Only used if `orientation_target` is a LuaEntity.","type":"Vector","optional":true},{"name":"oriented_offset","order":10,"description":"Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.","type":"Vector","optional":true},{"name":"players","order":16,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"render_layer","order":5,"description":"","type":"RenderLayer","optional":true},{"name":"surface","order":13,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":11,"description":"Center of the animation.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":12,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":14,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"tint","order":4,"description":"","type":"Color","optional":true},{"name":"visible","order":17,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"x_scale","order":2,"description":"Horizontal scale of the animation. Default is 1.","type":"double","optional":true},{"name":"y_scale","order":3,"description":"Vertical scale of the animation. Default is 1.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_arc","order":4,"description":"Create an arc.","parameters":[{"name":"angle","order":4,"description":"The angle of the arc, in radian.","type":"float","optional":false},{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":12,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"forces","order":9,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"max_radius","order":1,"description":"The radius of the outer edge of the arc, in tiles.","type":"double","optional":false},{"name":"min_radius","order":2,"description":"The radius of the inner edge of the arc, in tiles.","type":"double","optional":false},{"name":"only_in_alt_mode","order":13,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":10,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"start_angle","order":3,"description":"Where the arc starts, in radian.","type":"float","optional":false},{"name":"surface","order":7,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":5,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":6,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":8,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":11,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_circle","order":2,"description":"Create a circle.","parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":11,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"filled","order":3,"description":"If the circle should be filled.","type":"boolean","optional":false},{"name":"forces","order":8,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"only_in_alt_mode","order":12,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":9,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"radius","order":1,"description":"In tiles.","type":"double","optional":false},{"name":"surface","order":6,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":4,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":5,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":7,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":10,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":2,"description":"Width of the outline, used only if filled = false. Value is in pixels (32 per tile).","type":"float","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_light","order":7,"description":"Create a light.","notes":["The base game uses the utility sprites `light_medium` and `light_small` for lights."],"parameters":[{"name":"color","order":6,"description":"Defaults to white (no tint).","type":"Color","optional":true},{"name":"forces","order":11,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"intensity","order":3,"description":"Default is 1.","type":"float","optional":true},{"name":"minimum_darkness","order":4,"description":"The minimum darkness at which this light is rendered. Default is 0.","type":"float","optional":true},{"name":"only_in_alt_mode","order":14,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the light. Default is 0.","type":"RealOrientation","optional":true},{"name":"oriented","order":5,"description":"If this light has the same orientation as the entity target, default is false. Note that `orientation` is still applied to the sprite.","type":"boolean","optional":true},{"name":"players","order":12,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"scale","order":2,"description":"Default is 1.","type":"float","optional":true},{"name":"sprite","order":0,"description":"","type":"SpritePath","optional":false},{"name":"surface","order":9,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":7,"description":"Center of the light.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":8,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":10,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":13,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_line","order":0,"description":"Create a line.","examples":["Draw a white and 2 pixel wide line from {0, 0} to {2, 2}. \n```\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2}\n```","Draw a red and 3 pixel wide line from {0, 0} to {0, 5}. The line has 1 tile long dashes and gaps. \n```\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {0, 5}, color = {r = 1}, width = 3, gap_length = 1, dash_length = 1}\n```"],"parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"dash_length","order":3,"description":"Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.","type":"double","optional":true},{"name":"draw_on_ground","order":13,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"forces","order":10,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"from","order":4,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"from_offset","order":5,"description":"Only used if `from` is a LuaEntity.","type":"Vector","optional":true},{"name":"gap_length","order":2,"description":"Length of the gaps that this line has, in tiles. Default is 0.","type":"double","optional":true},{"name":"only_in_alt_mode","order":14,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":11,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"surface","order":8,"description":"","type":"SurfaceIdentification","optional":false},{"name":"time_to_live","order":9,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"to","order":6,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"to_offset","order":7,"description":"Only used if `to` is a LuaEntity.","type":"Vector","optional":true},{"name":"visible","order":12,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":1,"description":"In pixels (32 per tile).","type":"float","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_polygon","order":5,"description":"Create a triangle mesh defined by a triangle strip.","parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":12,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"forces","order":9,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"only_in_alt_mode","order":13,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":4,"description":"The orientation applied to all vertices. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":5,"description":"If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that `orientation` is still applied.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":true},{"name":"orientation_target_offset","order":6,"description":"Only used if `orientation_target` is a LuaEntity.","type":"Vector","optional":true},{"name":"players","order":10,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"surface","order":7,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":2,"description":"Acts like an offset applied to all vertices that are not set to an entity.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":true},{"name":"target_offset","order":3,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":8,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"vertices","order":1,"description":"","type":{"complex_type":"array","value":"ScriptRenderVertexTarget"},"optional":false},{"name":"visible","order":11,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_rectangle","order":3,"description":"Create a rectangle.","parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":12,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"filled","order":2,"description":"If the rectangle should be filled.","type":"boolean","optional":false},{"name":"forces","order":9,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"left_top","order":3,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"left_top_offset","order":4,"description":"Only used if `left_top` is a LuaEntity.","type":"Vector","optional":true},{"name":"only_in_alt_mode","order":13,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":10,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"right_bottom","order":5,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"right_bottom_offset","order":6,"description":"Only used if `right_bottom` is a LuaEntity.","type":"Vector","optional":true},{"name":"surface","order":7,"description":"","type":"SurfaceIdentification","optional":false},{"name":"time_to_live","order":8,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":11,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":1,"description":"Width of the outline, used only if filled = false. Value is in pixels (32 per tile).","type":"float","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_sprite","order":6,"description":"Create a sprite.","examples":["This will draw an iron plate icon at the character's feet. The sprite will move together with the character. \n```\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = game.player.character, surface = game.player.surface}\n```","This will draw an iron plate icon at the character's head. The sprite will move together with the character. \n```\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = game.player.character, target_offset = {0, -2}, surface = game.player.surface}\n```"],"parameters":[{"name":"forces","order":13,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"only_in_alt_mode","order":16,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the sprite. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":6,"description":"If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":true},{"name":"orientation_target_offset","order":7,"description":"Only used if `orientation_target` is a LuaEntity.","type":"Vector","optional":true},{"name":"oriented_offset","order":8,"description":"Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.","type":"Vector","optional":true},{"name":"players","order":14,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"render_layer","order":5,"description":"","type":"RenderLayer","optional":true},{"name":"sprite","order":0,"description":"","type":"SpritePath","optional":false},{"name":"surface","order":11,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":9,"description":"Center of the sprite.","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":10,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"time_to_live","order":12,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"tint","order":4,"description":"","type":"Color","optional":true},{"name":"visible","order":15,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"x_scale","order":2,"description":"Horizontal scale of the sprite. Default is 1.","type":"double","optional":true},{"name":"y_scale","order":3,"description":"Vertical scale of the sprite. Default is 1.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"draw_text","order":1,"description":"Create a text.","notes":["Not all fonts support scaling."],"parameters":[{"name":"alignment","order":13,"description":"Defaults to \"left\". Other options are \"right\" and \"center\".","type":"string","optional":true},{"name":"color","order":4,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":11,"description":"If this should be drawn below sprites and entities.","type":"boolean","optional":true},{"name":"font","order":6,"description":"Name of font to use. Defaults to the same font as flying-text.","type":"string","optional":true},{"name":"forces","order":8,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":true},{"name":"only_in_alt_mode","order":16,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":12,"description":"The orientation of the text. Default is 0.","type":"RealOrientation","optional":true},{"name":"players","order":9,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"scale","order":5,"description":"","type":"double","optional":true},{"name":"scale_with_zoom","order":15,"description":"Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.","type":"boolean","optional":true},{"name":"surface","order":1,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":2,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":3,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true},{"name":"text","order":0,"description":"The text to display.","type":"LocalisedString","optional":false},{"name":"time_to_live","order":7,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"vertical_alignment","order":14,"description":"Defaults to \"top\". Other options are \"middle\", \"baseline\" and \"bottom\".","type":"string","optional":true},{"name":"visible","order":10,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Id of the render object","type":"uint64","optional":false}]},{"name":"get_alignment","order":52,"description":"Get the alignment of the text with this id.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text.","type":"string","optional":true}]},{"name":"get_all_ids","order":12,"description":"Gets an array of all valid object ids.","parameters":[{"name":"mod_name","order":0,"description":"If provided, get only the render objects created by this mod.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"uint64"},"optional":false}]},{"name":"get_angle","order":73,"description":"Get the angle of the arc with this id.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Angle in radian. `nil` if the object is not a arc.","type":"float","optional":true}]},{"name":"get_animation","order":95,"description":"Get the animation prototype name of the animation with this id.","subclasses":["Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not an animation.","type":"string","optional":true}]},{"name":"get_animation_offset","order":99,"description":"Get the animation offset of the animation with this id.","subclasses":["Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Animation offset in frames. `nil` if the object is not an animation.","type":"double","optional":true}]},{"name":"get_animation_speed","order":97,"description":"Get the animation speed of the animation with this id.","subclasses":["Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Animation speed in frames per tick. `nil` if the object is not an animation.","type":"double","optional":true}]},{"name":"get_color","order":29,"description":"Get the color or tint of the object with this id.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object does not support color.","type":"Color","optional":true}]},{"name":"get_dash_length","order":37,"description":"Get the dash length of the line with this id.","subclasses":["Line"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a line.","type":"double","optional":true}]},{"name":"get_draw_on_ground","order":25,"description":"Get whether this is being drawn on the ground, under most entities and sprites.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_filled","order":58,"description":"Get if the circle or rectangle with this id is filled.","subclasses":["Circle","Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a circle or rectangle.","type":"boolean","optional":true}]},{"name":"get_font","order":50,"description":"Get the font of the text with this id.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text.","type":"string","optional":true}]},{"name":"get_forces","order":19,"description":"Get the forces that the object with this id is rendered to or `nil` if visible to all forces.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaForce"},"optional":true}]},{"name":"get_from","order":33,"description":"Get from where the line with this id is drawn.","subclasses":["Line"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this object is not a line.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_gap_length","order":39,"description":"Get the length of the gaps in the line with this id.","subclasses":["Line"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a line.","type":"double","optional":true}]},{"name":"get_intensity","order":89,"description":"Get the intensity of the light with this id.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a light.","type":"float","optional":true}]},{"name":"get_left_top","order":62,"description":"Get where top left corner of the rectangle with this id is drawn.","subclasses":["Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a rectangle.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_max_radius","order":67,"description":"Get the radius of the outer edge of the arc with this id.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a arc.","type":"double","optional":true}]},{"name":"get_min_radius","order":69,"description":"Get the radius of the inner edge of the arc with this id.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a arc.","type":"double","optional":true}]},{"name":"get_minimum_darkness","order":91,"description":"Get the minimum darkness at which the light with this id is rendered.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a light.","type":"float","optional":true}]},{"name":"get_only_in_alt_mode","order":27,"description":"Get whether this is only rendered in alt-mode.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_orientation","order":44,"description":"Get the orientation of the object with this id.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Text","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text, polygon, sprite, light or animation.","type":"RealOrientation","optional":true}]},{"name":"get_orientation_target","order":85,"description":"The object rotates so that it faces this target. Note that `orientation` is still applied to the object. Get the orientation_target of the object with this id.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Polygon","Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if no target or if this object is not a polygon, sprite, or animation.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_oriented","order":93,"description":"Get if the light with this id is rendered has the same orientation as the target entity. Note that `orientation` is still applied to the sprite.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a light.","type":"boolean","optional":true}]},{"name":"get_oriented_offset","order":87,"description":"Offsets the center of the sprite or animation if `orientation_target` is given. This offset will rotate together with the sprite or animation. Get the oriented_offset of the sprite or animation with this id.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if this object is not a sprite or animation.","type":"Vector","optional":true}]},{"name":"get_players","order":21,"description":"Get the players that the object with this id is rendered to or `nil` if visible to all players.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaPlayer"},"optional":true}]},{"name":"get_radius","order":60,"description":"Get the radius of the circle with this id.","subclasses":["Circle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a circle.","type":"double","optional":true}]},{"name":"get_render_layer","order":83,"description":"Get the render layer of the sprite or animation with this id.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a sprite or animation.","type":"RenderLayer","optional":true}]},{"name":"get_right_bottom","order":64,"description":"Get where bottom right corner of the rectangle with this id is drawn.","subclasses":["Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a rectangle.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_scale","order":46,"description":"Get the scale of the text or light with this id.","subclasses":["Text","Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text or light.","type":"double","optional":true}]},{"name":"get_scale_with_zoom","order":56,"description":"Get if the text with this id scales with player zoom.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text.","type":"boolean","optional":true}]},{"name":"get_sprite","order":77,"description":"Get the sprite of the sprite or light with this id.","subclasses":["Sprite","Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a sprite or light.","type":"SpritePath","optional":true}]},{"name":"get_start_angle","order":71,"description":"Get where the arc with this id starts.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Angle in radian. `nil` if the object is not a arc.","type":"float","optional":true}]},{"name":"get_surface","order":16,"description":"The surface the object with this id is rendered on.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaSurface","optional":false}]},{"name":"get_target","order":42,"description":"Get where the object with this id is drawn.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Text","Circle","Arc","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object does not support target.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_text","order":48,"description":"Get the text that is displayed by the text with this id.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text.","type":"LocalisedString","optional":true}]},{"name":"get_time_to_live","order":17,"description":"Get the time to live of the object with this id. This will be 0 if the object does not expire.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_to","order":35,"description":"Get where the line with this id is drawn to.","subclasses":["Line"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a line.","type":"ScriptRenderTarget","optional":true}]},{"name":"get_type","order":14,"description":"Gets the type of the given object. The types are \"text\", \"line\", \"circle\", \"rectangle\", \"arc\", \"polygon\", \"sprite\", \"light\" and \"animation\".","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_vertical_alignment","order":54,"description":"Get the vertical alignment of the text with this id.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a text.","type":"string","optional":true}]},{"name":"get_vertices","order":75,"description":"Get the vertices of the polygon with this id.","subclasses":["Polygon"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a polygon.","type":{"complex_type":"array","value":"ScriptRenderTarget"},"optional":true}]},{"name":"get_visible","order":23,"description":"Get whether this is rendered to anyone at all.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_width","order":31,"description":"Get the width of the object with this id. Value is in pixels (32 per tile).","subclasses":["Line","Circle","Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object does not support width.","type":"float","optional":true}]},{"name":"get_x_scale","order":79,"description":"Get the horizontal scale of the sprite or animation with this id.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a sprite or animation.","type":"double","optional":true}]},{"name":"get_y_scale","order":81,"description":"Get the vertical scale of the sprite or animation with this id.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if the object is not a sprite or animation.","type":"double","optional":true}]},{"name":"is_font_valid","order":10,"description":"Does a font with this name exist?","parameters":[{"name":"font_name","order":0,"description":"","type":"string","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_valid","order":11,"description":"Does a valid object with this id exist?","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"set_alignment","order":53,"description":"Set the alignment of the text with this id. Does nothing if this object is not a text.","subclasses":["Text"],"parameters":[{"name":"alignment","order":1,"description":"\"left\", \"right\" or \"center\".","type":"string","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_angle","order":74,"description":"Set the angle of the arc with this id. Does nothing if this object is not a arc.","subclasses":["Arc"],"parameters":[{"name":"angle","order":1,"description":"angle in radian","type":"float","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_animation","order":96,"description":"Set the animation prototype name of the animation with this id. Does nothing if this object is not an animation.","subclasses":["Animation"],"parameters":[{"name":"animation","order":1,"description":"","type":"string","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_animation_offset","order":100,"description":"Set the animation offset of the animation with this id. Does nothing if this object is not an animation.","subclasses":["Animation"],"parameters":[{"name":"animation_offset","order":1,"description":"Animation offset in frames.","type":"double","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_animation_speed","order":98,"description":"Set the animation speed of the animation with this id. Does nothing if this object is not an animation.","subclasses":["Animation"],"parameters":[{"name":"animation_speed","order":1,"description":"Animation speed in frames per tick.","type":"double","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_color","order":30,"description":"Set the color or tint of the object with this id. Does nothing if this object does not support color.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"color","order":1,"description":"","type":"Color","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_corners","order":66,"description":"Set the corners of the rectangle with this id. Does nothing if this object is not a rectangle.","subclasses":["Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"left_top","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"left_top_offset","order":2,"description":"","type":"Vector","optional":false},{"name":"right_bottom","order":3,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"right_bottom_offset","order":4,"description":"","type":"Vector","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_dash_length","order":38,"description":"Set the dash length of the line with this id. Does nothing if this object is not a line.","subclasses":["Line"],"parameters":[{"name":"dash_length","order":1,"description":"","type":"double","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_dashes","order":41,"description":"Set the length of the dashes and the length of the gaps in the line with this id. Does nothing if this object is not a line.","subclasses":["Line"],"parameters":[{"name":"dash_length","order":1,"description":"","type":"double","optional":false},{"name":"gap_length","order":2,"description":"","type":"double","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_draw_on_ground","order":26,"description":"Set whether this is being drawn on the ground, under most entities and sprites.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon"],"parameters":[{"name":"draw_on_ground","order":1,"description":"","type":"boolean","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_filled","order":59,"description":"Set if the circle or rectangle with this id is filled. Does nothing if this object is not a circle or rectangle.","subclasses":["Circle","Rectangle"],"parameters":[{"name":"filled","order":1,"description":"","type":"boolean","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_font","order":51,"description":"Set the font of the text with this id. Does nothing if this object is not a text.","subclasses":["Text"],"parameters":[{"name":"font","order":1,"description":"","type":"string","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_forces","order":20,"description":"Set the forces that the object with this id is rendered to.","parameters":[{"name":"forces","order":1,"description":"Providing an empty array will set the object to be visible to all forces.","type":{"complex_type":"array","value":"ForceIdentification"},"optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_from","order":34,"description":"Set from where the line with this id is drawn. Does nothing if the object is not a line.","subclasses":["Line"],"parameters":[{"name":"from","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"from_offset","order":2,"description":"","type":"Vector","optional":true},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_gap_length","order":40,"description":"Set the length of the gaps in the line with this id. Does nothing if this object is not a line.","subclasses":["Line"],"parameters":[{"name":"gap_length","order":1,"description":"","type":"double","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_intensity","order":90,"description":"Set the intensity of the light with this id. Does nothing if this object is not a light.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"intensity","order":1,"description":"","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_left_top","order":63,"description":"Set where top left corner of the rectangle with this id is drawn. Does nothing if this object is not a rectangle.","subclasses":["Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"left_top","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"left_top_offset","order":2,"description":"","type":"Vector","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_max_radius","order":68,"description":"Set the radius of the outer edge of the arc with this id. Does nothing if this object is not a arc.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"max_radius","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_min_radius","order":70,"description":"Set the radius of the inner edge of the arc with this id. Does nothing if this object is not a arc.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"min_radius","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_minimum_darkness","order":92,"description":"Set the minimum darkness at which the light with this id is rendered. Does nothing if this object is not a light.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"minimum_darkness","order":1,"description":"","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_only_in_alt_mode","order":28,"description":"Set whether this is only rendered in alt-mode.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"only_in_alt_mode","order":1,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_orientation","order":45,"description":"Set the orientation of the object with this id. Does nothing if this object is not a text, polygon, sprite, light or animation.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Text","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"orientation","order":1,"description":"","type":"RealOrientation","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_orientation_target","order":86,"description":"The object rotates so that it faces this target. Note that `orientation` is still applied to the object. Set the orientation_target of the object with this id. Does nothing if this object is not a polygon, sprite, or animation. Set to `nil` if the object should not have an orientation_target.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Polygon","Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"orientation_target","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"orientation_target_offset","order":2,"description":"","type":"Vector","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_oriented","order":94,"description":"Set if the light with this id is rendered has the same orientation as the target entity. Does nothing if this object is not a light. Note that `orientation` is still applied to the sprite.","subclasses":["Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"oriented","order":1,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_oriented_offset","order":88,"description":"Offsets the center of the sprite or animation if `orientation_target` is given. This offset will rotate together with the sprite or animation. Set the oriented_offset of the sprite or animation with this id. Does nothing if this object is not a sprite or animation.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"oriented_offset","order":1,"description":"","type":"Vector","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_players","order":22,"description":"Set the players that the object with this id is rendered to.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"players","order":1,"description":"Providing an empty array will set the object to be visible to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_radius","order":61,"description":"Set the radius of the circle with this id. Does nothing if this object is not a circle.","subclasses":["Circle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"radius","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_render_layer","order":84,"description":"Set the render layer of the sprite or animation with this id. Does nothing if this object is not a sprite or animation.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"render_layer","order":1,"description":"","type":"RenderLayer","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_right_bottom","order":65,"description":"Set where top bottom right of the rectangle with this id is drawn. Does nothing if this object is not a rectangle.","subclasses":["Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"right_bottom","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"right_bottom_offset","order":2,"description":"","type":"Vector","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_scale","order":47,"description":"Set the scale of the text or light with this id. Does nothing if this object is not a text or light.","subclasses":["Text","Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"scale","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_scale_with_zoom","order":57,"description":"Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes. Does nothing if this object is not a text.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"scale_with_zoom","order":1,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_sprite","order":78,"description":"Set the sprite of the sprite or light with this id. Does nothing if this object is not a sprite or light.","subclasses":["Sprite","Light"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"sprite","order":1,"description":"","type":"SpritePath","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_start_angle","order":72,"description":"Set where the arc with this id starts. Does nothing if this object is not a arc.","subclasses":["Arc"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"start_angle","order":1,"description":"angle in radian","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_target","order":43,"description":"Set where the object with this id is drawn. Does nothing if this object does not support target.","notes":["Polygon vertices that are set to an entity will ignore this."],"subclasses":["Text","Circle","Arc","Polygon","Sprite","Light","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"target","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":2,"description":"","type":"Vector","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_text","order":49,"description":"Set the text that is displayed by the text with this id. Does nothing if this object is not a text.","subclasses":["Text"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"text","order":1,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_time_to_live","order":18,"description":"Set the time to live of the object with this id. Set to 0 if the object should not expire.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"time_to_live","order":1,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_to","order":36,"description":"Set where the line with this id is drawn to. Does nothing if this object is not a line.","subclasses":["Line"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"to","order":1,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"to_offset","order":2,"description":"","type":"Vector","optional":true}],"takes_table":false,"return_values":[]},{"name":"set_vertical_alignment","order":55,"description":"Set the vertical alignment of the text with this id. Does nothing if this object is not a text.","subclasses":["Text"],"parameters":[{"name":"alignment","order":1,"description":"\"top\", \"middle\", \"baseline\" or \"bottom\"","type":"string","optional":false},{"name":"id","order":0,"description":"","type":"uint64","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_vertices","order":76,"description":"Set the vertices of the polygon with this id. Does nothing if this object is not a polygon.","subclasses":["Polygon"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"vertices","order":1,"description":"","type":{"complex_type":"array","value":"ScriptRenderVertexTarget"},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_visible","order":24,"description":"Set whether this is rendered to anyone at all.","parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"visible","order":1,"description":"","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_width","order":32,"description":"Set the width of the object with this id. Does nothing if this object does not support width. Value is in pixels (32 per tile).","subclasses":["Line","Circle","Rectangle"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"width","order":1,"description":"","type":"float","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_x_scale","order":80,"description":"Set the horizontal scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animation.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"x_scale","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_y_scale","order":82,"description":"Set the vertical scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animation.","subclasses":["Sprite","Animation"],"parameters":[{"name":"id","order":0,"description":"","type":"uint64","optional":false},{"name":"y_scale","order":1,"description":"","type":"double","optional":false}],"takes_table":false,"return_values":[]}],"attributes":[{"name":"object_name","order":0,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaResourceCategoryPrototype","order":77,"description":"Prototype of a resource category.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaRoboportControlBehavior","order":78,"description":"Control behavior for roboports.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"available_construction_output_signal","order":4,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"available_logistic_output_signal","order":2,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"read_logistics","order":0,"description":"`true` if the roboport should report the logistics network content to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"read_robot_stats","order":1,"description":"`true` if the roboport should report the robot statistics to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"total_construction_output_signal","order":5,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"total_logistic_output_signal","order":3,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaSettings","order":79,"description":"Object containing mod settings of three distinct types: `startup`, `global`, and `player`. An instance of LuaSettings is available through the global object named `settings`.","methods":[{"name":"get_player_settings","order":0,"description":"Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as [LuaPlayer::mod_settings](LuaPlayer::mod_settings).","notes":["This table will become invalid if its associated player does."],"parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false}]}],"attributes":[{"name":"global","order":1,"description":"The current global mod settings, indexed by prototype name.\n\nEven though these are marked as read-only, they can be changed by overwriting individual [ModSetting](ModSetting) tables in the custom table. Mods can only change their own settings. Using the in-game console, all global settings can be changed.","type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false,"read":true,"write":false},{"name":"object_name","order":3,"description":"This object's name.","type":"string","optional":false,"read":true,"write":false},{"name":"player","order":2,"description":"The default player mod settings for this map, indexed by prototype name.\n\nEven though these are marked as read-only, they can be changed by overwriting individual [ModSetting](ModSetting) tables in the custom table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.","type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false,"read":true,"write":false},{"name":"startup","order":0,"description":"The startup mod settings, indexed by prototype name.","type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaShortcutPrototype","order":80,"description":"Prototype of a shortcut.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"action","order":4,"description":"","type":"string","optional":false,"read":true,"write":false},{"name":"associated_control_input","order":8,"description":"The control input that is associated with this shortcut, if any.","type":"string","optional":true,"read":true,"write":false},{"name":"item_to_spawn","order":5,"description":"The item to create when this shortcut is used, if any.","type":"LuaItemPrototype","optional":true,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"technology_to_unlock","order":6,"description":"The technology to unlock when this shortcut is used, if any.","type":"LuaTechnologyPrototype","optional":true,"read":true,"write":false},{"name":"toggleable","order":7,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaStorageTankControlBehavior","order":81,"description":"Control behavior for storage tanks.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]},{"name":"LuaStyle","order":82,"description":"Style of a GUI element. All of the attributes listed here may be `nil` if not available for a particular GUI element.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"badge_font","order":54,"description":"","subclasses":["TabStyle"],"type":"string","optional":false,"read":true,"write":true},{"name":"badge_horizontal_spacing","order":55,"description":"","subclasses":["TabStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"bar_width","order":41,"description":"","subclasses":["LuaProgressBarStyle"],"type":"uint","optional":false,"read":true,"write":true},{"name":"bottom_cell_padding","order":22,"description":"Space between the table cell contents bottom and border.","subclasses":["LuaTableStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"bottom_margin","order":14,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"bottom_padding","order":10,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"cell_padding","order":64,"description":"Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.","subclasses":["LuaTableStyle"],"type":"int","optional":false,"read":false,"write":true},{"name":"clicked_font_color","order":30,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"clicked_vertical_offset","order":33,"description":"","subclasses":["LuaButtonStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"color","order":42,"description":"","subclasses":["LuaProgressBarStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"column_alignments","order":43,"description":"Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:","examples":["```\ntable_element.style.column_alignments[1] = \"center\"\n```"],"type":{"complex_type":"LuaCustomTable","key":"uint","value":"Alignment"},"optional":false,"read":true,"write":false},{"name":"default_badge_font_color","order":56,"description":"","subclasses":["TabStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"disabled_badge_font_color","order":58,"description":"","subclasses":["TabStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"disabled_font_color","order":31,"description":"","subclasses":["LuaButtonStyle","LuaTabStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"extra_bottom_margin_when_activated","order":50,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_bottom_padding_when_activated","order":46,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_left_margin_when_activated","order":51,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_left_padding_when_activated","order":47,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_margin_when_activated","order":66,"description":"Sets `extra_top/right/bottom/left_margin_when_activated` to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.","type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false,"read":false,"write":true},{"name":"extra_padding_when_activated","order":65,"description":"Sets `extra_top/right/bottom/left_padding_when_activated` to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.","type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false,"read":false,"write":true},{"name":"extra_right_margin_when_activated","order":52,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_right_padding_when_activated","order":48,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_top_margin_when_activated","order":49,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"extra_top_padding_when_activated","order":45,"description":"","subclasses":["ScrollPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"font","order":19,"description":"","type":"string","optional":false,"read":true,"write":true},{"name":"font_color","order":18,"description":"","type":"Color","optional":false,"read":true,"write":true},{"name":"gui","order":0,"description":"Gui of the [LuaGuiElement](LuaGuiElement) of this style.","type":"LuaGui","optional":false,"read":true,"write":false},{"name":"height","order":60,"description":"Sets both minimal and maximal height to the given value.","type":"int","optional":false,"read":false,"write":true},{"name":"horizontal_align","order":16,"description":"Horizontal align of the inner content of the widget, if any. Possible values are \"left\", \"center\" or \"right\".","type":"string","optional":true,"read":true,"write":true},{"name":"horizontal_spacing","order":38,"description":"Horizontal space between individual cells.","subclasses":["LuaTableStyle","LuaFlowStyle","LuaHorizontalFlowStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"horizontally_squashable","order":26,"description":"Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default value is false.","type":"boolean","optional":true,"read":true,"write":true},{"name":"horizontally_stretchable","order":24,"description":"Whether the GUI element stretches its size horizontally to other elements. `nil` if this element does not support stretching.","type":"boolean","optional":true,"read":true,"write":true},{"name":"hovered_font_color","order":29,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"left_cell_padding","order":23,"description":"Space between the table cell contents left and border.","subclasses":["LuaTableStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"left_margin","order":15,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"left_padding","order":11,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"margin","order":63,"description":"Sets top/right/bottom/left margins to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.","type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false,"read":false,"write":true},{"name":"maximal_height","order":5,"description":"Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.","type":"int","optional":false,"read":true,"write":true},{"name":"maximal_width","order":3,"description":"Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.","type":"int","optional":false,"read":true,"write":true},{"name":"minimal_height","order":4,"description":"Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.","type":"int","optional":false,"read":true,"write":true},{"name":"minimal_width","order":2,"description":"Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.","type":"int","optional":false,"read":true,"write":true},{"name":"name","order":1,"description":"Name of this style.","type":"string","optional":false,"read":true,"write":false},{"name":"natural_height","order":7,"description":"Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.","type":"int","optional":false,"read":true,"write":true},{"name":"natural_width","order":6,"description":"Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.","type":"int","optional":false,"read":true,"write":true},{"name":"object_name","order":68,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"padding","order":62,"description":"Sets top/right/bottom/left paddings to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.","type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false,"read":false,"write":true},{"name":"pie_progress_color","order":32,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"rich_text_setting","order":28,"description":"How this GUI element handles rich text.","subclasses":["LuaLabelStyle","LuaTextBoxStyle","LuaTextFieldStyle"],"type":"defines.rich_text_setting","optional":false,"read":true,"write":true},{"name":"right_cell_padding","order":21,"description":"Space between the table cell contents right and border.","subclasses":["LuaTableStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"right_margin","order":13,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"right_padding","order":9,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"selected_badge_font_color","order":57,"description":"","subclasses":["TabStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"selected_clicked_font_color","order":36,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"selected_font_color","order":34,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"selected_hovered_font_color","order":35,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"single_line","order":44,"description":"","subclasses":["LabelStyle"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"size","order":61,"description":"Sets both width and height to the given value. Also accepts an array with two values, setting width to the first and height to the second one.","type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false,"read":false,"write":true},{"name":"stretch_image_to_widget_size","order":53,"description":"","subclasses":["ImageStyle"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"strikethrough_color","order":37,"description":"","subclasses":["LuaButtonStyle"],"type":"Color","optional":false,"read":true,"write":true},{"name":"top_cell_padding","order":20,"description":"Space between the table cell contents top and border.","subclasses":["LuaTableStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"top_margin","order":12,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"top_padding","order":8,"description":"","type":"int","optional":false,"read":true,"write":true},{"name":"use_header_filler","order":40,"description":"","subclasses":["LuaFrameStyle"],"type":"boolean","optional":false,"read":true,"write":true},{"name":"valid","order":67,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"vertical_align","order":17,"description":"Vertical align of the inner content of the widget, if any. Possible values are \"top\", \"center\" or \"bottom\".","type":"string","optional":true,"read":true,"write":true},{"name":"vertical_spacing","order":39,"description":"Vertical space between individual cells.","subclasses":["LuaTableStyle","LuaFlowStyle","LuaVerticalFlowStyle","LuaTabbedPaneStyle"],"type":"int","optional":false,"read":true,"write":true},{"name":"vertically_squashable","order":27,"description":"Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwise.","type":"boolean","optional":true,"read":true,"write":true},{"name":"vertically_stretchable","order":25,"description":"Whether the GUI element stretches its size vertically to other elements. `nil` if this element does not support stretching.","type":"boolean","optional":true,"read":true,"write":true},{"name":"width","order":59,"description":"Sets both minimal and maximal width to the given value.","type":"int","optional":false,"read":false,"write":true}],"operators":[],"abstract":false},{"name":"LuaSurface","order":83,"description":"A \"domain\" of the world. Surfaces can only be created and deleted through the API. Surfaces are uniquely identified by their name. Every game contains at least the surface \"nauvis\".","methods":[{"name":"add_script_area","order":59,"description":"Adds the given script area.","parameters":[{"name":"area","order":0,"description":"","type":"ScriptArea","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The id of the created area.","type":"uint","optional":false}]},{"name":"add_script_position","order":64,"description":"Adds the given script position.","parameters":[{"name":"area","order":0,"description":"","type":"ScriptPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The id of the created position.","type":"uint","optional":false}]},{"name":"build_checkerboard","order":75,"description":"Sets the given area to the checkerboard lab tiles.","parameters":[{"name":"area","order":0,"description":"The tile area.","type":"BoundingBox","optional":false}],"takes_table":false,"return_values":[]},{"name":"build_enemy_base","order":21,"description":"Send a group to build a new base.","notes":["The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`."],"parameters":[{"name":"force","order":2,"description":"Force the new base will belong to. Defaults to enemy.","type":"ForceIdentification","optional":true},{"name":"position","order":0,"description":"Location of the new base.","type":"MapPosition","optional":false},{"name":"unit_count","order":1,"description":"Number of biters to send for the base-building task.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"calculate_tile_properties","order":73,"description":"","parameters":[{"name":"positions","order":1,"description":"Positions for which to calculate property values","type":{"complex_type":"array","value":"MapPosition"},"optional":false},{"name":"property_names","order":0,"description":"Names of properties (e.g. \"elevation\") to calculate","type":{"complex_type":"array","value":"string"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Table of property value lists, keyed by property name","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"double"}},"optional":false}]},{"name":"can_fast_replace","order":2,"description":"If there exists an entity at the given location that can be fast-replaced with the given entity parameters.","parameters":[{"name":"direction","order":2,"description":"Direction the entity would be placed. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"force","order":3,"description":"The force that would place the entity. Defaults to the `\"neutral\"` force.","type":"ForceIdentification","optional":true},{"name":"name","order":0,"description":"Name of the entity to check.","type":"string","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_place_entity","order":1,"description":"Check for collisions with terrain or other entities.","parameters":[{"name":"build_check_type","order":4,"description":"Which type of check should be carried out. Defaults to `ghost_revive`.","type":"defines.build_check_type","optional":true},{"name":"direction","order":2,"description":"Direction of the placed entity. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"force","order":3,"description":"The force that would place the entity. Defaults to the `\"neutral\"` force.","type":"ForceIdentification","optional":true},{"name":"forced","order":5,"description":"If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`. Defaults to `false`.","type":"boolean","optional":true},{"name":"inner_name","order":6,"description":"The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.","type":"string","optional":true},{"name":"name","order":0,"description":"Name of the entity prototype to check.","type":"string","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_deconstruct_area","order":33,"description":"Cancel a deconstruction order.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised for every entity whose deconstruction has been successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to cancel deconstruction orders in.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose deconstruction orders to cancel.","type":"ForceIdentification","optional":false},{"name":"item","order":4,"description":"The deconstruction item to use if any.","type":"LuaItemStack","optional":true},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"cancel_upgrade_area","order":35,"description":"Cancel a upgrade order.","raises":[{"name":"on_cancelled_upgrade","order":0,"description":"Raised for every entity whose upgrade has been successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to cancel upgrade orders in.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose upgrade orders to cancel.","type":"ForceIdentification","optional":false},{"name":"item","order":4,"description":"The upgrade item to use if any.","type":"LuaItemStack","optional":true},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"clear","order":54,"description":"Clears this surface deleting all entities and chunks on it.","raises":[{"name":"on_pre_surface_cleared","order":0,"description":"","timeframe":"future_tick","optional":false},{"name":"on_surface_cleared","order":1,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"ignore_characters","order":0,"description":"Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed).","type":"boolean","optional":true}],"takes_table":false,"return_values":[]},{"name":"clear_pollution","order":47,"description":"Clears all pollution on this surface.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clone_area","order":51,"description":"Clones the given area.","notes":["Entities are cloned in an order such that they can always be created, eg rails before trains."],"raises":[{"name":"on_area_cloned","order":1,"description":"Raised after the individual `on_entity_cloned` events.","timeframe":"instantly","optional":false},{"name":"on_entity_cloned","order":0,"description":"Raised for every entity that was cloned.","timeframe":"instantly","optional":false}],"parameters":[{"name":"clear_destination_decoratives","order":8,"description":"If the destination decoratives should be cleared","type":"boolean","optional":true},{"name":"clear_destination_entities","order":7,"description":"If the destination entities should be cleared","type":"boolean","optional":true},{"name":"clone_decoratives","order":6,"description":"If decoratives should be cloned","type":"boolean","optional":true},{"name":"clone_entities","order":5,"description":"If entities should be cloned","type":"boolean","optional":true},{"name":"clone_tiles","order":4,"description":"If tiles should be cloned","type":"boolean","optional":true},{"name":"create_build_effect_smoke","order":10,"description":"If true, the building effect smoke will be shown around the new entities.","type":"boolean","optional":true},{"name":"destination_area","order":1,"description":"","type":"BoundingBox","optional":false},{"name":"destination_force","order":3,"description":"","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"destination_surface","order":2,"description":"","type":"SurfaceIdentification","optional":true},{"name":"expand_map","order":9,"description":"If the destination surface should be expanded when destination_area is outside current bounds. Default false.","type":"boolean","optional":true},{"name":"source_area","order":0,"description":"","type":"BoundingBox","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"clone_brush","order":52,"description":"Clones the given area.","notes":["[defines.events.on_entity_cloned](defines.events.on_entity_cloned) is raised for each entity, and then [defines.events.on_area_cloned](defines.events.on_area_cloned) is raised.","Entities are cloned in an order such that they can always be created, eg rails before trains."],"parameters":[{"name":"clear_destination_decoratives","order":9,"description":"If the destination decoratives should be cleared","type":"boolean","optional":true},{"name":"clear_destination_entities","order":8,"description":"If the destination entities should be cleared","type":"boolean","optional":true},{"name":"clone_decoratives","order":7,"description":"If decoratives should be cloned","type":"boolean","optional":true},{"name":"clone_entities","order":6,"description":"If entities should be cloned","type":"boolean","optional":true},{"name":"clone_tiles","order":5,"description":"If tiles should be cloned","type":"boolean","optional":true},{"name":"create_build_effect_smoke","order":12,"description":"If true, the building effect smoke will be shown around the new entities.","type":"boolean","optional":true},{"name":"destination_force","order":4,"description":"","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"destination_offset","order":1,"description":"","type":"TilePosition","optional":false},{"name":"destination_surface","order":3,"description":"","type":"SurfaceIdentification","optional":true},{"name":"expand_map","order":10,"description":"If the destination surface should be expanded when destination_area is outside current bounds. Default false.","type":"boolean","optional":true},{"name":"manual_collision_mode","order":11,"description":"If manual-style collision checks should be done.","type":"boolean","optional":true},{"name":"source_offset","order":0,"description":"","type":"TilePosition","optional":false},{"name":"source_positions","order":2,"description":"","type":{"complex_type":"array","value":"TilePosition"},"optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"clone_entities","order":53,"description":"Clones the given entities.","notes":["Entities are cloned in an order such that they can always be created, eg rails before trains."],"raises":[{"name":"on_entity_cloned","order":0,"description":"Raised for every entity that was cloned.","timeframe":"instantly","optional":false}],"parameters":[{"name":"create_build_effect_smoke","order":5,"description":"If true, the building effect smoke will be shown around the new entities.","type":"boolean","optional":true},{"name":"destination_force","order":3,"description":"","type":"ForceIdentification","optional":true},{"name":"destination_offset","order":1,"description":"","type":"Vector","optional":false},{"name":"destination_surface","order":2,"description":"","type":"SurfaceIdentification","optional":true},{"name":"entities","order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"snap_to_grid","order":4,"description":"","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"count_entities_filtered","order":7,"description":"Count entities of given type or name in a given area. Works just like [LuaSurface::find_entities_filtered](LuaSurface::find_entities_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.\n\nIf no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":8,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"direction","order":7,"description":"","type":{"complex_type":"union","options":["defines.direction",{"complex_type":"array","value":"defines.direction"}],"full_format":false},"optional":true},{"name":"force","order":9,"description":"","type":{"complex_type":"union","options":["ForceIdentification",{"complex_type":"array","value":"ForceIdentification"}],"full_format":false},"optional":true},{"name":"ghost_name","order":5,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"ghost_type","order":6,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"invert","order":14,"description":"Whether the filters should be inverted.","type":"boolean","optional":true},{"name":"is_military_target","order":13,"description":"","type":"boolean","optional":true},{"name":"limit","order":12,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"MapPosition","optional":true},{"name":"radius","order":2,"description":"If given with position, will count all entities within the radius of the position.","type":"double","optional":true},{"name":"to_be_deconstructed","order":10,"description":"","type":"boolean","optional":true},{"name":"to_be_upgraded","order":11,"description":"","type":"boolean","optional":true},{"name":"type","order":4,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"count_tiles_filtered","order":8,"description":"Count tiles of a given name in a given area. Works just like [LuaSurface::find_tiles_filtered](LuaSurface::find_tiles_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.\n\nIf no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":9,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"force","order":4,"description":"","type":{"complex_type":"union","options":["ForceIdentification",{"complex_type":"array","value":"ForceIdentification"}],"full_format":false},"optional":true},{"name":"has_hidden_tile","order":6,"description":"","type":"boolean","optional":true},{"name":"has_tile_ghost","order":7,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true},{"name":"invert","order":10,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":5,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"Ignored if not given with radius.","type":"MapPosition","optional":true},{"name":"radius","order":2,"description":"If given with position, will return all entities within the radius of the position.","type":"double","optional":true},{"name":"to_be_deconstructed","order":8,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"create_decoratives","order":44,"description":"Adds the given decoratives to the surface.","notes":["This will merge decoratives of the same type that already exist effectively increasing the \"amount\" field."],"parameters":[{"name":"check_collision","order":0,"description":"If collision should be checked against entities/tiles.","type":"boolean","optional":true},{"name":"decoratives","order":1,"description":"","type":{"complex_type":"array","value":"Decorative"},"optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"create_entity","order":17,"description":"Create an entity on this surface.","examples":["```\nasm = game.surfaces[1].create_entity{name = \"assembling-machine-1\", position = {15, 3}, force = game.forces.player, recipe = \"iron-stick\"}\n```","Creates a filter inserter with circuit conditions and a filter \n```\ngame.surfaces[1].create_entity{\n  name = \"filter-inserter\", position = {20, 15}, force = game.player.force,\n  conditions = {red = {name = \"wood\", count = 3, operator = \">\"},\n              green = {name = \"iron-ore\", count = 1, operator = \"<\"},\n  logistics = {name = \"wood\", count = 3, operator = \"=\"}},\n  filters = {{index = 1, name = \"iron-ore\"}}\n}\n```","Creates a requester chest already set to request 128 iron plates. \n```\ngame.surfaces[1].create_entity{\n  name = \"logistic-chest-requester\", position = {game.player.position.x+3, game.player.position.y},\n  force = game.player.force, request_filters = {{index = 1, name = \"iron-plate\", count = 128}}\n}\n```","```\ngame.surfaces[1].create_entity{name = \"big-biter\", position = {15, 3}, force = game.forces.player} -- Friendly biter\ngame.surfaces[1].create_entity{name = \"medium-biter\", position = {15, 3}, force = game.forces.enemy} -- Enemy biter\n```","Creates a basic inserter at the player's location facing north \n```\ngame.surfaces[1].create_entity{name = \"inserter\", position = game.player.position, direction = defines.direction.north}\n```"],"raises":[{"name":"script_raised_built","order":0,"description":"Raised if the `raise_built` flag was set and the entity was successfully created.","timeframe":"instantly","optional":true}],"parameters":[{"name":"create_build_effect_smoke","order":10,"description":"If false, the building effect smoke will not be shown around the new entity.","type":"boolean","optional":true},{"name":"direction","order":2,"description":"Desired orientation of the entity after creation.","type":"defines.direction","optional":true},{"name":"fast_replace","order":6,"description":"If true, building will attempt to simulate fast-replace building.","type":"boolean","optional":true},{"name":"force","order":3,"description":"Force of the entity, default is enemy.","type":"ForceIdentification","optional":true},{"name":"item","order":13,"description":"If provided, the entity will attempt to pull stored values from this item (for example; creating a spidertron from a previously named and mined spidertron)","type":"LuaItemStack","optional":true},{"name":"move_stuck_players","order":12,"description":"If true, any characters that are in the way of the entity are teleported out of the way.","type":"boolean","optional":true},{"name":"name","order":0,"description":"The entity prototype name to create.","type":"string","optional":false},{"name":"player","order":7,"description":"If given set the last_user to this player. If fast_replace is true simulate fast replace using this player.","type":"PlayerIdentification","optional":true},{"name":"position","order":1,"description":"Where to create the entity.","type":"MapPosition","optional":false},{"name":"raise_built","order":9,"description":"If true; [defines.events.script_raised_built](defines.events.script_raised_built) will be fired on successful entity creation.","type":"boolean","optional":true},{"name":"source","order":5,"description":"Source entity. Used for beams and highlight-boxes.","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":true},{"name":"spawn_decorations","order":11,"description":"If true, entity types that have spawn_decorations property will apply triggers defined in the property.","type":"boolean","optional":true},{"name":"spill","order":8,"description":"If false while fast_replace is true and player is nil any items from fast-replacing will be deleted instead of dropped on the ground.","type":"boolean","optional":true},{"name":"target","order":4,"description":"Entity with health for the new entity to target.","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"artillery-flare","order":15,"parameters":[{"name":"frame_speed","order":3,"description":"","type":"float","optional":false},{"name":"height","order":1,"description":"","type":"float","optional":false},{"name":"movement","order":0,"description":"","type":"Vector","optional":false},{"name":"vertical_speed","order":2,"description":"","type":"float","optional":false}]},{"name":"artillery-projectile","order":17,"parameters":[{"name":"max_range","order":1,"description":"","type":"double","optional":true},{"name":"speed","order":0,"description":"","type":"double","optional":false}]},{"name":"assembling-machine","order":0,"parameters":[{"name":"recipe","order":0,"description":"","type":"string","optional":true}]},{"name":"beam","order":1,"parameters":[{"name":"duration","order":3,"description":"If set, beam will be destroyed after this value of ticks.","type":"uint","optional":true},{"name":"max_length","order":2,"description":"If set, beam will be destroyed when distance between source and target is greater than this value.","type":"uint","optional":true},{"name":"source_offset","order":4,"description":"Source position will be offset by this value when rendering the beam.","type":"Vector","optional":true},{"name":"source_position","order":1,"description":"Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true},{"name":"target_position","order":0,"description":"Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true}]},{"name":"character-corpse","order":21,"parameters":[{"name":"inventory_size","order":0,"description":"","type":"uint","optional":true},{"name":"player_index","order":1,"description":"","type":"uint","optional":true}]},{"name":"cliff","order":4,"parameters":[{"name":"cliff_orientation","order":0,"description":"If not specified, `direction` will be used instead.","type":"CliffOrientation","optional":true}]},{"name":"container","order":3,"parameters":[{"name":"bar","order":0,"description":"Inventory index where the red limiting bar should be set.","type":"uint","optional":true}]},{"name":"entity-ghost","order":6,"parameters":[{"name":"expires","order":1,"description":"If `false` the ghost entity will not expire. Default is `false`.","type":"boolean","optional":true},{"name":"inner_name","order":0,"description":"The prototype name of the entity contained in the ghost.","type":"string","optional":false}]},{"name":"fire","order":7,"parameters":[{"name":"initial_ground_flame_count","order":0,"description":"With how many small flames should the fire on ground be created. Defaults to the initial flame count of the prototype.","type":"uint8","optional":true}]},{"name":"flying-text","order":5,"parameters":[{"name":"color","order":1,"description":"Color of the displayed text.","type":"Color","optional":true},{"name":"render_player_index","order":2,"description":"","type":"uint","optional":true},{"name":"text","order":0,"description":"The string to show.","type":"LocalisedString","optional":false}]},{"name":"highlight-box","order":22,"parameters":[{"name":"blink_interval","order":3,"description":"The blink interval for this highlight box. Makes it be shown every `blink_interval` ticks. Defaults to `0` (constantly shown).","type":"uint","optional":true},{"name":"bounding_box","order":0,"description":"The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.","type":"BoundingBox","optional":true},{"name":"box_type","order":1,"description":"Specifies the graphical appearance (color) of the highlight box. Defaults to `\"electricity\"`.","type":"CursorBoxRenderType","optional":true},{"name":"render_player_index","order":2,"description":"The player to render the highlight box for. If not provided, it will be rendered for all players.","type":"uint","optional":true},{"name":"time_to_live","order":4,"description":"The amount of time in ticks that the highlight box will exist for. Defaults to existing forever.","type":"uint","optional":true}]},{"name":"inserter","order":8,"parameters":[{"name":"conditions","order":0,"description":"","type":"InserterCircuitConditions","optional":false},{"name":"filters","order":1,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":false}]},{"name":"item-entity","order":9,"parameters":[{"name":"stack","order":0,"description":"The stack of items to create.","type":"SimpleItemStack","optional":false}]},{"name":"item-request-proxy","order":10,"parameters":[{"name":"modules","order":1,"description":"The stacks of items to be delivered to target entity from logistic network.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false},{"name":"target","order":0,"description":"The target items are to be delivered to.","type":"LuaEntity","optional":false}]},{"name":"locomotive","order":12,"parameters":[{"name":"snap_to_train_stop","order":0,"description":"Whether the locomotive should snap to an adjacent train stop. Defaults to true.","type":"boolean","optional":true}]},{"name":"logistic-container","order":13,"parameters":[{"name":"request_filters","order":0,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":true}]},{"name":"particle","order":14,"parameters":[{"name":"frame_speed","order":3,"description":"","type":"float","optional":false},{"name":"height","order":1,"description":"","type":"float","optional":false},{"name":"movement","order":0,"description":"","type":"Vector","optional":false},{"name":"vertical_speed","order":2,"description":"","type":"float","optional":false}]},{"name":"programmable-speaker","order":20,"parameters":[{"name":"alert_parameters","order":1,"description":"","type":"ProgrammableSpeakerAlertParameters","optional":true},{"name":"parameters","order":0,"description":"","type":"ProgrammableSpeakerParameters","optional":true}]},{"name":"projectile","order":16,"parameters":[{"name":"max_range","order":1,"description":"","type":"double","optional":true},{"name":"speed","order":0,"description":"","type":"double","optional":false}]},{"name":"resource","order":18,"parameters":[{"name":"amount","order":0,"description":"","type":"uint","optional":false},{"name":"enable_cliff_removal","order":2,"description":"If colliding cliffs are removed. Default is true.","type":"boolean","optional":true},{"name":"enable_tree_removal","order":1,"description":"If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true.","type":"boolean","optional":true},{"name":"snap_to_tile_center","order":3,"description":"If true, the resource entity will be placed to center of a tile as map generator would place it, otherwise standard non-resource grid alignment rules will apply. Default is true.","type":"boolean","optional":true}]},{"name":"rolling-stock","order":11,"parameters":[{"name":"color","order":1,"description":"The color of this rolling stock, if it supports colors.","type":"Color","optional":true},{"name":"orientation","order":0,"description":"The orientation of this rolling stock.","type":"RealOrientation","optional":true}]},{"name":"simple-entity-with-force","order":25,"parameters":[{"name":"render_player_index","order":0,"description":"","type":"uint","optional":true}]},{"name":"simple-entity-with-owner","order":24,"parameters":[{"name":"render_player_index","order":0,"description":"","type":"uint","optional":true}]},{"name":"speech-bubble","order":23,"parameters":[{"name":"lifetime","order":1,"description":"","type":"uint","optional":true},{"name":"text","order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"stream","order":2,"parameters":[{"name":"source_offset","order":2,"description":"Source position will be offset by this value when rendering the stream.","type":"Vector","optional":true},{"name":"source_position","order":1,"description":"Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true},{"name":"target_position","order":0,"description":"Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true}]},{"name":"underground-belt","order":19,"parameters":[{"name":"type","order":0,"description":"`\"output\"` or `\"input\"`; default is `\"input\"`.","type":"string","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on the type of entity:","takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The created entity or `nil` if the creation failed.","type":"LuaEntity","optional":true}]},{"name":"create_particle","order":19,"description":"Creates a particle at the given location","parameters":[{"name":"frame_speed","order":5,"description":"","type":"float","optional":false},{"name":"height","order":3,"description":"","type":"float","optional":false},{"name":"movement","order":2,"description":"","type":"Vector","optional":false},{"name":"name","order":0,"description":"The particle name.","type":"string","optional":false},{"name":"position","order":1,"description":"Where to create the particle.","type":"MapPosition","optional":false},{"name":"vertical_speed","order":4,"description":"","type":"float","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"create_trivial_smoke","order":18,"description":"","parameters":[{"name":"name","order":0,"description":"The smoke prototype name to create.","type":"string","optional":false},{"name":"position","order":1,"description":"Where to create the smoke.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"create_unit_group","order":20,"description":"Create a new unit group at a given position.","raises":[{"name":"on_unit_group_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"force","order":1,"description":"Force of the new unit group. Defaults to `\"enemy\"`.","type":"ForceIdentification","optional":true},{"name":"position","order":0,"description":"Initial position of the new unit group.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":"LuaUnitGroup","optional":false}]},{"name":"deconstruct_area","order":32,"description":"Place a deconstruction request.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised for every entity that has been successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to mark for deconstruction.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose bots should perform the deconstruction.","type":"ForceIdentification","optional":false},{"name":"item","order":4,"description":"The deconstruction item to use if any.","type":"LuaItemStack","optional":true},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"decorative_prototype_collides","order":72,"description":"","parameters":[{"name":"position","order":1,"description":"The position to check","type":"MapPosition","optional":false},{"name":"prototype","order":0,"description":"The decorative prototype to check","type":"string","optional":false}],"takes_table":false,"return_values":[]},{"name":"delete_chunk","order":39,"description":"","raises":[{"name":"on_chunk_deleted","order":1,"description":"","timeframe":"future_tick","optional":false},{"name":"on_pre_chunk_deleted","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"position","order":0,"description":"The chunk position to delete","type":"ChunkPosition","optional":false}],"takes_table":false,"return_values":[]},{"name":"destroy_decoratives","order":43,"description":"Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":3,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"exclude_soft","order":6,"description":"Soft decoratives can be drawn over rails.","type":"boolean","optional":true},{"name":"from_layer","order":4,"description":"","type":"string","optional":true},{"name":"invert","order":8,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":7,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"},"LuaDecorativePrototype",{"complex_type":"array","value":"LuaDecorativePrototype"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"TilePosition","optional":true},{"name":"to_layer","order":5,"description":"","type":"string","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"edit_script_area","order":58,"description":"Sets the given script area to the new values.","parameters":[{"name":"area","order":1,"description":"","type":"ScriptArea","optional":false},{"name":"id","order":0,"description":"The area to edit.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"edit_script_position","order":63,"description":"Sets the given script position to the new values.","parameters":[{"name":"area","order":1,"description":"","type":"ScriptPosition","optional":false},{"name":"id","order":0,"description":"The position to edit.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"entity_prototype_collides","order":71,"description":"","parameters":[{"name":"direction","order":3,"description":"","type":"defines.direction","optional":true},{"name":"position","order":1,"description":"The position to check","type":"MapPosition","optional":false},{"name":"prototype","order":0,"description":"The entity prototype to check","type":"EntityPrototypeIdentification","optional":false},{"name":"use_map_generation_bounding_box","order":2,"description":"If the map generation bounding box should be used instead of the collision bounding box","type":"boolean","optional":false}],"takes_table":false,"return_values":[]},{"name":"find_decoratives_filtered","order":45,"description":"Find decoratives of a given name in a given area.\n\nIf no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.","examples":["```\ngame.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, name = \"sand-decal\"} -- gets all sand-decals in the rectangle\ngame.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, limit = 5}  -- gets the first 5 decoratives in the rectangle\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":3,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"exclude_soft","order":6,"description":"Soft decoratives can be drawn over rails.","type":"boolean","optional":true},{"name":"from_layer","order":4,"description":"","type":"string","optional":true},{"name":"invert","order":8,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":7,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"},"LuaDecorativePrototype",{"complex_type":"array","value":"LuaDecorativePrototype"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"TilePosition","optional":true},{"name":"to_layer","order":5,"description":"","type":"string","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"DecorativeResult"},"optional":false}]},{"name":"find_enemy_units","order":12,"description":"Find enemy units (entities with type \"unit\") of a given force within an area.","notes":["This is more efficient than [LuaSurface::find_entities](LuaSurface::find_entities)."],"examples":["Find all units who would be interested to attack the player, within 100-tile area. \n```\nlocal enemies = game.player.surface.find_enemy_units(game.player.position, 100)\n```"],"parameters":[{"name":"center","order":0,"description":"Center of the search area","type":"MapPosition","optional":false},{"name":"force","order":2,"description":"Force to find enemies of. If not given, uses the player force.","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"radius","order":1,"description":"Radius of the circular search area","type":"double","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entities","order":4,"description":"Find entities in a given area.\n\nIf no area is given all entities on the surface are returned.","examples":["Will evaluate to a list of all entities within given area. \n```\ngame.surfaces[\"nauvis\"].find_entities({{-10, -10}, {10, 10}})\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entities_filtered","order":5,"description":"Find all entities of the given type or name in the given area.\n\nIf no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned.\n\n- If no `area` or `position` are given, the entire surface is searched.\n- If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).\n- If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities.\n- If `area` is specified, this returns the entities colliding with that area.","examples":["```\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, type = \"resource\"} -- gets all resources in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = \"iron-ore\"} -- gets all iron ores in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = {\"iron-ore\", \"copper-ore\"}} -- gets all iron ore and copper ore in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, force = \"player\"}  -- gets player owned entities in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, limit = 5}  -- gets the first 5 entities in the rectangle\ngame.surfaces[1].find_entities_filtered{position = {0, 0}, radius = 10}  -- gets all entities within 10 tiles of the position [0,0].\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":8,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"direction","order":7,"description":"","type":{"complex_type":"union","options":["defines.direction",{"complex_type":"array","value":"defines.direction"}],"full_format":false},"optional":true},{"name":"force","order":9,"description":"","type":{"complex_type":"union","options":["ForceIdentification",{"complex_type":"array","value":"ForceIdentification"}],"full_format":false},"optional":true},{"name":"ghost_name","order":5,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"ghost_type","order":6,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"invert","order":14,"description":"Whether the filters should be inverted.","type":"boolean","optional":true},{"name":"is_military_target","order":13,"description":"","type":"boolean","optional":true},{"name":"limit","order":12,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"Has precedence over area field.","type":"MapPosition","optional":true},{"name":"radius","order":2,"description":"","type":"double","optional":true},{"name":"to_be_deconstructed","order":10,"description":"","type":"boolean","optional":true},{"name":"to_be_upgraded","order":11,"description":"","type":"boolean","optional":true},{"name":"type","order":4,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entity","order":3,"description":"Find a specific entity at a specific position.","examples":["```\ngame.player.selected.surface.find_entity('filter-inserter', {0,0})\n```"],"parameters":[{"name":"entity","order":0,"description":"Entity to look for.","type":"string","optional":false},{"name":"position","order":1,"description":"Coordinates to look at.","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if no such entity is found.","type":"LuaEntity","optional":true}]},{"name":"find_logistic_network_by_position","order":30,"description":"Find the logistic network that covers a given position.","parameters":[{"name":"force","order":1,"description":"Force the logistic network should belong to.","type":"ForceIdentification","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The found network or `nil` if no such network was found.","type":"LuaLogisticNetwork","optional":true}]},{"name":"find_logistic_networks_by_construction_area","order":31,"description":"Finds all of the logistics networks whose construction area intersects with the given position.","parameters":[{"name":"force","order":1,"description":"Force the logistic networks should belong to.","type":"ForceIdentification","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaLogisticNetwork"},"optional":false}]},{"name":"find_nearest_enemy","order":14,"description":"Find the enemy military target ([military entity](https://wiki.factorio.com/Military_units_and_structures)) closest to the given position.","parameters":[{"name":"force","order":2,"description":"The force the result will be an enemy of. Uses the player force if not specified.","type":"ForceIdentification","optional":true},{"name":"max_distance","order":1,"description":"Radius of the circular search area.","type":"double","optional":false},{"name":"position","order":0,"description":"Center of the search area.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The nearest enemy military target or `nil` if no enemy could be found within the given area.","type":"LuaEntity","optional":true}]},{"name":"find_nearest_enemy_entity_with_owner","order":15,"description":"Find the enemy entity-with-owner closest to the given position.","parameters":[{"name":"force","order":2,"description":"The force the result will be an enemy of. Uses the player force if not specified.","type":"ForceIdentification","optional":true},{"name":"max_distance","order":1,"description":"Radius of the circular search area.","type":"double","optional":false},{"name":"position","order":0,"description":"Center of the search area.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"The nearest enemy entity-with-owner or `nil` if no enemy could be found within the given area.","type":"LuaEntity","optional":false}]},{"name":"find_non_colliding_position","order":9,"description":"Find a non-colliding position within a given radius.","notes":["Special care needs to be taken when using a radius of `0`. The game will not stop searching until it finds a suitable position, so it is important to make sure such a position exists. One particular case where it would not be able to find a solution is running it before any chunks have been generated."],"parameters":[{"name":"center","order":1,"description":"Center of the search area.","type":"MapPosition","optional":false},{"name":"force_to_tile_center","order":4,"description":"Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Default false.","type":"boolean","optional":true},{"name":"name","order":0,"description":"Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)","type":"string","optional":false},{"name":"precision","order":3,"description":"The step length from the given position as it searches, in tiles. Minimum value is `0.01`.","type":"double","optional":false},{"name":"radius","order":2,"description":"Max distance from `center` to search in. A radius of `0` means an infinitely-large search area.","type":"double","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The non-colliding position. May be `nil` if no suitable position was found.","type":"MapPosition","optional":true}]},{"name":"find_non_colliding_position_in_box","order":10,"description":"Find a non-colliding position within a given rectangle.","parameters":[{"name":"force_to_tile_center","order":3,"description":"Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Default false.","type":"boolean","optional":true},{"name":"name","order":0,"description":"Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)","type":"string","optional":false},{"name":"precision","order":2,"description":"The step length from the given position as it searches, in tiles. Minimum value is 0.01.","type":"double","optional":false},{"name":"search_space","order":1,"description":"The rectangle to search inside.","type":"BoundingBox","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The non-colliding position. May be `nil` if no suitable position was found.","type":"MapPosition","optional":true}]},{"name":"find_tiles_filtered","order":6,"description":"Find all tiles of the given name in the given area.\n\nIf no filters are given, this returns all tiles in the search area.\n\nIf no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":9,"description":"","type":{"complex_type":"union","options":["CollisionMaskLayer",{"complex_type":"array","value":"CollisionMaskLayer"}],"full_format":false},"optional":true},{"name":"force","order":4,"description":"","type":{"complex_type":"union","options":["ForceIdentification",{"complex_type":"array","value":"ForceIdentification"}],"full_format":false},"optional":true},{"name":"has_hidden_tile","order":6,"description":"","type":"boolean","optional":true},{"name":"has_tile_ghost","order":7,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true},{"name":"invert","order":10,"description":"Whether the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":5,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"Ignored if not given with radius.","type":"MapPosition","optional":true},{"name":"radius","order":2,"description":"If given with position, will return all entities within the radius of the position.","type":"double","optional":true},{"name":"to_be_deconstructed","order":8,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"find_units","order":13,"description":"Find units (entities with type \"unit\") of a given force and force condition within a given area.","notes":["This is more efficient than [LuaSurface::find_entities](LuaSurface::find_entities)."],"examples":["Find friendly units to \"player\" force \n```\nlocal friendly_units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"friend\")\n```","Find units of \"player\" force \n```\nlocal units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"same\"})\n```"],"parameters":[{"name":"area","order":0,"description":"Box to find units within.","type":"BoundingBox","optional":false},{"name":"condition","order":2,"description":"Only forces which meet the condition will be included in the search.","type":"ForceCondition","optional":false},{"name":"force","order":1,"description":"Force performing the search.","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"force_generate_chunk_requests","order":28,"description":"Blocks and generates all chunks that have been requested using all available threads.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_chunks","order":25,"description":"Get an iterator going over every chunk on this surface.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaChunkIterator","optional":false}]},{"name":"get_closest","order":68,"description":"Gets the closest entity in the list to this position.","parameters":[{"name":"entities","order":1,"description":"The Entities to check","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaEntity","optional":true}]},{"name":"get_connected_tiles","order":38,"description":"Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position.","notes":["This won't find tiles in non-generated chunks."],"parameters":[{"name":"position","order":0,"description":"The tile position to start at.","type":"TilePosition","optional":false},{"name":"tiles","order":1,"description":"The tiles to search for.","type":{"complex_type":"array","value":"string"},"optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The resulting set of tiles.","type":{"complex_type":"array","value":"TilePosition"},"optional":false}]},{"name":"get_entities_with_force","order":74,"description":"Returns all the military targets (entities with force) on this chunk for the given force.","parameters":[{"name":"force","order":1,"description":"Entities of this force will be returned.","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":false},{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_hidden_tile","order":36,"description":"The hidden tile name.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"`nil` if there isn't one for the given position.","type":"string","optional":true}]},{"name":"get_map_exchange_string","order":66,"description":"Gets the map exchange string for the current map generation settings of this surface.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_pollution","order":0,"description":"Get the pollution for a given position.","notes":["Pollution is stored per chunk, so this will return the same value for all positions in one chunk."],"examples":["```\ngame.surfaces[1].get_pollution({1,2})\n```"],"parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_random_chunk","order":50,"description":"Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"ChunkPosition","optional":false}]},{"name":"get_resource_counts","order":49,"description":"Gets the resource amount of all resources on this surface","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_script_area","order":57,"description":"Gets the first script area by name or id.","parameters":[{"name":"key","order":0,"description":"The name or id of the area to get.","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"ScriptArea","optional":true}]},{"name":"get_script_areas","order":56,"description":"Gets the script areas that match the given name or if no name is given all areas are returned.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"ScriptArea"},"optional":false}]},{"name":"get_script_position","order":62,"description":"Gets the first script position by name or id.","parameters":[{"name":"key","order":0,"description":"The name or id of the position to get.","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"ScriptPosition","optional":true}]},{"name":"get_script_positions","order":61,"description":"Gets the script positions that match the given name or if no name is given all positions are returned.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"ScriptPosition"},"optional":false}]},{"name":"get_starting_area_radius","order":67,"description":"Gets the starting area radius of this surface.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_tile","order":22,"description":"Get the tile at a given position. An alternative call signature for this method is passing it a single [TilePosition](TilePosition).","notes":["Non-integer values will result in them being rounded down."],"parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"LuaTile","optional":false}]},{"name":"get_total_pollution","order":70,"description":"Gets the total amount of pollution on the surface by iterating over all of the chunks containing pollution.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_train_stops","order":69,"description":"Gets train stops matching the given filters.","parameters":[{"name":"force","order":1,"description":"The force to search. Not providing a force will match stops in any force.","type":"ForceIdentification","optional":true},{"name":"name","order":0,"description":"The name(s) of the train stops. Not providing names will match any stop.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"takes_table":true,"table_is_optional":true,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_trains","order":46,"description":"","parameters":[{"name":"force","order":0,"description":"The force to search. Not providing a force will match trains in any force.","type":"ForceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTrain"},"optional":false}]},{"name":"help","order":76,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"is_chunk_generated","order":26,"description":"Is a given chunk generated?","parameters":[{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"play_sound","order":48,"description":"Play a sound for every player on this surface.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]},{"name":"pollute","order":24,"description":"Spawn pollution at the given position.","parameters":[{"name":"amount","order":1,"description":"How much pollution to add.","type":"double","optional":false},{"name":"source","order":0,"description":"Where to spawn the pollution.","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[]},{"name":"print","order":42,"description":"Print text to the chat console of all players on this surface.","notes":["Messages that are identical to a message sent in the last 60 ticks are not printed again."],"parameters":[{"name":"color","order":1,"description":"","type":"Color","optional":true},{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"regenerate_decorative","order":41,"description":"Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives.","notes":["All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks."],"parameters":[{"name":"chunks","order":1,"description":"The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":true},{"name":"decoratives","order":0,"description":"Prototype names of decorative or decoratives to autoplace. When `nil` all decoratives with an autoplace are used.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"takes_table":false,"return_values":[]},{"name":"regenerate_entity","order":40,"description":"Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities.","notes":["All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks."],"parameters":[{"name":"chunks","order":1,"description":"The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":true},{"name":"entities","order":0,"description":"Prototype names of entity or entities to autoplace. When `nil` all entities with an autoplace are used.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"takes_table":false,"return_values":[]},{"name":"remove_script_area","order":60,"description":"Removes the given script area.","parameters":[{"name":"id","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"If the area was actually removed. False when it didn't exist.","type":"boolean","optional":false}]},{"name":"remove_script_position","order":65,"description":"Removes the given script position.","parameters":[{"name":"id","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"If the position was actually removed. False when it didn't exist.","type":"boolean","optional":false}]},{"name":"request_path","order":55,"description":"Generates a path with the specified constraints (as an array of [PathfinderWaypoints](PathfinderWaypoint)) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use [LuaEntity::set_command](LuaEntity::set_command) instead.\n\nThe resulting path is ultimately returned asynchronously via [on_script_path_request_finished](on_script_path_request_finished).","raises":[{"name":"on_script_path_request_finished","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"bounding_box","order":0,"description":"The dimensions of the object that's supposed to travel the path.","type":"BoundingBox","optional":false},{"name":"can_open_gates","order":7,"description":"Whether the path request can open gates. Defaults to `false`.","type":"boolean","optional":true},{"name":"collision_mask","order":1,"description":"The list of masks the `bounding_box` collides with.","type":{"complex_type":"union","options":["CollisionMaskWithFlags",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false},{"name":"entity_to_ignore","order":9,"description":"Makes the pathfinder ignore collisions with this entity if it is given.","type":"LuaEntity","optional":true},{"name":"force","order":4,"description":"The force for which to generate the path, determining which gates can be opened for example.","type":"ForceIdentification","optional":false},{"name":"goal","order":3,"description":"The position to find a path to.","type":"MapPosition","optional":false},{"name":"path_resolution_modifier","order":8,"description":"Defines how coarse the pathfinder's grid is. Smaller values mean a coarser grid (negative numbers allowed). Allowed values are from -8 to 8. Defaults to `0`.","type":"int","optional":true},{"name":"pathfind_flags","order":6,"description":"Flags that affect pathfinder behavior.","type":"PathfinderFlags","optional":true},{"name":"radius","order":5,"description":"How close the pathfinder needs to get to its `goal` (in tiles). Defaults to `1`.","type":"double","optional":true},{"name":"start","order":2,"description":"The position from which to start pathfinding.","type":"MapPosition","optional":false}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"A unique handle to identify this call when [on_script_path_request_finished](on_script_path_request_finished) fires.","type":"uint","optional":false}]},{"name":"request_to_generate_chunks","order":27,"description":"Request that the game's map generator generate chunks at the given position for the given radius on this surface.","parameters":[{"name":"position","order":0,"description":"Where to generate the new chunks.","type":"MapPosition","optional":false},{"name":"radius","order":1,"description":"The chunk radius from `position` to generate new chunks in.","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_chunk_generated_status","order":29,"description":"Set generated status of a chunk. Useful when copying chunks.","parameters":[{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false},{"name":"status","order":1,"description":"The chunk's new status.","type":"defines.chunk_generated_status","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_hidden_tile","order":37,"description":"Set the hidden tile for the specified position. While during normal gameplay only [non-mineable](LuaTilePrototype::mineable_properties) tiles can become hidden, this method allows any kind of tile to be set as the hidden one.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false},{"name":"tile","order":1,"description":"The new hidden tile or `nil` to clear the hidden tile.","type":{"complex_type":"union","options":["string","LuaTilePrototype"],"full_format":false},"optional":false}],"takes_table":false,"return_values":[]},{"name":"set_multi_command","order":16,"description":"Give a command to multiple units. This will automatically select suitable units for the task.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false},{"name":"force","order":2,"description":"Force of the units this command is to be given to. If not specified, uses the enemy force.","type":"ForceIdentification","optional":true},{"name":"unit_count","order":1,"description":"Number of units to give the command to.","type":"uint","optional":false},{"name":"unit_search_distance","order":3,"description":"Radius to search for units. The search area is centered on the destination of the command.","type":"uint","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[{"order":0,"description":"Number of units actually sent. May be less than `count` if not enough units were available.","type":"uint","optional":false}]},{"name":"set_tiles","order":23,"description":"Set tiles at specified locations. Can automatically correct the edges around modified tiles.\n\nPlacing a [mineable](LuaTilePrototype::mineable_properties) tile on top of a non-mineable one will turn the latter into the [LuaTile::hidden_tile](LuaTile::hidden_tile) for that tile. Placing a mineable tile on a mineable one or a non-mineable tile on a non-mineable one will not modify the hidden tile. This restriction can however be circumvented by using [LuaSurface::set_hidden_tile](LuaSurface::set_hidden_tile).","notes":["It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one."],"raises":[{"name":"script_raised_set_tiles","order":0,"description":"Raised if the `raise_event` flag was set.","timeframe":"instantly","optional":true}],"parameters":[{"name":"correct_tiles","order":1,"description":"If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.","type":"boolean","optional":true},{"name":"raise_event","order":4,"description":"`true` or `false`. Defaults to `false`.","type":"boolean","optional":true},{"name":"remove_colliding_decoratives","order":3,"description":"`true` or `false`. Defaults to `true`.","type":"boolean","optional":true},{"name":"remove_colliding_entities","order":2,"description":"`true`, `false`, or `abort_on_collision`. Defaults to `true`.","type":{"complex_type":"union","options":["boolean","string"],"full_format":false},"optional":true},{"name":"tiles","order":0,"description":"","type":{"complex_type":"array","value":"Tile"},"optional":false}],"takes_table":false,"return_values":[]},{"name":"spill_item_stack","order":11,"description":"Spill items on the ground centered at a given location.","parameters":[{"name":"allow_belts","order":4,"description":"Whether items can be spilled onto belts. Defaults to `true`.","type":"boolean","optional":true},{"name":"enable_looted","order":2,"description":"When true, each created item will be flagged with the [LuaEntity::to_be_looted](LuaEntity::to_be_looted) flag.","type":"boolean","optional":true},{"name":"force","order":3,"description":"When provided (and not `nil`) the items will be marked for deconstruction by this force.","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"items","order":1,"description":"Items to spill","type":"ItemStackIdentification","optional":false},{"name":"position","order":0,"description":"Center of the spillage","type":"MapPosition","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The created item-on-ground entities.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"upgrade_area","order":34,"description":"Place an upgrade request.","raises":[{"name":"on_marked_for_upgrade","order":0,"description":"Raised for every entity that has been successfully marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to mark for upgrade.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose bots should perform the upgrade.","type":"ForceIdentification","optional":false},{"name":"item","order":4,"description":"The upgrade item to use.","type":"LuaItemStack","optional":false},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"takes_table":true,"table_is_optional":false,"return_values":[]}],"attributes":[{"name":"always_day","order":4,"description":"When set to true, the sun will always shine.","type":"boolean","optional":false,"read":true,"write":true},{"name":"brightness_visual_weights","order":19,"description":"Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT).\n\nThe LUT is multiplied by `((1 - weight) + brightness * weight)` and result is clamped to range [0, 1].\n\nDefault is `{0, 0, 0}`, which means no influence.","examples":["Makes night on the surface pitch black, assuming [LuaSurface::min_brightness](LuaSurface::min_brightness) being set to default value `0.15`. \n```\ngame.surfaces[1].brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 }\n```"],"type":"ColorModifier","optional":false,"read":true,"write":true},{"name":"darkness","order":6,"description":"Amount of darkness at the current time, as a number in range [0, 1].","type":"float","optional":false,"read":true,"write":false},{"name":"dawn","order":14,"description":"The daytime when dawn starts.","type":"double","optional":false,"read":true,"write":true},{"name":"daytime","order":5,"description":"Current time of day, as a number in range [0, 1).","type":"double","optional":false,"read":true,"write":true},{"name":"dusk","order":13,"description":"The daytime when dusk starts.","type":"double","optional":false,"read":true,"write":true},{"name":"evening","order":15,"description":"The daytime when evening starts.","type":"double","optional":false,"read":true,"write":true},{"name":"freeze_daytime","order":11,"description":"True if daytime is currently frozen.","type":"boolean","optional":false,"read":true,"write":true},{"name":"generate_with_lab_tiles","order":3,"description":"When set to true, new chunks will be generated with lab tiles, instead of using the surface's map generation settings.","type":"boolean","optional":false,"read":true,"write":true},{"name":"index","order":1,"description":"Unique ID associated with this surface.","type":"uint","optional":false,"read":true,"write":false},{"name":"map_gen_settings","order":2,"description":"The generation settings for this surface. These can be modified to after surface generation, but note that this will not retroactively update the surface. To manually adjust it, [LuaSurface::regenerate_entity](LuaSurface::regenerate_entity), [LuaSurface::regenerate_decorative](LuaSurface::regenerate_decorative) and [LuaSurface::delete_chunk](LuaSurface::delete_chunk) can be used.","type":"MapGenSettings","optional":false,"read":true,"write":true},{"name":"min_brightness","order":18,"description":"The minimal brightness during the night. Default is `0.15`. The value has an effect on the game simalution only, it doesn't have any effect on rendering.","type":"double","optional":false,"read":true,"write":true},{"name":"morning","order":16,"description":"The daytime when morning starts.","type":"double","optional":false,"read":true,"write":true},{"name":"name","order":0,"description":"The name of this surface. Names are unique among surfaces.","notes":["the default surface can't be renamed."],"type":"string","optional":false,"read":true,"write":true},{"name":"object_name","order":22,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"peaceful_mode","order":10,"description":"Is peaceful mode enabled on this surface?","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_clouds","order":20,"description":"If clouds are shown on this surface.","notes":["If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown."],"type":"boolean","optional":false,"read":true,"write":true},{"name":"solar_power_multiplier","order":17,"description":"The multiplier of solar power on this surface. Cannot be less than 0.","notes":["Solar equipment is still limited to its maximum power output."],"type":"double","optional":false,"read":true,"write":true},{"name":"ticks_per_day","order":12,"description":"The number of ticks per day for this surface.","type":"uint","optional":false,"read":true,"write":true},{"name":"valid","order":21,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"wind_orientation","order":8,"description":"Current wind direction.","type":"RealOrientation","optional":false,"read":true,"write":true},{"name":"wind_orientation_change","order":9,"description":"Change in wind orientation per tick.","type":"double","optional":false,"read":true,"write":true},{"name":"wind_speed","order":7,"description":"Current wind speed.","type":"double","optional":false,"read":true,"write":true}],"operators":[],"abstract":false},{"name":"LuaTechnology","order":84,"description":"One research item.","methods":[{"name":"help","order":1,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"reload","order":0,"description":"Reload this technology from its prototype.","parameters":[],"takes_table":false,"return_values":[]}],"attributes":[{"name":"effects","order":11,"description":"Effects applied when this technology is researched.","type":{"complex_type":"array","value":"TechnologyModifier"},"optional":false,"read":true,"write":false},{"name":"enabled","order":5,"description":"Can this technology be researched?","type":"boolean","optional":false,"read":true,"write":true},{"name":"force","order":0,"description":"The force this technology belongs to.","type":"LuaForce","optional":false,"read":true,"write":false},{"name":"level","order":15,"description":"The current level of this technology. For level-based technology writing to this is the same as researching the technology to the previous level. Writing the level will set [LuaTechnology::enabled](LuaTechnology::enabled) to `true`.","type":"uint","optional":false,"read":true,"write":true},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"Localised name of this technology.","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":1,"description":"Name of this technology.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":18,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":14,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"prerequisites","order":9,"description":"Prerequisites of this technology. The result maps technology name to the [LuaTechnology](LuaTechnology) object.","type":{"complex_type":"dictionary","key":"string","value":"LuaTechnology"},"optional":false,"read":true,"write":false},{"name":"prototype","order":4,"description":"The prototype of this technology.","type":"LuaTechnologyPrototype","optional":false,"read":true,"write":false},{"name":"research_unit_count","order":12,"description":"The number of research units required for this technology.","notes":["This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](LuaTechnologyPrototype::ignore_tech_cost_multiplier) is `true`."],"type":"uint","optional":false,"read":true,"write":false},{"name":"research_unit_count_formula","order":16,"description":"The count formula used for this infinite research. `nil` if this research isn't infinite.","type":"string","optional":true,"read":true,"write":false},{"name":"research_unit_energy","order":13,"description":"Amount of energy required to finish a unit of research.","type":"double","optional":false,"read":true,"write":false},{"name":"research_unit_ingredients","order":10,"description":"The types of ingredients that labs will require to research this technology.","type":{"complex_type":"array","value":"Ingredient"},"optional":false,"read":true,"write":false},{"name":"researched","order":8,"description":"Has this technology been researched? Switching from `false` to `true` will trigger the technology advancement perks; switching from `true` to `false` will reverse them.","type":"boolean","optional":false,"read":true,"write":true},{"name":"upgrade","order":7,"description":"Is this an upgrade-type research?","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":17,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"visible_when_disabled","order":6,"description":"If this technology will be visible in the research GUI even though it is disabled.","type":"boolean","optional":false,"read":true,"write":true}],"operators":[],"abstract":false},{"name":"LuaTechnologyPrototype","order":85,"description":"A Technology prototype.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"effects","order":10,"description":"Effects applied when this technology is researched.","type":{"complex_type":"array","value":"TechnologyModifier"},"optional":false,"read":true,"write":false},{"name":"enabled","order":3,"description":"If this technology prototype is enabled by default (enabled at the beginning of a game).","type":"boolean","optional":false,"read":true,"write":false},{"name":"hidden","order":4,"description":"If this technology prototype is hidden.","type":"boolean","optional":false,"read":true,"write":false},{"name":"ignore_tech_cost_multiplier","order":6,"description":"If this technology ignores the technology cost multiplier setting.","notes":["[LuaTechnologyPrototype::research_unit_count](LuaTechnologyPrototype::research_unit_count) will already take this setting into account."],"type":"boolean","optional":false,"read":true,"write":false},{"name":"level","order":14,"description":"The level of this research.","type":"uint","optional":false,"read":true,"write":false},{"name":"localised_description","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":1,"description":"Localised name of this technology.","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"max_level","order":15,"description":"The max level of this research.","type":"uint","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this technology.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":18,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":13,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"prerequisites","order":8,"description":"Prerequisites of this technology. The result maps technology name to the [LuaTechnologyPrototype](LuaTechnologyPrototype) object.","type":{"complex_type":"dictionary","key":"string","value":"LuaTechnologyPrototype"},"optional":false,"read":true,"write":false},{"name":"research_unit_count","order":11,"description":"The number of research units required for this technology.","notes":["This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](LuaTechnologyPrototype::ignore_tech_cost_multiplier) is `true`."],"type":"uint","optional":false,"read":true,"write":false},{"name":"research_unit_count_formula","order":16,"description":"The count formula used for this infinite research. `nil` if this research isn't infinite.","type":"string","optional":true,"read":true,"write":false},{"name":"research_unit_energy","order":12,"description":"Amount of energy required to finish a unit of research.","type":"double","optional":false,"read":true,"write":false},{"name":"research_unit_ingredients","order":9,"description":"The types of ingredients that labs will require to research this technology.","type":{"complex_type":"array","value":"Ingredient"},"optional":false,"read":true,"write":false},{"name":"upgrade","order":7,"description":"If the is technology prototype is an upgrade to some other technology.","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":17,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"visible_when_disabled","order":5,"description":"If this technology will be visible in the research GUI even though it is disabled.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaTile","order":86,"description":"A single \"square\" on the map.","methods":[{"name":"cancel_deconstruction","order":3,"description":"Cancels deconstruction if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised if the tile's deconstruction was successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the deconstruction order.","type":"ForceIdentification","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[]},{"name":"collides_with","order":0,"description":"What type of things can collide with this tile?","examples":["Check if the character would collide with a tile \n```\ngame.player.print(tostring(game.player.surface.get_tile(1, 1).collides_with(\"player-layer\")))\n```"],"parameters":[{"name":"layer","order":0,"description":"","type":"CollisionMaskLayer","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_tile_ghosts","order":5,"description":"Gets all tile ghosts on this tile.","parameters":[{"name":"force","order":0,"description":"Get tile ghosts of this force.","type":"ForceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"has_tile_ghost","order":4,"description":"Does this tile have any tile ghosts on it.","parameters":[{"name":"force","order":0,"description":"Check for tile ghosts of this force.","type":"ForceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"help","order":6,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"order_deconstruction","order":2,"description":"Orders deconstruction of this tile by the given force.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised if the tile was successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force whose robots are supposed to do the deconstruction.","type":"ForceIdentification","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"The deconstructible tile proxy created, if any.","type":"LuaEntity","optional":true}]},{"name":"to_be_deconstructed","order":1,"description":"Is this tile marked for deconstruction?","parameters":[{"name":"force","order":0,"description":"The force who did the deconstruction order.","type":"ForceIdentification","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"hidden_tile","order":3,"description":"The name of the [LuaTilePrototype](LuaTilePrototype) hidden under this tile, if any. During normal gameplay, only [non-mineable](LuaTilePrototype::mineable_properties) tiles can become hidden. This can however be circumvented with [LuaSurface::set_hidden_tile](LuaSurface::set_hidden_tile).","type":"string","optional":true,"read":true,"write":false},{"name":"name","order":0,"description":"Prototype name of this tile. E.g. `\"sand-3\"` or `\"grass-2\"`.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"position","order":2,"description":"The position this tile references.","type":"TilePosition","optional":false,"read":true,"write":false},{"name":"prototype","order":1,"description":"","type":"LuaTilePrototype","optional":false,"read":true,"write":false},{"name":"surface","order":4,"description":"The surface this tile is on.","type":"LuaSurface","optional":false,"read":true,"write":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaTilePrototype","order":87,"description":"Prototype of a tile.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"allowed_neighbors","order":13,"description":"","type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":false,"read":true,"write":false},{"name":"automatic_neighbors","order":12,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"autoplace_specification","order":7,"description":"Autoplace specification for this prototype, if any.","type":"AutoplaceSpecification","optional":true,"read":true,"write":false},{"name":"can_be_part_of_blueprint","order":18,"description":"False if this tile is not allowed in blueprints regardless of the ability to build it.","type":"boolean","optional":false,"read":true,"write":false},{"name":"check_collision_with_entities","order":20,"description":"True if building this tile should check for colliding entities above and prevent building if such are found. Also during mining tiles above this tile checks for entities colliding with this tile and prevents mining if such are found.","type":"boolean","optional":false,"read":true,"write":false},{"name":"collision_mask","order":4,"description":"The collision mask this tile uses","type":"CollisionMask","optional":false,"read":true,"write":false},{"name":"collision_mask_with_flags","order":5,"description":"","type":"CollisionMaskWithFlags","optional":false,"read":true,"write":false},{"name":"decorative_removal_probability","order":11,"description":"The probability that decorative entities will be removed from on top of this tile when this tile is generated.","type":"float","optional":false,"read":true,"write":false},{"name":"emissions_per_second","order":19,"description":"Amount of pollution emissions per second this tile will absorb.","type":"double","optional":false,"read":true,"write":false},{"name":"items_to_place_this","order":17,"description":"Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name. `nil` (instead of an empty table) if no items can place this tile.","type":{"complex_type":"array","value":"SimpleItemStack"},"optional":false,"read":true,"write":false},{"name":"layer","order":6,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"map_color","order":10,"description":"","type":"Color","optional":false,"read":true,"write":false},{"name":"mineable_properties","order":15,"description":"","type":{"complex_type":"table","parameters":[{"name":"minable","order":0,"description":"Is this tile mineable at all?","type":"boolean","optional":false},{"name":"mining_particle","order":2,"description":"Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.","type":"string","optional":true},{"name":"mining_time","order":1,"description":"Energy required to mine a tile.","type":"double","optional":false},{"name":"products","order":3,"description":"Products obtained by mining this tile.","type":{"complex_type":"array","value":"Product"},"optional":false}]},"optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"needs_correction","order":14,"description":"If this tile needs correction logic applied when it's generated in the world..","type":"boolean","optional":false,"read":true,"write":false},{"name":"next_direction","order":16,"description":"The next direction of this tile, if any. Used when a tile has multiple directions (such as hazard concrete)","type":"LuaTilePrototype","optional":true,"read":true,"write":false},{"name":"object_name","order":22,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"valid","order":21,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"vehicle_friction_modifier","order":9,"description":"","type":"float","optional":false,"read":true,"write":false},{"name":"walking_speed_modifier","order":8,"description":"","type":"float","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaTrain","order":88,"description":"A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons.","methods":[{"name":"clear_fluids_inside","order":10,"description":"Clears all fluids in this train.","parameters":[],"takes_table":false,"return_values":[]},{"name":"clear_items_inside","order":4,"description":"Clear all items in this train.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_contents","order":1,"description":"Get a mapping of the train's inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The counts, indexed by item names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_fluid_contents","order":7,"description":"Gets a mapping of the train's fluid inventory.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The counts, indexed by fluid names.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false}]},{"name":"get_fluid_count","order":6,"description":"Get the amount of a particular fluid stored in the train.","parameters":[{"name":"fluid","order":0,"description":"Fluid name to count. If not given, counts all fluids.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_item_count","order":0,"description":"Get the amount of a particular item stored in the train.","parameters":[{"name":"item","order":0,"description":"Item name to count. If not given, counts all items.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_rails","order":12,"description":"Gets all rails under the train.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"go_to_station","order":11,"description":"Go to the station specified by the index in the train's schedule.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"takes_table":false,"return_values":[]},{"name":"help","order":13,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"insert","order":3,"description":"Insert a stack into the train.","parameters":[{"name":"stack","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[]},{"name":"insert_fluid","order":9,"description":"Inserts the given fluid into the first available location in this train.","parameters":[{"name":"fluid","order":0,"description":"","type":"Fluid","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The amount inserted.","type":"double","optional":false}]},{"name":"recalculate_path","order":5,"description":"Checks if the path is invalid and tries to re-path if it isn't.","parameters":[{"name":"force","order":0,"description":"Forces the train to re-path regardless of the current path being valid or not.","type":"boolean","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"If the train has a path after the repath attempt.","type":"boolean","optional":false}]},{"name":"remove_fluid","order":8,"description":"Remove some fluid from the train.","parameters":[{"name":"fluid","order":0,"description":"","type":"Fluid","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"The amount of fluid actually removed.","type":"double","optional":false}]},{"name":"remove_item","order":2,"description":"Remove some items from the train.","parameters":[{"name":"stack","order":0,"description":"The amount and type of items to remove","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]}],"attributes":[{"name":"back_rail","order":12,"description":"The rail at the back end of the train, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"back_stock","order":16,"description":"The back stock of this train, if any. The back of the train is at the opposite end of the [front](LuaTrain::front_stock).","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"cargo_wagons","order":7,"description":"The cargo carriages the train contains.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"carriages","order":5,"description":"The rolling stocks this train is composed of, with the numbering starting at the [front](LuaTrain::front_stock) of the train.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"fluid_wagons","order":8,"description":"The fluid carriages the train contains.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"front_rail","order":11,"description":"The rail at the front end of the train, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"front_stock","order":15,"description":"The front stock of this train, if any. The front of the train is in the direction that a majority of locomotives are pointing in. If it's a tie, the North and West directions take precedence.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"has_path","order":18,"description":"If this train has a path.","type":"boolean","optional":false,"read":true,"write":false},{"name":"id","order":21,"description":"The unique train ID.","type":"uint","optional":false,"read":true,"write":false},{"name":"kill_count","order":25,"description":"The total number of kills by this train.","type":"uint","optional":false,"read":true,"write":false},{"name":"killed_players","order":24,"description":"The players killed by this train.\n\nThe keys are the player indices, the values are how often this train killed that player.","type":{"complex_type":"dictionary","key":"uint","value":"uint"},"optional":false,"read":true,"write":false},{"name":"locomotives","order":6,"description":"Arrays of locomotives. The result is two arrays, indexed by `\"front_movers\"` and `\"back_movers\"` containing the locomotives. E.g. `{front_movers={loco1, loco2}, back_movers={loco3}}`.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaEntity"}},"optional":false,"read":true,"write":false},{"name":"manual_mode","order":0,"description":"When `true`, the train is explicitly controlled by the player or script. When `false`, the train moves autonomously according to its schedule.","type":"boolean","optional":false,"read":true,"write":true},{"name":"max_backward_speed","order":3,"description":"Current max speed when moving backwards, depends on locomotive prototype and fuel.","type":"double","optional":false,"read":true,"write":false},{"name":"max_forward_speed","order":2,"description":"Current max speed when moving forward, depends on locomotive prototype and fuel.","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":29,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"passengers","order":22,"description":"The player passengers on the train","notes":["This does *not* index using player index. See [LuaPlayer::index](LuaPlayer::index) on each player instance for the player index."],"type":{"complex_type":"array","value":"LuaPlayer"},"optional":false,"read":true,"write":false},{"name":"path","order":26,"description":"The path this train is using, if any.","type":"LuaRailPath","optional":true,"read":true,"write":false},{"name":"path_end_rail","order":19,"description":"The destination rail this train is currently pathing to, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"path_end_stop","order":20,"description":"The destination train stop this train is currently pathing to, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"rail_direction_from_back_rail","order":14,"description":"","type":"defines.rail_direction","optional":false,"read":true,"write":false},{"name":"rail_direction_from_front_rail","order":13,"description":"","type":"defines.rail_direction","optional":false,"read":true,"write":false},{"name":"riding_state","order":23,"description":"The riding state of this train.","type":"RidingState","optional":false,"read":true,"write":false},{"name":"schedule","order":9,"description":"This train's current schedule, if any. Set to `nil` to clear.","notes":["The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute."],"type":"TrainSchedule","optional":true,"read":true,"write":true},{"name":"signal","order":27,"description":"The signal this train is arriving or waiting at, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"speed","order":1,"description":"Current speed.","notes":["Changing the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc."],"type":"double","optional":false,"read":true,"write":true},{"name":"state","order":10,"description":"This train's current state.","type":"defines.train_state","optional":false,"read":true,"write":false},{"name":"station","order":17,"description":"The train stop this train is stopped at, if any.","type":"LuaEntity","optional":true,"read":true,"write":false},{"name":"valid","order":28,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false},{"name":"weight","order":4,"description":"The weight of this train.","type":"double","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaTrainStopControlBehavior","order":89,"description":"Control behavior for train stops.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"enable_disable","order":5,"description":"`true` if the train stop is enabled/disabled through the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"read_from_train","order":1,"description":"`true` if the train stop should send the train contents to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"read_stopped_train","order":2,"description":"`true` if the train stop should send the stopped train id to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"read_trains_count","order":4,"description":"`true` if the train stop should send amount of incoming trains to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"send_to_train","order":0,"description":"`true` if the train stop should send the circuit network contents to the train to use.","type":"boolean","optional":false,"read":true,"write":true},{"name":"set_trains_limit","order":3,"description":"`true` if the trains_limit_signal is used to set a limit of trains incoming for train stop.","type":"boolean","optional":false,"read":true,"write":true},{"name":"stopped_train_signal","order":6,"description":"The signal that will be sent when using the send-train-id option.","type":"SignalID","optional":false,"read":true,"write":true},{"name":"trains_count_signal","order":7,"description":"The signal that will be sent when using the read-trains-count option.","type":"SignalID","optional":false,"read":true,"write":true},{"name":"trains_limit_signal","order":8,"description":"The signal to be used by set-trains-limit to limit amount of incoming trains","type":"SignalID","optional":false,"read":true,"write":true},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaGenericOnOffControlBehavior"]},{"name":"LuaTransportBeltControlBehavior","order":90,"description":"Control behavior for transport belts.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"enable_disable","order":0,"description":"If the belt will be enabled/disabled based off the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"read_contents","order":1,"description":"If the belt will read the contents and send them to the circuit network.","type":"boolean","optional":false,"read":true,"write":true},{"name":"read_contents_mode","order":2,"description":"The read mode for the belt.","type":"defines.control_behavior.transport_belt.content_read_mode","optional":false,"read":true,"write":true},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaGenericOnOffControlBehavior"]},{"name":"LuaTransportLine","order":91,"description":"One line on a transport belt.","methods":[{"name":"can_insert_at","order":3,"description":"Can an item be inserted at a given position?","parameters":[{"name":"position","order":0,"description":"Where to insert an item.","type":"float","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_insert_at_back","order":4,"description":"Can an item be inserted at the back of this line?","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":0,"description":"Remove all items from this transport line.","parameters":[],"takes_table":false,"return_values":[]},{"name":"get_contents","order":7,"description":"Get counts of all items on this line, similar to how [LuaInventory::get_contents](LuaInventory::get_contents) does.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"The counts, indexed by item names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_item_count","order":1,"description":"Count some or all items on this line, similar to how [LuaInventory::get_item_count](LuaInventory::get_item_count) does.","parameters":[{"name":"item","order":0,"description":"Prototype name of the item to count. If not specified, count all items.","type":"string","optional":true}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"help","order":9,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"insert_at","order":5,"description":"Insert items at a given position.","parameters":[{"name":"items","order":1,"description":"Items to insert.","type":"ItemStackIdentification","optional":false},{"name":"position","order":0,"description":"Where on the line to insert the items.","type":"float","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Were the items inserted successfully?","type":"boolean","optional":false}]},{"name":"insert_at_back","order":6,"description":"Insert items at the back of this line.","parameters":[{"name":"items","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Were the items inserted successfully?","type":"boolean","optional":false}]},{"name":"line_equals","order":8,"description":"Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.","notes":["This can return true even when the [LuaTransportLine::owner](LuaTransportLine::owner)s are different (so `this == other` is false), because the internal transport lines can span multiple tiles."],"parameters":[{"name":"other","order":0,"description":"","type":"LuaTransportLine","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove_item","order":2,"description":"Remove some items from this line.","parameters":[{"name":"items","order":0,"description":"Items to remove.","type":"ItemStackIdentification","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]}],"attributes":[{"name":"input_lines","order":2,"description":"The transport lines that this transport line is fed by or an empty table if none.","type":{"complex_type":"array","value":"LuaTransportLine"},"optional":false,"read":true,"write":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"output_lines","order":1,"description":"The transport lines that this transport line outputs items to or an empty table if none.","type":{"complex_type":"array","value":"LuaTransportLine"},"optional":false,"read":true,"write":false},{"name":"owner","order":0,"description":"The entity this transport line belongs to.","type":"LuaEntity","optional":false,"read":true,"write":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[{"name":"index","order":1,"description":"The indexing operator.","type":"LuaItemStack","optional":false,"read":true,"write":false},{"name":"length","order":0,"description":"Get the number of items on this transport line.","type":"uint","optional":false,"read":true,"write":false}],"abstract":false},{"name":"LuaTrivialSmokePrototype","order":92,"description":"Prototype of a trivial smoke.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"affected_by_wind","order":14,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"color","order":4,"description":"","type":"Color","optional":false,"read":true,"write":false},{"name":"cyclic","order":13,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"duration","order":8,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"end_scale","order":6,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"fade_away_duration","order":10,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"fade_in_duration","order":11,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"glow_animation","order":16,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"glow_fade_away_duration","order":12,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"movement_slow_down_factor","order":7,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":19,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"render_layer","order":17,"description":"","type":"RenderLayer","optional":false,"read":true,"write":false},{"name":"show_when_smoke_off","order":15,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"spread_duration","order":9,"description":"","type":"uint","optional":false,"read":true,"write":false},{"name":"start_scale","order":5,"description":"","type":"double","optional":false,"read":true,"write":false},{"name":"valid","order":18,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaUnitGroup","order":93,"description":"A collection of units moving and attacking together. The engine creates autonomous unit groups to attack polluted areas. The script can create and control such groups as well. Groups can accept commands in the same manner as regular units.","methods":[{"name":"add_member","order":0,"description":"Make a unit a member of this group. Has the same effect as giving a `group_command` with this group to the unit.","notes":["The member must have the same force as the unit group."],"parameters":[{"name":"unit","order":0,"description":"","type":"LuaEntity","optional":false}],"takes_table":false,"return_values":[]},{"name":"destroy","order":5,"description":"Dissolve this group. Its members won't be destroyed, they will be merely unlinked from this group.","parameters":[],"takes_table":false,"return_values":[]},{"name":"help","order":6,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"set_autonomous","order":3,"description":"Make this group autonomous. Autonomous groups will automatically attack polluted areas. Autonomous groups aren't considered to be [script-driven](LuaUnitGroup::is_script_driven).","parameters":[],"takes_table":false,"return_values":[]},{"name":"set_command","order":1,"description":"Give this group a command.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"takes_table":false,"return_values":[]},{"name":"set_distraction_command","order":2,"description":"Give this group a distraction command.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"takes_table":false,"return_values":[]},{"name":"start_moving","order":4,"description":"Make the group start moving even if some of its members haven't yet arrived.","parameters":[],"takes_table":false,"return_values":[]}],"attributes":[{"name":"command","order":7,"description":"The command given to this group, if any.","type":"Command","optional":true,"read":true,"write":false},{"name":"distraction_command","order":8,"description":"The distraction command given to this group, if any.","type":"Command","optional":true,"read":true,"write":false},{"name":"force","order":3,"description":"The force of this unit group.","type":"LuaForce","optional":false,"read":true,"write":false},{"name":"group_number","order":5,"description":"The group number for this unit group.","type":"uint","optional":false,"read":true,"write":false},{"name":"is_script_driven","order":6,"description":"Whether this unit group is controlled by a script or by the game engine. This can be changed using [LuaUnitGroup::set_autonomous](LuaUnitGroup::set_autonomous).","type":"boolean","optional":false,"read":true,"write":false},{"name":"members","order":0,"description":"Members of this group.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false,"read":true,"write":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"position","order":1,"description":"Group position. This can have different meanings depending on the group state. When the group is gathering, the position is the place of gathering. When the group is moving, the position is the expected position of its members along the path. When the group is attacking, it is the average position of its members.","type":"MapPosition","optional":false,"read":true,"write":false},{"name":"state","order":2,"description":"Whether this group is gathering, moving or attacking.","type":"defines.group_state","optional":false,"read":true,"write":false},{"name":"surface","order":4,"description":"The surface of this unit group.","type":"LuaSurface","optional":false,"read":true,"write":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaVirtualSignalPrototype","order":94,"description":"Prototype of a virtual signal.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"localised_description","order":3,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"localised_name","order":2,"description":"","type":"LocalisedString","optional":false,"read":true,"write":false},{"name":"name","order":0,"description":"Name of this prototype.","type":"string","optional":false,"read":true,"write":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"order","order":1,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","type":"string","optional":false,"read":true,"write":false},{"name":"special","order":4,"description":"Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.","type":"boolean","optional":false,"read":true,"write":false},{"name":"subgroup","order":5,"description":"","type":"LuaGroup","optional":false,"read":true,"write":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaVoidEnergySourcePrototype","order":95,"description":"Prototype of a void energy source.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"emissions","order":0,"description":"The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","type":"double","optional":false,"read":true,"write":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"render_no_network_icon","order":1,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"render_no_power_icon","order":2,"description":"","type":"boolean","optional":false,"read":true,"write":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false},{"name":"LuaWallControlBehavior","order":96,"description":"Control behavior for walls.","methods":[{"name":"help","order":0,"description":"All methods and properties that this object supports.","parameters":[],"takes_table":false,"return_values":[{"order":0,"description":"","type":"string","optional":false}]}],"attributes":[{"name":"circuit_condition","order":0,"description":"The circuit condition.","type":"CircuitConditionDefinition","optional":false,"read":true,"write":true},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","type":"string","optional":false,"read":true,"write":false},{"name":"open_gate","order":1,"description":"","type":"boolean","optional":false,"read":true,"write":true},{"name":"output_signal","order":3,"description":"","type":"SignalID","optional":false,"read":true,"write":true},{"name":"read_sensor","order":2,"description":"","type":"boolean","optional":false,"read":true,"write":true},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","type":"boolean","optional":false,"read":true,"write":false}],"operators":[],"abstract":false,"base_classes":["LuaControlBehavior"]}],"events":[{"name":"CustomInputEvent","order":0,"description":"Called when a [CustomInput](https://wiki.factorio.com/Prototype/CustomInput) is activated.","data":[{"name":"cursor_position","order":2,"description":"The mouse cursor position when the custom input was activated.","type":"MapPosition","optional":false},{"name":"input_name","order":1,"description":"The prototype name of the custom input that was activated.","type":"string","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that activated the custom input.","type":"uint","optional":false},{"name":"selected_prototype","order":3,"description":"Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.","type":"SelectedPrototypeData","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_ai_command_completed","order":1,"description":"Called when a unit/group completes a command.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"result","order":1,"description":"","type":"defines.behavior_result","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit_number","order":0,"description":"unit_number/group_number of the unit/group which just completed a command.","type":"uint","optional":false},{"name":"was_distracted","order":2,"description":"Was this command generated by a distraction.","type":"boolean","optional":false}]},{"name":"on_area_cloned","order":2,"description":"Called when an area of the map is cloned.","data":[{"name":"clear_destination_decoratives","order":9,"description":"","type":"boolean","optional":false},{"name":"clear_destination_entities","order":8,"description":"","type":"boolean","optional":false},{"name":"clone_decoratives","order":7,"description":"","type":"boolean","optional":false},{"name":"clone_entities","order":6,"description":"","type":"boolean","optional":false},{"name":"clone_tiles","order":5,"description":"","type":"boolean","optional":false},{"name":"destination_area","order":3,"description":"","type":"BoundingBox","optional":false},{"name":"destination_force","order":4,"description":"","type":"LuaForce","optional":true},{"name":"destination_surface","order":2,"description":"","type":"LuaSurface","optional":false},{"name":"name","order":10,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_area","order":1,"description":"","type":"BoundingBox","optional":false},{"name":"source_surface","order":0,"description":"","type":"LuaSurface","optional":false},{"name":"tick","order":11,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_biter_base_built","order":3,"description":"Called when a biter migration builds a base.","notes":["This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base."],"data":[{"name":"entity","order":0,"description":"The entity that was built.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_brush_cloned","order":4,"description":"Called when a set of positions on the map is cloned.","data":[{"name":"clear_destination_decoratives","order":10,"description":"","type":"boolean","optional":false},{"name":"clear_destination_entities","order":9,"description":"","type":"boolean","optional":false},{"name":"clone_decoratives","order":8,"description":"","type":"boolean","optional":false},{"name":"clone_entities","order":7,"description":"","type":"boolean","optional":false},{"name":"clone_tiles","order":6,"description":"","type":"boolean","optional":false},{"name":"destination_force","order":5,"description":"","type":"LuaForce","optional":true},{"name":"destination_offset","order":1,"description":"","type":"TilePosition","optional":false},{"name":"destination_surface","order":4,"description":"","type":"LuaSurface","optional":false},{"name":"name","order":11,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_offset","order":0,"description":"","type":"TilePosition","optional":false},{"name":"source_positions","order":3,"description":"","type":{"complex_type":"array","value":"TilePosition"},"optional":false},{"name":"source_surface","order":2,"description":"","type":"LuaSurface","optional":false},{"name":"tick","order":12,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_build_base_arrived","order":5,"description":"Called when a [defines.command.build_base](defines.command.build_base) command reaches its destination, and before building starts.","data":[{"name":"group","order":1,"description":"The unit group the command was assigned to.","type":"LuaUnitGroup","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"The unit the command was assigned to.","type":"LuaEntity","optional":true}]},{"name":"on_built_entity","order":6,"description":"Called when player builds something. Can be filtered using [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter).","data":[{"name":"created_entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"item","order":3,"description":"The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).","type":"LuaItemPrototype","optional":true},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"stack","order":2,"description":"","type":"LuaItemStack","optional":false},{"name":"tags","order":4,"description":"The tags associated with this entity if any.","type":"Tags","optional":true},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cancelled_deconstruction","order":7,"description":"Called when the deconstruction of an entity is canceled. Can be filtered using [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter).","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cancelled_upgrade","order":8,"description":"Called when the upgrade of an entity is canceled. Can be filtered using [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter).","data":[{"name":"direction","order":3,"description":"","type":"defines.direction","optional":true},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"target","order":2,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_character_corpse_expired","order":9,"description":"Called when a character corpse expires due to timeout or all of the items being removed from it.","notes":["this is not called if the corpse is mined. See [defines.events.on_pre_player_mined_item](defines.events.on_pre_player_mined_item) to detect that."],"data":[{"name":"corpse","order":0,"description":"The corpse.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_added","order":10,"description":"Called when a chart tag is created.","data":[{"name":"force","order":1,"description":"","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_modified","order":11,"description":"Called when a chart tag is modified by a player.","data":[{"name":"force","order":2,"description":"","type":"LuaForce","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_icon","order":4,"description":"","type":"SignalID","optional":true},{"name":"old_player","order":5,"description":"","type":"uint","optional":true},{"name":"old_text","order":3,"description":"","type":"string","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_removed","order":12,"description":"Called just before a chart tag is deleted.","data":[{"name":"force","order":1,"description":"","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_charted","order":13,"description":"Called when a chunk is charted or re-charted.","data":[{"name":"area","order":2,"description":"Area of the chunk.","type":"BoundingBox","optional":false},{"name":"force","order":3,"description":"","type":"LuaForce","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":1,"description":"","type":"ChunkPosition","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_deleted","order":14,"description":"Called when one or more chunks are deleted using [LuaSurface::delete_chunk](LuaSurface::delete_chunk).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"positions","order":1,"description":"The chunks deleted.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_generated","order":15,"description":"Called when a chunk is generated.","data":[{"name":"area","order":0,"description":"Area of the chunk.","type":"BoundingBox","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":1,"description":"Position of the chunk.","type":"ChunkPosition","optional":false},{"name":"surface","order":2,"description":"The surface the chunk is on.","type":"LuaSurface","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_combat_robot_expired","order":16,"description":"Called when a combat robot expires through a lack of energy, or timeout.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"owner","order":1,"description":"The entity that owns the robot if any.","type":"LuaEntity","optional":true},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_console_chat","order":17,"description":"Called when a message is sent to the in-game console, either by a player or through the server interface.","notes":["This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`)."],"data":[{"name":"message","order":1,"description":"The chat message that was sent.","type":"string","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the chatting, if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_console_command","order":18,"description":"Called when someone enters a command-like message regardless of it being a valid command.","data":[{"name":"command","order":1,"description":"The command as typed without the preceding forward slash ('/').","type":"string","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"parameters","order":2,"description":"The parameters provided if any.","type":"string","optional":false},{"name":"player_index","order":0,"description":"The player if any.","type":"uint","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_cancelled","order":19,"description":"Called when a cutscene is cancelled by the player or by script.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player the cutscene was shown to.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_waypoint_reached","order":20,"description":"Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.\n\nThis refers to an index in the table previously passed to set_controller which started the cutscene.","notes":["Due to implementation omission, waypoint_index is 0-based."],"data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player index of the player viewing the cutscene.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"waypoint_index","order":1,"description":"The index of the waypoint we just completed.","type":"uint","optional":false}]},{"name":"on_difficulty_settings_changed","order":21,"description":"Called when the map difficulty settings are changed.","notes":["It's not guaranteed that both settings are changed - just that at least one has been changed."],"data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_recipe_difficulty","order":0,"description":"","type":"uint","optional":false},{"name":"old_technology_difficulty","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_cloned","order":22,"description":"Called when an entity is cloned. Can be filtered for the source entity using [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter).","data":[{"name":"destination","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_damaged","order":23,"description":"Called when an entity is damaged. Can be filtered using [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter).","notes":["This is not called when an entities health is set directly by another mod."],"data":[{"name":"cause","order":5,"description":"The entity that did the attacking if available.","type":"LuaEntity","optional":true},{"name":"damage_type","order":1,"description":"","type":"LuaDamagePrototype","optional":false},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"final_damage_amount","order":3,"description":"The damage amount after resistances.","type":"float","optional":false},{"name":"final_health","order":4,"description":"The health of the entity after the damage was applied.","type":"float","optional":false},{"name":"force","order":6,"description":"The force that did the attacking if any.","type":"LuaForce","optional":true},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"original_damage_amount","order":2,"description":"The damage amount before resistances.","type":"float","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_destroyed","order":24,"description":"Called after an entity is destroyed that has been registered with [LuaBootstrap::register_on_entity_destroyed](LuaBootstrap::register_on_entity_destroyed).","notes":["Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick."],"data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"registration_number","order":0,"description":"The number returned by [register_on_entity_destroyed](LuaBootstrap::register_on_entity_destroyed) to uniquely identify this entity during this event.","type":"uint64","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit_number","order":1,"description":"The [LuaEntity::unit_number](LuaEntity::unit_number) of the destroyed entity, if it had one.","type":"uint","optional":true}]},{"name":"on_entity_died","order":25,"description":"Called when an entity dies. Can be filtered using [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter).","data":[{"name":"cause","order":1,"description":"The entity that did the killing if available.","type":"LuaEntity","optional":true},{"name":"damage_type","order":4,"description":"The damage type if any.","type":"LuaDamagePrototype","optional":true},{"name":"entity","order":0,"description":"The entity that died.","type":"LuaEntity","optional":false},{"name":"force","order":3,"description":"The force that did the killing if any.","type":"LuaForce","optional":true},{"name":"loot","order":2,"description":"The loot generated by this entity if any.","type":"LuaInventory","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_logistic_slot_changed","order":26,"description":"Called when one of an entity's personal logistic slots changes.","notes":["\"Personal logistic slot\" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests."],"data":[{"name":"entity","order":1,"description":"The entity for whom a logistic slot was changed.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed the slot, or `nil` if changed by script.","type":"uint","optional":true},{"name":"slot_index","order":2,"description":"The slot index that was changed.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_renamed","order":27,"description":"Called after an entity has been renamed either by the player or through script.","data":[{"name":"by_script","order":1,"description":"","type":"boolean","optional":false},{"name":"entity","order":2,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_name","order":3,"description":"","type":"string","optional":false},{"name":"player_index","order":0,"description":"If by_script is true this will not be included.","type":"uint","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_settings_pasted","order":28,"description":"Called after entity copy-paste is done.","data":[{"name":"destination","order":2,"description":"The destination entity settings were copied to.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"source","order":1,"description":"The source entity settings were copied from.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_spawned","order":29,"description":"Called when an entity is spawned by a EnemySpawner","data":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"spawner","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_equipment_inserted","order":30,"description":"Called after equipment is inserted into an equipment grid.","data":[{"name":"equipment","order":1,"description":"The equipment inserted.","type":"LuaEquipment","optional":false},{"name":"grid","order":0,"description":"The equipment grid inserted into.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_equipment_removed","order":31,"description":"Called after equipment is removed from an equipment grid.","data":[{"name":"count","order":2,"description":"The count of equipment removed.","type":"uint","optional":false},{"name":"equipment","order":1,"description":"The equipment removed.","type":"string","optional":false},{"name":"grid","order":0,"description":"The equipment grid removed from.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_cease_fire_changed","order":32,"description":"Called when the a forces cease fire values change.","data":[{"name":"added","order":2,"description":"If the other force was added or removed.","type":"boolean","optional":false},{"name":"force","order":0,"description":"The force who's cease fire changed.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_force","order":1,"description":"Which force was added or removed.","type":"LuaForce","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_created","order":33,"description":"Called when a new force is created using `game.create_force()`","notes":["This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist."],"data":[{"name":"force","order":0,"description":"The newly created force.","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_friends_changed","order":34,"description":"Called when the a forces friends change.","data":[{"name":"added","order":2,"description":"If the other force was added or removed.","type":"boolean","optional":false},{"name":"force","order":0,"description":"The force who's friends changed.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_force","order":1,"description":"Which force was added or removed.","type":"LuaForce","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_reset","order":35,"description":"Called when [LuaForce::reset](LuaForce::reset) is finished.","data":[{"name":"force","order":0,"description":"","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_forces_merged","order":36,"description":"Called after two forces have been merged using `game.merge_forces()`.","notes":["The source force is invalidated before this event is called and the name can be re-used in this event if desired."],"data":[{"name":"destination","order":2,"description":"The force entities where reassigned to.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_index","order":1,"description":"The index of the destroyed force.","type":"uint","optional":false},{"name":"source_name","order":0,"description":"The force destroyed.","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_forces_merging","order":37,"description":"Called when two forces are about to be merged using `game.merge_forces()`.","data":[{"name":"destination","order":1,"description":"The force to reassign entities to.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":0,"description":"The force to be destroyed","type":"LuaForce","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_game_created_from_scenario","order":38,"description":"Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, [LuaBootstrap::on_init](LuaBootstrap::on_init) is not fired.","notes":["This event is not fired when the scenario is loaded via the map editor."],"data":[{"name":"name","order":0,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_checked_state_changed","order":39,"description":"Called when [LuaGuiElement](LuaGuiElement) checked state is changed (related to checkboxes and radio buttons).","data":[{"name":"element","order":0,"description":"The element whose checked state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_click","order":40,"description":"Called when [LuaGuiElement](LuaGuiElement) is clicked.","data":[{"name":"alt","order":3,"description":"If alt was pressed.","type":"boolean","optional":false},{"name":"button","order":2,"description":"The mouse button used if any.","type":"defines.mouse_button_type","optional":false},{"name":"control","order":4,"description":"If control was pressed.","type":"boolean","optional":false},{"name":"element","order":0,"description":"The clicked element.","type":"LuaGuiElement","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the clicking.","type":"uint","optional":false},{"name":"shift","order":5,"description":"If shift was pressed.","type":"boolean","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_closed","order":41,"description":"Called when the player closes the GUI they have open.\n\nThis can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.","notes":["It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened."],"data":[{"name":"element","order":6,"description":"The custom GUI element that was open","type":"LuaGuiElement","optional":true},{"name":"entity","order":2,"description":"The entity that was open","type":"LuaEntity","optional":true},{"name":"equipment","order":4,"description":"The equipment that was open","type":"LuaEquipment","optional":true},{"name":"gui_type","order":1,"description":"The GUI type that was open.","type":"defines.gui_type","optional":false},{"name":"inventory","order":9,"description":"The script inventory that was open","type":"LuaInventory","optional":true},{"name":"item","order":3,"description":"The item that was open","type":"LuaItemStack","optional":true},{"name":"name","order":10,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_player","order":5,"description":"The other player that was open","type":"LuaPlayer","optional":true},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"technology","order":7,"description":"The technology that was automatically selected when opening the research GUI","type":"LuaTechnology","optional":true},{"name":"tick","order":11,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile_position","order":8,"description":"The tile position that was open","type":"TilePosition","optional":true}]},{"name":"on_gui_confirmed","order":42,"description":"Called when a [LuaGuiElement](LuaGuiElement) is confirmed, for example by pressing Enter in a textfield.","data":[{"name":"alt","order":2,"description":"If alt was pressed.","type":"boolean","optional":false},{"name":"control","order":3,"description":"If control was pressed.","type":"boolean","optional":false},{"name":"element","order":0,"description":"The confirmed element.","type":"LuaGuiElement","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the confirming.","type":"uint","optional":false},{"name":"shift","order":4,"description":"If shift was pressed.","type":"boolean","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_elem_changed","order":43,"description":"Called when [LuaGuiElement](LuaGuiElement) element value is changed (related to choose element buttons).","data":[{"name":"element","order":0,"description":"The element whose element value changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_location_changed","order":44,"description":"Called when [LuaGuiElement](LuaGuiElement) element location is changed (related to frames in `player.gui.screen`).","data":[{"name":"element","order":0,"description":"The element whose location changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_opened","order":45,"description":"Called when the player opens a GUI.","data":[{"name":"element","order":6,"description":"The custom GUI element that was opened","type":"LuaGuiElement","optional":true},{"name":"entity","order":2,"description":"The entity that was opened","type":"LuaEntity","optional":true},{"name":"equipment","order":4,"description":"The equipment that was opened","type":"LuaEquipment","optional":true},{"name":"gui_type","order":1,"description":"The GUI type that was opened.","type":"defines.gui_type","optional":false},{"name":"inventory","order":7,"description":"The script inventory that was opened","type":"LuaInventory","optional":true},{"name":"item","order":3,"description":"The item that was opened","type":"LuaItemStack","optional":true},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_player","order":5,"description":"The other player that was opened","type":"LuaPlayer","optional":true},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_selected_tab_changed","order":46,"description":"Called when [LuaGuiElement](LuaGuiElement) selected tab is changed (related to tabbed-panes).","data":[{"name":"element","order":0,"description":"The tabbed pane whose selected tab changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_selection_state_changed","order":47,"description":"Called when [LuaGuiElement](LuaGuiElement) selection state is changed (related to drop-downs and listboxes).","data":[{"name":"element","order":0,"description":"The element whose selection state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_switch_state_changed","order":48,"description":"Called when [LuaGuiElement](LuaGuiElement) switch state is changed (related to switches).","data":[{"name":"element","order":0,"description":"The switch whose switch state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_text_changed","order":49,"description":"Called when [LuaGuiElement](LuaGuiElement) text is changed by the player.","data":[{"name":"element","order":0,"description":"The edited element.","type":"LuaGuiElement","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the edit.","type":"uint","optional":false},{"name":"text","order":2,"description":"The new text in the element.","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_value_changed","order":50,"description":"Called when [LuaGuiElement](LuaGuiElement) slider value is changed (related to the slider element).","data":[{"name":"element","order":0,"description":"The element whose value changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_land_mine_armed","order":51,"description":"Called when a land mine is armed.","data":[{"name":"mine","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_lua_shortcut","order":52,"description":"Called when a custom Lua shortcut is pressed.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"prototype_name","order":1,"description":"Shortcut prototype name of the shortcut that was clicked.","type":"string","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_marked_for_deconstruction","order":53,"description":"Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered using [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter).","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_marked_for_upgrade","order":54,"description":"Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter).","data":[{"name":"direction","order":3,"description":"The new direction (if any)","type":"defines.direction","optional":true},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":true},{"name":"target","order":1,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_market_item_purchased","order":55,"description":"Called after a player purchases some offer from a `market` entity.","data":[{"name":"count","order":3,"description":"The amount of offers purchased.","type":"uint","optional":false},{"name":"market","order":1,"description":"The market entity.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"offer_index","order":2,"description":"The index of the offer purchased.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player who did the purchasing.","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_mod_item_opened","order":56,"description":"Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag","data":[{"name":"item","order":1,"description":"The item clicked on.","type":"LuaItemPrototype","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_permission_group_added","order":57,"description":"Called directly after a permission group is added.","data":[{"name":"group","order":1,"description":"The group added.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that added the group.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_permission_group_deleted","order":58,"description":"Called directly after a permission group is deleted.","data":[{"name":"group_name","order":1,"description":"The group that was deleted.","type":"string","optional":false},{"name":"id","order":2,"description":"The group id that was deleted.","type":"uint","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the deletion.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_permission_group_edited","order":59,"description":"Called directly after a permission group is edited in some way.","data":[{"name":"action","order":3,"description":"The action when the `type` is \"add-permission\" or \"remove-permission\".","type":"defines.input_action","optional":false},{"name":"group","order":1,"description":"The group being edited.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_name","order":6,"description":"The new group name when the `type` is \"rename\".","type":"string","optional":false},{"name":"old_name","order":5,"description":"The old group name when the `type` is \"rename\".","type":"string","optional":false},{"name":"other_player_index","order":4,"description":"The other player when the `type` is \"add-player\" or \"remove-player\".","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player that did the editing.","type":"uint","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"type","order":2,"description":"The edit type: \"add-permission\", \"remove-permission\", \"enable-all\", \"disable-all\", \"add-player\", \"remove-player\", \"rename\".","type":"string","optional":false}]},{"name":"on_permission_string_imported","order":60,"description":"Called directly after a permission string is imported.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that imported the string.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_picked_up_item","order":61,"description":"Called when a player picks up an item.","data":[{"name":"item_stack","order":0,"description":"","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_alt_reverse_selected_area","order":62,"description":"Called after a player alt-reverse-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_alt_selected_area","order":63,"description":"Called after a player alt-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_ammo_inventory_changed","order":64,"description":"Called after a players ammo inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_armor_inventory_changed","order":65,"description":"Called after a players armor inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_banned","order":66,"description":"Called when a player is banned.","data":[{"name":"by_player","order":2,"description":"The player that did the banning if any.","type":"uint","optional":true},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player banned.","type":"uint","optional":true},{"name":"player_name","order":1,"description":"The banned player name.","type":"string","optional":false},{"name":"reason","order":3,"description":"The reason given if any.","type":"string","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_built_tile","order":67,"description":"Called after a player builds tiles.","data":[{"name":"item","order":4,"description":"The item type used to build the tiles","type":"LuaItemPrototype","optional":true},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"stack","order":5,"description":"The stack used to build the tiles (may be empty if all of the items where used to build the tiles).","type":"LuaItemStack","optional":true},{"name":"surface_index","order":1,"description":"The surface the tile(s) were built on.","type":"uint","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile","order":3,"description":"The tile prototype that was placed.","type":"LuaTilePrototype","optional":false},{"name":"tiles","order":2,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_player_cancelled_crafting","order":68,"description":"Called when a player cancels crafting.","data":[{"name":"cancel_count","order":3,"description":"The number of crafts that have been cancelled.","type":"uint","optional":false},{"name":"items","order":1,"description":"The crafting items returned to the player's inventory.","type":"LuaInventory","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe that has been cancelled.","type":"LuaRecipe","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_force","order":69,"description":"Called after a player changes forces.","data":[{"name":"force","order":1,"description":"The old force.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed forces.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_position","order":70,"description":"Called when the tile position a player is located at changes.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_surface","order":71,"description":"Called after a player changes surfaces.","notes":["In the instance a player is moved off a surface due to it being deleted this is not called."],"data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed surfaces.","type":"uint","optional":false},{"name":"surface_index","order":1,"description":"The surface index the player was on.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cheat_mode_disabled","order":72,"description":"Called when cheat mode is disabled on a player.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cheat_mode_enabled","order":73,"description":"Called when cheat mode is enabled on a player.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_clicked_gps_tag","order":74,"description":"Called when a player clicks a gps tag","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"Index of the player","type":"uint","optional":false},{"name":"position","order":1,"description":"Map position contained in gps tag","type":"MapPosition","optional":false},{"name":"surface","order":2,"description":"Surface name contained in gps tag, even when such surface does not exists","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_configured_blueprint","order":75,"description":"Called when a player clicks the \"confirm\" button in the configure Blueprint GUI.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_configured_spider_remote","order":76,"description":"Called when a player configures spidertron remote to be connected with a given spidertron","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that configured the remote.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"vehicle","order":1,"description":"Spider vehicle to which remote was connected to.","type":"LuaEntity","optional":false}]},{"name":"on_player_crafted_item","order":77,"description":"Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see [on_pre_player_crafted_item](on_pre_player_crafted_item)).","data":[{"name":"item_stack","order":0,"description":"The item that has been crafted.","type":"LuaItemStack","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe used to craft this item.","type":"LuaRecipe","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_created","order":78,"description":"Called after the player was created.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cursor_stack_changed","order":79,"description":"Called after a players cursorstack changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_deconstructed_area","order":80,"description":"Called when a player selects an area with a deconstruction planner.","data":[{"name":"alt","order":4,"description":"If normal selection or alt selection was used.","type":"boolean","optional":false},{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_demoted","order":81,"description":"Called when a player is demoted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_died","order":82,"description":"Called after a player dies.","data":[{"name":"cause","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_display_resolution_changed","order":83,"description":"Called when the display resolution changes for a given player.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_resolution","order":1,"description":"The old display resolution","type":"DisplayResolution","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_display_scale_changed","order":84,"description":"Called when the display scale changes for a given player.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_scale","order":1,"description":"The old display scale","type":"double","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_driving_changed_state","order":85,"description":"Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.","notes":["This event is not raised when the player is ejected from a vehicle due to it being destroyed."],"data":[{"name":"entity","order":1,"description":"The vehicle if any.","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_dropped_item","order":86,"description":"Called when a player drops an item on the ground.","data":[{"name":"entity","order":1,"description":"The item-on-ground entity.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_fast_transferred","order":87,"description":"Called when a player fast-transfers something to or from an entity.","data":[{"name":"entity","order":1,"description":"The entity transferred from or to.","type":"LuaEntity","optional":false},{"name":"from_player","order":2,"description":"Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.","type":"boolean","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player transferred from or to.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_flushed_fluid","order":88,"description":"Called after player flushed fluid","data":[{"name":"amount","order":2,"description":"Amount of fluid that was removed","type":"double","optional":false},{"name":"entity","order":3,"description":"Entity from which flush was performed","type":"LuaEntity","optional":false},{"name":"fluid","order":1,"description":"Name of a fluid that was flushed","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"only_this_entity","order":4,"description":"True if flush was requested only on this entity","type":"boolean","optional":false},{"name":"player_index","order":0,"description":"Index of the player","type":"uint","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_gun_inventory_changed","order":89,"description":"Called after a players gun inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_joined_game","order":90,"description":"Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_kicked","order":91,"description":"Called when a player is kicked.","data":[{"name":"by_player","order":1,"description":"The player that did the kicking if any.","type":"uint","optional":true},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player kicked.","type":"uint","optional":false},{"name":"reason","order":2,"description":"The reason given if any.","type":"string","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_left_game","order":92,"description":"Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"reason","order":1,"description":"","type":"defines.disconnect_reason","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_main_inventory_changed","order":93,"description":"Called after a players main inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_mined_entity","order":94,"description":"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. Can be filtered using [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter).","notes":["The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it."],"data":[{"name":"buffer","order":2,"description":"The temporary inventory that holds the result of mining the entity.","type":"LuaInventory","optional":false},{"name":"entity","order":1,"description":"The entity that has been mined.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The index of the player doing the mining.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_mined_item","order":95,"description":"Called when the player mines something.","data":[{"name":"item_stack","order":0,"description":"The item given to the player","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_mined_tile","order":96,"description":"Called after a player mines tiles.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"surface_index","order":1,"description":"The surface the tile(s) were mined from.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":2,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_player_muted","order":97,"description":"Called when a player is muted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_pipette","order":98,"description":"Called when a player invokes the \"smart pipette\" over an entity.","data":[{"name":"item","order":1,"description":"The item put in the cursor","type":"LuaItemPrototype","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"used_cheat_mode","order":2,"description":"If cheat mode was used to give a free stack of the item.","type":"boolean","optional":false}]},{"name":"on_player_placed_equipment","order":99,"description":"Called after the player puts equipment in an equipment grid","data":[{"name":"equipment","order":1,"description":"The equipment put in the equipment grid.","type":"LuaEquipment","optional":false},{"name":"grid","order":2,"description":"The equipment grid the equipment was put in.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_promoted","order":100,"description":"Called when a player is promoted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_removed","order":101,"description":"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.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player index that was removed","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_removed_equipment","order":102,"description":"Called after the player removes equipment from an equipment grid","data":[{"name":"count","order":3,"description":"The count of equipment removed.","type":"uint","optional":false},{"name":"equipment","order":2,"description":"The equipment removed.","type":"string","optional":false},{"name":"grid","order":1,"description":"The equipment grid removed from.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_repaired_entity","order":103,"description":"Called when a player repairs an entity. Can be filtered using [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter).","data":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_respawned","order":104,"description":"Called after a player respawns.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"player_port","order":1,"description":"The player port used to respawn if one was used.","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_reverse_selected_area","order":105,"description":"Called after a player reverse-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_rotated_entity","order":106,"description":"Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.","data":[{"name":"entity","order":0,"description":"The rotated entity.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":false},{"name":"previous_direction","order":1,"description":"The previous direction","type":"defines.direction","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_selected_area","order":107,"description":"Called after a player selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_set_quick_bar_slot","order":108,"description":"Called when a player sets a quickbar slot to anything (new value, or set to empty).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_setup_blueprint","order":109,"description":"Called when a player selects an area with a blueprint.","data":[{"name":"alt","order":4,"description":"If normal selection or alt selection was used.","type":"boolean","optional":false},{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"mapping","order":5,"description":"The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect.","type":{"complex_type":"LuaLazyLoadedValue","value":{"complex_type":"dictionary","key":"uint","value":"LuaEntity"}},"optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_toggled_alt_mode","order":110,"description":"Called when a player toggles alt mode, also known as \"show entity info\".","data":[{"name":"alt_mode","order":1,"description":"The new alt mode value. This value is a shortcut for accessing [GameViewSettings::show_entity_info](GameViewSettings::show_entity_info) on the player.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_toggled_map_editor","order":111,"description":"Called when a player toggles the map editor on or off.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_trash_inventory_changed","order":112,"description":"Called after a players trash inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_unbanned","order":113,"description":"Called when a player is un-banned.","data":[{"name":"by_player","order":2,"description":"The player that did the un-banning if any.","type":"uint","optional":true},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player un-banned.","type":"uint","optional":true},{"name":"player_name","order":1,"description":"The player name un-banned.","type":"string","optional":false},{"name":"reason","order":3,"description":"The reason the player was banned if any.","type":"string","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_unmuted","order":114,"description":"Called when a player is unmuted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_used_capsule","order":115,"description":"Called when a player uses a capsule that results in some game action.","data":[{"name":"item","order":1,"description":"The capsule item used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"position","order":2,"description":"The position the capsule was used.","type":"MapPosition","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_used_spider_remote","order":116,"description":"Called when a player uses spidertron remote to send a spidertron to a given position","data":[{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that used the remote.","type":"uint","optional":false},{"name":"position","order":2,"description":"Goal position to which spidertron was sent to.","type":"MapPosition","optional":false},{"name":"success","order":3,"description":"If the use was successful. It may fail when spidertron has different driver or when player is on different surface.","type":"boolean","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"vehicle","order":1,"description":"Spider vehicle which was requested to move.","type":"LuaEntity","optional":false}]},{"name":"on_post_entity_died","order":117,"description":"Called after an entity dies. Can be filtered using [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter).","data":[{"name":"corpses","order":5,"description":"The corpses created by the entity dying if any.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"damage_type","order":4,"description":"The damage type if any.","type":"LuaDamagePrototype","optional":true},{"name":"force","order":1,"description":"The force that did the killing if any.","type":"LuaForce","optional":true},{"name":"ghost","order":0,"description":"The ghost created by the entity dying if any.","type":"LuaEntity","optional":true},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":2,"description":"Position where the entity died.","type":"MapPosition","optional":false},{"name":"prototype","order":3,"description":"The entity prototype of the entity that died.","type":"LuaEntityPrototype","optional":false},{"name":"surface_index","order":6,"description":"The surface the entity was on.","type":"uint","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit_number","order":7,"description":"The unit number the entity had if any.","type":"uint","optional":true}]},{"name":"on_pre_build","order":118,"description":"Called when players uses an item to build something. Called before [on_built_entity](on_built_entity).","data":[{"name":"created_by_moving","order":6,"description":"Item was placed while moving.","type":"boolean","optional":false},{"name":"direction","order":3,"description":"The direction the item was facing when placed.","type":"defines.direction","optional":false},{"name":"flip_horizontal","order":4,"description":"If building this blueprint was flipped horizontally.","type":"boolean","optional":false},{"name":"flip_vertical","order":5,"description":"If building this blueprint was flipped vertically.","type":"boolean","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who did the placing.","type":"uint","optional":false},{"name":"position","order":1,"description":"Where the item was placed.","type":"MapPosition","optional":false},{"name":"shift_build","order":2,"description":"Item was placed using shift building.","type":"boolean","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_chunk_deleted","order":119,"description":"Called before one or more chunks are deleted using [LuaSurface::delete_chunk](LuaSurface::delete_chunk).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"positions","order":1,"description":"The chunks to be deleted.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_entity_settings_pasted","order":120,"description":"Called before entity copy-paste is done.","data":[{"name":"destination","order":2,"description":"The destination entity settings will be copied to.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"source","order":1,"description":"The source entity settings will be copied from.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_ghost_deconstructed","order":121,"description":"Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter).","data":[{"name":"ghost","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the deconstruction if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_ghost_upgraded","order":122,"description":"Called before a ghost entity is upgraded. Can be filtered using [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter).","data":[{"name":"ghost","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the upgrade if any.","type":"uint","optional":true},{"name":"target","order":2,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_permission_group_deleted","order":123,"description":"Called directly before a permission group is deleted.","data":[{"name":"group","order":1,"description":"The group to be deleted.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the deletion.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_permission_string_imported","order":124,"description":"Called directly before a permission string is imported.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player importing the string.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_crafted_item","order":125,"description":"Called when a player queues something to be crafted.","data":[{"name":"items","order":2,"description":"The items removed from the players inventory to do the crafting.","type":"LuaInventory","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"queued_count","order":3,"description":"The number of times the recipe is being queued.","type":"uint","optional":false},{"name":"recipe","order":1,"description":"The recipe being queued.","type":"LuaRecipe","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_died","order":126,"description":"Called before a players dies.","data":[{"name":"cause","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_left_game","order":127,"description":"Called before a player leaves the game.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"reason","order":1,"description":"","type":"defines.disconnect_reason","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_mined_item","order":128,"description":"Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed. Can be filtered using [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter).","data":[{"name":"entity","order":0,"description":"The entity being mined","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_removed","order":129,"description":"Called before 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.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player index that will be removed","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_toggled_map_editor","order":130,"description":"Called before a player toggles the map editor on or off.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_robot_exploded_cliff","order":131,"description":"Called directly before a robot explodes cliffs.","data":[{"name":"cliff","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"item","order":2,"description":"The cliff explosive used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_script_inventory_resized","order":132,"description":"Called just before a script inventory is resized.","data":[{"name":"inventory","order":2,"description":"","type":"LuaInventory","optional":false},{"name":"mod","order":1,"description":"The mod that did the resizing. This will be `\"core\"` if done by console command or scenario script.","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_size","order":4,"description":"The new inventory size.","type":"uint","optional":false},{"name":"old_size","order":3,"description":"The old inventory size.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"If done by console command; the player who ran the command.","type":"uint","optional":true},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_surface_cleared","order":133,"description":"Called just before a surface is cleared (all entities removed and all chunks deleted).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_surface_deleted","order":134,"description":"Called just before a surface is deleted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_cancelled","order":135,"description":"Called when research is cancelled.","data":[{"name":"force","order":1,"description":"The force whose research was cancelled.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"A mapping of technology name to how many times it was cancelled.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_finished","order":136,"description":"Called when a research finishes.","data":[{"name":"by_script","order":1,"description":"If the technology was researched by script.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The researched technology","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_reversed","order":137,"description":"Called when a research is reversed (unresearched).","data":[{"name":"by_script","order":1,"description":"If the technology was un-researched by script.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The technology un-researched","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_started","order":138,"description":"Called when a technology research starts.","data":[{"name":"last_research","order":1,"description":"","type":"LuaTechnology","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The technology being researched","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_resource_depleted","order":139,"description":"Called when a resource entity reaches 0 or its minimum yield for infinite resources.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_built_entity","order":140,"description":"Called when a construction robot builds an entity. Can be filtered using [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter).","data":[{"name":"created_entity","order":1,"description":"The entity built.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that did the building.","type":"LuaEntity","optional":false},{"name":"stack","order":2,"description":"The item used to do the building.","type":"LuaItemStack","optional":false},{"name":"tags","order":3,"description":"The tags associated with this entity if any.","type":"Tags","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_built_tile","order":141,"description":"Called after a robot builds tiles.","data":[{"name":"item","order":3,"description":"The item type used to build the tiles.","type":"LuaItemPrototype","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot.","type":"LuaEntity","optional":false},{"name":"stack","order":4,"description":"The stack used to build the tiles (may be empty if all of the items where used to build the tiles).","type":"LuaItemStack","optional":false},{"name":"surface_index","order":5,"description":"The surface the tile(s) are build on.","type":"uint","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile","order":2,"description":"The tile prototype that was placed.","type":"LuaTilePrototype","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_robot_exploded_cliff","order":142,"description":"Called directly after a robot explodes cliffs.","data":[{"name":"item","order":1,"description":"The cliff explosive used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_mined","order":143,"description":"Called when a robot mines an entity.","data":[{"name":"item_stack","order":1,"description":"The entity the robot just picked up.","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that did the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_mined_entity","order":144,"description":"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. Can be filtered using [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter).","notes":["The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it."],"data":[{"name":"buffer","order":2,"description":"The temporary inventory that holds the result of mining the entity.","type":"LuaInventory","optional":false},{"name":"entity","order":1,"description":"The entity that has been mined.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot doing the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_mined_tile","order":145,"description":"Called after a robot mines tiles.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot.","type":"LuaEntity","optional":false},{"name":"surface_index","order":2,"description":"The surface the tile(s) were mined on.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_robot_pre_mined","order":146,"description":"Called before a robot mines an entity. Can be filtered using [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter).","data":[{"name":"entity","order":1,"description":"The entity which is about to be mined.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that's about to do the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_rocket_launch_ordered","order":147,"description":"Called when a rocket silo is ordered to be launched.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"The player that is riding the rocket, if any.","type":"uint","optional":true},{"name":"rocket","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"rocket_silo","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_rocket_launched","order":148,"description":"Called when the rocket is launched.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"The player that is riding the rocket, if any.","type":"uint","optional":true},{"name":"rocket","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"rocket_silo","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_runtime_mod_setting_changed","order":149,"description":"Called when a runtime mod setting is changed by a player.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"If the `setting_type` is `\"global\"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `\"runtime-per-user\"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.","type":"uint","optional":true},{"name":"setting","order":1,"description":"The prototype name of the setting that was changed.","type":"string","optional":false},{"name":"setting_type","order":2,"description":"Either \"runtime-per-user\" or \"runtime-global\".","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_script_inventory_resized","order":150,"description":"Called just after a script inventory is resized.","data":[{"name":"inventory","order":2,"description":"","type":"LuaInventory","optional":false},{"name":"mod","order":1,"description":"The mod that did the resizing. This will be `\"core\"` if done by console command or scenario script.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_size","order":4,"description":"The new inventory size.","type":"uint","optional":false},{"name":"old_size","order":3,"description":"The old inventory size.","type":"uint","optional":false},{"name":"overflow_inventory","order":5,"description":"Any items which didn't fit into the new inventory size.","type":"LuaInventory","optional":false},{"name":"player_index","order":0,"description":"If done by console command; the player who ran the command.","type":"uint","optional":true},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_script_path_request_finished","order":151,"description":"Called when a [LuaSurface::request_path](LuaSurface::request_path) call completes.","data":[{"name":"id","order":1,"description":"Handle to associate the callback with a particular call to [LuaSurface::request_path](LuaSurface::request_path).","type":"uint","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"path","order":0,"description":"The actual path that the pathfinder has determined. `nil` if pathfinding failed.","type":{"complex_type":"array","value":"PathfinderWaypoint"},"optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"try_again_later","order":2,"description":"Indicates that the pathfinder failed because it is too busy, and that you can retry later.","type":"boolean","optional":false}]},{"name":"on_script_trigger_effect","order":152,"description":"Called when a script trigger effect is triggered.","data":[{"name":"effect_id","order":0,"description":"The effect_id specified in the trigger effect.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_entity","order":3,"description":"","type":"LuaEntity","optional":true},{"name":"source_position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"surface_index","order":1,"description":"The surface the effect happened on.","type":"uint","optional":false},{"name":"target_entity","order":5,"description":"","type":"LuaEntity","optional":true},{"name":"target_position","order":4,"description":"","type":"MapPosition","optional":true},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_sector_scanned","order":153,"description":"Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter).","data":[{"name":"area","order":2,"description":"Area of the scanned chunk.","type":"BoundingBox","optional":false},{"name":"chunk_position","order":1,"description":"The chunk scanned.","type":"ChunkPosition","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"radar","order":0,"description":"The radar that did the scanning.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_selected_entity_changed","order":154,"description":"Called after the selected entity changes for a given player.","data":[{"name":"last_entity","order":1,"description":"The last selected entity if it still exists and there was one.","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player whose selected entity changed.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_spider_command_completed","order":155,"description":"Called when a spider finishes moving to its autopilot position.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"vehicle","order":0,"description":"Spider vehicle which was requested to move.","type":"LuaEntity","optional":false}]},{"name":"on_string_translated","order":156,"description":"Called when a translation request generated through [LuaPlayer::request_translation](LuaPlayer::request_translation) is translated.","data":[{"name":"id","order":3,"description":"The unique id for this translation request.","type":"uint","optional":false},{"name":"localised_string","order":1,"description":"The localised string being translated.","type":"LocalisedString","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player whose locale was used for the translation.","type":"uint","optional":false},{"name":"result","order":2,"description":"The translated `localised_string`.","type":"string","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"translated","order":4,"description":"Whether the requested localised string was valid and could be translated.","type":"boolean","optional":false}]},{"name":"on_surface_cleared","order":157,"description":"Called just after a surface is cleared (all entities removed and all chunks deleted).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_created","order":158,"description":"Called when a surface is created.","notes":["This is not called when the default surface is created as it will always exist."],"data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_deleted","order":159,"description":"Called after a surface is deleted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_imported","order":160,"description":"Called after a surface is imported.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"original_name","order":1,"description":"The original surface name.","type":"string","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_renamed","order":161,"description":"Called when a surface is renamed.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_name","order":2,"description":"","type":"string","optional":false},{"name":"old_name","order":1,"description":"","type":"string","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_technology_effects_reset","order":162,"description":"Called when [LuaForce::reset_technology_effects](LuaForce::reset_technology_effects) is finished.","data":[{"name":"force","order":0,"description":"","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_tick","order":163,"description":"It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.","data":[{"name":"name","order":0,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_train_changed_state","order":164,"description":"Called when a train changes state (started to stopped and vice versa)","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_state","order":1,"description":"","type":"defines.train_state","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_train_created","order":165,"description":"Called when a new train is created either through disconnecting/connecting an existing one or building a new one.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_train_id_1","order":1,"description":"The first old train id when splitting/merging trains.","type":"uint","optional":true},{"name":"old_train_id_2","order":2,"description":"The second old train id when splitting/merging trains.","type":"uint","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_train_schedule_changed","order":166,"description":"Called when a trains schedule is changed either by the player or through script.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who made the change if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_trigger_created_entity","order":167,"description":"Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=\"true\"`.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_trigger_fired_artillery","order":168,"description":"Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=\"true\"`.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_added_to_group","order":169,"description":"Called when a unit is added to a unit group.","data":[{"name":"group","order":1,"description":"","type":"LuaUnitGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"on_unit_group_created","order":170,"description":"Called when a new unit group is created, before any members are added to it.","data":[{"name":"group","order":0,"description":"","type":"LuaUnitGroup","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_group_finished_gathering","order":171,"description":"Called when a unit group finishes gathering and starts executing its command.","data":[{"name":"group","order":0,"description":"","type":"LuaUnitGroup","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_removed_from_group","order":172,"description":"Called when a unit is removed from a unit group.","data":[{"name":"group","order":1,"description":"","type":"LuaUnitGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"on_worker_robot_expired","order":173,"description":"Called when a worker (construction or logistic) robot expires through a lack of energy.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"script_raised_built","order":174,"description":"A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_built](LuaBootstrap::raise_script_built), or when `raise_built` is passed to [LuaSurface::create_entity](LuaSurface::create_entity). Can be filtered using [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter).","data":[{"name":"entity","order":0,"description":"The entity that has been built.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"script_raised_destroy","order":175,"description":"A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_destroy](LuaBootstrap::raise_script_destroy), or when `raise_destroy` is passed to [LuaEntity::destroy](LuaEntity::destroy). Can be filtered using [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter).","data":[{"name":"entity","order":0,"description":"The entity that was destroyed.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"script_raised_revive","order":176,"description":"A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_revive](LuaBootstrap::raise_script_revive), or when `raise_revive` is passed to [LuaEntity::revive](LuaEntity::revive). Can be filtered using [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter).","data":[{"name":"entity","order":0,"description":"The entity that was revived.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tags","order":1,"description":"The tags associated with this entity, if any.","type":"Tags","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"script_raised_set_tiles","order":177,"description":"A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_set_tiles](LuaBootstrap::raise_script_set_tiles), or when `raise_event` is passed to [LuaSurface::set_tiles](LuaSurface::set_tiles).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"The surface whose tiles were changed.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The tiles that were changed.","type":{"complex_type":"array","value":"Tile"},"optional":false}]}],"defines":[{"name":"alert_type","order":0,"description":"","values":[{"name":"custom","order":6,"description":""},{"name":"entity_destroyed","order":0,"description":""},{"name":"entity_under_attack","order":1,"description":""},{"name":"no_material_for_construction","order":3,"description":""},{"name":"no_storage","order":7,"description":""},{"name":"not_enough_construction_robots","order":2,"description":""},{"name":"not_enough_repair_packs","order":4,"description":""},{"name":"train_out_of_fuel","order":8,"description":""},{"name":"turret_fire","order":5,"description":""}]},{"name":"behavior_result","order":1,"description":"AI command exit status. See [LuaEntity::set_command](LuaEntity::set_command)","values":[{"name":"deleted","order":3,"description":""},{"name":"fail","order":1,"description":""},{"name":"in_progress","order":0,"description":""},{"name":"success","order":2,"description":""}]},{"name":"build_check_type","order":2,"description":"","values":[{"name":"blueprint_ghost","order":4,"description":""},{"name":"ghost_revive","order":5,"description":""},{"name":"manual","order":1,"description":""},{"name":"manual_ghost","order":2,"description":""},{"name":"script","order":0,"description":""},{"name":"script_ghost","order":3,"description":""}]},{"name":"chain_signal_state","order":3,"description":"State of a chain signal.","values":[{"name":"all_open","order":1,"description":""},{"name":"none","order":0,"description":""},{"name":"none_open","order":3,"description":""},{"name":"partially_open","order":2,"description":""}]},{"name":"chunk_generated_status","order":4,"description":"","values":[{"name":"basic_tiles","order":2,"description":""},{"name":"corrected_tiles","order":3,"description":""},{"name":"custom_tiles","order":1,"description":""},{"name":"entities","order":5,"description":""},{"name":"nothing","order":0,"description":""},{"name":"tiles","order":4,"description":""}]},{"name":"circuit_condition_index","order":5,"description":"","values":[{"name":"arithmetic_combinator","order":3,"description":""},{"name":"constant_combinator","order":5,"description":""},{"name":"decider_combinator","order":4,"description":""},{"name":"inserter_circuit","order":0,"description":""},{"name":"inserter_logistic","order":1,"description":""},{"name":"lamp","order":2,"description":""},{"name":"offshore_pump","order":6,"description":""},{"name":"pump","order":7,"description":""}]},{"name":"circuit_connector_id","order":6,"description":"","values":[{"name":"accumulator","order":0,"description":""},{"name":"combinator_input","order":13,"description":""},{"name":"combinator_output","order":14,"description":""},{"name":"constant_combinator","order":1,"description":""},{"name":"container","order":2,"description":""},{"name":"electric_pole","order":10,"description":""},{"name":"inserter","order":11,"description":""},{"name":"lamp","order":12,"description":""},{"name":"linked_container","order":3,"description":""},{"name":"offshore_pump","order":15,"description":""},{"name":"programmable_speaker","order":4,"description":""},{"name":"pump","order":16,"description":""},{"name":"rail_chain_signal","order":6,"description":""},{"name":"rail_signal","order":5,"description":""},{"name":"roboport","order":7,"description":""},{"name":"storage_tank","order":8,"description":""},{"name":"wall","order":9,"description":""}]},{"name":"command","order":7,"description":"Command given to units describing what they should do.","values":[{"name":"attack","order":0,"description":"Attack another entity."},{"name":"attack_area","order":4,"description":"Go to a place and attack what you see."},{"name":"build_base","order":8,"description":"Go to a position and build a base there."},{"name":"compound","order":2,"description":"Chain commands together, see [defines.compound_command](defines.compound_command)."},{"name":"flee","order":6,"description":"Flee from another entity."},{"name":"go_to_location","order":1,"description":"Go to a specific position."},{"name":"group","order":3,"description":"Do what your group wants you to do."},{"name":"stop","order":7,"description":"Stop moving and stay where you are."},{"name":"wander","order":5,"description":"Chill."}]},{"name":"compound_command","order":8,"description":"How commands are joined together in a compound command (see [defines.command.compound](defines.command.compound)).","values":[{"name":"logical_and","order":0,"description":"Fail on first failure. Only succeeds if all commands (executed one after another) succeed."},{"name":"logical_or","order":1,"description":"Succeed on first success. Only fails if all commands (executed one after another) fail."},{"name":"return_last","order":2,"description":"Execute all commands in sequence and fail or succeed depending on the return status of the last command."}]},{"name":"control_behavior","order":9,"description":"","subkeys":[{"name":"inserter","order":0,"description":"","subkeys":[{"name":"circuit_mode_of_operation","order":0,"description":"","values":[{"name":"enable_disable","order":1,"description":""},{"name":"none","order":0,"description":""},{"name":"read_hand_contents","order":3,"description":""},{"name":"set_filters","order":2,"description":""},{"name":"set_stack_size","order":4,"description":""}]},{"name":"hand_read_mode","order":1,"description":"","values":[{"name":"hold","order":0,"description":""},{"name":"pulse","order":1,"description":""}]}]},{"name":"lamp","order":2,"description":"","subkeys":[{"name":"circuit_mode_of_operation","order":0,"description":"","values":[{"name":"use_colors","order":0,"description":""}]}]},{"name":"logistic_container","order":1,"description":"","subkeys":[{"name":"circuit_mode_of_operation","order":0,"description":"","values":[{"name":"send_contents","order":0,"description":""},{"name":"set_requests","order":1,"description":""}]}]},{"name":"mining_drill","order":3,"description":"","subkeys":[{"name":"resource_read_mode","order":0,"description":"","values":[{"name":"entire_patch","order":1,"description":""},{"name":"this_miner","order":0,"description":""}]}]},{"name":"transport_belt","order":4,"description":"","subkeys":[{"name":"content_read_mode","order":0,"description":"","values":[{"name":"hold","order":1,"description":""},{"name":"pulse","order":0,"description":""}]}]},{"name":"type","order":5,"description":"","values":[{"name":"accumulator","order":12,"description":"[LuaAccumulatorControlBehavior](LuaAccumulatorControlBehavior)"},{"name":"arithmetic_combinator","order":9,"description":"[LuaArithmeticCombinatorControlBehavior](LuaArithmeticCombinatorControlBehavior)"},{"name":"constant_combinator","order":10,"description":"[LuaConstantCombinatorControlBehavior](LuaConstantCombinatorControlBehavior)"},{"name":"container","order":0,"description":"[LuaContainerControlBehavior](LuaContainerControlBehavior)"},{"name":"decider_combinator","order":8,"description":"[LuaDeciderCombinatorControlBehavior](LuaDeciderCombinatorControlBehavior)"},{"name":"generic_on_off","order":1,"description":"[LuaGenericOnOffControlBehavior](LuaGenericOnOffControlBehavior)"},{"name":"inserter","order":2,"description":"[LuaInserterControlBehavior](LuaInserterControlBehavior)"},{"name":"lamp","order":3,"description":"[LuaLampControlBehavior](LuaLampControlBehavior)"},{"name":"logistic_container","order":4,"description":"[LuaLogisticContainerControlBehavior](LuaLogisticContainerControlBehavior)"},{"name":"mining_drill","order":16,"description":"[LuaMiningDrillControlBehavior](LuaMiningDrillControlBehavior)"},{"name":"programmable_speaker","order":17,"description":"[LuaProgrammableSpeakerControlBehavior](LuaProgrammableSpeakerControlBehavior)"},{"name":"rail_chain_signal","order":14,"description":"[LuaRailChainSignalControlBehavior](LuaRailChainSignalControlBehavior)"},{"name":"rail_signal","order":13,"description":"[LuaRailSignalControlBehavior](LuaRailSignalControlBehavior)"},{"name":"roboport","order":5,"description":"[LuaRoboportControlBehavior](LuaRoboportControlBehavior)"},{"name":"storage_tank","order":6,"description":"[LuaStorageTankControlBehavior](LuaStorageTankControlBehavior)"},{"name":"train_stop","order":7,"description":"[LuaTrainStopControlBehavior](LuaTrainStopControlBehavior)"},{"name":"transport_belt","order":11,"description":"[LuaTransportBeltControlBehavior](LuaTransportBeltControlBehavior)"},{"name":"wall","order":15,"description":"[LuaWallControlBehavior](LuaWallControlBehavior)"}]}]},{"name":"controllers","order":10,"description":"","values":[{"name":"character","order":1,"description":"The controller controls a character. This is the default controller in freeplay."},{"name":"cutscene","order":4,"description":"The player can't interact with the world, and the camera pans around in a predefined manner."},{"name":"editor","order":3,"description":"The Editor Controller near ultimate power to do almost anything in the game."},{"name":"ghost","order":0,"description":"Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen."},{"name":"god","order":2,"description":"The controller isn't tied to a character. This is the default controller in sandbox."},{"name":"spectator","order":5,"description":"Can't change anything in the world but can view anything."}]},{"name":"deconstruction_item","order":11,"description":"","subkeys":[{"name":"entity_filter_mode","order":0,"description":"","values":[{"name":"blacklist","order":1,"description":""},{"name":"whitelist","order":0,"description":""}]},{"name":"tile_filter_mode","order":1,"description":"","values":[{"name":"blacklist","order":1,"description":""},{"name":"whitelist","order":0,"description":""}]},{"name":"tile_selection_mode","order":2,"description":"","values":[{"name":"always","order":1,"description":""},{"name":"never","order":2,"description":""},{"name":"normal","order":0,"description":""},{"name":"only","order":3,"description":""}]}]},{"name":"difficulty","order":12,"description":"","values":[{"name":"easy","order":0,"description":""},{"name":"hard","order":2,"description":""},{"name":"normal","order":1,"description":""}]},{"name":"difficulty_settings","order":13,"description":"","subkeys":[{"name":"recipe_difficulty","order":0,"description":"","values":[{"name":"expensive","order":1,"description":""},{"name":"normal","order":0,"description":""}]},{"name":"technology_difficulty","order":1,"description":"","values":[{"name":"expensive","order":1,"description":""},{"name":"normal","order":0,"description":""}]}]},{"name":"direction","order":14,"description":"","values":[{"name":"east","order":2,"description":""},{"name":"north","order":0,"description":""},{"name":"northeast","order":1,"description":""},{"name":"northwest","order":7,"description":""},{"name":"south","order":4,"description":""},{"name":"southeast","order":3,"description":""},{"name":"southwest","order":5,"description":""},{"name":"west","order":6,"description":""}]},{"name":"disconnect_reason","order":15,"description":"","values":[{"name":"afk","order":6,"description":""},{"name":"banned","order":9,"description":""},{"name":"cannot_keep_up","order":5,"description":""},{"name":"desync_limit_reached","order":4,"description":""},{"name":"dropped","order":1,"description":""},{"name":"kicked","order":7,"description":""},{"name":"kicked_and_deleted","order":8,"description":""},{"name":"quit","order":0,"description":""},{"name":"reconnect","order":2,"description":""},{"name":"switching_servers","order":10,"description":""},{"name":"wrong_input","order":3,"description":""}]},{"name":"distraction","order":16,"description":"","values":[{"name":"by_anything","order":2,"description":"Attack closer enemy entities, including entities \"built\" by player (belts, inserters, chests)."},{"name":"by_damage","order":3,"description":"Attack when attacked."},{"name":"by_enemy","order":1,"description":"Attack closer enemy entities with force."},{"name":"none","order":0,"description":"Perform command even if someone attacks the unit."}]},{"name":"entity_status","order":17,"description":"","values":[{"name":"cant_divide_segments","order":42,"description":"Used by rail signals."},{"name":"charging","order":13,"description":"Used by accumulators."},{"name":"closed_by_circuit_network","order":7,"description":""},{"name":"disabled","order":39,"description":"Used by constant combinators: Combinator is turned off via switch in GUI."},{"name":"disabled_by_control_behavior","order":5,"description":""},{"name":"disabled_by_script","order":8,"description":""},{"name":"discharging","order":14,"description":"Used by accumulators."},{"name":"fluid_ingredient_shortage","order":23,"description":"Used by crafting machines."},{"name":"full_output","order":24,"description":"Used by crafting machines, boilers, burner energy sources and reactors: Reactor/burner has full burnt result inventory, boiler has full output fluidbox."},{"name":"fully_charged","order":15,"description":"Used by accumulators."},{"name":"item_ingredient_shortage","order":25,"description":"Used by crafting machines."},{"name":"launching_rocket","order":32,"description":"Used by the rocket silo."},{"name":"low_input_fluid","order":22,"description":"Used by boilers and fluid turrets: Boiler still has some fluid but is about to run out."},{"name":"low_power","order":3,"description":""},{"name":"low_temperature","order":38,"description":"Used by heat energy sources."},{"name":"marked_for_deconstruction","order":9,"description":""},{"name":"missing_required_fluid","order":26,"description":"Used by mining drills when the mining fluid is missing."},{"name":"missing_science_packs","order":27,"description":"Used by labs."},{"name":"networks_connected","order":11,"description":"Used by power switches."},{"name":"networks_disconnected","order":12,"description":"Used by power switches."},{"name":"no_ammo","order":37,"description":"Used by ammo turrets."},{"name":"no_fuel","order":4,"description":""},{"name":"no_ingredients","order":18,"description":"Used by furnaces."},{"name":"no_input_fluid","order":19,"description":"Used by boilers, fluid turrets and fluid energy sources: Boiler has no fluid to work with."},{"name":"no_minable_resources","order":21,"description":"Used by mining drills."},{"name":"no_modules_to_transmit","order":33,"description":"Used by beacons."},{"name":"no_power","order":2,"description":""},{"name":"no_recipe","order":17,"description":"Used by assembling machines."},{"name":"no_research_in_progress","order":20,"description":"Used by labs."},{"name":"normal","order":1,"description":""},{"name":"not_connected_to_rail","order":41,"description":"Used by rail signals."},{"name":"not_plugged_in_electric_network","order":10,"description":"Used by generators and solar panels."},{"name":"opened_by_circuit_network","order":6,"description":""},{"name":"out_of_logistic_network","order":16,"description":"Used by logistic containers."},{"name":"preparing_rocket_for_launch","order":30,"description":"Used by the rocket silo."},{"name":"recharging_after_power_outage","order":34,"description":"Used by roboports."},{"name":"turned_off_during_daytime","order":40,"description":"Used by lamps."},{"name":"waiting_for_source_items","order":28,"description":"Used by inserters."},{"name":"waiting_for_space_in_destination","order":29,"description":"Used by inserters and mining drills."},{"name":"waiting_for_target_to_be_built","order":35,"description":"Used by inserters targeting entity ghosts."},{"name":"waiting_for_train","order":36,"description":"Used by inserters targeting rails."},{"name":"waiting_to_launch_rocket","order":31,"description":"Used by the rocket silo."},{"name":"working","order":0,"description":""}]},{"name":"events","order":18,"description":"See the [events page](events.html) for more info on what events contain and when they get raised.","values":[{"name":"on_ai_command_completed","order":122,"description":""},{"name":"on_area_cloned","order":127,"description":""},{"name":"on_biter_base_built","order":59,"description":""},{"name":"on_brush_cloned","order":128,"description":""},{"name":"on_build_base_arrived","order":143,"description":""},{"name":"on_built_entity","order":9,"description":""},{"name":"on_cancelled_deconstruction","order":26,"description":""},{"name":"on_cancelled_upgrade","order":124,"description":""},{"name":"on_character_corpse_expired","order":97,"description":""},{"name":"on_chart_tag_added","order":144,"description":""},{"name":"on_chart_tag_modified","order":145,"description":""},{"name":"on_chart_tag_removed","order":146,"description":""},{"name":"on_chunk_charted","order":105,"description":""},{"name":"on_chunk_deleted","order":114,"description":""},{"name":"on_chunk_generated","order":15,"description":""},{"name":"on_combat_robot_expired","order":86,"description":""},{"name":"on_console_chat","order":75,"description":""},{"name":"on_console_command","order":76,"description":""},{"name":"on_cutscene_cancelled","order":168,"description":""},{"name":"on_cutscene_waypoint_reached","order":138,"description":""},{"name":"on_difficulty_settings_changed","order":64,"description":""},{"name":"on_entity_cloned","order":126,"description":""},{"name":"on_entity_damaged","order":7,"description":""},{"name":"on_entity_destroyed","order":159,"description":""},{"name":"on_entity_died","order":5,"description":""},{"name":"on_entity_logistic_slot_changed","order":172,"description":""},{"name":"on_entity_renamed","order":61,"description":""},{"name":"on_entity_settings_pasted","order":37,"description":""},{"name":"on_entity_spawned","order":137,"description":""},{"name":"on_equipment_inserted","order":173,"description":""},{"name":"on_equipment_removed","order":174,"description":""},{"name":"on_force_cease_fire_changed","order":151,"description":""},{"name":"on_force_created","order":33,"description":""},{"name":"on_force_friends_changed","order":152,"description":""},{"name":"on_force_reset","order":107,"description":""},{"name":"on_forces_merged","order":109,"description":""},{"name":"on_forces_merging","order":34,"description":""},{"name":"on_game_created_from_scenario","order":129,"description":""},{"name":"on_gui_checked_state_changed","order":4,"description":""},{"name":"on_gui_click","order":1,"description":""},{"name":"on_gui_closed","order":91,"description":""},{"name":"on_gui_confirmed","order":2,"description":""},{"name":"on_gui_elem_changed","order":71,"description":""},{"name":"on_gui_location_changed","order":148,"description":""},{"name":"on_gui_opened","order":90,"description":""},{"name":"on_gui_selected_tab_changed","order":149,"description":""},{"name":"on_gui_selection_state_changed","order":62,"description":""},{"name":"on_gui_switch_state_changed","order":150,"description":""},{"name":"on_gui_text_changed","order":3,"description":""},{"name":"on_gui_value_changed","order":92,"description":""},{"name":"on_land_mine_armed","order":108,"description":""},{"name":"on_lua_shortcut","order":147,"description":""},{"name":"on_marked_for_deconstruction","order":25,"description":""},{"name":"on_marked_for_upgrade","order":123,"description":""},{"name":"on_market_item_purchased","order":57,"description":""},{"name":"on_mod_item_opened","order":89,"description":""},{"name":"on_permission_group_added","order":167,"description":""},{"name":"on_permission_group_deleted","order":166,"description":""},{"name":"on_permission_group_edited","order":162,"description":""},{"name":"on_permission_string_imported","order":164,"description":""},{"name":"on_picked_up_item","order":8,"description":""},{"name":"on_player_alt_reverse_selected_area","order":176,"description":""},{"name":"on_player_alt_selected_area","order":54,"description":""},{"name":"on_player_ammo_inventory_changed","order":40,"description":""},{"name":"on_player_armor_inventory_changed","order":39,"description":""},{"name":"on_player_banned","order":117,"description":""},{"name":"on_player_built_tile","order":49,"description":""},{"name":"on_player_cancelled_crafting","order":104,"description":""},{"name":"on_player_changed_force","order":60,"description":""},{"name":"on_player_changed_position","order":88,"description":""},{"name":"on_player_changed_surface","order":55,"description":""},{"name":"on_player_cheat_mode_disabled","order":96,"description":""},{"name":"on_player_cheat_mode_enabled","order":95,"description":""},{"name":"on_player_clicked_gps_tag","order":160,"description":""},{"name":"on_player_configured_blueprint","order":74,"description":""},{"name":"on_player_configured_spider_remote","order":169,"description":""},{"name":"on_player_crafted_item","order":16,"description":""},{"name":"on_player_created","order":30,"description":""},{"name":"on_player_cursor_stack_changed","order":35,"description":""},{"name":"on_player_deconstructed_area","order":73,"description":""},{"name":"on_player_demoted","order":85,"description":""},{"name":"on_player_died","order":45,"description":""},{"name":"on_player_display_resolution_changed","order":101,"description":""},{"name":"on_player_display_scale_changed","order":102,"description":""},{"name":"on_player_driving_changed_state","order":32,"description":""},{"name":"on_player_dropped_item","order":58,"description":""},{"name":"on_player_fast_transferred","order":134,"description":""},{"name":"on_player_flushed_fluid","order":161,"description":""},{"name":"on_player_gun_inventory_changed","order":41,"description":""},{"name":"on_player_joined_game","order":47,"description":""},{"name":"on_player_kicked","order":118,"description":""},{"name":"on_player_left_game","order":48,"description":""},{"name":"on_player_main_inventory_changed","order":38,"description":""},{"name":"on_player_mined_entity","order":68,"description":""},{"name":"on_player_mined_item","order":11,"description":""},{"name":"on_player_mined_tile","order":50,"description":""},{"name":"on_player_muted","order":93,"description":""},{"name":"on_player_pipette","order":100,"description":""},{"name":"on_player_placed_equipment","order":42,"description":""},{"name":"on_player_promoted","order":84,"description":""},{"name":"on_player_removed","order":77,"description":""},{"name":"on_player_removed_equipment","order":43,"description":""},{"name":"on_player_repaired_entity","order":133,"description":""},{"name":"on_player_respawned","order":46,"description":""},{"name":"on_player_reverse_selected_area","order":175,"description":""},{"name":"on_player_rotated_entity","order":24,"description":""},{"name":"on_player_selected_area","order":53,"description":""},{"name":"on_player_set_quick_bar_slot","order":155,"description":""},{"name":"on_player_setup_blueprint","order":72,"description":""},{"name":"on_player_toggled_alt_mode","order":132,"description":""},{"name":"on_player_toggled_map_editor","order":125,"description":""},{"name":"on_player_trash_inventory_changed","order":110,"description":""},{"name":"on_player_unbanned","order":119,"description":""},{"name":"on_player_unmuted","order":94,"description":""},{"name":"on_player_used_capsule","order":79,"description":""},{"name":"on_player_used_spider_remote","order":170,"description":""},{"name":"on_post_entity_died","order":6,"description":""},{"name":"on_pre_build","order":12,"description":""},{"name":"on_pre_chunk_deleted","order":115,"description":""},{"name":"on_pre_entity_settings_pasted","order":36,"description":""},{"name":"on_pre_ghost_deconstructed","order":98,"description":""},{"name":"on_pre_ghost_upgraded","order":99,"description":""},{"name":"on_pre_permission_group_deleted","order":165,"description":""},{"name":"on_pre_permission_string_imported","order":163,"description":""},{"name":"on_pre_player_crafted_item","order":103,"description":""},{"name":"on_pre_player_died","order":44,"description":""},{"name":"on_pre_player_left_game","order":111,"description":""},{"name":"on_pre_player_mined_item","order":14,"description":""},{"name":"on_pre_player_removed","order":78,"description":""},{"name":"on_pre_player_toggled_map_editor","order":156,"description":""},{"name":"on_pre_robot_exploded_cliff","order":135,"description":""},{"name":"on_pre_script_inventory_resized","order":157,"description":""},{"name":"on_pre_surface_cleared","order":112,"description":""},{"name":"on_pre_surface_deleted","order":67,"description":""},{"name":"on_research_cancelled","order":23,"description":""},{"name":"on_research_finished","order":21,"description":""},{"name":"on_research_reversed","order":22,"description":""},{"name":"on_research_started","order":20,"description":""},{"name":"on_resource_depleted","order":31,"description":""},{"name":"on_robot_built_entity","order":17,"description":""},{"name":"on_robot_built_tile","order":51,"description":""},{"name":"on_robot_exploded_cliff","order":136,"description":""},{"name":"on_robot_mined","order":19,"description":""},{"name":"on_robot_mined_entity","order":69,"description":""},{"name":"on_robot_mined_tile","order":52,"description":""},{"name":"on_robot_pre_mined","order":18,"description":""},{"name":"on_rocket_launch_ordered","order":120,"description":""},{"name":"on_rocket_launched","order":13,"description":""},{"name":"on_runtime_mod_setting_changed","order":63,"description":""},{"name":"on_script_inventory_resized","order":158,"description":""},{"name":"on_script_path_request_finished","order":121,"description":""},{"name":"on_script_trigger_effect","order":154,"description":""},{"name":"on_sector_scanned","order":10,"description":""},{"name":"on_selected_entity_changed","order":56,"description":""},{"name":"on_spider_command_completed","order":171,"description":""},{"name":"on_string_translated","order":153,"description":""},{"name":"on_surface_cleared","order":113,"description":""},{"name":"on_surface_created","order":65,"description":""},{"name":"on_surface_deleted","order":66,"description":""},{"name":"on_surface_imported","order":130,"description":""},{"name":"on_surface_renamed","order":131,"description":""},{"name":"on_technology_effects_reset","order":106,"description":""},{"name":"on_tick","order":0,"description":""},{"name":"on_train_changed_state","order":29,"description":""},{"name":"on_train_created","order":70,"description":""},{"name":"on_train_schedule_changed","order":116,"description":""},{"name":"on_trigger_created_entity","order":27,"description":""},{"name":"on_trigger_fired_artillery","order":28,"description":""},{"name":"on_unit_added_to_group","order":140,"description":""},{"name":"on_unit_group_created","order":139,"description":""},{"name":"on_unit_group_finished_gathering","order":142,"description":""},{"name":"on_unit_removed_from_group","order":141,"description":""},{"name":"on_worker_robot_expired","order":87,"description":""},{"name":"script_raised_built","order":80,"description":""},{"name":"script_raised_destroy","order":81,"description":""},{"name":"script_raised_revive","order":82,"description":""},{"name":"script_raised_set_tiles","order":83,"description":""}]},{"name":"flow_precision_index","order":19,"description":"","values":[{"name":"fifty_hours","order":5,"description":""},{"name":"five_seconds","order":0,"description":""},{"name":"one_hour","order":3,"description":""},{"name":"one_minute","order":1,"description":""},{"name":"one_thousand_hours","order":7,"description":""},{"name":"ten_hours","order":4,"description":""},{"name":"ten_minutes","order":2,"description":""},{"name":"two_hundred_fifty_hours","order":6,"description":""}]},{"name":"group_state","order":20,"description":"","values":[{"name":"attacking_distraction","order":2,"description":""},{"name":"attacking_target","order":3,"description":""},{"name":"finished","order":4,"description":""},{"name":"gathering","order":0,"description":""},{"name":"moving","order":1,"description":""},{"name":"pathfinding","order":5,"description":""},{"name":"wander_in_group","order":6,"description":""}]},{"name":"gui_type","order":21,"description":"","values":[{"name":"achievement","order":8,"description":""},{"name":"blueprint_library","order":9,"description":""},{"name":"bonus","order":6,"description":""},{"name":"controller","order":3,"description":""},{"name":"custom","order":15,"description":""},{"name":"entity","order":1,"description":""},{"name":"equipment","order":10,"description":""},{"name":"item","order":5,"description":""},{"name":"logistic","order":11,"description":""},{"name":"none","order":0,"description":""},{"name":"other_player","order":12,"description":""},{"name":"permissions","order":13,"description":""},{"name":"player_management","order":17,"description":""},{"name":"production","order":4,"description":""},{"name":"research","order":2,"description":""},{"name":"script_inventory","order":19,"description":""},{"name":"server_management","order":16,"description":""},{"name":"tile","order":18,"description":""},{"name":"trains","order":7,"description":""},{"name":"tutorials","order":14,"description":""}]},{"name":"input_action","order":22,"description":"","values":[{"name":"activate_copy","order":0,"description":""},{"name":"activate_cut","order":1,"description":""},{"name":"activate_paste","order":2,"description":""},{"name":"add_permission_group","order":3,"description":""},{"name":"add_train_station","order":4,"description":""},{"name":"admin_action","order":5,"description":""},{"name":"alt_reverse_select_area","order":6,"description":""},{"name":"alt_select_area","order":7,"description":""},{"name":"alt_select_blueprint_entities","order":8,"description":""},{"name":"alternative_copy","order":9,"description":""},{"name":"begin_mining","order":10,"description":""},{"name":"begin_mining_terrain","order":11,"description":""},{"name":"build","order":12,"description":""},{"name":"build_rail","order":13,"description":""},{"name":"build_terrain","order":14,"description":""},{"name":"cancel_craft","order":15,"description":""},{"name":"cancel_deconstruct","order":16,"description":""},{"name":"cancel_new_blueprint","order":17,"description":""},{"name":"cancel_research","order":18,"description":""},{"name":"cancel_upgrade","order":19,"description":""},{"name":"change_active_character_tab","order":20,"description":""},{"name":"change_active_item_group_for_crafting","order":21,"description":""},{"name":"change_active_item_group_for_filters","order":22,"description":""},{"name":"change_active_quick_bar","order":23,"description":""},{"name":"change_arithmetic_combinator_parameters","order":24,"description":""},{"name":"change_decider_combinator_parameters","order":25,"description":""},{"name":"change_entity_label","order":26,"description":""},{"name":"change_item_description","order":27,"description":""},{"name":"change_item_label","order":28,"description":""},{"name":"change_multiplayer_config","order":29,"description":""},{"name":"change_picking_state","order":30,"description":""},{"name":"change_programmable_speaker_alert_parameters","order":31,"description":""},{"name":"change_programmable_speaker_circuit_parameters","order":32,"description":""},{"name":"change_programmable_speaker_parameters","order":33,"description":""},{"name":"change_riding_state","order":34,"description":""},{"name":"change_shooting_state","order":35,"description":""},{"name":"change_train_stop_station","order":36,"description":""},{"name":"change_train_wait_condition","order":37,"description":""},{"name":"change_train_wait_condition_data","order":38,"description":""},{"name":"clear_cursor","order":39,"description":""},{"name":"connect_rolling_stock","order":40,"description":""},{"name":"copy","order":41,"description":""},{"name":"copy_entity_settings","order":42,"description":""},{"name":"copy_opened_blueprint","order":43,"description":""},{"name":"copy_opened_item","order":44,"description":""},{"name":"craft","order":45,"description":""},{"name":"cursor_split","order":46,"description":""},{"name":"cursor_transfer","order":47,"description":""},{"name":"custom_input","order":48,"description":""},{"name":"cycle_blueprint_book_backwards","order":49,"description":""},{"name":"cycle_blueprint_book_forwards","order":50,"description":""},{"name":"deconstruct","order":51,"description":""},{"name":"delete_blueprint_library","order":52,"description":""},{"name":"delete_blueprint_record","order":53,"description":""},{"name":"delete_custom_tag","order":54,"description":""},{"name":"delete_permission_group","order":55,"description":""},{"name":"destroy_item","order":56,"description":""},{"name":"destroy_opened_item","order":57,"description":""},{"name":"disconnect_rolling_stock","order":58,"description":""},{"name":"drag_train_schedule","order":59,"description":""},{"name":"drag_train_wait_condition","order":60,"description":""},{"name":"drop_blueprint_record","order":61,"description":""},{"name":"drop_item","order":62,"description":""},{"name":"edit_blueprint_tool_preview","order":63,"description":""},{"name":"edit_custom_tag","order":64,"description":""},{"name":"edit_permission_group","order":65,"description":""},{"name":"export_blueprint","order":66,"description":""},{"name":"fast_entity_split","order":67,"description":""},{"name":"fast_entity_transfer","order":68,"description":""},{"name":"flush_opened_entity_fluid","order":69,"description":""},{"name":"flush_opened_entity_specific_fluid","order":70,"description":""},{"name":"go_to_train_station","order":71,"description":""},{"name":"grab_blueprint_record","order":72,"description":""},{"name":"gui_checked_state_changed","order":73,"description":""},{"name":"gui_click","order":74,"description":""},{"name":"gui_confirmed","order":75,"description":""},{"name":"gui_elem_changed","order":76,"description":""},{"name":"gui_location_changed","order":77,"description":""},{"name":"gui_selected_tab_changed","order":78,"description":""},{"name":"gui_selection_state_changed","order":79,"description":""},{"name":"gui_switch_state_changed","order":80,"description":""},{"name":"gui_text_changed","order":81,"description":""},{"name":"gui_value_changed","order":82,"description":""},{"name":"import_blueprint","order":83,"description":""},{"name":"import_blueprint_string","order":84,"description":""},{"name":"import_blueprints_filtered","order":85,"description":""},{"name":"import_permissions_string","order":86,"description":""},{"name":"inventory_split","order":87,"description":""},{"name":"inventory_transfer","order":88,"description":""},{"name":"launch_rocket","order":89,"description":""},{"name":"lua_shortcut","order":90,"description":""},{"name":"map_editor_action","order":91,"description":""},{"name":"market_offer","order":92,"description":""},{"name":"mod_settings_changed","order":93,"description":""},{"name":"open_achievements_gui","order":94,"description":""},{"name":"open_blueprint_library_gui","order":95,"description":""},{"name":"open_blueprint_record","order":96,"description":""},{"name":"open_bonus_gui","order":97,"description":""},{"name":"open_character_gui","order":98,"description":""},{"name":"open_current_vehicle_gui","order":99,"description":""},{"name":"open_equipment","order":100,"description":""},{"name":"open_gui","order":101,"description":""},{"name":"open_item","order":102,"description":""},{"name":"open_logistic_gui","order":103,"description":""},{"name":"open_mod_item","order":104,"description":""},{"name":"open_parent_of_opened_item","order":105,"description":""},{"name":"open_production_gui","order":106,"description":""},{"name":"open_technology_gui","order":107,"description":""},{"name":"open_tips_and_tricks_gui","order":108,"description":""},{"name":"open_train_gui","order":109,"description":""},{"name":"open_train_station_gui","order":110,"description":""},{"name":"open_trains_gui","order":111,"description":""},{"name":"paste_entity_settings","order":112,"description":""},{"name":"place_equipment","order":113,"description":""},{"name":"quick_bar_pick_slot","order":114,"description":""},{"name":"quick_bar_set_selected_page","order":115,"description":""},{"name":"quick_bar_set_slot","order":116,"description":""},{"name":"reassign_blueprint","order":117,"description":""},{"name":"remove_cables","order":118,"description":""},{"name":"remove_train_station","order":119,"description":""},{"name":"reset_assembling_machine","order":120,"description":""},{"name":"reset_item","order":121,"description":""},{"name":"reverse_select_area","order":122,"description":""},{"name":"rotate_entity","order":123,"description":""},{"name":"select_area","order":124,"description":""},{"name":"select_blueprint_entities","order":125,"description":""},{"name":"select_entity_slot","order":126,"description":""},{"name":"select_item","order":127,"description":""},{"name":"select_mapper_slot","order":128,"description":""},{"name":"select_next_valid_gun","order":129,"description":""},{"name":"select_tile_slot","order":130,"description":""},{"name":"send_spidertron","order":131,"description":""},{"name":"set_auto_launch_rocket","order":132,"description":""},{"name":"set_autosort_inventory","order":133,"description":""},{"name":"set_behavior_mode","order":134,"description":""},{"name":"set_car_weapons_control","order":135,"description":""},{"name":"set_circuit_condition","order":136,"description":""},{"name":"set_circuit_mode_of_operation","order":137,"description":""},{"name":"set_controller_logistic_trash_filter_item","order":138,"description":""},{"name":"set_deconstruction_item_tile_selection_mode","order":139,"description":""},{"name":"set_deconstruction_item_trees_and_rocks_only","order":140,"description":""},{"name":"set_entity_color","order":141,"description":""},{"name":"set_entity_energy_property","order":142,"description":""},{"name":"set_entity_logistic_trash_filter_item","order":143,"description":""},{"name":"set_filter","order":144,"description":""},{"name":"set_flat_controller_gui","order":145,"description":""},{"name":"set_heat_interface_mode","order":146,"description":""},{"name":"set_heat_interface_temperature","order":147,"description":""},{"name":"set_infinity_container_filter_item","order":148,"description":""},{"name":"set_infinity_container_remove_unfiltered_items","order":149,"description":""},{"name":"set_infinity_pipe_filter","order":150,"description":""},{"name":"set_inserter_max_stack_size","order":151,"description":""},{"name":"set_inventory_bar","order":152,"description":""},{"name":"set_linked_container_link_i_d","order":153,"description":""},{"name":"set_logistic_filter_item","order":154,"description":""},{"name":"set_logistic_filter_signal","order":155,"description":""},{"name":"set_player_color","order":156,"description":""},{"name":"set_recipe_notifications","order":157,"description":""},{"name":"set_request_from_buffers","order":158,"description":""},{"name":"set_research_finished_stops_game","order":159,"description":""},{"name":"set_signal","order":160,"description":""},{"name":"set_splitter_priority","order":161,"description":""},{"name":"set_train_stopped","order":162,"description":""},{"name":"set_trains_limit","order":163,"description":""},{"name":"set_vehicle_automatic_targeting_parameters","order":164,"description":""},{"name":"setup_assembling_machine","order":165,"description":""},{"name":"setup_blueprint","order":166,"description":""},{"name":"setup_single_blueprint_record","order":167,"description":""},{"name":"smart_pipette","order":168,"description":""},{"name":"spawn_item","order":169,"description":""},{"name":"stack_split","order":170,"description":""},{"name":"stack_transfer","order":171,"description":""},{"name":"start_repair","order":172,"description":""},{"name":"start_research","order":173,"description":""},{"name":"start_walking","order":174,"description":""},{"name":"stop_building_by_moving","order":175,"description":""},{"name":"switch_connect_to_logistic_network","order":176,"description":""},{"name":"switch_constant_combinator_state","order":177,"description":""},{"name":"switch_inserter_filter_mode_state","order":178,"description":""},{"name":"switch_power_switch_state","order":179,"description":""},{"name":"switch_to_rename_stop_gui","order":180,"description":""},{"name":"take_equipment","order":181,"description":""},{"name":"toggle_deconstruction_item_entity_filter_mode","order":182,"description":""},{"name":"toggle_deconstruction_item_tile_filter_mode","order":183,"description":""},{"name":"toggle_driving","order":184,"description":""},{"name":"toggle_enable_vehicle_logistics_while_moving","order":185,"description":""},{"name":"toggle_entity_logistic_requests","order":186,"description":""},{"name":"toggle_equipment_movement_bonus","order":187,"description":""},{"name":"toggle_map_editor","order":188,"description":""},{"name":"toggle_personal_logistic_requests","order":189,"description":""},{"name":"toggle_personal_roboport","order":190,"description":""},{"name":"toggle_show_entity_info","order":191,"description":""},{"name":"translate_string","order":192,"description":""},{"name":"undo","order":193,"description":""},{"name":"upgrade","order":194,"description":""},{"name":"upgrade_opened_blueprint_by_item","order":195,"description":""},{"name":"upgrade_opened_blueprint_by_record","order":196,"description":""},{"name":"use_artillery_remote","order":197,"description":""},{"name":"use_item","order":198,"description":""},{"name":"wire_dragging","order":199,"description":""},{"name":"write_to_console","order":200,"description":""}]},{"name":"input_method","order":23,"description":"","values":[{"name":"game_controller","order":1,"description":""},{"name":"keyboard_and_mouse","order":0,"description":""}]},{"name":"inventory","order":24,"description":"","values":[{"name":"artillery_turret_ammo","order":40,"description":""},{"name":"artillery_wagon_ammo","order":41,"description":""},{"name":"assembling_machine_input","order":21,"description":""},{"name":"assembling_machine_modules","order":23,"description":""},{"name":"assembling_machine_output","order":22,"description":""},{"name":"beacon_modules","order":38,"description":""},{"name":"burnt_result","order":1,"description":""},{"name":"car_ammo","order":35,"description":""},{"name":"car_trunk","order":34,"description":""},{"name":"cargo_wagon","order":36,"description":""},{"name":"character_ammo","order":8,"description":""},{"name":"character_armor","order":9,"description":""},{"name":"character_corpse","order":39,"description":""},{"name":"character_guns","order":7,"description":""},{"name":"character_main","order":6,"description":""},{"name":"character_trash","order":11,"description":""},{"name":"character_vehicle","order":10,"description":""},{"name":"chest","order":2,"description":""},{"name":"editor_ammo","order":15,"description":""},{"name":"editor_armor","order":16,"description":""},{"name":"editor_guns","order":14,"description":""},{"name":"editor_main","order":13,"description":""},{"name":"fuel","order":0,"description":""},{"name":"furnace_modules","order":5,"description":""},{"name":"furnace_result","order":4,"description":""},{"name":"furnace_source","order":3,"description":""},{"name":"god_main","order":12,"description":""},{"name":"item_main","order":27,"description":""},{"name":"lab_input","order":24,"description":""},{"name":"lab_modules","order":25,"description":""},{"name":"mining_drill_modules","order":26,"description":""},{"name":"roboport_material","order":18,"description":""},{"name":"roboport_robot","order":17,"description":""},{"name":"robot_cargo","order":19,"description":""},{"name":"robot_repair","order":20,"description":""},{"name":"rocket","order":33,"description":""},{"name":"rocket_silo_input","order":30,"description":""},{"name":"rocket_silo_modules","order":32,"description":""},{"name":"rocket_silo_output","order":31,"description":""},{"name":"rocket_silo_result","order":29,"description":""},{"name":"rocket_silo_rocket","order":28,"description":""},{"name":"spider_ammo","order":43,"description":""},{"name":"spider_trash","order":44,"description":""},{"name":"spider_trunk","order":42,"description":""},{"name":"turret_ammo","order":37,"description":""}]},{"name":"logistic_member_index","order":25,"description":"","values":[{"name":"character_provider","order":4,"description":""},{"name":"character_requester","order":2,"description":""},{"name":"character_storage","order":3,"description":""},{"name":"generic_on_off_behavior","order":5,"description":""},{"name":"logistic_container","order":0,"description":""},{"name":"vehicle_storage","order":1,"description":""}]},{"name":"logistic_mode","order":26,"description":"","values":[{"name":"active_provider","order":1,"description":""},{"name":"buffer","order":5,"description":""},{"name":"none","order":0,"description":""},{"name":"passive_provider","order":4,"description":""},{"name":"requester","order":3,"description":""},{"name":"storage","order":2,"description":""}]},{"name":"mouse_button_type","order":27,"description":"","values":[{"name":"left","order":1,"description":""},{"name":"middle","order":3,"description":""},{"name":"none","order":0,"description":""},{"name":"right","order":2,"description":""}]},{"name":"prototypes","order":28,"description":"A dictionary mapping all top-level prototypes by name to a list of their associated subtypes. This list is organized as a lookup table, meaning it maps the sub-prototype names to `0`. As an example, `defines.prototypes['entity']` looks like this: `{furnace=0, inserter=0, container=0, ...}`."},{"name":"rail_connection_direction","order":29,"description":"","values":[{"name":"left","order":0,"description":""},{"name":"none","order":3,"description":""},{"name":"right","order":2,"description":""},{"name":"straight","order":1,"description":""}]},{"name":"rail_direction","order":30,"description":"","values":[{"name":"back","order":1,"description":""},{"name":"front","order":0,"description":""}]},{"name":"relative_gui_position","order":31,"description":"","values":[{"name":"bottom","order":1,"description":""},{"name":"left","order":2,"description":""},{"name":"right","order":3,"description":""},{"name":"top","order":0,"description":""}]},{"name":"relative_gui_type","order":32,"description":"","values":[{"name":"accumulator_gui","order":0,"description":""},{"name":"achievement_gui","order":1,"description":""},{"name":"additional_entity_info_gui","order":2,"description":""},{"name":"admin_gui","order":3,"description":""},{"name":"arithmetic_combinator_gui","order":4,"description":""},{"name":"armor_gui","order":5,"description":""},{"name":"assembling_machine_gui","order":6,"description":""},{"name":"assembling_machine_select_recipe_gui","order":7,"description":""},{"name":"beacon_gui","order":8,"description":""},{"name":"blueprint_book_gui","order":9,"description":""},{"name":"blueprint_library_gui","order":10,"description":""},{"name":"blueprint_setup_gui","order":11,"description":""},{"name":"bonus_gui","order":12,"description":""},{"name":"burner_equipment_gui","order":13,"description":""},{"name":"car_gui","order":14,"description":""},{"name":"constant_combinator_gui","order":15,"description":""},{"name":"container_gui","order":16,"description":""},{"name":"controller_gui","order":17,"description":""},{"name":"decider_combinator_gui","order":18,"description":""},{"name":"deconstruction_item_gui","order":19,"description":""},{"name":"electric_energy_interface_gui","order":20,"description":""},{"name":"electric_network_gui","order":21,"description":""},{"name":"entity_variations_gui","order":22,"description":""},{"name":"entity_with_energy_source_gui","order":23,"description":""},{"name":"equipment_grid_gui","order":24,"description":""},{"name":"furnace_gui","order":25,"description":""},{"name":"generic_on_off_entity_gui","order":26,"description":""},{"name":"heat_interface_gui","order":27,"description":""},{"name":"infinity_pipe_gui","order":28,"description":""},{"name":"inserter_gui","order":29,"description":""},{"name":"item_with_inventory_gui","order":30,"description":""},{"name":"lab_gui","order":31,"description":""},{"name":"lamp_gui","order":32,"description":""},{"name":"linked_container_gui","order":33,"description":""},{"name":"loader_gui","order":34,"description":""},{"name":"logistic_gui","order":35,"description":""},{"name":"market_gui","order":36,"description":""},{"name":"mining_drill_gui","order":37,"description":""},{"name":"other_player_gui","order":38,"description":""},{"name":"permissions_gui","order":39,"description":""},{"name":"pipe_gui","order":40,"description":""},{"name":"power_switch_gui","order":41,"description":""},{"name":"production_gui","order":42,"description":""},{"name":"programmable_speaker_gui","order":43,"description":""},{"name":"rail_chain_signal_gui","order":44,"description":""},{"name":"rail_signal_gui","order":45,"description":""},{"name":"reactor_gui","order":46,"description":""},{"name":"rename_stop_gui","order":47,"description":""},{"name":"resource_entity_gui","order":48,"description":""},{"name":"roboport_gui","order":49,"description":""},{"name":"rocket_silo_gui","order":50,"description":""},{"name":"script_inventory_gui","order":51,"description":""},{"name":"server_config_gui","order":52,"description":""},{"name":"spider_vehicle_gui","order":53,"description":""},{"name":"splitter_gui","order":54,"description":""},{"name":"standalone_character_gui","order":55,"description":""},{"name":"storage_tank_gui","order":56,"description":""},{"name":"tile_variations_gui","order":57,"description":""},{"name":"train_gui","order":58,"description":""},{"name":"train_stop_gui","order":59,"description":""},{"name":"trains_gui","order":60,"description":""},{"name":"transport_belt_gui","order":61,"description":""},{"name":"upgrade_item_gui","order":62,"description":""},{"name":"wall_gui","order":63,"description":""}]},{"name":"render_mode","order":33,"description":"","values":[{"name":"chart","order":1,"description":""},{"name":"chart_zoomed_in","order":2,"description":""},{"name":"game","order":0,"description":""}]},{"name":"rich_text_setting","order":34,"description":"","values":[{"name":"disabled","order":1,"description":""},{"name":"enabled","order":0,"description":""},{"name":"highlight","order":2,"description":""}]},{"name":"riding","order":35,"description":"","subkeys":[{"name":"acceleration","order":0,"description":"","values":[{"name":"accelerating","order":1,"description":""},{"name":"braking","order":2,"description":""},{"name":"nothing","order":0,"description":""},{"name":"reversing","order":3,"description":""}]},{"name":"direction","order":1,"description":"","values":[{"name":"left","order":0,"description":""},{"name":"right","order":2,"description":""},{"name":"straight","order":1,"description":""}]}]},{"name":"rocket_silo_status","order":36,"description":"","values":[{"name":"arms_advance","order":6,"description":""},{"name":"arms_retract","order":10,"description":""},{"name":"building_rocket","order":0,"description":""},{"name":"create_rocket","order":1,"description":""},{"name":"doors_closing","order":13,"description":""},{"name":"doors_opened","order":4,"description":""},{"name":"doors_opening","order":3,"description":""},{"name":"engine_starting","order":9,"description":""},{"name":"launch_started","order":14,"description":""},{"name":"launch_starting","order":8,"description":""},{"name":"lights_blinking_close","order":12,"description":""},{"name":"lights_blinking_open","order":2,"description":""},{"name":"rocket_flying","order":11,"description":""},{"name":"rocket_ready","order":7,"description":""},{"name":"rocket_rising","order":5,"description":""}]},{"name":"shooting","order":37,"description":"","values":[{"name":"not_shooting","order":0,"description":""},{"name":"shooting_enemies","order":1,"description":""},{"name":"shooting_selected","order":2,"description":""}]},{"name":"signal_state","order":38,"description":"State of an ordinary rail signal.","values":[{"name":"closed","order":1,"description":"Red."},{"name":"open","order":0,"description":"Green."},{"name":"reserved","order":2,"description":"Orange."},{"name":"reserved_by_circuit_network","order":3,"description":"Red - From circuit network."}]},{"name":"train_state","order":39,"description":"","values":[{"name":"arrive_signal","order":4,"description":"Braking before a rail signal."},{"name":"arrive_station","order":6,"description":"Braking before a station."},{"name":"destination_full","order":10,"description":"Same as no_path but all candidate train stops are full"},{"name":"manual_control","order":9,"description":"Can move if user explicitly sits in and rides the train."},{"name":"manual_control_stop","order":8,"description":"Switched to manual control and has to stop."},{"name":"no_path","order":3,"description":"Has no path and is stopped."},{"name":"no_schedule","order":2,"description":"Doesn't have anywhere to go."},{"name":"on_the_path","order":0,"description":"Normal state -- following the path."},{"name":"path_lost","order":1,"description":"Had path and lost it -- must stop."},{"name":"wait_signal","order":5,"description":"Waiting at a signal."},{"name":"wait_station","order":7,"description":"Waiting at a station."}]},{"name":"transport_line","order":40,"description":"","values":[{"name":"left_line","order":0,"description":""},{"name":"left_split_line","order":6,"description":""},{"name":"left_underground_line","order":2,"description":""},{"name":"right_line","order":1,"description":""},{"name":"right_split_line","order":7,"description":""},{"name":"right_underground_line","order":3,"description":""},{"name":"secondary_left_line","order":4,"description":""},{"name":"secondary_left_split_line","order":8,"description":""},{"name":"secondary_right_line","order":5,"description":""},{"name":"secondary_right_split_line","order":9,"description":""}]},{"name":"wire_connection_id","order":41,"description":"","values":[{"name":"electric_pole","order":0,"description":""},{"name":"power_switch_left","order":1,"description":""},{"name":"power_switch_right","order":2,"description":""}]},{"name":"wire_type","order":42,"description":"","values":[{"name":"copper","order":2,"description":""},{"name":"green","order":1,"description":""},{"name":"red","order":0,"description":""}]}],"builtin_types":[{"name":"LuaObject","order":13,"description":"Any LuaObject listed on the [Classes](classes) page."},{"name":"boolean","order":10,"description":"Either `true` or `false`."},{"name":"double","order":1,"description":"A double-precision floating-point number. This is the same data type as all Lua numbers use."},{"name":"float","order":0,"description":"A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision numbers, when a function takes a float, the game engine will immediately convert the double-precision number to single-precision."},{"name":"int","order":2,"description":"32-bit signed integer. Possible values are -2,147,483,648 to 2,147,483,647."},{"name":"int8","order":3,"description":"8-bit signed integer. Possible values are -128 to 127."},{"name":"nil","order":11,"description":"Nil is the type of the value `nil`, whose main property is to be different from any other value. It usually represents the absence of a useful value."},{"name":"number","order":8,"description":"Any kind of integer or floating point number."},{"name":"string","order":9,"description":"Strings are enclosed in double-quotes, like this `\"hi\"`."},{"name":"table","order":12,"description":"Tables are enclosed in curly brackets, like this `{}`."},{"name":"uint","order":4,"description":"32-bit unsigned integer. Possible values are 0 to 4,294,967,295."},{"name":"uint16","order":6,"description":"16-bit unsigned integer. Possible values are 0 to 65535."},{"name":"uint64","order":7,"description":"64-bit unsigned integer. Possible values are 0 to 18,446,744,073,709,551,615."},{"name":"uint8","order":5,"description":"8-bit unsigned integer. Possible values are 0 to 255."}],"concepts":[{"name":"AchievementPrototypeFilter","order":155,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"allowed-without-fight\"`, `\"type\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"AdvancedMapGenSettings","order":63,"description":"","type":{"complex_type":"table","parameters":[{"name":"difficulty_settings","order":3,"description":"","type":"DifficultySettings","optional":false},{"name":"enemy_evolution","order":1,"description":"","type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","type":"EnemyExpansionMapSettings","optional":false},{"name":"pollution","order":0,"description":"","type":"PollutionMapSettings","optional":false}]}},{"name":"Alert","order":23,"description":"","type":{"complex_type":"table","parameters":[{"name":"icon","order":4,"description":"The SignalID used for a custom alert. Only present for custom alerts.","type":"SignalID","optional":true},{"name":"message","order":5,"description":"The message for a custom alert. Only present for custom alerts.","type":"LocalisedString","optional":true},{"name":"position","order":3,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":2,"description":"","type":"LuaEntityPrototype","optional":true},{"name":"target","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":0,"description":"The tick this alert was created.","type":"uint","optional":false}]}},{"name":"Alignment","order":134,"description":"A [string](string) that specifies where a GUI element should be.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"top-left","description":""},{"complex_type":"literal","value":"middle-left","description":""},{"complex_type":"literal","value":"left","description":"The same as `\"middle-left\"`"},{"complex_type":"literal","value":"bottom-left","description":""},{"complex_type":"literal","value":"top-center","description":""},{"complex_type":"literal","value":"middle-center","description":""},{"complex_type":"literal","value":"center","description":"The same as `\"middle-center\"`"},{"complex_type":"literal","value":"bottom-center","description":""},{"complex_type":"literal","value":"top-right","description":""},{"complex_type":"literal","value":"right","description":"The same as `\"middle-right\"`"},{"complex_type":"literal","value":"bottom-right","description":""}],"full_format":true}},{"name":"AmmoType","order":104,"description":"","type":{"complex_type":"table","parameters":[{"name":"action","order":0,"description":"","type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"category","order":3,"description":"Ammo category of this ammo.","type":"string","optional":false},{"name":"clamp_position","order":2,"description":"When `true`, the gun will be able to shoot even when the target is out of range. Only applies when `target_type` is `position`. The gun will fire at the maximum range in the direction of the target position. Defaults to `false`.","type":"boolean","optional":true},{"name":"consumption_modifier","order":7,"description":"","type":"double","optional":true},{"name":"cooldown_modifier","order":6,"description":"","type":"double","optional":true},{"name":"energy_consumption","order":4,"description":"Energy consumption of a single shot, if applicable. Defaults to `0`.","type":"double","optional":true},{"name":"range_modifier","order":5,"description":"","type":"double","optional":true},{"name":"target_type","order":1,"description":"One of `\"entity\"` (fires at an entity), `\"position\"` (fires directly at a position), or `\"direction\"` (fires in a direction).","type":"string","optional":false}]}},{"name":"Any","order":129,"description":"Any basic type (string, number, boolean), table, or LuaObject.","type":{"complex_type":"union","options":["string","boolean","number","table","LuaObject"],"full_format":false}},{"name":"AnyBasic","order":128,"description":"Any basic type (string, number, boolean) or table.","type":{"complex_type":"union","options":["string","boolean","number","table"],"full_format":false}},{"name":"ArithmeticCombinatorParameters","order":75,"description":"","type":{"complex_type":"table","parameters":[{"name":"first_constant","order":2,"description":"Constant to use as the first argument of the operation. Has no effect when `first_signal` is set. Defaults to `0`.","type":"int","optional":true},{"name":"first_signal","order":0,"description":"First signal to use in an operation. If not specified, the second argument will be the value of `first_constant`.","type":"SignalID","optional":true},{"name":"operation","order":4,"description":"Must be one of `\"*\"`, `\"/\"`, `\"+\"`, `\"-\"`, `\"%\"`, `\"^\"`, `\"<<\"`, `\">>\"`, `\"AND\"`, `\"OR\"`, `\"XOR\"`. When not specified, defaults to `\"*\"`.","type":"string","optional":true},{"name":"output_signal","order":5,"description":"Specifies the signal to output.","type":"SignalID","optional":true},{"name":"second_constant","order":3,"description":"Constant to use as the second argument of the operation. Has no effect when `second_signal` is set. Defaults to `0`.","type":"int","optional":true},{"name":"second_signal","order":1,"description":"Second signal to use in an operation. If not specified, the second argument will be the value of `second_constant`.","type":"SignalID","optional":true}]}},{"name":"AttackParameterFluid","order":122,"description":"","type":{"complex_type":"table","parameters":[{"name":"damage_modifier","order":1,"description":"Multiplier applied to the damage of an attack.","type":"double","optional":false},{"name":"type","order":0,"description":"Name of the [LuaFluidPrototype](LuaFluidPrototype).","type":"string","optional":false}]}},{"name":"AttackParameters","order":123,"description":"","type":{"complex_type":"table","parameters":[{"name":"ammo_categories","order":16,"description":"List of the names of compatible [LuaAmmoCategoryPrototypes](LuaAmmoCategoryPrototype).","type":{"complex_type":"array","value":"string"},"optional":true},{"name":"ammo_consumption_modifier","order":10,"description":"Multiplier applied to the ammo consumption of an attack.","type":"float","optional":false},{"name":"ammo_type","order":15,"description":"","type":"AmmoType","optional":true},{"name":"cooldown","order":11,"description":"Minimum amount of ticks between shots. If this is less than `1`, multiple shots can be performed per tick.","type":"float","optional":false},{"name":"damage_modifier","order":9,"description":"Multiplier applied to the damage of an attack.","type":"float","optional":false},{"name":"fire_penalty","order":4,"description":"When searching for the nearest enemy to attack, `fire_penalty` is added to the enemy's distance if they are on fire.","type":"float","optional":false},{"name":"health_penalty","order":6,"description":"When searching for an enemy to attack, a higher `health_penalty` will discourage targeting enemies with high health. A negative penalty will do the opposite.","type":"float","optional":false},{"name":"min_attack_distance","order":7,"description":"If less than `range`, the entity will choose a random distance between `range` and `min_attack_distance` and attack from that distance. Used for spitters.","type":"float","optional":false},{"name":"min_range","order":2,"description":"Minimum range of attack. Used with flamethrower turrets to prevent self-immolation.","type":"float","optional":false},{"name":"movement_slow_down_cooldown","order":14,"description":"","type":"float","optional":false},{"name":"movement_slow_down_factor","order":13,"description":"","type":"double","optional":false},{"name":"range","order":1,"description":"Maximum range of attack.","type":"float","optional":false},{"name":"range_mode","order":3,"description":"Defines how the range is determined. Either `'center-to-center'` or `'bounding-box-to-bounding-box'`.","type":"string","optional":false},{"name":"rotate_penalty","order":5,"description":"When searching for an enemy to attack, a higher `rotate_penalty` will discourage targeting enemies that would take longer to turn to face.","type":"float","optional":false},{"name":"turn_range","order":8,"description":"The arc that the entity can attack in as a fraction of a circle. A value of `1` means the full 360 degrees.","type":"float","optional":false},{"name":"type","order":0,"description":"The type of AttackParameter. One of `'projectile'`, `'stream'` or `'beam'`.","type":"string","optional":false},{"name":"warmup","order":12,"description":"Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so.","type":"uint","optional":false}],"variant_parameter_groups":[{"name":"projectile","order":0,"parameters":[{"name":"projectile_center","order":0,"description":"","type":"Vector","optional":false},{"name":"projectile_creation_distance","order":1,"description":"","type":"float","optional":false},{"name":"projectile_creation_parameters","order":4,"description":"","type":{"complex_type":"array","value":"CircularProjectileCreationSpecification"},"optional":true},{"name":"projectile_orientation_offset","order":2,"description":"","type":"float","optional":false},{"name":"shell_particle","order":3,"description":"","type":"CircularParticleCreationSpecification","optional":true}]},{"name":"stream","order":1,"parameters":[{"name":"fluid_consumption","order":2,"description":"","type":"float","optional":false},{"name":"fluids","order":3,"description":"","type":{"complex_type":"array","value":"AttackParameterFluid"},"optional":true},{"name":"gun_barrel_length","order":0,"description":"","type":"float","optional":false},{"name":"gun_center_shift","order":1,"description":"","type":{"complex_type":"dictionary","key":"string","value":"Vector"},"optional":false},{"name":"projectile_creation_parameters","order":4,"description":"","type":{"complex_type":"array","value":"CircularProjectileCreationSpecification"},"optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"AutoplaceControl","order":59,"description":"","type":{"complex_type":"table","parameters":[{"name":"frequency","order":0,"description":"For things that are placed as spots such as ores and enemy bases, frequency is generally proportional to number of spots placed per unit area. For continuous features such as forests, frequency is how compressed the probability function is over distance, i.e. the inverse of 'scale' (similar to terrain_segmentation). When the [LuaAutoplaceControlPrototype](LuaAutoplaceControlPrototype) is of the category `\"terrain\"`, then scale is shown in the map generator GUI instead of frequency.","type":"MapGenSize","optional":false},{"name":"richness","order":2,"description":"Has different effects for different things, but generally affects the 'health' or density of a thing that is placed without affecting where it is placed. For trees, richness affects tree health. For ores, richness multiplies the amount of ore at any given tile in a patch. Metadata about autoplace controls (such as whether or not 'richness' does anything for them) can be found in the [LuaAutoplaceControlPrototype](LuaAutoplaceControlPrototype) by looking up `game.autoplace_control_prototypes[(control prototype name)]`, e.g. `game.autoplace_control_prototypes[\"enemy-base\"].richness` is false, because enemy base autoplacement doesn't use richness.","type":"MapGenSize","optional":false},{"name":"size","order":1,"description":"For things that are placed as spots, size is proportional to the area of each spot. For continuous features, size affects how much of the map is covered with the thing, and is called 'coverage' in the GUI.","type":"MapGenSize","optional":false}]}},{"name":"AutoplaceSettings","order":60,"description":"","type":{"complex_type":"table","parameters":[{"name":"settings","order":1,"description":"","type":{"complex_type":"dictionary","key":"string","value":"AutoplaceControl"},"optional":false},{"name":"treat_missing_as_default","order":0,"description":"Whether missing autoplace names for this type should be default enabled.","type":"boolean","optional":false}]}},{"name":"AutoplaceSpecification","order":53,"description":"Specifies how probability and richness are calculated when placing something on the map. Can be specified either using `probability_expression` and `richness_expression` or by using all the other fields.","type":{"complex_type":"table","parameters":[{"name":"control","order":13,"description":"Control prototype name.","type":"string","optional":true},{"name":"coverage","order":2,"description":"","type":"double","optional":false},{"name":"default_enabled","order":11,"description":"","type":"boolean","optional":false},{"name":"force","order":15,"description":"","type":"string","optional":false},{"name":"max_probability","order":4,"description":"","type":"double","optional":false},{"name":"order","order":10,"description":"","type":"string","optional":false},{"name":"peaks","order":12,"description":"","type":{"complex_type":"array","value":"AutoplaceSpecificationPeak"},"optional":true},{"name":"placement_density","order":5,"description":"","type":"uint","optional":false},{"name":"probability_expression","order":0,"description":"","type":"NoiseExpression","optional":false},{"name":"random_probability_penalty","order":16,"description":"","type":"double","optional":false},{"name":"richness_base","order":6,"description":"","type":"double","optional":false},{"name":"richness_expression","order":1,"description":"","type":"NoiseExpression","optional":false},{"name":"richness_multiplier","order":7,"description":"","type":"double","optional":false},{"name":"richness_multiplier_distance_bonus","order":8,"description":"","type":"double","optional":false},{"name":"sharpness","order":3,"description":"","type":"double","optional":false},{"name":"starting_area_size","order":9,"description":"","type":"uint","optional":false},{"name":"tile_restriction","order":14,"description":"","type":{"complex_type":"array","value":"AutoplaceSpecificationRestriction"},"optional":true}]}},{"name":"AutoplaceSpecificationPeak","order":55,"description":"","type":{"complex_type":"table","parameters":[{"name":"aux_max_range","order":33,"description":"","type":"double","optional":false},{"name":"aux_optimal","order":31,"description":"","type":"double","optional":false},{"name":"aux_range","order":32,"description":"","type":"double","optional":false},{"name":"aux_top_property_limit","order":34,"description":"","type":"double","optional":false},{"name":"distance_max_range","order":29,"description":"","type":"double","optional":false},{"name":"distance_optimal","order":27,"description":"","type":"double","optional":false},{"name":"distance_range","order":28,"description":"","type":"double","optional":false},{"name":"distance_top_property_limit","order":30,"description":"","type":"double","optional":false},{"name":"elevation_max_range","order":13,"description":"","type":"double","optional":false},{"name":"elevation_optimal","order":11,"description":"","type":"double","optional":false},{"name":"elevation_range","order":12,"description":"","type":"double","optional":false},{"name":"elevation_top_property_limit","order":14,"description":"","type":"double","optional":false},{"name":"influence","order":0,"description":"","type":"double","optional":false},{"name":"max_influence","order":1,"description":"","type":"double","optional":false},{"name":"min_influence","order":2,"description":"","type":"double","optional":false},{"name":"noisePersistence","order":4,"description":"","type":"double","optional":false},{"name":"noise_layer","order":5,"description":"Prototype name of the noise layer.","type":"string","optional":true},{"name":"noise_octaves_difference","order":6,"description":"","type":"double","optional":false},{"name":"richness_influence","order":3,"description":"","type":"double","optional":false},{"name":"starting_area_weight_max_range","order":21,"description":"","type":"double","optional":false},{"name":"starting_area_weight_optimal","order":19,"description":"","type":"double","optional":false},{"name":"starting_area_weight_range","order":20,"description":"","type":"double","optional":false},{"name":"starting_area_weight_top_property_limit","order":22,"description":"","type":"double","optional":false},{"name":"temperature_max_range","order":17,"description":"","type":"double","optional":false},{"name":"temperature_optimal","order":15,"description":"","type":"double","optional":false},{"name":"temperature_range","order":16,"description":"","type":"double","optional":false},{"name":"temperature_top_property_limit","order":18,"description":"","type":"double","optional":false},{"name":"tier_from_start_max_range","order":25,"description":"","type":"double","optional":false},{"name":"tier_from_start_optimal","order":23,"description":"","type":"double","optional":false},{"name":"tier_from_start_range","order":24,"description":"","type":"double","optional":false},{"name":"tier_from_start_top_property_limit","order":26,"description":"","type":"double","optional":false},{"name":"water_max_range","order":9,"description":"","type":"double","optional":false},{"name":"water_optimal","order":7,"description":"","type":"double","optional":false},{"name":"water_range","order":8,"description":"","type":"double","optional":false},{"name":"water_top_property_limit","order":10,"description":"","type":"double","optional":false}]}},{"name":"AutoplaceSpecificationRestriction","order":56,"description":"","type":{"complex_type":"table","parameters":[{"name":"first","order":0,"description":"Tile prototype name","type":"string","optional":true},{"name":"second","order":1,"description":"Second prototype name","type":"string","optional":true}]}},{"name":"BeamTarget","order":105,"description":"","type":{"complex_type":"table","parameters":[{"name":"entity","order":0,"description":"The target entity.","type":"LuaEntity","optional":true},{"name":"position","order":1,"description":"The target position.","type":"MapPosition","optional":true}]}},{"name":"BlueprintEntity","order":45,"description":"The representation of an entity inside of a blueprint. It has at least these fields, but can contain additional ones depending on the kind of entity.","type":{"complex_type":"table","parameters":[{"name":"connections","order":6,"description":"The circuit network connections of the entity, if there are any. Only relevant for entities that support circuit connections.","type":"BlueprintCircuitConnection","optional":true},{"name":"control_behavior","order":7,"description":"The control behavior of the entity, if it has one. The format of the control behavior depends on the entity's type. Only relevant for entities that support control behaviors.","type":"BlueprintControlBehavior","optional":true},{"name":"direction","order":3,"description":"The direction the entity is facing. Only present for entities that can face in different directions and when the entity is not facing north.","type":"defines.direction","optional":true},{"name":"entity_number","order":0,"description":"The entity's unique identifier in the blueprint.","type":"uint","optional":false},{"name":"items","order":5,"description":"The items that the entity will request when revived, if there are any. It's a mapping of prototype names to amounts. Only relevant for entity ghosts.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true},{"name":"name","order":1,"description":"The prototype name of the entity.","type":"string","optional":false},{"name":"position","order":2,"description":"The position of the entity.","type":"MapPosition","optional":false},{"name":"schedule","order":8,"description":"The schedule of the entity, if it has one. Only relevant for locomotives.","type":{"complex_type":"array","value":"TrainScheduleRecord"},"optional":true},{"name":"tags","order":4,"description":"The entity tags of the entity, if there are any. Only relevant for entity ghosts.","type":"Tags","optional":true}]}},{"name":"BlueprintItemIcon","order":43,"description":"","type":{"complex_type":"table","parameters":[{"name":"index","order":1,"description":"Index of the icon in the blueprint icons slots. Has to be an integer in the range [1, 4].","type":"uint","optional":false},{"name":"name","order":0,"description":"Name of the item prototype whose icon should be used.","type":"string","optional":false}]}},{"name":"BlueprintSignalIcon","order":44,"description":"","type":{"complex_type":"table","parameters":[{"name":"index","order":1,"description":"Index of the icon in the blueprint icons slots. Has to be an integer in the range [1, 4].","type":"uint","optional":false},{"name":"signal","order":0,"description":"The icon to use. It can be any item icon as well as any virtual signal icon.","type":"SignalID","optional":false}]}},{"name":"BoundingBox","order":17,"description":"Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with [MapPosition](MapPosition), the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero, however it is ignored when provided to the game.","examples":["Explicit definition: \n```\n{left_top = {x = -2, y = -3}, right_bottom = {x = 5, y = 8}}\n```","Shorthand: \n```\n{{-2, -3}, {5, 8}}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"left_top","order":0,"description":"","type":"MapPosition","optional":false},{"name":"orientation","order":2,"description":"","type":"RealOrientation","optional":true},{"name":"right_bottom","order":1,"description":"","type":"MapPosition","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"left_top","order":0,"description":"","type":"MapPosition","optional":false},{"name":"orientation","order":2,"description":"","type":"RealOrientation","optional":true},{"name":"right_bottom","order":1,"description":"","type":"MapPosition","optional":false}]}],"full_format":false}},{"name":"CapsuleAction","order":124,"description":"","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"One of `\"throw\"`, `\"equipment-remote\"`, `\"use-on-self\"`, `\"artillery-remote\"`, `\"destroy-cliffs\"`.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"artillery-remote","order":3,"parameters":[{"name":"flare","order":0,"description":"Name of the [flare prototype](LuaEntityPrototype).","type":"string","optional":false}]},{"name":"destroy-cliffs","order":4,"parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false},{"name":"radius","order":1,"description":"","type":"float","optional":false},{"name":"timeout","order":2,"description":"","type":"uint","optional":false}]},{"name":"equipment-remote","order":1,"parameters":[{"name":"equipment","order":0,"description":"Name of the [LuaEquipmentPrototype](LuaEquipmentPrototype).","type":"string","optional":false}]},{"name":"throw","order":0,"parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false},{"name":"uses_stack","order":1,"description":"Whether using the capsule consumes an item from the stack.","type":"boolean","optional":false}]},{"name":"use-on-self","order":2,"parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"ChartTagSpec","order":29,"description":"","notes":["Either `icon`, `text`, or both must be provided."],"type":{"complex_type":"table","parameters":[{"name":"icon","order":1,"description":"","type":"SignalID","optional":true},{"name":"last_user","order":3,"description":"","type":"PlayerIdentification","optional":true},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"text","order":2,"description":"","type":"string","optional":true}]}},{"name":"ChunkPosition","order":5,"description":"Coordinates of a chunk in a [LuaSurface](LuaSurface) where each integer `x`/`y` represents a different chunk. This uses the same format as [MapPosition](MapPosition), meaning it can be specified either with or without explicit keys. A [MapPosition](MapPosition) can be translated to a ChunkPosition by dividing the `x`/`y` values by 32.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}],"full_format":false}},{"name":"ChunkPositionAndArea","order":9,"description":"A [ChunkPosition](ChunkPosition) with an added bounding box for the area of the chunk.","type":{"complex_type":"table","parameters":[{"name":"area","order":2,"description":"","type":"BoundingBox","optional":false},{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}},{"name":"CircuitCondition","order":80,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":0,"description":"Specifies how the inputs should be compared. If not specified, defaults to `\"<\"`.","type":"ComparatorString","optional":true},{"name":"constant","order":3,"description":"Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`.","type":"int","optional":true},{"name":"first_signal","order":1,"description":"Defaults to blank","type":"SignalID","optional":true},{"name":"second_signal","order":2,"description":"What to compare `first_signal` to. If not specified, `first_signal` will be compared to `constant`.","type":"SignalID","optional":true}]}},{"name":"CircuitConditionDefinition","order":81,"description":"","type":{"complex_type":"table","parameters":[{"name":"condition","order":0,"description":"","type":"CircuitCondition","optional":false},{"name":"fulfilled","order":1,"description":"Whether the condition is currently fulfilled","type":"boolean","optional":true}]}},{"name":"CircuitConnectionDefinition","order":82,"description":"","type":{"complex_type":"table","parameters":[{"name":"source_circuit_id","order":2,"description":"","type":"defines.circuit_connector_id","optional":false},{"name":"target_circuit_id","order":3,"description":"","type":"defines.circuit_connector_id","optional":false},{"name":"target_entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"wire","order":0,"description":"Wire color, either [defines.wire_type.red](defines.wire_type.red) or [defines.wire_type.green](defines.wire_type.green).","type":"defines.wire_type","optional":false}]}},{"name":"CircularParticleCreationSpecification","order":120,"description":"","type":{"complex_type":"table","parameters":[{"name":"center","order":11,"description":"This vector is a table with `x` and `y` keys instead of an array.","type":"Vector","optional":false},{"name":"creation_distance","order":12,"description":"","type":"double","optional":false},{"name":"creation_distance_orientation","order":13,"description":"","type":"double","optional":false},{"name":"direction","order":1,"description":"","type":"float","optional":false},{"name":"direction_deviation","order":2,"description":"","type":"float","optional":false},{"name":"height","order":7,"description":"","type":"float","optional":false},{"name":"height_deviation","order":8,"description":"","type":"float","optional":false},{"name":"name","order":0,"description":"Name of the [LuaEntityPrototype](LuaEntityPrototype)","type":"string","optional":false},{"name":"speed","order":3,"description":"","type":"float","optional":false},{"name":"speed_deviation","order":4,"description":"","type":"float","optional":false},{"name":"starting_frame_speed","order":5,"description":"","type":"float","optional":false},{"name":"starting_frame_speed_deviation","order":6,"description":"","type":"float","optional":false},{"name":"use_source_position","order":14,"description":"","type":"boolean","optional":false},{"name":"vertical_speed","order":9,"description":"","type":"float","optional":false},{"name":"vertical_speed_deviation","order":10,"description":"","type":"float","optional":false}]}},{"name":"CircularProjectileCreationSpecification","order":121,"description":"","type":{"complex_type":"tuple","parameters":[{"name":"_","order":0,"description":"","type":"RealOrientation","optional":false},{"name":"_","order":1,"description":"","type":"Vector","optional":false}]}},{"name":"CliffOrientation","order":146,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"west-to-east","description":""},{"complex_type":"literal","value":"north-to-south","description":""},{"complex_type":"literal","value":"east-to-west","description":""},{"complex_type":"literal","value":"south-to-north","description":""},{"complex_type":"literal","value":"west-to-north","description":""},{"complex_type":"literal","value":"north-to-east","description":""},{"complex_type":"literal","value":"east-to-south","description":""},{"complex_type":"literal","value":"south-to-west","description":""},{"complex_type":"literal","value":"west-to-south","description":""},{"complex_type":"literal","value":"north-to-west","description":""},{"complex_type":"literal","value":"east-to-north","description":""},{"complex_type":"literal","value":"south-to-east","description":""},{"complex_type":"literal","value":"west-to-none","description":""},{"complex_type":"literal","value":"none-to-east","description":""},{"complex_type":"literal","value":"east-to-none","description":""},{"complex_type":"literal","value":"none-to-west","description":""},{"complex_type":"literal","value":"north-to-none","description":""},{"complex_type":"literal","value":"none-to-south","description":""},{"complex_type":"literal","value":"south-to-none","description":""},{"complex_type":"literal","value":"none-to-north","description":""}],"full_format":true}},{"name":"CliffPlacementSettings","order":61,"description":"","type":{"complex_type":"table","parameters":[{"name":"cliff_elevation_0","order":1,"description":"Elevation at which the first row of cliffs is placed. The default is `10`, and this cannot be set from the map generation GUI.","type":"float","optional":false},{"name":"cliff_elevation_interval","order":2,"description":"Elevation difference between successive rows of cliffs. This is inversely proportional to 'frequency' in the map generation GUI. Specifically, when set from the GUI the value is `40 / frequency`.","type":"float","optional":false},{"name":"name","order":0,"description":"Name of the cliff prototype.","type":"string","optional":false},{"name":"richness","order":3,"description":"Corresponds to 'continuity' in the GUI. This value is not used directly, but is used by the 'cliffiness' noise expression, which in combination with elevation and the two cliff elevation properties drives cliff placement (cliffs are placed when elevation crosses the elevation contours defined by `cliff_elevation_0` and `cliff_elevation_interval` when 'cliffiness' is greater than `0.5`). The default 'cliffiness' expression interprets this value such that larger values result in longer unbroken walls of cliffs, and smaller values (between `0` and `1`) result in larger gaps in cliff walls.","type":"MapGenSize","optional":false}]}},{"name":"CollisionMask","order":114,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.","type":{"complex_type":"dictionary","key":"CollisionMaskLayer","value":{"complex_type":"literal","value":true}}},{"name":"CollisionMaskLayer","order":113,"description":"A [string](string) specifying a collision mask layer.\n\nIn addition to the listed layers, there is `\"layer-13\"` through `\"layer-55\"`. These layers are currently unused by the game but may change. If a mod is going to use one of the unused layers it's recommended to start at the higher layers because the base game will take from the lower ones.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ground-tile","description":""},{"complex_type":"literal","value":"water-tile","description":""},{"complex_type":"literal","value":"resource-layer","description":""},{"complex_type":"literal","value":"doodad-layer","description":""},{"complex_type":"literal","value":"floor-layer","description":""},{"complex_type":"literal","value":"item-layer","description":""},{"complex_type":"literal","value":"ghost-layer","description":""},{"complex_type":"literal","value":"object-layer","description":""},{"complex_type":"literal","value":"player-layer","description":""},{"complex_type":"literal","value":"train-layer","description":""},{"complex_type":"literal","value":"rail-layer","description":""},{"complex_type":"literal","value":"transport-belt-layer","description":""},{"complex_type":"literal","value":"not-setup","description":""}],"full_format":true}},{"name":"CollisionMaskWithFlags","order":115,"description":"A [CollisionMask](CollisionMask) which also includes any flags this mask has.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"type","value":"CollisionMaskLayer","description":""},{"complex_type":"literal","value":"not-colliding-with-itself","description":"Any two entities that both have this option enabled on their prototype and have an identical collision mask layers list will not collide. Other collision mask options are not included in the identical layer list check. This does mean that two different prototypes with the same collision mask layers and this option enabled will not collide."},{"complex_type":"literal","value":"consider-tile-transitions","description":"Uses the prototypes position rather than its collision box when doing collision checks with tile prototypes. Allows the prototype to overlap colliding tiles up until its center point. This is only respected for character movement and cars driven by players."},{"complex_type":"literal","value":"colliding-with-tiles-only","description":"Any prototype with this collision option will only be checked for collision with other prototype's collision masks if they are a tile."}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"Color","order":20,"description":"Red, green, blue and alpha values, all in range [0, 1] or all in range [0, 255] if any value is > 1. All values here are optional. Color channels default to `0`, the alpha channel defaults to `1`.\n\nSimilar to [MapPosition](MapPosition), Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers. The game usually expects colors to be in pre-multiplied form (color channels are pre-multiplied by alpha).","examples":["```\nred1 = {r = 0.5, g = 0, b = 0, a = 0.5}  -- Half-opacity red\nred2 = {r = 0.5, a = 0.5}                -- Same color as red1\nblack = {}                               -- All channels omitted: black\nred1_short = {0.5, 0, 0, 0.5}            -- Same color as red1 in short-hand notation\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]},{"complex_type":"tuple","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]}],"full_format":false}},{"name":"ColorModifier","order":21,"description":"Same as [Color](Color), but red, green, blue and alpha values can be any floating point number, without any special handling of the range [1, 255].","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]},{"complex_type":"tuple","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]}],"full_format":false}},{"name":"Command","order":86,"description":"Commands can be given to enemies and unit groups.","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Type of command. The remaining fields depend on the value of this field.","type":"defines.command","optional":false}],"variant_parameter_groups":[{"name":"defines.command.attack","order":0,"parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"target","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"defines.command.attack_area","order":4,"parameters":[{"name":"destination","order":0,"description":"Center of the attack area.","type":"MapPosition","optional":false},{"name":"distraction","order":2,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"radius","order":1,"description":"Radius of the attack area.","type":"double","optional":false}]},{"name":"defines.command.build_base","order":8,"parameters":[{"name":"destination","order":0,"description":"Where to build the base.","type":"MapPosition","optional":false},{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"ignore_planner","order":2,"description":"Whether the units should ignore expansion candidate chunks. When `false`, they will obey and not build a base in a non-candidate chunk. Defaults to `false`.","type":"boolean","optional":true}]},{"name":"defines.command.compound","order":2,"parameters":[{"name":"commands","order":1,"description":"The sub-commands.","type":{"complex_type":"array","value":"Command"},"optional":false},{"name":"structure_type","order":0,"description":"How the commands should be chained together.","type":"defines.compound_command","optional":false}]},{"name":"defines.command.flee","order":7,"parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"from","order":0,"description":"The entity to flee from","type":"LuaEntity","optional":false}]},{"name":"defines.command.go_to_location","order":1,"parameters":[{"name":"destination","order":0,"description":"The position to path to. Either this or `destination_entity` need to be specified. If both are, `destination_entity` is used.","type":"MapPosition","optional":true},{"name":"destination_entity","order":1,"description":"The entity to path to. Either this or `destination` need to be specified. If both are, `destination_entity` is used.","type":"LuaEntity","optional":true},{"name":"distraction","order":2,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"pathfind_flags","order":3,"description":"Flags that affect pathfinder behavior.","type":"PathfinderFlags","optional":true},{"name":"radius","order":4,"description":"How close the pathfinder needs to get to its destination (in tiles). Defaults to `3`.","type":"double","optional":true}]},{"name":"defines.command.group","order":3,"parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"group","order":0,"description":"The group whose command to follow.","type":"LuaUnitGroup","optional":false},{"name":"use_group_distraction","order":2,"description":"Whether the unit will use the group distraction or the commands distraction. Defaults to true.","type":"boolean","optional":true}]},{"name":"defines.command.stop","order":6,"parameters":[{"name":"distraction","order":0,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"ticks_to_wait","order":1,"description":"Ticks to wander before successfully completing the command. Default is max uint, which means stop forever.","type":"uint","optional":true}]},{"name":"defines.command.wander","order":5,"parameters":[{"name":"distraction","order":0,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"radius","order":1,"description":"Defaults to 10. Does not apply when `wander_in_group` is `true`.","type":"double","optional":true},{"name":"ticks_to_wait","order":3,"description":"Ticks to wander before successfully completing the command. Default is max uint, which means wander forever.","type":"uint","optional":true},{"name":"wander_in_group","order":2,"description":"When commanding a group, defines how the group will wander. When `true`, the units in the group will wander around inside the group's radius, just like gathering biters. When `false`, the units will wander as a group, ie they will all walk together in the same random direction. Default is true for groups. Passing true for a single unit is an error.","type":"boolean","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"ComparatorString","order":77,"description":"A string that specifies how the inputs should be compared","notes":["While the API accepts both versions for `\"less/greater than or equal to\"` and `\"not equal\"`, it'll always return `\"\u2265\"`, `\"\u2264\"` or `\"\u2260\"` respectively when reading them back."],"type":{"complex_type":"union","options":[{"complex_type":"literal","value":"=","description":"\"equal to\""},{"complex_type":"literal","value":">","description":"\"greater than\""},{"complex_type":"literal","value":"<","description":"\"lesser than\""},{"complex_type":"literal","value":"\u2265","description":"\"greater than or equal to\""},{"complex_type":"literal","value":">=","description":"\"greater than or equal to\""},{"complex_type":"literal","value":"\u2264","description":"\"lesser than or equal to\""},{"complex_type":"literal","value":"<=","description":"\"lesser than or equal to\""},{"complex_type":"literal","value":"\u2260","description":"\"not equal to\""},{"complex_type":"literal","value":"!=","description":"\"not equal to\""}],"full_format":true}},{"name":"ConfigurationChangedData","order":138,"description":"","type":{"complex_type":"table","parameters":[{"name":"migration_applied","order":4,"description":"`true` when mod prototype migrations have been applied since the last time this save was loaded.","type":"boolean","optional":false},{"name":"mod_changes","order":2,"description":"Dictionary of mod changes. It is indexed by mod name.","type":{"complex_type":"dictionary","key":"string","value":"ModChangeData"},"optional":false},{"name":"mod_startup_settings_changed","order":3,"description":"`true` when mod startup settings have changed since the last time this save was loaded.","type":"boolean","optional":false},{"name":"new_version","order":1,"description":"New version of the map. Present only when loading map version other than the current version.","type":"string","optional":true},{"name":"old_version","order":0,"description":"Old version of the map. Present only when loading map version other than the current version.","type":"string","optional":true}]}},{"name":"ConstantCombinatorParameters","order":76,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"Value of the signal to emit.","type":"int","optional":false},{"name":"index","order":2,"description":"Index of the constant combinator's slot to set this signal to.","type":"uint","optional":false},{"name":"signal","order":0,"description":"Signal to emit.","type":"SignalID","optional":false}]}},{"name":"CraftingQueueItem","order":22,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":2,"description":"The amount of items being crafted.","type":"uint","optional":false},{"name":"index","order":0,"description":"The index of the item in the crafting queue.","type":"uint","optional":false},{"name":"prerequisite","order":3,"description":"The item is a prerequisite for another item in the queue.","type":"boolean","optional":false},{"name":"recipe","order":1,"description":"The recipe being crafted.","type":"string","optional":false}]}},{"name":"CursorBoxRenderType","order":143,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"entity","description":"Yellow box."},{"complex_type":"literal","value":"not-allowed","description":"Red box."},{"complex_type":"literal","value":"electricity","description":"Light blue box."},{"complex_type":"literal","value":"pair","description":"Light blue box."},{"complex_type":"literal","value":"copy","description":"Green box."},{"complex_type":"literal","value":"train-visualization","description":"White box."},{"complex_type":"literal","value":"logistics","description":"Light blue box."},{"complex_type":"literal","value":"blueprint-snap-rectangle","description":"Green box."}],"full_format":true}},{"name":"CustomCommandData","order":139,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"The name of the command.","type":"string","optional":false},{"name":"parameter","order":3,"description":"The parameter passed after the command, if there is one.","type":"string","optional":true},{"name":"player_index","order":2,"description":"The player who issued the command, or `nil` if it was issued from the server console.","type":"uint","optional":true},{"name":"tick","order":1,"description":"The tick the command was used in.","type":"uint","optional":false}]}},{"name":"CutsceneWaypoint","order":26,"description":"","type":{"complex_type":"table","parameters":[{"name":"position","order":0,"description":"Position to pan the camera to.","type":"MapPosition","optional":true},{"name":"target","order":1,"description":"Entity or unit group to pan the camera to.","type":{"complex_type":"union","options":["LuaEntity","LuaUnitGroup"],"full_format":false},"optional":true},{"name":"time_to_wait","order":3,"description":"Time in ticks to wait before moving to the next waypoint.","type":"uint","optional":false},{"name":"transition_time","order":2,"description":"How many ticks it will take to reach this waypoint from the previous one.","type":"uint","optional":false},{"name":"zoom","order":4,"description":"Zoom level to be set when the waypoint is reached. When not specified, the previous waypoint's zoom is used.","type":"double","optional":true}]}},{"name":"DeciderCombinatorParameters","order":78,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":3,"description":"Specifies how the inputs should be compared. If not specified, defaults to `\"<\"`.","type":"ComparatorString","optional":true},{"name":"constant","order":2,"description":"Constant to use as the second argument of operation. Defaults to `0`.","type":"uint","optional":true},{"name":"copy_count_from_input","order":5,"description":"Defaults to `true`. When `false`, will output a value of `1` for the given `output_signal`.","type":"boolean","optional":true},{"name":"first_signal","order":0,"description":"Defaults to blank.","type":"SignalID","optional":true},{"name":"output_signal","order":4,"description":"Defaults to blank.","type":"SignalID","optional":true},{"name":"second_signal","order":1,"description":"Second signal to use in an operation, if any. If this is not specified, the second argument to a decider combinator's operation is assumed to be the value of `constant`.","type":"SignalID","optional":true}]}},{"name":"Decorative","order":27,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"","type":"uint8","optional":false},{"name":"name","order":0,"description":"The name of the decorative prototype.","type":"string","optional":false},{"name":"position","order":1,"description":"","type":"TilePosition","optional":false}]}},{"name":"DecorativePrototypeFilter","order":154,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"decal\"`, `\"autoplace\"`, `\"collision-mask\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"collision-mask","order":0,"description":"","parameters":[{"name":"mask","order":0,"description":"","type":{"complex_type":"union","options":["CollisionMask","CollisionMaskWithFlags"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"How to filter: `\"collides\"`, `\"layers-equals\"`, `\"contains-any\"` or `\"contains-all\"`","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"DecorativeResult","order":28,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"","type":"uint","optional":false},{"name":"decorative","order":1,"description":"","type":"LuaDecorativePrototype","optional":false},{"name":"position","order":0,"description":"","type":"TilePosition","optional":false}]}},{"name":"DifficultySettings","order":40,"description":"Technology and recipe difficulty settings. Updating any of the attributes will immediately take effect in the game engine.","type":{"complex_type":"table","parameters":[{"name":"recipe_difficulty","order":0,"description":"","type":"defines.difficulty_settings.recipe_difficulty","optional":false},{"name":"research_queue_setting","order":3,"description":"Either `\"after-victory\"`, `\"always\"` or `\"never\"`. Changing this to `\"always\"` or `\"after-victory\"` does not automatically unlock the research queue. See [LuaForce](LuaForce) for that.","type":"string","optional":false},{"name":"technology_difficulty","order":1,"description":"","type":"defines.difficulty_settings.technology_difficulty","optional":false},{"name":"technology_price_multiplier","order":2,"description":"A value in range [0.001, 1000].","type":"double","optional":false}]}},{"name":"DisplayResolution","order":1,"description":"","type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"width","order":0,"description":"","type":"uint","optional":false}]}},{"name":"EnemyEvolutionMapSettings","order":33,"description":"These values represent a percentual increase in evolution. This means a value of `0.1` would increase evolution by 10%.","type":{"complex_type":"table","parameters":[{"name":"destroy_factor","order":2,"description":"The amount evolution progresses for every destroyed spawner. Defaults to `0.002`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether enemy evolution is enabled at all.","type":"boolean","optional":false},{"name":"pollution_factor","order":3,"description":"The amount evolution progresses for every unit of pollution. Defaults to `0.0000009`.","type":"double","optional":false},{"name":"time_factor","order":1,"description":"The amount evolution naturally progresses by every second. Defaults to `0.000004`.","type":"double","optional":false}]}},{"name":"EnemyExpansionMapSettings","order":34,"description":"Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry).\n\nThe pseudocode algorithm to determine a chunk's score is as follows:\n\n```\nplayer = 0\nfor neighbour in all chunks within enemy_building_influence_radius from chunk:\n  player += number of player buildings on neighbour\n          * building_coefficient\n          * neighbouring_chunk_coefficient^distance(chunk, neighbour)\n\nbase = 0\nfor neighbour in all chunk within friendly_base_influence_radius from chunk:\n  base += num of enemy bases on neighbour\n          * other_base_coefficient\n          * neighbouring_base_chunk_coefficient^distance(chunk, neighbour)\n\nscore(chunk) = 1 / (1 + player + base)\n```","type":{"complex_type":"table","parameters":[{"name":"building_coefficient","order":4,"description":"Defaults to `0.1`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether enemy expansion is enabled at all.","type":"boolean","optional":false},{"name":"enemy_building_influence_radius","order":3,"description":"Defaults to `2`.","type":"uint","optional":false},{"name":"friendly_base_influence_radius","order":2,"description":"Defaults to `2`.","type":"uint","optional":false},{"name":"max_colliding_tiles_coefficient","order":8,"description":"A chunk has to have at most this high of a percentage of unbuildable tiles for it to be considered a candidate to avoid chunks full of water as candidates. Defaults to `0.9`, or 90%.","type":"double","optional":false},{"name":"max_expansion_cooldown","order":12,"description":"The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3,600=216,000` ticks.","type":"uint","optional":false},{"name":"max_expansion_distance","order":1,"description":"Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to `7`.","type":"uint","optional":false},{"name":"min_expansion_cooldown","order":11,"description":"The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3,600=14,400` ticks.","type":"uint","optional":false},{"name":"neighbouring_base_chunk_coefficient","order":7,"description":"Defaults to `0.4`.","type":"double","optional":false},{"name":"neighbouring_chunk_coefficient","order":6,"description":"Defaults to `0.5`.","type":"double","optional":false},{"name":"other_base_coefficient","order":5,"description":"Defaults to `2.0`.","type":"double","optional":false},{"name":"settler_group_max_size","order":10,"description":"The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `20`.","type":"uint","optional":false},{"name":"settler_group_min_size","order":9,"description":"The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `5`.","type":"uint","optional":false}]}},{"name":"EntityPrototypeFilter","order":160,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"flying-robot\"`, `\"robot-with-logistics-interface\"`, `\"rail\"`, `\"ghost\"`, `\"explosion\"`, `\"vehicle\"`, `\"crafting-machine\"`, `\"rolling-stock\"`, `\"turret\"`, `\"transport-belt-connectable\"`, `\"wall-connectable\"`, `\"buildable\"`, `\"placable-in-editor\"`, `\"clonable\"`, `\"selectable\"`, `\"hidden\"`, `\"entity-with-health\"`, `\"building\"`, `\"fast-replaceable\"`, `\"uses-direction\"`, `\"minable\"`, `\"circuit-connectable\"`, `\"autoplace\"`, `\"blueprintable\"`, `\"item-to-place\"`, `\"name\"`, `\"type\"`, `\"collision-mask\"`, `\"flag\"`, `\"build-base-evolution-requirement\"`, `\"selection-priority\"`, `\"emissions\"`, `\"crafting-category\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"build-base-evolution-requirement","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"collision-mask","order":2,"description":"Usage example: \n```\ngame.get_filtered_entity_prototypes({{filter = \"collision-mask\", mask = \"player-layer\", mask_mode = \"collides\"}})\n```","parameters":[{"name":"mask","order":0,"description":"","type":{"complex_type":"union","options":["CollisionMask","CollisionMaskWithFlags"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"How to filter: `\"collides\"`, `\"layers-equals\"`, `\"contains-any\"` or `\"contains-all\"`","type":"string","optional":false}]},{"name":"crafting-category","order":7,"description":"","parameters":[{"name":"crafting_category","order":0,"description":"Matches if the prototype is for a crafting machine with this crafting category.","type":"string","optional":false}]},{"name":"emissions","order":6,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"flag","order":3,"description":"Usage example: \n```\ngame.get_filtered_entity_prototypes({{filter = \"flag\", flag = \"placeable-player\"}, {filter = \"flag\", flag = \"placeable-enemy\", mode = \"and\"}})\n```","parameters":[{"name":"flag","order":0,"description":"One of the values in [EntityPrototypeFlags](EntityPrototypeFlags).","type":"string","optional":false}]},{"name":"name","order":0,"description":"For use within nested filters such as the `place-result` filter of array[[ItemPrototypeFilter](ItemPrototypeFilter)]. To get a specific prototype by name, see [LuaGameScript::entity_prototypes](LuaGameScript::entity_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"selection-priority","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint8","optional":false}]},{"name":"type","order":1,"description":"Usage example: \n```\ngame.get_filtered_entity_prototypes({{filter = \"type\", type = \"unit\"}})\n```","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"EntityPrototypeFlags","order":111,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nBy default, none of these flags are set.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"not-rotatable","description":"Prevents the entity from being rotated before or after placement."},{"complex_type":"literal","value":"placeable-neutral","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-player","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-enemy","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-off-grid","description":"Determines whether the entity needs to be aligned with the invisible grid within the world. Most entities are confined in this way, with a few exceptions such as trees and land mines."},{"complex_type":"literal","value":"player-creation","description":"Makes it possible to blueprint, deconstruct, and repair the entity (which can be turned off again using the specific flags). Makes it possible for the biter AI to target the entity as a distraction. Enables dust to automatically be created when building the entity. If the entity does not have a `map_color` set, this flag makes the entity appear on the map with the default color specified by the UtilityConstants."},{"complex_type":"literal","value":"building-direction-8-way","description":"Uses 45 degree angle increments when selecting direction."},{"complex_type":"literal","value":"filter-directions","description":"Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default."},{"complex_type":"literal","value":"fast-replaceable-no-build-while-moving","description":"Fast replace will not apply when building while moving."},{"complex_type":"literal","value":"breaths-air","description":"Used to specify that the entity breathes air, and is thus affected by poison."},{"complex_type":"literal","value":"not-repairable","description":"Used to specify that the entity can not be 'healed' by repair packs."},{"complex_type":"literal","value":"not-on-map","description":"Prevents the entity from being drawn on the map."},{"complex_type":"literal","value":"not-deconstructable","description":"Prevents the entity from being deconstructed."},{"complex_type":"literal","value":"not-blueprintable","description":"Prevents the entity from being part of a blueprint."},{"complex_type":"literal","value":"hidden","description":"Hides the entity from the bonus GUI and from the \"made in\"-property of recipe tooltips."},{"complex_type":"literal","value":"hide-alt-info","description":"Hides the alt-info of this entity when in alt-mode."},{"complex_type":"literal","value":"fast-replaceable-no-cross-type-while-moving","description":"Does not fast replace this entity over other entity types when building while moving."},{"complex_type":"literal","value":"no-gap-fill-while-building","description":""},{"complex_type":"literal","value":"not-flammable","description":"Does not apply fire stickers to the entity."},{"complex_type":"literal","value":"no-automated-item-removal","description":"Prevents inserters and loaders from taking items from this entity."},{"complex_type":"literal","value":"no-automated-item-insertion","description":"Prevents inserters and loaders from inserting items into this entity."},{"complex_type":"literal","value":"no-copy-paste","description":"Prevents the entity from being copy-pasted."},{"complex_type":"literal","value":"not-selectable-in-game","description":"Disallows selection of the entity even when a selection box is specified for other reasons. For example, selection boxes are used to determine the size of outlines to be shown when highlighting entities inside electric pole ranges."},{"complex_type":"literal","value":"not-upgradable","description":"Prevents the entity from being selected by the upgrade planner."},{"complex_type":"literal","value":"not-in-kill-statistics","description":"Prevents the entity from being shown in the kill statistics."},{"complex_type":"literal","value":"not-in-made-in","description":"Prevents the entity from being shown in the \"made in\" list in recipe tooltips."}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"EntityPrototypeIdentification","order":98,"description":"An entity prototype may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEntity","description":"The entity."},{"complex_type":"type","value":"LuaEntityPrototype","description":"The entity prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"EquipmentPoint","order":10,"description":"A table used to define a manual shape for a piece of equipment.","type":{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"uint","optional":false},{"name":"y","order":1,"description":"","type":"uint","optional":false}]}},{"name":"EquipmentPosition","order":7,"description":"Position inside an equipment grid. This uses the same format as [MapPosition](MapPosition), meaning it can be specified either with or without explicit keys.","examples":["Explicit definition: \n```\n{x = 5, y = 2}\n{y = 2, x = 5}\n```","Shorthand: \n```\n{1, 2}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}],"full_format":false}},{"name":"EquipmentPrototypeFilter","order":157,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"item-to-place\"`, `\"type\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"EventData","order":135,"description":"Information about the event that has been raised. The table can also contain other fields depending on the type of event. See [the list of Factorio events](events.html) for more information on these.","type":{"complex_type":"table","parameters":[{"name":"mod_name","order":2,"description":"The name of the mod that raised the event if it was raised using [LuaBootstrap::raise_event](LuaBootstrap::raise_event).","type":"string","optional":true},{"name":"name","order":0,"description":"The identifier of the event this handler was registered to.","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"The tick during which the event happened.","type":"uint","optional":false}]}},{"name":"EventFilter","order":161,"description":"Used to filter out irrelevant event callbacks in a performant way.","notes":["Filters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed."],"type":{"complex_type":"array","value":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEntityClonedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDamagedEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPreRobotMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaRobotBuiltEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPostEntityDiedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDiedEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedReviveEventFilter","description":""},{"complex_type":"type","value":"LuaPrePlayerMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaEntityMarkedForDeconstructionEventFilter","description":""},{"complex_type":"type","value":"LuaPreGhostDeconstructedEventFilter","description":""},{"complex_type":"type","value":"LuaPreGhostUpgradedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDeconstructionCancelledEventFilter","description":""},{"complex_type":"type","value":"LuaEntityMarkedForUpgradeEventFilter","description":""},{"complex_type":"type","value":"LuaSectorScannedEventFilter","description":""},{"complex_type":"type","value":"LuaRobotMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedDestroyEventFilter","description":""},{"complex_type":"type","value":"LuaUpgradeCancelledEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedBuiltEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerBuiltEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerRepairedEntityEventFilter","description":""}],"full_format":true}}},{"name":"Fluid","order":47,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":1,"description":"Amount of the fluid.","type":"double","optional":false},{"name":"name","order":0,"description":"Fluid prototype name of the fluid.","type":"string","optional":false},{"name":"temperature","order":2,"description":"The temperature. When reading from [LuaFluidBox](LuaFluidBox), this field will always be present. It is not necessary to specify it when writing, however. When not specified, the fluid will be set to the fluid's default temperature as specified in the fluid's prototype.","type":"double","optional":true}]}},{"name":"FluidBoxConnection","order":74,"description":"A definition of a fluidbox connection point.","type":{"complex_type":"table","parameters":[{"name":"max_underground_distance","order":2,"description":"The maximum tile distance this underground connection can connect at if this is an underground pipe.","type":"uint","optional":true},{"name":"positions","order":1,"description":"The 4 cardinal direction connection points for this pipe. This vector is a table with `x` and `y` keys instead of an array.","type":{"complex_type":"array","value":"Vector"},"optional":false},{"name":"type","order":0,"description":"The connection type: \"input\", \"output\", or \"input-output\".","type":"string","optional":false}]}},{"name":"FluidBoxFilter","order":70,"description":"","type":{"complex_type":"table","parameters":[{"name":"maximum_temperature","order":2,"description":"The maximum temperature allowed into the fluidbox.","type":"double","optional":false},{"name":"minimum_temperature","order":1,"description":"The minimum temperature allowed into the fluidbox.","type":"double","optional":false},{"name":"name","order":0,"description":"Fluid prototype name of the filtered fluid.","type":"string","optional":false}]}},{"name":"FluidBoxFilterSpec","order":71,"description":"","type":{"complex_type":"table","parameters":[{"name":"force","order":3,"description":"Force the filter to be set, regardless of current fluid content.","type":"boolean","optional":true},{"name":"maximum_temperature","order":2,"description":"The maximum temperature allowed into the fluidbox.","type":"double","optional":true},{"name":"minimum_temperature","order":1,"description":"The minimum temperature allowed into the fluidbox.","type":"double","optional":true},{"name":"name","order":0,"description":"Fluid prototype name of the filtered fluid.","type":"string","optional":false}]}},{"name":"FluidIdentification","order":92,"description":"A fluid may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The fluid name."},{"complex_type":"type","value":"LuaFluidPrototype","description":"The fluid prototype."},{"complex_type":"type","value":"Fluid","description":"The fluid."}],"full_format":true}},{"name":"FluidPrototypeFilter","order":156,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"hidden\"`, `\"name\"`, `\"subgroup\"`, `\"default-temperature\"`, `\"max-temperature\"`, `\"heat-capacity\"`, `\"fuel-value\"`, `\"emissions-multiplier\"`, `\"gas-temperature\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"default-temperature","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"emissions-multiplier","order":6,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-value","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"gas-temperature","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"heat-capacity","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"max-temperature","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"name","order":0,"description":"For use within nested filters such as the `has-product-fluid` filter of array[[RecipePrototypeFilter](RecipePrototypeFilter)]. To get a specific prototype by name, see [LuaGameScript::fluid_prototypes](LuaGameScript::fluid_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"subgroup","order":1,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](LuaGroup) (subgroup) name","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ForceCondition","order":144,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"all","description":"All forces pass."},{"complex_type":"literal","value":"enemy","description":"Forces which will attack pass."},{"complex_type":"literal","value":"ally","description":"Forces which won't attack pass."},{"complex_type":"literal","value":"friend","description":"Forces which are friends pass."},{"complex_type":"literal","value":"not-friend","description":"Forces which are not friends pass."},{"complex_type":"literal","value":"same","description":"The same force pass."},{"complex_type":"literal","value":"not-same","description":"The non-same forces pass."}],"full_format":true}},{"name":"ForceIdentification","order":93,"description":"A force may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The force name."},{"complex_type":"type","value":"LuaForce","description":"A reference to [LuaForce](LuaForce) may be passed directly."}],"full_format":true}},{"name":"GameViewSettings","order":30,"description":"Parameters that affect the look and control of the game. Updating any of the member attributes here will immediately take effect in the game engine.","type":{"complex_type":"struct","attributes":[{"name":"show_alert_gui","order":4,"description":"Show the flashing alert icons next to the player's toolbar.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_controller_gui","order":0,"description":"Show the controller GUI elements. This includes the toolbar, the selected tool slot, the armour slot, and the gun and ammunition slots.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_entity_info","order":3,"description":"Show overlay icons on entities. Also known as \"alt-mode\".","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_map_view_options","order":8,"description":"Shows or hides the view options when map is opened.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_minimap","order":1,"description":"Show the chart in the upper right-hand corner of the screen.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_quickbar","order":9,"description":"Shows or hides quickbar of shortcuts.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_rail_block_visualisation","order":6,"description":"When `true` (`false` is default), the rails will always show the rail block visualisation.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_research_info","order":2,"description":"Show research progress and name in the upper right-hand corner of the screen.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_shortcut_bar","order":10,"description":"Shows or hides the shortcut bar.","type":"boolean","optional":false,"read":true,"write":true},{"name":"show_side_menu","order":7,"description":"Shows or hides the buttons row.","type":"boolean","optional":false,"read":true,"write":true},{"name":"update_entity_selection","order":5,"description":"When `true` (the default), mousing over an entity will select it. Otherwise, moving the mouse won't update entity selection.","type":"boolean","optional":false,"read":true,"write":true}]}},{"name":"GuiAnchor","order":11,"description":"","type":{"complex_type":"table","parameters":[{"name":"gui","order":0,"description":"","type":"defines.relative_gui_type","optional":false},{"name":"name","order":3,"description":"If provided, only anchors the GUI element when the opened thing matches the name. `name` takes precedence over `names`.","type":"string","optional":true},{"name":"names","order":4,"description":"If provided, only anchors the GUI element when the opened thing matches one of the names. When reading an anchor, `names` is always populated.","type":{"complex_type":"array","value":"string"},"optional":true},{"name":"position","order":1,"description":"","type":"defines.relative_gui_position","optional":false},{"name":"type","order":2,"description":"If provided, only anchors the GUI element when the opened things type matches the type.","type":"string","optional":true}]}},{"name":"GuiArrowSpecification","order":103,"description":"Used for specifying where a GUI arrow should point to.","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"This determines which of the following fields will be required. Must be one of `\"nowhere\"` (will remove the arrow entirely), `\"goal\"` (will point to the current goal), `\"entity_info\"`, `\"active_window\"`, `\"entity\"`, `\"position\"`, `\"crafting_queue\"` or `\"item_stack\"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"crafting_queue","order":2,"parameters":[{"name":"crafting_queueindex","order":0,"description":"Index in the crafting queue to point to.","type":"uint","optional":false}]},{"name":"entity","order":0,"parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"item_stack","order":3,"parameters":[{"name":"inventory_index","order":0,"description":"Which inventory the stack is in.","type":"defines.inventory","optional":false},{"name":"item_stack_index","order":1,"description":"Which stack to point to.","type":"uint","optional":false},{"name":"source","order":2,"description":"Must be either `\"player\"`, `\"target\"`, `\"player-quickbar\"` or `\"player-equipment-bar\"`.","type":"string","optional":false}]},{"name":"position","order":1,"parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"GuiLocation","order":8,"description":"Screen coordinates of a GUI element in a [LuaGui](LuaGui). This uses the same format as [TilePosition](TilePosition), meaning it can be specified either with or without explicit keys.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}],"full_format":false}},{"name":"HeatConnection","order":73,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"","type":"defines.direction","optional":false},{"name":"position","order":0,"description":"","type":"Vector","optional":false}]}},{"name":"HeatSetting","order":72,"description":"The settings used by a heat-interface type entity.","type":{"complex_type":"table","parameters":[{"name":"mode","order":1,"description":"`\"at-least\"`, `\"at-most\"`, `\"exactly\"`, `\"add\"`, or `\"remove\"`. Defaults to `\"at-least\"`.","type":"string","optional":true},{"name":"temperature","order":0,"description":"The target temperature. Defaults to the minimum temperature of the heat buffer.","type":"double","optional":true}]}},{"name":"InfinityInventoryFilter","order":68,"description":"A single filter used by an infinity-filters instance.","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"The count of the filter.","type":"uint","optional":true},{"name":"index","order":3,"description":"The index of this filter in the filters list. Not required when writing a filter.","type":"uint","optional":false},{"name":"mode","order":2,"description":"`\"at-least\"`, `\"at-most\"`, or `\"exactly\"`. Defaults to `\"at-least\"`.","type":"string","optional":true},{"name":"name","order":0,"description":"Name of the item.","type":"string","optional":false}]}},{"name":"InfinityPipeFilter","order":69,"description":"A single filter used by an infinity-pipe type entity.","type":{"complex_type":"table","parameters":[{"name":"mode","order":3,"description":"`\"at-least\"`, `\"at-most\"`, `\"exactly\"`, `\"add\"`, or `\"remove\"`. Defaults to `\"at-least\"`.","type":"string","optional":true},{"name":"name","order":0,"description":"Name of the fluid.","type":"string","optional":false},{"name":"percentage","order":1,"description":"The fill percentage the pipe (e.g. 0.5 for 50%). Can't be negative.","type":"double","optional":true},{"name":"temperature","order":2,"description":"The temperature of the fluid. Defaults to the default/minimum temperature of the fluid.","type":"double","optional":true}]}},{"name":"Ingredient","order":48,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"Amount of the item or fluid.","type":"double","optional":false},{"name":"catalyst_amount","order":3,"description":"How much of this ingredient is a catalyst.","type":{"complex_type":"union","options":["uint","double"],"full_format":false},"optional":true},{"name":"name","order":1,"description":"Prototype name of the required item or fluid.","type":"string","optional":false},{"name":"type","order":0,"description":"`\"item\"` or `\"fluid\"`.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"fluid","order":0,"parameters":[{"name":"maximum_temperature","order":1,"description":"The maximum fluid temperature allowed.","type":"double","optional":true},{"name":"minimum_temperature","order":0,"description":"The minimum fluid temperature required.","type":"double","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"InserterCircuitConditions","order":79,"description":"","type":{"complex_type":"table","parameters":[{"name":"circuit","order":0,"description":"","type":"CircuitCondition","optional":true},{"name":"logistics","order":1,"description":"","type":"CircuitCondition","optional":true}]}},{"name":"InventoryFilter","order":84,"description":"","type":{"complex_type":"table","parameters":[{"name":"index","order":0,"description":"Position of the corresponding filter slot.","type":"uint","optional":false},{"name":"name","order":1,"description":"Item prototype name of the item to filter.","type":"string","optional":false}]}},{"name":"ItemPrototypeFilter","order":151,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"tool\"`, `\"mergeable\"`, `\"item-with-inventory\"`, `\"selection-tool\"`, `\"item-with-label\"`, `\"has-rocket-launch-products\"`, `\"fuel\"`, `\"place-result\"`, `\"burnt-result\"`, `\"place-as-tile\"`, `\"placed-as-equipment-result\"`, `\"name\"`, `\"type\"`, `\"flag\"`, `\"subgroup\"`, `\"fuel-category\"`, `\"stack-size\"`, `\"default-request-amount\"`, `\"wire-count\"`, `\"fuel-value\"`, `\"fuel-acceleration-multiplier\"`, `\"fuel-top-speed-multiplier\"`, `\"fuel-emissions-multiplier\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"burnt-result","order":1,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the burnt result.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"default-request-amount","order":10,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"flag","order":6,"description":"","parameters":[{"name":"flag","order":0,"description":"One of the values in [ItemPrototypeFlags](ItemPrototypeFlags).","type":"string","optional":false}]},{"name":"fuel-acceleration-multiplier","order":13,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-category","order":8,"description":"","parameters":[{"name":"fuel-category","order":0,"description":"A [LuaFuelCategoryPrototype](LuaFuelCategoryPrototype) name","type":"string","optional":false}]},{"name":"fuel-emissions-multiplier","order":15,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-top-speed-multiplier","order":14,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-value","order":12,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"name","order":4,"description":"For use within nested filters such as the `has-product-item` filter of array[[RecipePrototypeFilter](RecipePrototypeFilter)]. To get a specific prototype by name, see [LuaGameScript::item_prototypes](LuaGameScript::item_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"place-as-tile","order":2,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the placed tile.","type":{"complex_type":"array","value":"TilePrototypeFilter"},"optional":true}]},{"name":"place-result","order":0,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the place result.","type":{"complex_type":"array","value":"EntityPrototypeFilter"},"optional":true}]},{"name":"placed-as-equipment-result","order":3,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the placed equipment.","type":{"complex_type":"array","value":"EquipmentPrototypeFilter"},"optional":true}]},{"name":"stack-size","order":9,"description":"Usage example: \n```\ngame.get_filtered_item_prototypes({{filter = \"stack-size\", comparison = \">\", value = 20}, {filter = \"stack-size\", comparison = \"<\", value = 100, mode = \"and\"}})\n```","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"subgroup","order":7,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](LuaGroup) (subgroup) name","type":"string","optional":false}]},{"name":"type","order":5,"description":"Usage example: \n```\ngame.get_filtered_item_prototypes({{filter = \"type\", type = \"armor\"}})\n```","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"wire-count","order":11,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ItemPrototypeFlags","order":112,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nBy default, none of these flags are set.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"draw-logistic-overlay","description":"Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default."},{"complex_type":"literal","value":"hidden","description":"Hides the item in the logistic requests and filters GUIs (among others)."},{"complex_type":"literal","value":"always-show","description":"Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked."},{"complex_type":"literal","value":"hide-from-bonus-gui","description":"Hides the item from the bonus GUI."},{"complex_type":"literal","value":"hide-from-fuel-tooltip","description":"Hides the item from the tooltip that's shown when hovering over a burner inventory."},{"complex_type":"literal","value":"not-stackable","description":"Prevents the item from being stacked. It also prevents the item from stacking in assembling machine input slots, which can otherwise exceed the item stack size if required by the recipe. Additionally, the item does not show an item count when in the cursor."},{"complex_type":"literal","value":"can-extend-inventory","description":"Makes the item act as an extension to the inventory that it is placed in. Only has an effect for items with inventory."},{"complex_type":"literal","value":"primary-place-result","description":"Makes construction bots prefer this item when building the entity specified by its `place_result`."},{"complex_type":"literal","value":"mod-openable","description":"Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items."},{"complex_type":"literal","value":"only-in-cursor","description":"Makes it so the item is deleted when clearing the cursor, instead of being put into the player's inventory. The copy-paste tools use this by default, for example."},{"complex_type":"literal","value":"spawnable","description":"Allows the item to be spawned by a quickbar shortcut or custom input."}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"ItemPrototypeIdentification","order":99,"description":"An item prototype may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaItemStack","description":"The item."},{"complex_type":"type","value":"LuaItemPrototype","description":"The item prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"ItemStackDefinition","order":90,"description":"","type":{"complex_type":"table","parameters":[{"name":"ammo","order":4,"description":"Amount of ammo in the ammo items in the stack.","type":"double","optional":true},{"name":"count","order":1,"description":"Number of items the stack holds. If not specified, defaults to `1`.","type":"uint","optional":true},{"name":"durability","order":3,"description":"Durability of the tool items in the stack.","type":"double","optional":true},{"name":"health","order":2,"description":"Health of the items in the stack. Defaults to `1.0`.","type":"float","optional":true},{"name":"name","order":0,"description":"Prototype name of the item the stack holds.","type":"string","optional":false},{"name":"tags","order":5,"description":"Tags of the items with tags in the stack.","type":{"complex_type":"array","value":"string"},"optional":true}]}},{"name":"ItemStackIdentification","order":97,"description":"An item may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"SimpleItemStack","description":""},{"complex_type":"type","value":"LuaItemStack","description":""}],"full_format":true}},{"name":"ItemStackLocation","order":147,"description":"","type":{"complex_type":"table","parameters":[{"name":"inventory","order":0,"description":"","type":"defines.inventory","optional":false},{"name":"slot","order":1,"description":"","type":"uint","optional":false}]}},{"name":"LocalisedString","order":0,"description":"Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.\n\nThe key identifies the string template. For example, `\"gui-alert-tooltip.attack\"` (for the template `\"__1__\n    objects are being damaged\"`; see the file `data/core/locale/en.cfg`).\n\nThe template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters.\n\nAs a special case, when the key is just the empty string, all the parameters will be concatenated (after processing, if any are localised strings). If there is only one parameter, it will be used as is.\n\nFurthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number, boolean or `nil`, which will be converted to their textual representation.","examples":["In the English translation, this will print `\"No ammo\"`; in the Czech translation, it will print `\"Bez munice\"`: \n```\ngame.player.print({\"description.no-ammo\"})\n```\n The `description.no-ammo` template contains no placeholders, so no further parameters are necessary.","In the English translation, this will print `\"Durability: 5/9\"`; in the Japanese one, it will print `\"\u8010\u4e45\u5ea6: 5/9\"`: \n```\ngame.player.print({\"description.durability\", 5, 9})\n```","This will print `\"hello\"` in all translations: \n```\ngame.player.print({\"\", \"hello\"})\n```","This will print `\"Iron plate: 60\"` in the English translation and `\"Eisenplatte: 60\"` in the German translation. \n```\ngame.print({\"\", {\"item-name.iron-plate\"}, \": \", 60})\n```"],"type":{"complex_type":"union","options":["string","number","boolean","LuaObject","nil",{"complex_type":"array","value":{"complex_type":"union","options":["string","LocalisedString"],"full_format":false}}],"full_format":false}},{"name":"LogisticFilter","order":126,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":2,"description":"The count for this filter.","type":"uint","optional":false},{"name":"index","order":0,"description":"The index this filter applies to.","type":"uint","optional":false},{"name":"name","order":1,"description":"The item name for this filter.","type":"string","optional":false}]}},{"name":"LogisticParameters","order":2,"description":"","type":{"complex_type":"table","parameters":[{"name":"max","order":2,"description":"","type":"uint","optional":true},{"name":"min","order":1,"description":"","type":"uint","optional":true},{"name":"name","order":0,"description":"The item. `nil` clears the filter.","type":"string","optional":true}]}},{"name":"Loot","order":50,"description":"","type":{"complex_type":"table","parameters":[{"name":"count_max","order":3,"description":"Maximum amount of loot to drop.","type":"double","optional":false},{"name":"count_min","order":2,"description":"Minimum amount of loot to drop.","type":"double","optional":false},{"name":"item","order":0,"description":"Item prototype name of the result.","type":"string","optional":false},{"name":"probability","order":1,"description":"Probability that any loot at all will drop, as a number in range [0, 1].","type":"double","optional":false}]}},{"name":"LuaEntityClonedEventFilter","order":172,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDamagedEventFilter","order":181,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`, `\"original-damage-amount\"`, `\"final-damage-amount\"`, `\"damage-type\"`, `\"final-health\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"damage-type","order":6,"description":"","parameters":[{"name":"type","order":0,"description":"A [LuaDamagePrototype](LuaDamagePrototype) name","type":"string","optional":false}]},{"name":"final-damage-amount","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"final-health","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"original-damage-amount","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDeconstructionCancelledEventFilter","order":178,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDiedEventFilter","order":163,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityMarkedForDeconstructionEventFilter","order":164,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityMarkedForUpgradeEventFilter","order":169,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerBuiltEntityEventFilter","order":179,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`, `\"force\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"force","order":4,"description":"","parameters":[{"name":"force","order":0,"description":"The entity force","type":"string","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerMinedEntityEventFilter","order":180,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerRepairedEntityEventFilter","order":168,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPostEntityDiedEventFilter","order":170,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. Can only be `\"type\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreGhostDeconstructedEventFilter","order":165,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreGhostUpgradedEventFilter","order":177,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPrePlayerMinedEntityEventFilter","order":175,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreRobotMinedEntityEventFilter","order":171,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaRobotBuiltEntityEventFilter","order":176,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`, `\"force\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"force","order":4,"description":"","parameters":[{"name":"force","order":0,"description":"The entity force","type":"string","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaRobotMinedEntityEventFilter","order":174,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedBuiltEventFilter","order":173,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedDestroyEventFilter","order":166,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedReviveEventFilter","order":162,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaSectorScannedEventFilter","order":182,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaUpgradeCancelledEventFilter","order":167,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"ghost\"`, `\"rail\"`, `\"rail-signal\"`, `\"rolling-stock\"`, `\"robot-with-logistics-interface\"`, `\"vehicle\"`, `\"turret\"`, `\"crafting-machine\"`, `\"wall-connectable\"`, `\"transport-belt-connectable\"`, `\"circuit-network-connectable\"`, `\"type\"`, `\"name\"`, `\"ghost_type\"`, `\"ghost_name\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"MapAndDifficultySettings","order":41,"description":"All regular [MapSettings](MapSettings) plus an additional table that contains the [DifficultySettings](DifficultySettings).","type":{"complex_type":"table","parameters":[{"name":"difficulty_settings","order":7,"description":"","type":"DifficultySettings","optional":false},{"name":"enemy_evolution","order":1,"description":"","type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","type":"EnemyExpansionMapSettings","optional":false},{"name":"max_failed_behavior_count","order":6,"description":"If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.","type":"uint","optional":false},{"name":"path_finder","order":5,"description":"","type":"PathFinderMapSettings","optional":false},{"name":"pollution","order":0,"description":"","type":"PollutionMapSettings","optional":false},{"name":"steering","order":4,"description":"","type":"SteeringMapSettings","optional":false},{"name":"unit_group","order":3,"description":"","type":"UnitGroupMapSettings","optional":false}]}},{"name":"MapExchangeStringData","order":42,"description":"The data that can be extracted from a map exchange string, as a plain table.","type":{"complex_type":"table","parameters":[{"name":"map_gen_settings","order":1,"description":"","type":"MapGenSettings","optional":false},{"name":"map_settings","order":0,"description":"","type":"MapAndDifficultySettings","optional":false}]}},{"name":"MapGenPreset","order":64,"description":"","type":{"complex_type":"table","parameters":[{"name":"advanced_settings","order":3,"description":"","type":"AdvancedMapGenSettings","optional":true},{"name":"basic_settings","order":2,"description":"","type":"MapGenSettings","optional":true},{"name":"default","order":1,"description":"Whether this is the preset that is selected by default.","type":"boolean","optional":true},{"name":"order","order":0,"description":"The string used to alphabetically sort the presets. It is a simple string that has no additional semantic meaning.","type":"string","optional":false}]}},{"name":"MapGenSettings","order":62,"description":"The 'map type' dropdown in the map generation GUI is actually a selector for elevation generator. The base game sets `property_expression_names.elevation` to `\"0_16-elevation\"` to reproduce terrain from 0.16 or to `\"0_17-island\"` for the island preset. If generators are available for other properties, the 'map type' dropdown in the GUI will be renamed to 'elevation' and shown along with selectors for the other selectable properties.","examples":["Assuming a NamedNoiseExpression with the name \"my-alternate-grass1-probability\" is defined \n```\nlocal surface = game.player.surface\nlocal mgs = surface.map_gen_settings\nmgs.property_expression_names[\"tile:grass1:probability\"] = \"my-alternate-grass1-probability\"\nsurface.map_gen_settings = mgs\n```\n would override the probability of grass1 being placed at any given point on the current surface.","To make there be no deep water on (newly generated chunks) a surface: \n```\nlocal surface = game.player.surface\nlocal mgs = surface.map_gen_settings\nmgs.property_expression_names[\"tile:deepwater:probability\"] = -1000\nsurface.map_gen_settings = mgs\n```\n This does not require a NamedNoiseExpression to be defined, since literal numbers (and strings naming literal numbers, e.g. `\"123\"`) are understood to stand for constant value expressions."],"type":{"complex_type":"table","parameters":[{"name":"autoplace_controls","order":2,"description":"Indexed by autoplace control prototype name.","type":{"complex_type":"dictionary","key":"string","value":"AutoplaceControl"},"optional":false},{"name":"autoplace_settings","order":4,"description":"Each setting in this dictionary maps the string type to the settings for that type. Valid types are `\"entity\"`, `\"tile\"` and `\"decorative\"`.","type":{"complex_type":"dictionary","key":"string","value":"AutoplaceSettings"},"optional":false},{"name":"cliff_settings","order":5,"description":"Map generation settings for entities of the type \"cliff\".","type":"CliffPlacementSettings","optional":false},{"name":"default_enable_all_autoplace_controls","order":3,"description":"Whether undefined `autoplace_controls` should fall back to the default controls or not. Defaults to `true`.","type":"boolean","optional":false},{"name":"height","order":8,"description":"Height in tiles. If `0`, the map has 'infinite' height, with the actual limitation being one million tiles in each direction from the center.","type":"uint","optional":false},{"name":"peaceful_mode","order":11,"description":"Whether peaceful mode is enabled for this map.","type":"boolean","optional":false},{"name":"property_expression_names","order":12,"description":"Overrides for tile property value generators. Values either name a NamedNoiseExpression or can be literal numbers, stored as strings (e.g. `\"5\"`). All other controls can be overridden by a property expression names. Notable properties: \n- `moisture` - a value between 0 and 1 that determines whether a tile becomes sandy (low moisture) or grassy (high moisture).\n- `aux` - a value between 0 and 1 that determines whether low-moisture tiles become sand or red desert.\n- `temperature` - provides a value (vaguely representing degrees Celsius, varying between -20 and 50) that is used (together with moisture and aux) as part of tree and decorative placement.\n- `elevation` - tiles values less than zero become water. Cliffs are placed along certain contours according to [CliffPlacementSettings](CliffPlacementSettings).\n- `cliffiness` - determines whether (when >0.5) or not (when <0.5) a cliff will be placed at an otherwise suitable (according to [CliffPlacementSettings](CliffPlacementSettings)) location.\n- `enemy-base-intensity` - a number that is referenced by both `enemy-base-frequency` and `enemy-base-radius`. i.e. if this is overridden, enemy base frequency and size will both be affected and do something reasonable. By default, this expression returns a value proportional to distance from any starting point, clamped at about 7.\n- `enemy-base-frequency` - a number representing average number of enemy bases per tile for a region, by default in terms of `enemy-base-intensity`.\n- `enemy-base-radius` - a number representing the radius of an enemy base, if one were to be placed on the given tile, by default proportional to a constant plus `enemy-base-intensity`. Climate controls ('Moisture' and 'Terrain type' at the bottom of the Terrain tab in the map generator GUI) don't have their own dedicated structures in MapGenSettings. Instead, their values are stored as property expression overrides with long names: \n- `control-setting:moisture:frequency:multiplier` - frequency (inverse of scale) multiplier for moisture noise. Default is 1.\n- `control-setting:moisture:bias` - global bias for moisture (which normally varies between 0 and 1). Default is 0.\n- `control-setting:aux:frequency:multiplier` - frequency (inverse of scale) multiplier for aux (called 'terrain type' in the GUI) noise. Default is 1.\n- `control-setting:aux:bias` - global bias for aux/terrain type (which normally varies between 0 and 1). Default is 0. All other MapGenSettings feed into named noise expressions, and therefore placement can be overridden by including the name of a property in this dictionary. The probability and richness functions for placing specific tiles, entities, and decoratives can be overridden by including an entry named `{tile|entity|decorative}:(prototype name):{probability|richness}`.","type":{"complex_type":"dictionary","key":"string","value":"string"},"optional":false},{"name":"seed","order":6,"description":"The random seed used to generated this map.","type":"uint","optional":false},{"name":"starting_area","order":9,"description":"Size of the starting area.","type":"MapGenSize","optional":false},{"name":"starting_points","order":10,"description":"Positions of the starting areas.","type":{"complex_type":"array","value":"MapPosition"},"optional":false},{"name":"terrain_segmentation","order":0,"description":"The inverse of 'water scale' in the map generator GUI. Lower `terrain_segmentation` increases the scale of elevation features (lakes, continents, etc). This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).","type":"MapGenSize","optional":false},{"name":"water","order":1,"description":"The equivalent to 'water coverage' in the map generator GUI. Specifically, when this value is non-zero, `water_level = 10 * log2` (the value of this field), and the elevation generator subtracts water level from elevation before adding starting lakes. If water is set to 'none', elevation is clamped to a small positive value before adding starting lakes. This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).","type":"MapGenSize","optional":false},{"name":"width","order":7,"description":"Width in tiles. If `0`, the map has 'infinite' width, with the actual limitation being one million tiles in each direction from the center.","type":"uint","optional":false}]}},{"name":"MapGenSize","order":58,"description":"A floating point number specifying an amount.\n\nFor backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number (when queried, a number will always be returned):","notes":["The map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected."],"type":{"complex_type":"union","options":[{"complex_type":"type","value":"float","description":"Specifying a map gen dimension."},{"complex_type":"literal","value":"none","description":"equivalent to `0`."},{"complex_type":"literal","value":"very-low","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"very-small","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"very-poor","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"low","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"small","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"poor","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"normal","description":"equivalent to `1`."},{"complex_type":"literal","value":"medium","description":"equivalent to `1`."},{"complex_type":"literal","value":"regular","description":"equivalent to `1`."},{"complex_type":"literal","value":"high","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"big","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"good","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"very-high","description":"equivalent to `2`."},{"complex_type":"literal","value":"very-big","description":"equivalent to `2`."},{"complex_type":"literal","value":"very-good","description":"equivalent to `2`."}],"full_format":true}},{"name":"MapPosition","order":4,"description":"Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements.\n\nThe coordinates are saved as a fixed-size 32 bit integer, with 8 bits reserved for decimal precision, meaning the smallest value step is `1/2^8 = 0.00390625` tiles.","examples":["Explicit definition: \n```\n{x = 5.5, y = 2}\n{y = 2.25, x = 5.125}\n```","Shorthand: \n```\n{1.625, 2.375}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"double","optional":false},{"name":"y","order":1,"description":"","type":"double","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"double","optional":false},{"name":"y","order":1,"description":"","type":"double","optional":false}]}],"full_format":false}},{"name":"MapSettings","order":39,"description":"Various game-related settings. Updating any of the attributes will immediately take effect in the game engine.","examples":["Increase the number of short paths the pathfinder can cache. \n```\ngame.map_settings.path_finder.short_cache_size = 15\n```"],"type":{"complex_type":"table","parameters":[{"name":"enemy_evolution","order":1,"description":"","type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","type":"EnemyExpansionMapSettings","optional":false},{"name":"max_failed_behavior_count","order":6,"description":"If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.","type":"uint","optional":false},{"name":"path_finder","order":5,"description":"","type":"PathFinderMapSettings","optional":false},{"name":"pollution","order":0,"description":"","type":"PollutionMapSettings","optional":false},{"name":"steering","order":4,"description":"","type":"SteeringMapSettings","optional":false},{"name":"unit_group","order":3,"description":"","type":"UnitGroupMapSettings","optional":false}]}},{"name":"MapViewSettings","order":31,"description":"What is shown in the map view. If a field is not given, that setting will not be changed.","type":{"complex_type":"table","parameters":[{"name":"show-electric-network","order":1,"description":"","type":"boolean","optional":true},{"name":"show-logistic-network","order":0,"description":"","type":"boolean","optional":true},{"name":"show-networkless-logistic-members","order":6,"description":"","type":"boolean","optional":true},{"name":"show-non-standard-map-info","order":7,"description":"","type":"boolean","optional":true},{"name":"show-player-names","order":5,"description":"","type":"boolean","optional":true},{"name":"show-pollution","order":3,"description":"","type":"boolean","optional":true},{"name":"show-train-station-names","order":4,"description":"","type":"boolean","optional":true},{"name":"show-turret-range","order":2,"description":"","type":"boolean","optional":true}]}},{"name":"ModChangeData","order":137,"description":"","type":{"complex_type":"table","parameters":[{"name":"new_version","order":1,"description":"New version of the mod. May be `nil` if the mod is no longer present (i.e. it was just removed).","type":"string","optional":false},{"name":"old_version","order":0,"description":"Old version of the mod. May be `nil` if the mod wasn't previously present (i.e. it was just added).","type":"string","optional":false}]}},{"name":"ModSetting","order":127,"description":"","notes":["Runtime settings can be changed through console commands and by the mod that owns the settings by writing a new table to the ModSetting."],"type":{"complex_type":"table","parameters":[{"name":"value","order":0,"description":"The value of the mod setting. The type depends on the kind of setting.","type":{"complex_type":"union","options":["int","double","boolean","string"],"full_format":false},"optional":false}]}},{"name":"ModSettingPrototypeFilter","order":152,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"type\"`, `\"mod\"`, `\"setting-type\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"mod","order":1,"description":"","parameters":[{"name":"mod","order":0,"description":"The mod name","type":"string","optional":false}]},{"name":"setting-type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The setting scope type (`\"startup\"`, `\"runtime-global\"`, or `\"runtime-per-user\"`)","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ModuleEffectValue","order":109,"description":"","type":{"complex_type":"table","parameters":[{"name":"bonus","order":0,"description":"The percentual increase of the attribute. A value of `0.6` means a 60% increase.","type":"float","optional":false}]}},{"name":"ModuleEffects","order":110,"description":"","examples":["These are the effects of the vanilla Productivity Module 3 (up to floating point imprecisions): \n```\n{consumption={bonus=0.6},\n speed={bonus=-0.15},\n productivity={bonus=0.06},\n pollution={bonus=0.075}}\n```"],"type":{"complex_type":"table","parameters":[{"name":"consumption","order":0,"description":"","type":"ModuleEffectValue","optional":true},{"name":"pollution","order":3,"description":"","type":"ModuleEffectValue","optional":true},{"name":"productivity","order":2,"description":"","type":"ModuleEffectValue","optional":true},{"name":"speed","order":1,"description":"","type":"ModuleEffectValue","optional":true}]}},{"name":"MouseButtonFlags","order":142,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nTo write to this, use an array[[string](string)] of the mouse buttons that should be possible to use with on button. The flag `\"left-and-right\"` can also be set, which will set `\"left\"` and `\"right\"` to `true`.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"left","description":""},{"complex_type":"literal","value":"right","description":""},{"complex_type":"literal","value":"middle","description":""},{"complex_type":"literal","value":"button-4","description":""},{"complex_type":"literal","value":"button-5","description":""},{"complex_type":"literal","value":"button-6","description":""},{"complex_type":"literal","value":"button-7","description":""},{"complex_type":"literal","value":"button-8","description":""},{"complex_type":"literal","value":"button-9","description":""}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"NoiseExpression","order":54,"description":"A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation. These can only be meaningfully written/modified during the data load phase. More detailed information is found on the [wiki](https://wiki.factorio.com/Types/NoiseExpression).","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Names the type of the expression and determines what other fields are required.","type":"string","optional":false}]}},{"name":"NthTickEventData","order":136,"description":"","type":{"complex_type":"table","parameters":[{"name":"nth_tick","order":1,"description":"The nth tick this handler was registered to.","type":"uint","optional":false},{"name":"tick","order":0,"description":"The tick during which the event happened.","type":"uint","optional":false}]}},{"name":"Offer","order":52,"description":"A single offer on a market entity.","type":{"complex_type":"table","parameters":[{"name":"offer","order":1,"description":"The action that will take place when a player accepts the offer. Usually a `\"give-item\"` modifier.","type":"TechnologyModifier","optional":false},{"name":"price","order":0,"description":"List of prices.","type":{"complex_type":"array","value":"Ingredient"},"optional":false}]}},{"name":"OldTileAndPosition","order":13,"description":"","type":{"complex_type":"table","parameters":[{"name":"old_tile","order":0,"description":"","type":"LuaTilePrototype","optional":false},{"name":"position","order":1,"description":"","type":"TilePosition","optional":false}]}},{"name":"PathFinderMapSettings","order":38,"description":"","type":{"complex_type":"table","parameters":[{"name":"cache_accept_path_end_distance_ratio","order":12,"description":"When looking for a path from cache, make sure it doesn't end too far from the requested end in relative terms. This is typically more lenient than the start ratio since the end target could be moving. Defaults to `0.15`.","type":"double","optional":false},{"name":"cache_accept_path_start_distance_ratio","order":11,"description":"When looking for a path from cache, make sure it doesn't start too far from the requested start in relative terms. Defaults to `0.2`.","type":"double","optional":false},{"name":"cache_max_connect_to_cache_steps_multiplier","order":10,"description":"When looking for a connection to a cached path, search at most for this number of steps times the original estimate. Defaults to `100`.","type":"uint","optional":false},{"name":"cache_path_end_distance_rating_multiplier","order":16,"description":"When assigning a rating to the best path, this multiplier times end distances is considered. This value is typically higher than the start multiplier as this results in better end path quality. Defaults to `20`.","type":"double","optional":false},{"name":"cache_path_start_distance_rating_multiplier","order":15,"description":"When assigning a rating to the best path, this multiplier times start distances is considered. Defaults to `10`.","type":"double","optional":false},{"name":"direct_distance_to_consider_short_request","order":25,"description":"The maximum direct distance in tiles before a request is no longer considered short. Defaults to `100`.","type":"uint","optional":false},{"name":"enemy_with_different_destination_collision_penalty","order":19,"description":"A penalty that is applied for another unit that is too close and either not moving or has a different goal. Defaults to `30`.","type":"double","optional":false},{"name":"extended_collision_penalty","order":22,"description":"The collision penalty for collisions in the extended bounding box but outside the entity's actual bounding box. Defaults to `3`.","type":"double","optional":false},{"name":"fwd2bwd_ratio","order":0,"description":"The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`.","type":"uint","optional":false},{"name":"general_entity_collision_penalty","order":20,"description":"The general collision penalty with other units. Defaults to `10`.","type":"double","optional":false},{"name":"general_entity_subsequent_collision_penalty","order":21,"description":"The collision penalty for positions that require the destruction of an entity to get to. Defaults to `3`.","type":"double","optional":false},{"name":"goal_pressure_ratio","order":1,"description":"When looking at which node to check next, their heuristic value is multiplied by this ratio. The higher it is, the more the search is directed straight at the goal. Defaults to `2`.","type":"double","optional":false},{"name":"ignore_moving_enemy_collision_distance","order":18,"description":"The distance in tiles after which other moving units are not considered for pathfinding. Defaults to `5`.","type":"double","optional":false},{"name":"long_cache_min_cacheable_distance","order":9,"description":"The minimal distance to the goal in tiles required to be searched in the long path cache. Defaults to `30`.","type":"double","optional":false},{"name":"long_cache_size","order":6,"description":"Number of elements in the long cache. Defaults to `25`.","type":"uint","optional":false},{"name":"max_clients_to_accept_any_new_request","order":23,"description":"The amount of path finder requests accepted per tick regardless of the requested path's length. Defaults to `10`.","type":"uint","optional":false},{"name":"max_clients_to_accept_short_new_request","order":24,"description":"When the `max_clients_to_accept_any_new_request` amount is exhausted, only path finder requests with a short estimate will be accepted until this amount (per tick) is reached. Defaults to `100`.","type":"uint","optional":false},{"name":"max_steps_worked_per_tick","order":2,"description":"The maximum number of nodes that are expanded per tick. Defaults to `1,000`.","type":"double","optional":false},{"name":"max_work_done_per_tick","order":3,"description":"The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8,000`.","type":"uint","optional":false},{"name":"min_steps_to_check_path_find_termination","order":28,"description":"The minimum amount of steps that are guaranteed to be performed for every request. Defaults to `2000`.","type":"uint","optional":false},{"name":"negative_cache_accept_path_end_distance_ratio","order":14,"description":"Same principle as `cache_accept_path_end_distance_ratio`, but used for negative cache queries. Defaults to `0.3`.","type":"double","optional":false},{"name":"negative_cache_accept_path_start_distance_ratio","order":13,"description":"Same principle as `cache_accept_path_start_distance_ratio`, but used for negative cache queries. Defaults to `0.3`.","type":"double","optional":false},{"name":"negative_path_cache_delay_interval","order":32,"description":"The delay in ticks between decrementing the score of all paths in the negative cache by one. Defaults to `20`.","type":"uint","optional":false},{"name":"overload_levels","order":30,"description":"The thresholds of waiting clients after each of which the per-tick work limit will be increased by the corresponding value in `overload_multipliers`. This is to avoid clients having to wait too long. Must have the same number of elements as `overload_multipliers`. Defaults to `{0, 100, 500}`.","type":{"complex_type":"array","value":"uint"},"optional":false},{"name":"overload_multipliers","order":31,"description":"The multipliers to the amount of per-tick work applied after the corresponding thresholds in `overload_levels` have been reached. Must have the same number of elements as `overload_multipliers`. Defaults to `{2, 3, 4}`.","type":{"complex_type":"array","value":"double"},"optional":false},{"name":"short_cache_min_algo_steps_to_cache","order":8,"description":"The minimal number of nodes required to be searched in the short path cache. Defaults to `50`.","type":"uint","optional":false},{"name":"short_cache_min_cacheable_distance","order":7,"description":"The minimal distance to the goal in tiles required to be searched in the short path cache. Defaults to `10`.","type":"double","optional":false},{"name":"short_cache_size","order":5,"description":"Number of elements in the short cache. Defaults to `5`.","type":"uint","optional":false},{"name":"short_request_max_steps","order":26,"description":"The maximum amount of nodes a short request will traverse before being rescheduled as a long request. Defaults to `1000`.","type":"uint","optional":false},{"name":"short_request_ratio","order":27,"description":"The amount of steps that are allocated to short requests each tick, as a percentage of all available steps. Defaults to `0.5`, or 50%.","type":"double","optional":false},{"name":"stale_enemy_with_same_destination_collision_penalty","order":17,"description":"A penalty that is applied for another unit that is on the way to the goal. This is mainly relevant for situations where a group of units has arrived at the target they are supposed to attack, making units further back circle around to reach the target. Defaults to `30`.","type":"double","optional":false},{"name":"start_to_goal_cost_multiplier_to_terminate_path_find","order":29,"description":"If the actual amount of steps is higher than the initial estimate by this factor, pathfinding is terminated. Defaults to `2000.0`.","type":"double","optional":false},{"name":"use_path_cache","order":4,"description":"Whether to cache paths at all. Defaults to `true`.","type":"boolean","optional":false}]}},{"name":"PathfinderFlags","order":87,"description":"","type":{"complex_type":"table","parameters":[{"name":"allow_destroy_friendly_entities","order":0,"description":"Allows pathing through friendly entities. Defaults to `false`.","type":"boolean","optional":true},{"name":"allow_paths_through_own_entities","order":1,"description":"Allows the pathfinder to path through entities of the same force. Defaults to `false`.","type":"boolean","optional":true},{"name":"cache","order":2,"description":"Enables path caching. This can be more efficient, but might fail to respond to changes in the environment. Defaults to `true`.","type":"boolean","optional":true},{"name":"low_priority","order":4,"description":"Sets lower priority on the path request, meaning it might take longer to find a path at the expense of speeding up others. Defaults to `false`.","type":"boolean","optional":true},{"name":"no_break","order":5,"description":"Makes the pathfinder not break in the middle of processing this pathfind, no matter how much work is needed. Defaults to `false`.","type":"boolean","optional":true},{"name":"prefer_straight_paths","order":3,"description":"Makes the pathfinder try to path in straight lines. Defaults to `false`.","type":"boolean","optional":true}]}},{"name":"PathfinderWaypoint","order":25,"description":"","type":{"complex_type":"table","parameters":[{"name":"needs_destroy_to_reach","order":1,"description":"`true` if the path from the previous waypoint to this one goes through an entity that must be destroyed.","type":"boolean","optional":false},{"name":"position","order":0,"description":"The position of the waypoint on its surface.","type":"MapPosition","optional":false}]}},{"name":"PlaceAsTileResult","order":85,"description":"","type":{"complex_type":"table","parameters":[{"name":"condition","order":2,"description":"","type":"CollisionMask","optional":false},{"name":"condition_size","order":1,"description":"","type":"uint","optional":false},{"name":"result","order":0,"description":"The tile prototype.","type":"LuaTilePrototype","optional":false}]}},{"name":"PlayerIdentification","order":96,"description":"A player may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"uint","description":"The player index."},{"complex_type":"type","value":"string","description":"The player name."},{"complex_type":"type","value":"LuaPlayer","description":"A reference to [LuaPlayer](LuaPlayer) may be passed directly."}],"full_format":true}},{"name":"PollutionMapSettings","order":32,"description":"These values are for the time frame of one second (60 ticks).","type":{"complex_type":"table","parameters":[{"name":"ageing","order":3,"description":"The amount of pollution eaten by a chunk's tiles as a percentage of 1. Defaults to `1`.","type":"double","optional":false},{"name":"diffusion_ratio","order":1,"description":"The amount that is diffused to a neighboring chunk (possibly repeated for other directions as well). Defaults to `0.02`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether pollution is enabled at all.","type":"boolean","optional":false},{"name":"enemy_attack_pollution_consumption_modifier","order":11,"description":"Defaults to `1`.","type":"double","optional":false},{"name":"expected_max_per_chunk","order":4,"description":"Any amount of pollution larger than this value is visualized as this value instead. Defaults to `150`.","type":"double","optional":false},{"name":"max_pollution_to_restore_trees","order":10,"description":"Defaults to `20`.","type":"double","optional":false},{"name":"min_pollution_to_damage_trees","order":6,"description":"Defaults to `60`.","type":"double","optional":false},{"name":"min_to_diffuse","order":2,"description":"The amount of PUs that need to be in a chunk for it to start diffusing. Defaults to `15`.","type":"double","optional":false},{"name":"min_to_show_per_chunk","order":5,"description":"Any amount of pollution smaller than this value (but bigger than zero) is visualized as this value instead. Defaults to `50`.","type":"double","optional":false},{"name":"pollution_per_tree_damage","order":8,"description":"Defaults to `50`.","type":"double","optional":false},{"name":"pollution_restored_per_tree_damage","order":9,"description":"Defaults to `10`.","type":"double","optional":false},{"name":"pollution_with_max_forest_damage","order":7,"description":"Defaults to `150`.","type":"double","optional":false}]}},{"name":"Product","order":49,"description":"","examples":["Products of the \"steel-chest\" recipe (an array of Product): \n```\n{{type=\"item\", name=\"steel-chest\", amount=1}}\n```","Products of the \"advanced-oil-processing\" recipe: \n```\n{{type=\"fluid\", name=\"heavy-oil\", amount=1},\n {type=\"fluid\", name=\"light-oil\", amount=4.5},\n {type=\"fluid\", name=\"petroleum-gas\", amount=5.5}}\n```","What a custom recipe would look like that had a probability of 0.5 to return a minimum amount of 1 and a maximum amount of 5: \n```\n{{type=\"item\", name=\"custom-item\", probability=0.5, amount_min=1, amount_max=5}}\n```"],"type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"Amount of the item or fluid to give. If not specified, `amount_min`, `amount_max` and `probability` must all be specified.","type":"double","optional":true},{"name":"amount_max","order":4,"description":"Maximum amount of the item or fluid to give. Has no effect when `amount` is specified.","type":{"complex_type":"union","options":["uint","double"],"full_format":false},"optional":true},{"name":"amount_min","order":3,"description":"Minimal amount of the item or fluid to give. Has no effect when `amount` is specified.","type":{"complex_type":"union","options":["uint","double"],"full_format":false},"optional":true},{"name":"catalyst_amount","order":6,"description":"How much of this product is a catalyst.","type":{"complex_type":"union","options":["uint","double"],"full_format":false},"optional":true},{"name":"name","order":1,"description":"Prototype name of the result.","type":"string","optional":false},{"name":"probability","order":5,"description":"A value in range [0, 1]. Item or fluid is only given with this probability; otherwise no product is produced.","type":"double","optional":true},{"name":"type","order":0,"description":"`\"item\"` or `\"fluid\"`.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"fluid","order":0,"parameters":[{"name":"temperature","order":0,"description":"The fluid temperature of this product.","type":"double","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"ProgrammableSpeakerAlertParameters","order":131,"description":"","type":{"complex_type":"table","parameters":[{"name":"alert_message","order":3,"description":"","type":"string","optional":false},{"name":"icon_signal_id","order":2,"description":"","type":"SignalID","optional":false},{"name":"show_alert","order":0,"description":"","type":"boolean","optional":false},{"name":"show_on_map","order":1,"description":"","type":"boolean","optional":false}]}},{"name":"ProgrammableSpeakerCircuitParameters","order":132,"description":"","type":{"complex_type":"table","parameters":[{"name":"instrument_id","order":1,"description":"","type":"uint","optional":false},{"name":"note_id","order":2,"description":"","type":"uint","optional":false},{"name":"signal_value_is_pitch","order":0,"description":"","type":"boolean","optional":false}]}},{"name":"ProgrammableSpeakerInstrument","order":133,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":false},{"name":"notes","order":1,"description":"","type":{"complex_type":"array","value":"string"},"optional":false}]}},{"name":"ProgrammableSpeakerParameters","order":130,"description":"","type":{"complex_type":"table","parameters":[{"name":"allow_polyphony","order":2,"description":"","type":"boolean","optional":false},{"name":"playback_globally","order":1,"description":"","type":"boolean","optional":false},{"name":"playback_volume","order":0,"description":"","type":"double","optional":false}]}},{"name":"PrototypeFilter","order":150,"description":"Types `\"signal\"` and `\"item-group\"` do not support filters.","notes":["Filters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed."],"type":{"complex_type":"array","value":{"complex_type":"union","options":[{"complex_type":"type","value":"ItemPrototypeFilter","description":"for type `\"item\"`"},{"complex_type":"type","value":"TilePrototypeFilter","description":"for type `\"tile\"`"},{"complex_type":"type","value":"EntityPrototypeFilter","description":"for type `\"entity\"`"},{"complex_type":"type","value":"FluidPrototypeFilter","description":"for type `\"fluid\"`"},{"complex_type":"type","value":"RecipePrototypeFilter","description":"for type `\"recipe\"`"},{"complex_type":"type","value":"DecorativePrototypeFilter","description":"for type `\"decorative\"`"},{"complex_type":"type","value":"AchievementPrototypeFilter","description":"for type `\"achievement\"`"},{"complex_type":"type","value":"EquipmentPrototypeFilter","description":"for type `\"equipment\"`"},{"complex_type":"type","value":"TechnologyPrototypeFilter","description":"for type `\"technology\"`"}],"full_format":true}}},{"name":"RealOrientation","order":3,"description":"The smooth orientation. It is a [float](float) in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates \"north\", a value of `0.5` indicates \"south\".\n\nFor example then, a value of `0.625` would indicate \"south-west\", and a value of `0.875` would indicate \"north-west\".","type":"float"},{"name":"RecipePrototypeFilter","order":159,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"enabled\"`, `\"hidden\"`, `\"hidden-from-flow-stats\"`, `\"hidden-from-player-crafting\"`, `\"allow-as-intermediate\"`, `\"allow-intermediates\"`, `\"allow-decomposition\"`, `\"always-show-made-in\"`, `\"always-show-products\"`, `\"show-amount-in-title\"`, `\"has-ingredients\"`, `\"has-products\"`, `\"has-ingredient-item\"`, `\"has-ingredient-fluid\"`, `\"has-product-item\"`, `\"has-product-fluid\"`, `\"subgroup\"`, `\"category\"`, `\"energy\"`, `\"emissions-multiplier\"`, `\"request-paste-multiplier\"`, `\"overload-multiplier\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"category","order":5,"description":"","parameters":[{"name":"category","order":0,"description":"A [LuaRecipeCategoryPrototype](LuaRecipeCategoryPrototype) name","type":"string","optional":false}]},{"name":"emissions-multiplier","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"energy","order":6,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"has-ingredient-fluid","order":1,"description":"Usage example: \n```\n-- selects recipes that consume sulfuric acid\n{{filter = \"has-ingredient-fluid\", elem_filters = {{filter = \"name\", name = \"sulfuric-acid\"}}}}\n```","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 ingredient is a fluid that matches these filters.","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":true}]},{"name":"has-ingredient-item","order":0,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 ingredient is an item that matches these filters.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"has-product-fluid","order":3,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 product is a fluid that matches these filters.","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":true}]},{"name":"has-product-item","order":2,"description":"Usage example: \n```\n-- selects recipes that produce an item\n{{filter = \"has-product-item\"}}\n-- selects recipes that produce iron plates\n{{filter = \"has-product-item\", elem_filters = {{filter = \"name\", name = \"iron-plate\"}}}}\n-- selects recipes that produce items that place furnaces\n{{filter = \"has-product-item\", elem_filters = {{filter = \"place-result\", elem_filters = {{filter = \"type\", type = \"furnace\"}}}}}}\n```","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 product is an item that matches these filters.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"overload-multiplier","order":9,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"request-paste-multiplier","order":8,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"subgroup","order":4,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](LuaGroup) (subgroup) name","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"RenderLayer","order":145,"description":"A number between 0 and 255 inclusive, represented by one of the following named strings or the string version of the number. For example `\"27\"` and `\"decals\"` are both valid. Higher values are rendered above lower values.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"A string of a number"},{"complex_type":"literal","value":"water-tile","description":"15"},{"complex_type":"literal","value":"ground-tile","description":"25"},{"complex_type":"literal","value":"tile-transition","description":"26"},{"complex_type":"literal","value":"decals","description":"27"},{"complex_type":"literal","value":"lower-radius-visualization","description":"29"},{"complex_type":"literal","value":"radius-visualization","description":"30"},{"complex_type":"literal","value":"transport-belt-integration","description":"65"},{"complex_type":"literal","value":"resource","description":"66"},{"complex_type":"literal","value":"building-smoke","description":"67"},{"complex_type":"literal","value":"decorative","description":"92"},{"complex_type":"literal","value":"ground-patch","description":"93"},{"complex_type":"literal","value":"ground-patch-higher","description":"94"},{"complex_type":"literal","value":"ground-patch-higher2","description":"95"},{"complex_type":"literal","value":"remnants","description":"112"},{"complex_type":"literal","value":"floor","description":"113"},{"complex_type":"literal","value":"transport-belt","description":"114"},{"complex_type":"literal","value":"transport-belt-endings","description":"115"},{"complex_type":"literal","value":"floor-mechanics-under-corpse","description":"120"},{"complex_type":"literal","value":"corpse","description":"121"},{"complex_type":"literal","value":"floor-mechanics","description":"122"},{"complex_type":"literal","value":"item","description":"123"},{"complex_type":"literal","value":"lower-object","description":"124"},{"complex_type":"literal","value":"transport-belt-circuit-connector","description":"126"},{"complex_type":"literal","value":"lower-object-above-shadow","description":"127"},{"complex_type":"literal","value":"object","description":"129"},{"complex_type":"literal","value":"higher-object-under","description":"131"},{"complex_type":"literal","value":"higher-object-above","description":"132"},{"complex_type":"literal","value":"item-in-inserter-hand","description":"134"},{"complex_type":"literal","value":"wires","description":"135"},{"complex_type":"literal","value":"wires-above","description":"136"},{"complex_type":"literal","value":"entity-info-icon","description":"138"},{"complex_type":"literal","value":"entity-info-icon-above","description":"139"},{"complex_type":"literal","value":"explosion","description":"142"},{"complex_type":"literal","value":"projectile","description":"143"},{"complex_type":"literal","value":"smoke","description":"144"},{"complex_type":"literal","value":"air-object","description":"145"},{"complex_type":"literal","value":"air-entity-info-icon","description":"147"},{"complex_type":"literal","value":"light-effect","description":"148"},{"complex_type":"literal","value":"selection-box","description":"187"},{"complex_type":"literal","value":"higher-selection-box","description":"188"},{"complex_type":"literal","value":"collision-selection-box","description":"189"},{"complex_type":"literal","value":"arrow","description":"190"},{"complex_type":"literal","value":"cursor","description":"210"}],"full_format":true}},{"name":"Resistance","order":57,"description":"","type":{"complex_type":"table","parameters":[{"name":"decrease","order":0,"description":"Absolute damage decrease","type":"float","optional":false},{"name":"percent","order":1,"description":"Percentual damage decrease","type":"float","optional":false}]}},{"name":"RidingState","order":106,"description":"","type":{"complex_type":"table","parameters":[{"name":"acceleration","order":0,"description":"","type":"defines.riding.acceleration","optional":false},{"name":"direction","order":1,"description":"","type":"defines.riding.direction","optional":false}]}},{"name":"ScriptArea","order":18,"description":"An area defined using the map editor.","type":{"complex_type":"table","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":false},{"name":"color","order":2,"description":"","type":"Color","optional":false},{"name":"id","order":3,"description":"","type":"uint","optional":false},{"name":"name","order":1,"description":"","type":"string","optional":false}]}},{"name":"ScriptPosition","order":19,"description":"A position defined using the map editor.","type":{"complex_type":"table","parameters":[{"name":"color","order":2,"description":"","type":"Color","optional":false},{"name":"id","order":3,"description":"","type":"uint","optional":false},{"name":"name","order":1,"description":"","type":"string","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}},{"name":"ScriptRenderTarget","order":141,"description":"","type":{"complex_type":"table","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"entity_offset","order":1,"description":"","type":"Vector","optional":true},{"name":"position","order":2,"description":"","type":"MapPosition","optional":true}]}},{"name":"ScriptRenderVertexTarget","order":24,"description":"One vertex of a ScriptRenderPolygon.","type":{"complex_type":"table","parameters":[{"name":"target","order":0,"description":"","type":{"complex_type":"union","options":["MapPosition","LuaEntity"],"full_format":false},"optional":false},{"name":"target_offset","order":1,"description":"Only used if `target` is a LuaEntity.","type":"Vector","optional":true}]}},{"name":"SelectedPrototypeData","order":140,"description":"","type":{"complex_type":"table","parameters":[{"name":"base_type","order":0,"description":"E.g. `\"entity\"`.","type":"string","optional":false},{"name":"derived_type","order":1,"description":"E.g. `\"tree\"`.","type":"string","optional":false},{"name":"name","order":2,"description":"E.g. `\"tree-05\"`.","type":"string","optional":false}]}},{"name":"SelectionModeFlags","order":125,"description":"A set of flags on a selection tool that define how entities and tiles are selected. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"blueprint","description":"Selects entities and tiles as if selecting them for a blueprint."},{"complex_type":"literal","value":"deconstruct","description":"Selects entities and tiles as if selecting them for deconstruction."},{"complex_type":"literal","value":"cancel-deconstruct","description":"Selects entities and tiles as if selecting them for deconstruction cancellation."},{"complex_type":"literal","value":"items","description":"Selects items on the ground."},{"complex_type":"literal","value":"trees","description":"Selects trees."},{"complex_type":"literal","value":"buildable-type","description":"Selects entities which are considered a [building](LuaEntityPrototype::is_building), plus landmines."},{"complex_type":"literal","value":"nothing","description":"Selects no entities or tiles, but is useful to select an area."},{"complex_type":"literal","value":"items-to-place","description":"Selects entities and tiles that can be [built by an item](LuaItemPrototype::place_result)."},{"complex_type":"literal","value":"any-entity","description":"Selects all entities."},{"complex_type":"literal","value":"any-tile","description":"Selects all tiles."},{"complex_type":"literal","value":"same-force","description":"Selects entities with the same force as the selecting player."},{"complex_type":"literal","value":"not-same-force","description":"Selects entities with a different force as the selecting player."},{"complex_type":"literal","value":"friend","description":"Selects entities from a [friendly](LuaForce::is_friend) force."},{"complex_type":"literal","value":"enemy","description":"Selects entities from an [enemy](LuaForce::is_enemy) force."},{"complex_type":"literal","value":"upgrade","description":"Selects entities as if selecting them for upgrading."},{"complex_type":"literal","value":"cancel-upgrade","description":"Selects entities as if selecting them for upgrade cancellation."},{"complex_type":"literal","value":"downgrade","description":"Selects entities as if selecting them for downgrading."},{"complex_type":"literal","value":"entity-with-health","description":"Selects entities that are [entities with health](LuaEntity::is_entity_with_health)."},{"complex_type":"literal","value":"entity-with-force","description":"Deprecated. Replaced by `is-military-target`."},{"complex_type":"literal","value":"is-military-target","description":"Selects entities that are [military targets](LuaEntity::is_military_target)."},{"complex_type":"literal","value":"entity-with-owner","description":"Selects entities that are [entities with owner](LuaEntity::is_entity_with_owner)."},{"complex_type":"literal","value":"avoid-rolling-stock","description":"Selects entities that are not `rolling-stocks`."}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"Signal","order":66,"description":"An actual signal transmitted by the network.","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"Value of the signal.","type":"int","optional":false},{"name":"signal","order":0,"description":"ID of the signal.","type":"SignalID","optional":false}]}},{"name":"SignalID","order":65,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"Name of the item, fluid or virtual signal.","type":"string","optional":true},{"name":"type","order":0,"description":"`\"item\"`, `\"fluid\"`, or `\"virtual\"`.","type":"string","optional":false}]}},{"name":"SimpleItemStack","order":91,"description":"An item stack may be specified in one of two ways.","examples":["Both of these lines specify an item stack of one iron plate: \n```\n{name=\"iron-plate\"}\n```\n \n```\n{name=\"iron-plate\", count=1}\n```","This is a stack of 47 copper plates: \n```\n{name=\"copper-plate\", count=47}\n```","These are both full stacks of iron plates (for iron-plate, a full stack is 100 plates): \n```\n\"iron-plate\"\n```\n \n```\n{name=\"iron-plate\", count=100}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The name of the item, which represents a full stack of that item."},{"complex_type":"type","value":"ItemStackDefinition","description":"The detailed definition of an item stack."}],"full_format":true}},{"name":"SmokeSource","order":15,"description":"","notes":["The vectors for all 5 position attributes are a table with `x` and `y` keys instead of an array."],"type":{"complex_type":"table","parameters":[{"name":"deviation","order":8,"description":"","type":"MapPosition","optional":true},{"name":"east_position","order":5,"description":"","type":"Vector","optional":true},{"name":"frequency","order":1,"description":"","type":"double","optional":false},{"name":"height","order":14,"description":"","type":"float","optional":false},{"name":"height_deviation","order":15,"description":"","type":"float","optional":false},{"name":"name","order":0,"description":"","type":"string","optional":false},{"name":"north_position","order":4,"description":"","type":"Vector","optional":true},{"name":"offset","order":2,"description":"","type":"double","optional":false},{"name":"position","order":3,"description":"","type":"Vector","optional":true},{"name":"slow_down_factor","order":13,"description":"","type":"uint8","optional":false},{"name":"south_position","order":6,"description":"","type":"Vector","optional":true},{"name":"starting_frame","order":11,"description":"","type":"uint16","optional":false},{"name":"starting_frame_deviation","order":12,"description":"","type":"double","optional":false},{"name":"starting_frame_speed","order":9,"description":"","type":"uint16","optional":false},{"name":"starting_frame_speed_deviation","order":10,"description":"","type":"double","optional":false},{"name":"starting_vertical_speed","order":16,"description":"","type":"float","optional":false},{"name":"starting_vertical_speed_deviation","order":17,"description":"","type":"float","optional":false},{"name":"vertical_speed_slowdown","order":18,"description":"","type":"float","optional":false},{"name":"west_position","order":7,"description":"","type":"Vector","optional":true}]}},{"name":"SoundPath","order":108,"description":"It can be either the name of a [sound prototype](https://wiki.factorio.com/Prototype/Sound) defined in the data stage, or a path in the form `\"type/name\"`. The latter option can be sorted into three categories.\n\nThe validity of a SoundPath can be verified at runtime using [LuaGameScript::is_valid_sound_path](LuaGameScript::is_valid_sound_path).\n\nThe utility and ambient types each contain general use sound prototypes defined by the game itself.\n- `\"utility\"` - Uses the [UtilitySounds](https://wiki.factorio.com/Prototype/UtilitySounds) prototype. Example: `\"utility/wire_connect_pole\"`\n- `\"ambient\"` - Uses [AmbientSound](https://wiki.factorio.com/Prototype/AmbientSound) prototypes. Example: `\"ambient/resource-deficiency\"`\n\nThe following types can be combined with any tile name as long as its prototype defines the\n    corresponding sound.\n- `\"tile-walking\"` - Uses [Tile::walking_sound](https://wiki.factorio.com/Prototype/Tile#walking_sound). Example: `\"tile-walking/concrete\"`\n- `\"tile-mined\"` - Uses [Tile::mined_sound](https://wiki.factorio.com/Prototype/Tile#mined_sound)\n- `\"tile-build-small\"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound). Example: `\"tile-build-small/concrete\"`\n- `\"tile-build-medium\"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound)\n- `\"tile-build-large\"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound)\n\nThe following types can be combined with any entity name as long as its prototype defines the\n    corresponding sound.\n- `\"entity-build\"` - Uses [Entity::build_sound](https://wiki.factorio.com/Prototype/Entity#build_sound). Example: `\"entity-build/wooden-chest\"`\n- `\"entity-mined\"` - Uses [Entity::mined_sound](https://wiki.factorio.com/Prototype/Entity#mined_sound)\n- `\"entity-mining\"` - Uses [Entity::mining_sound](https://wiki.factorio.com/Prototype/Entity#mining_sound)\n- `\"entity-vehicle_impact\"` - Uses [Entity::vehicle_impact_sound](https://wiki.factorio.com/Prototype/Entity#vehicle_impact_sound)\n- `\"entity-rotated\"` - Uses [Entity::rotated_sound](https://wiki.factorio.com/Prototype/Entity#rotated_sound)\n- `\"entity-open\"` - Uses [Entity::open_sound](https://wiki.factorio.com/Prototype/Entity#open_sound)\n- `\"entity-close\"` - Uses [Entity::close_sound](https://wiki.factorio.com/Prototype/Entity#close_sound)","type":"string"},{"name":"SoundType","order":149,"description":"Defines which slider in the game's sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"game-effect","description":""},{"complex_type":"literal","value":"gui-effect","description":""},{"complex_type":"literal","value":"ambient","description":""},{"complex_type":"literal","value":"environment","description":""},{"complex_type":"literal","value":"walking","description":""},{"complex_type":"literal","value":"alert","description":""},{"complex_type":"literal","value":"wind","description":""}],"full_format":true}},{"name":"SpawnPointDefinition","order":89,"description":"","type":{"complex_type":"table","parameters":[{"name":"evolution_factor","order":0,"description":"Evolution factor for which this weight applies.","type":"double","optional":false},{"name":"weight","order":1,"description":"Probability of spawning this unit at this evolution factor.","type":"double","optional":false}]}},{"name":"SpritePath","order":107,"description":"It can be either the name of a [sprite prototype](https://wiki.factorio.com/Prototype/Sprite) defined in the data stage, or a path in form \"type/name\".\n\nThe validity of a SpritePath can be verified at runtime using [LuaGameScript::is_valid_sprite_path](LuaGameScript::is_valid_sprite_path).\n\nThe supported types are:\n- `\"item\"` - for example \"item/iron-plate\" is the icon sprite of iron plate\n- `\"entity\"` - for example \"entity/small-biter\" is the icon sprite of the small biter\n- `\"technology\"`\n- `\"recipe\"`\n- `\"item-group\"`\n- `\"fluid\"`\n- `\"tile\"`\n- `\"virtual-signal\"`\n- `\"achievement\"`\n- `\"equipment\"`\n- `\"file\"` - path to an image file located inside the current scenario. This file is not preloaded so it will be slower; for frequently used sprites, it is better to define sprite prototype and use it instead.\n- `\"utility\"` - sprite defined in the utility-sprites object, these are the pictures used by the game internally for the UI.","type":"string"},{"name":"SteeringMapSetting","order":36,"description":"","type":{"complex_type":"table","parameters":[{"name":"force_unit_fuzzy_goto_behavior","order":3,"description":"Used to make steering look better for aesthetic purposes.","type":"boolean","optional":false},{"name":"radius","order":0,"description":"Does not include the radius of the unit.","type":"double","optional":false},{"name":"separation_factor","order":1,"description":"","type":"double","optional":false},{"name":"separation_force","order":2,"description":"","type":"double","optional":false}]}},{"name":"SteeringMapSettings","order":37,"description":"","type":{"complex_type":"table","parameters":[{"name":"default","order":0,"description":"","type":"SteeringMapSetting","optional":false},{"name":"moving","order":1,"description":"","type":"SteeringMapSetting","optional":false}]}},{"name":"SurfaceIdentification","order":95,"description":"A surface may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"uint","description":"It will be the index of the surface. `nauvis` has index `1`, the first surface-created surface will have index `2` and so on."},{"complex_type":"type","value":"string","description":"It will be the surface name. E.g. `\"nauvis\"`."},{"complex_type":"type","value":"LuaSurface","description":"A reference to [LuaSurface](LuaSurface) may be passed directly."}],"full_format":true}},{"name":"TabAndContent","order":12,"description":"","type":{"complex_type":"table","parameters":[{"name":"content","order":1,"description":"","type":"LuaGuiElement","optional":false},{"name":"tab","order":0,"description":"","type":"LuaGuiElement","optional":false}]}},{"name":"Tags","order":14,"description":"A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`.","examples":["```\n{a = 1, b = true, c = \"three\", d = {e = \"f\"}}\n```"],"type":{"complex_type":"dictionary","key":"string","value":"AnyBasic"}},{"name":"TechnologyIdentification","order":94,"description":"A technology may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The technology name."},{"complex_type":"type","value":"LuaTechnology","description":"A reference to [LuaTechnology](LuaTechnology) may be passed directly."},{"complex_type":"type","value":"LuaTechnologyPrototype","description":"A reference to [LuaTechnologyPrototype](LuaTechnologyPrototype) may be passed directly."}],"full_format":true}},{"name":"TechnologyModifier","order":51,"description":"The effect that is applied when a technology is researched. It is a table that contains at least the field `type`.","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Modifier type. Specifies which of the other fields will be available. Possible values are: `\"inserter-stack-size-bonus\"`, `\"stack-inserter-capacity-bonus\"`, `\"laboratory-speed\"`, `\"character-logistic-trash-slots\"`, `\"maximum-following-robots-count\"`, `\"worker-robot-speed\"`, `\"worker-robot-storage\"`, `\"ghost-time-to-live\"`, `\"turret-attack\"`, `\"ammo-damage\"`, `\"give-item\"`, `\"gun-speed\"`, `\"unlock-recipe\"`, `\"character-crafting-speed\"`, `\"character-mining-speed\"`, `\"character-running-speed\"`, `\"character-build-distance\"`, `\"character-item-drop-distance\"`, `\"character-reach-distance\"`, `\"character-resource-reach-distance\"`, `\"character-item-pickup-distance\"`, `\"character-loot-pickup-distance\"`, `\"character-inventory-slots-bonus\"`, `\"deconstruction-time-to-live\"`, `\"max-failed-attempts-per-tick-per-construction-queue\"`, `\"max-successful-attempts-per-tick-per-construction-queue\"`, `\"character-health-bonus\"`, `\"mining-drill-productivity-bonus\"`, `\"train-braking-force-bonus\"`, `\"zoom-to-world-enabled\"`, `\"zoom-to-world-ghost-building-enabled\"`, `\"zoom-to-world-blueprint-enabled\"`, `\"zoom-to-world-deconstruction-planner-enabled\"`, `\"zoom-to-world-upgrade-planner-enabled\"`, `\"zoom-to-world-selection-tool-enabled\"`, `\"worker-robot-battery\"`, `\"laboratory-productivity\"`, `\"follower-robot-lifetime\"`, `\"artillery-range\"`, `\"nothing\"`, `\"character-additional-mining-categories\"`, `\"character-logistic-requests\"`.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"Other types","order":6,"parameters":[{"name":"modifier","order":0,"description":"Modification value. This value will be added to the variable it modifies.","type":"double","optional":false}]},{"name":"ammo-damage","order":1,"parameters":[{"name":"ammo_category","order":0,"description":"Prototype name of the ammunition category that is affected","type":"string","optional":false},{"name":"modifier","order":1,"description":"Modification value. This will be added to the current ammo damage modifier upon researching.","type":"double","optional":false}]},{"name":"give-item","order":2,"parameters":[{"name":"count","order":1,"description":"Number of items to give. Defaults to `1`.","type":"uint","optional":true},{"name":"item","order":0,"description":"Item prototype name to give.","type":"string","optional":false}]},{"name":"gun-speed","order":0,"parameters":[{"name":"ammo_category","order":0,"description":"Prototype name of the ammunition category that is affected","type":"string","optional":false},{"name":"modifier","order":1,"description":"Modification value. This will be added to the current gun speed modifier upon researching.","type":"double","optional":false}]},{"name":"nothing","order":5,"parameters":[{"name":"effect_description","order":0,"description":"Description of this nothing modifier.","type":"LocalisedString","optional":false}]},{"name":"turret-attack","order":3,"parameters":[{"name":"modifier","order":1,"description":"Modification value. This will be added to the current turret damage modifier upon researching.","type":"double","optional":false},{"name":"turret_id","order":0,"description":"Turret prototype name this modifier will affect.","type":"string","optional":false}]},{"name":"unlock-recipe","order":4,"parameters":[{"name":"recipe","order":0,"description":"Recipe prototype name to unlock.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"TechnologyPrototypeFilter","order":153,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"enabled\"`, `\"hidden\"`, `\"upgrade\"`, `\"visible-when-disabled\"`, `\"has-effects\"`, `\"has-prerequisites\"`, `\"research-unit-ingredient\"`, `\"level\"`, `\"max-level\"`, `\"time\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"level","order":1,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"max-level","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"research-unit-ingredient","order":0,"description":"","parameters":[{"name":"ingredient","order":0,"description":"The research ingredient to check.","type":"string","optional":false}]},{"name":"time","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"Tile","order":46,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"The prototype name of the tile.","type":"string","optional":false},{"name":"position","order":0,"description":"The position of the tile.","type":"TilePosition","optional":false}]}},{"name":"TilePosition","order":6,"description":"Coordinates of a tile on a [LuaSurface](LuaSurface) where each integer `x`/`y` represents a different tile. This uses the same format as [MapPosition](MapPosition), except it rounds any non-integer `x`/`y` down to whole numbers. It can be specified either with or without explicit keys.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}],"full_format":false}},{"name":"TilePrototypeFilter","order":158,"description":"Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on. One of `\"minable\"`, `\"autoplace\"`, `\"blueprintable\"`, `\"item-to-place\"`, `\"collision-mask\"`, `\"walking-speed-modifier\"`, `\"vehicle-friction-modifier\"`, `\"decorative-removal-probability\"`, `\"emissions\"`.","type":"string","optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Must be `\"or\"` or `\"and\"`. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":"string","optional":true}],"variant_parameter_groups":[{"name":"collision-mask","order":0,"description":"","parameters":[{"name":"mask","order":0,"description":"","type":{"complex_type":"union","options":["CollisionMask","CollisionMaskWithFlags"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"How to filter: `\"collides\"`, `\"layers-equals\"`, `\"contains-any\"` or `\"contains-all\"`","type":"string","optional":false}]},{"name":"decorative-removal-probability","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"emissions","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"vehicle-friction-modifier","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"walking-speed-modifier","order":1,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"TrainSchedule","order":102,"description":"","type":{"complex_type":"table","parameters":[{"name":"current","order":0,"description":"Index of the currently active record","type":"uint","optional":false},{"name":"records","order":1,"description":"","type":{"complex_type":"array","value":"TrainScheduleRecord"},"optional":false}]}},{"name":"TrainScheduleRecord","order":101,"description":"","type":{"complex_type":"table","parameters":[{"name":"rail","order":1,"description":"Rail to path to. Ignored if `station` is present.","type":"LuaEntity","optional":true},{"name":"rail_direction","order":2,"description":"When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to [LuaEntity::connected_rail_direction](LuaEntity::connected_rail_direction) of a TrainStop.","type":"defines.rail_direction","optional":true},{"name":"station","order":0,"description":"Name of the station.","type":"string","optional":true},{"name":"temporary","order":4,"description":"Only present when the station is temporary, the value is then always `true`.","type":"boolean","optional":true},{"name":"wait_conditions","order":3,"description":"","type":{"complex_type":"array","value":"WaitCondition"},"optional":true}]}},{"name":"TriggerDelivery","order":118,"description":"","type":{"complex_type":"table","parameters":[{"name":"source_effects","order":1,"description":"","type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":false},{"name":"target_effects","order":2,"description":"","type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":false},{"name":"type","order":0,"description":"One of `\"instant\"`, `\"projectile\"`, `\"flame-thrower\"`, `\"beam\"`, `\"stream\"`, `\"artillery\"`.","type":"string","optional":false}]}},{"name":"TriggerEffectItem","order":117,"description":"","type":{"complex_type":"table","parameters":[{"name":"affects_target","order":2,"description":"","type":"boolean","optional":false},{"name":"repeat_count","order":1,"description":"","type":"uint","optional":false},{"name":"show_in_tooltip","order":3,"description":"","type":"boolean","optional":false},{"name":"type","order":0,"description":"One of`\"damage\"`, `\"create-entity\"`, `\"create-explosion\"`, `\"create-fire\"`, `\"create-smoke\"`, `\"create-trivial-smoke\"`, `\"create-particle\"`, `\"create-sticker\"`, `\"nested-result\"`, `\"play-sound\"`, `\"push-back\"`, `\"destroy-cliffs\"`, `\"show-explosion-on-chart\"`, `\"insert-item\"`, `\"script\"`.","type":"string","optional":false}]}},{"name":"TriggerItem","order":119,"description":"","type":{"complex_type":"table","parameters":[{"name":"action_delivery","order":1,"description":"","type":{"complex_type":"array","value":"TriggerDelivery"},"optional":true},{"name":"collision_mask","order":4,"description":"The trigger will only affect entities that would collide with given collision mask.","type":"CollisionMask","optional":false},{"name":"entity_flags","order":2,"description":"The trigger will only affect entities that contain any of these flags.","type":"EntityPrototypeFlags","optional":true},{"name":"force","order":6,"description":"If `\"enemy\"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `\"ally\"` is the opposite of `\"enemy\"`.","type":"ForceCondition","optional":false},{"name":"ignore_collision_condition","order":3,"description":"","type":"boolean","optional":false},{"name":"repeat_count","order":7,"description":"","type":"uint","optional":false},{"name":"trigger_target_mask","order":5,"description":"","type":"TriggerTargetMask","optional":false},{"name":"type","order":0,"description":"One of `\"direct\"`, `\"area\"`, `\"line\"`, `\"cluster\"`.","type":"string","optional":false}]}},{"name":"TriggerTargetMask","order":116,"description":"A set of trigger target masks.","type":{"complex_type":"dictionary","key":"string","value":"boolean"}},{"name":"UnitGroupMapSettings","order":35,"description":"","type":{"complex_type":"table","parameters":[{"name":"max_gathering_unit_groups","order":11,"description":"The maximum number of automatically created unit groups gathering for attack at any time. Defaults to `30`.","type":"uint","optional":false},{"name":"max_group_gathering_time","order":1,"description":"The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3,600=36,000` ticks.","type":"uint","optional":false},{"name":"max_group_member_fallback_factor","order":8,"description":"When a member of a group falls back more than this factor times the group radius, the group will slow down to its `max_group_slowdown_factor` speed to let them catch up. Defaults to `3`.","type":"double","optional":false},{"name":"max_group_radius","order":4,"description":"The maximum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `30.0`.","type":"double","optional":false},{"name":"max_group_slowdown_factor","order":7,"description":"The minimum speed as a percentage of its maximum speed that a group will slow down to so members that fell behind can catch up. Defaults to `0.3`, or 30%.","type":"double","optional":false},{"name":"max_member_slowdown_when_ahead","order":6,"description":"The minimum speed a percentage of its regular speed that a group member can slow down to when ahead of the group. Defaults to `0.6`, or 60%.","type":"double","optional":false},{"name":"max_member_speedup_when_behind","order":5,"description":"The maximum speed a percentage of its regular speed that a group member can speed up to when catching up with the group. Defaults to `1.4`, or 140%.","type":"double","optional":false},{"name":"max_unit_group_size","order":12,"description":"The maximum number of members for an attack unit group. This only affects automatically created unit groups, manual groups created through the API are unaffected. Defaults to `200`.","type":"uint","optional":false},{"name":"max_wait_time_for_late_members","order":2,"description":"After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3,600=7,200` ticks.","type":"uint","optional":false},{"name":"member_disown_distance","order":9,"description":"When a member of a group falls back more than this factor times the group radius, it will be dropped from the group. Defaults to `10`.","type":"double","optional":false},{"name":"min_group_gathering_time","order":0,"description":"The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3,600` ticks.","type":"uint","optional":false},{"name":"min_group_radius","order":3,"description":"The minimum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `5.0`.","type":"double","optional":false},{"name":"tick_tolerance_when_member_arrives","order":10,"description":"","type":"uint","optional":false}]}},{"name":"UnitSpawnDefinition","order":88,"description":"","type":{"complex_type":"table","parameters":[{"name":"spawn_points","order":1,"description":"The points at which to spawn the unit.","type":{"complex_type":"array","value":"SpawnPointDefinition"},"optional":false},{"name":"unit","order":0,"description":"Prototype name of the unit that would be spawned.","type":"string","optional":false}]}},{"name":"UpgradeFilter","order":67,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"Name of the item, or entity.","type":"string","optional":true},{"name":"type","order":0,"description":"`\"item\"`, or `\"entity\"`.","type":"string","optional":false}]}},{"name":"Vector","order":16,"description":"A vector is a two-element array containing the `x` and `y` components. In some specific cases, the vector is a table with `x` and `y` keys instead, which the documentation will point out.","examples":["```\nright = {1.0, 0.0}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"float","optional":false},{"name":"y","order":1,"description":"","type":"float","optional":false}]},{"complex_type":"tuple","parameters":[{"name":"x","order":0,"description":"","type":"float","optional":false},{"name":"y","order":1,"description":"","type":"float","optional":false}]}],"full_format":false}},{"name":"VehicleAutomaticTargetingParameters","order":148,"description":"","type":{"complex_type":"table","parameters":[{"name":"auto_target_with_gunner","order":1,"description":"","type":"boolean","optional":false},{"name":"auto_target_without_gunner","order":0,"description":"","type":"boolean","optional":false}]}},{"name":"WaitCondition","order":100,"description":"","type":{"complex_type":"table","parameters":[{"name":"compare_type","order":1,"description":"Either `\"and\"`, or `\"or\"`. Tells how this condition is to be compared with the preceding conditions in the corresponding `wait_conditions` array.","type":"string","optional":false},{"name":"condition","order":3,"description":"Only present when `type` is `\"item_count\"`, `\"circuit\"` or `\"fluid_count\"`, and a circuit condition is configured.","type":"CircuitCondition","optional":true},{"name":"ticks","order":2,"description":"Number of ticks to wait when `type` is `\"time\"`, or number of ticks of inactivity when `type` is `\"inactivity\"`.","type":"uint","optional":true},{"name":"type","order":0,"description":"One of `\"time\"`, `\"inactivity\"`, `\"full\"`, `\"empty\"`, `\"item_count\"`, `\"circuit\"`, `\"robots_inactive\"`, `\"fluid_count\"`, `\"passenger_present\"`, `\"passenger_not_present\"`.","type":"string","optional":false}]}},{"name":"WireConnectionDefinition","order":83,"description":"","type":{"complex_type":"table","parameters":[{"name":"source_circuit_id","order":2,"description":"Mandatory if the source entity has more than one circuit connection using circuit wire.","type":"defines.circuit_connector_id","optional":true},{"name":"source_wire_id","order":4,"description":"Mandatory if the source entity has more than one wire connection using copper wire.","type":"defines.circuit_connector_id","optional":true},{"name":"target_circuit_id","order":3,"description":"Mandatory if the target entity has more than one circuit connection using circuit wire.","type":"defines.circuit_connector_id","optional":true},{"name":"target_entity","order":1,"description":"The entity to (dis)connect the source entity with.","type":"LuaEntity","optional":false},{"name":"target_wire_id","order":5,"description":"Mandatory if the target entity has more than one wire connection using copper wire.","type":"defines.circuit_connector_id","optional":true},{"name":"wire","order":0,"description":"Wire color, either [defines.wire_type.red](defines.wire_type.red) or [defines.wire_type.green](defines.wire_type.green).","type":"defines.wire_type","optional":false}]}}],"global_objects":[{"name":"commands","order":3,"description":"Allows registering custom commands for the in-game console accessible via the grave key.","type":"LuaCommandProcessor"},{"name":"game","order":0,"description":"This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with [LuaBootstrap::on_load](LuaBootstrap::on_load).","type":"LuaGameScript"},{"name":"rcon","order":5,"description":"Allows printing messages to the calling RCON instance if any.","type":"LuaRCON"},{"name":"remote","order":2,"description":"Allows inter-mod communication by way of providing a repository of interfaces that is shared by all mods.","type":"LuaRemote"},{"name":"rendering","order":6,"description":"Allows rendering of geometric shapes, text and sprites in the game world.","type":"LuaRendering"},{"name":"script","order":1,"description":"Provides an interface for registering event handlers.","type":"LuaBootstrap"},{"name":"settings","order":4,"description":"Allows reading the current mod settings.","type":"LuaSettings"}],"global_functions":[{"name":"localised_print","order":1,"description":"`localised_print()` allows printing [LocalisedString](LocalisedString) to stdout without polluting the Factorio [log file](https://wiki.factorio.com/Log_file). This is primarily useful when communicating with external tools that launch Factorio as a child process.","parameters":[{"name":"string","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"log","order":0,"description":"`log()` can print [LocalisedStrings](LocalisedString) to the Factorio [log file](https://wiki.factorio.com/Log_file). This, in combination with the serpent library, makes debugging in the data stage easier because it allows the inspection of entire prototype tables. For example, printing all properties of the sulfur item prototype can be done like so: `log(serpent.block(data.raw[\"item\"][\"sulfur\"]))`","parameters":[{"name":"string","order":0,"description":"","type":"LocalisedString","optional":false}],"takes_table":false,"return_values":[]},{"name":"table_size","order":2,"description":"Factorio provides the `table_size()` function as a simple way to determine the size of tables with non-continuous keys, as the standard `#` operator does not work correctly for these. The function is a C++ implementation of the following Lua code, which is faster than doing the same in Lua:\n\n```\nlocal function size(t)\n    local count = 0\n    for k,v in pairs(t) do\n        count = count + 1\n    end\n    return count\nend\n```\n\nNote that `table_size()` does not work correctly for [LuaCustomTable](LuaCustomTable), their size has to be determined with [LuaCustomTable::length_operator](LuaCustomTable::length_operator) instead.","parameters":[{"name":"table","order":0,"description":"","type":"table","optional":false}],"takes_table":false,"return_values":[{"order":0,"description":"","type":"uint","optional":false}]}]}