Prototype of an item. For example, an item prototype can be obtained from LuaPrototypes::item by its name: prototypes.item["iron-plate"].
LuaPrototypeBaseLuaEntityPrototypeunknowntruePrototype of the entity that will be created by placing this item, if any.
LuaEquipmentPrototypeunknowntruePrototype of the equipment that will be created by placing this item in an equipment grid, if any.
PlaceAsTileResultunknowntrueThe place-as-tile result if one is defined, if any.
booleanunknownfalseIs this item allowed to stack at all?
uint32unknownfalseMaximum stack size of the item specified by this prototype.
stringunknowntrueThe fuel category, if any.
LuaItemPrototypeunknowntrueThe result of burning this item as fuel, if any.
floatunknownfalseFuel value when burned.
doubleunknownfalseThe acceleration multiplier when this item is used as fuel in a vehicle.
doubleunknownfalseThe fuel top speed multiplier when this item is used as fuel in a vehicle.
doubleunknownfalseThe emissions multiplier if this is used as fuel.
doubleunknownfalseAdditional fuel acceleration multiplier per quality level.
doubleunknownfalseAdditional fuel top speed multiplier per quality level.
ItemPrototypeFlagsunknownfalseThe flags for this item prototype.
Array<Product>unknownfalseThe results of launching this item in a rocket.
"not-sendable" | "manual" | "automated"unknownfalseHow this item interacts when being sent to orbit.
booleanunknownfalseIf this item can be mod-opened.
LuaItemPrototypeunknowntrueThe spoil result of this item, if any
LuaEntityPrototypeunknowntrueThe result entity when planting this item as a seed.
SpoilToTriggerResultunknowntrueArray<TriggerItem>unknowntrueWeightunknownfalseWeight of this item. More information on how item weight is determined can be found on its auxiliary page.
doubleunknownfalseColorunknowntrueLuaSpaceLocationPrototypeunknownfalseLuaItemPrototypeunknowntrueAn alternative prototype that will be used to display info about this prototype in Factoriopedia.
booleanunknownfalseLuaAmmoCategoryPrototypeunknowntruefloatunknowntrueSize of full magazine.
floatunknowntrueAmount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.
LuaEquipmentGridPrototypeunknowntrueThe prototype of this armor's equipment grid, if any.
Dict<string, Resistance>unknowntrueResistances of this armor item, if any, indexed by damage type name.
BoundingBoxunknowntrueThe collision box used by character entities when wearing this armor.
BoundingBoxunknowntrueThe drawing box used by character entities when wearing this armor.
booleanunknowntrueIf this armor provides flight to character entities when worm.
CapsuleActionunknowntrueThe capsule action for this capsule item prototype.
ColorunknowntrueAttackParametersunknowntrueThe gun attack parameters.
uint32unknowntrueThe main inventory size for item-with-inventory-prototype.
Array<LuaItemPrototype>unknowntrueArray<LuaGroup>unknowntrueArray<LuaGroup>unknowntruePrototypeFilterModeunknowntrueThe filter mode used by this item with inventory.
LocalisedStringunknowntrueThe localised string used when the player attempts to put items into this item with inventory that aren't allowed.
ColorunknowntrueThe default label color used for this item with label, if any.
booleanunknowntrueIf true, and this item with label has a label it is drawn in place of the normal number when held in the cursor.
floatunknowntrueThe repairing speed if this is a repairing tool.
ModuleEffectsunknowntrueEffects of this module.
stringunknowntrueThe name of a 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.
uint32unknowntrueTier 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.
booleanunknowntrueArray<Color>unknowntrueArray<LuaEntityPrototype>unknowntruePrototypes of all rails possible to be used by this rail planner prototype.
LuaEntityPrototypeunknowntrueThe rail support used by this rail planner.
doubleunknowntruebooleanunknowntrueIf tiles area always included when doing selection with this selection tool prototype.
booleanunknowntrueIf this selection tool skips things covered by fog of war.
uint32unknowntrueThe number of entity filters this deconstruction item has.
uint32unknowntrueThe number of tile filters this deconstruction item has.
stringunknowntrueThe durability message key used when displaying the durability of this tool.
stringunknowntrueThe durability message key used when displaying the durability of this tool in Factoriopedia.
stringunknowntrueThe durability message value used when displaying the durability of this tool.
booleanunknowntrueIf this tool item has infinite durability.
TriggerItemunknowntrueLuaSurfacePrototypeunknowntruebooleanunknowntrueArray<SpacePlatformTileDefinition>unknowntrueArray<ItemProduct>unknowntruebooleanunknownfalseIs 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.
stringunknownfalseThe 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.
LuaItemPrototype.has_flag(flag: ItemPrototypeFlag) -> boolean
itemPrototype.has_flag(flag)
takes_table: falsetable_optional: falseTest whether this item prototype has a certain flag set.
flag: ItemPrototypeFlag — The flag to test.booleanLuaItemPrototype.get_spoil_ticks(quality?: QualityID) -> uint32
itemPrototype.get_spoil_ticks()
takes_table: falsetable_optional: falseThe number of ticks before this item spoils, or 0 if it does not spoil.
quality?: QualityIDuint32LuaItemPrototype.get_ammo_type(ammo_source_type?: "default" | "player" | "turret" | "vehicle") -> AmmoType?
itemPrototype.get_ammo_type()
takes_table: falsetable_optional: falseThe type of this ammo prototype.
ammo_source_type?: "default" | "player" | "turret" | "vehicle" — Defaults to "default".AmmoType?LuaItemPrototype.get_inventory_size_bonus(quality?: QualityID) -> uint32?
itemPrototype.get_inventory_size_bonus()
takes_table: falsetable_optional: falseThe inventory size bonus for this armor prototype.
quality?: QualityIDuint32?LuaItemPrototype.get_module_effects(quality?: QualityID) -> ModuleEffects?
itemPrototype.get_module_effects()
takes_table: falsetable_optional: falseEffects of this module at the specified quality.
quality?: QualityIDModuleEffects?LuaItemPrototype.get_selection_border_color(selection_mode: defines.selection_mode) -> Color?
itemPrototype.get_selection_border_color(selection_mode)
takes_table: falsetable_optional: falseThe color used when doing normal selection with this selection tool prototype.
selection_mode: defines.selection_modeColor?LuaItemPrototype.get_selection_mode_flags(selection_mode: defines.selection_mode) -> SelectionModeFlags?
itemPrototype.get_selection_mode_flags(selection_mode)
takes_table: falsetable_optional: falseFlags that affect which entities will be selected.
selection_mode: defines.selection_modeSelectionModeFlags?LuaItemPrototype.get_cursor_box_type(selection_mode: defines.selection_mode) -> CursorBoxRenderType?
itemPrototype.get_cursor_box_type(selection_mode)
takes_table: falsetable_optional: falseselection_mode: defines.selection_modeCursorBoxRenderType?LuaItemPrototype.get_entity_filter_mode(selection_mode: defines.selection_mode) -> PrototypeFilterMode?
itemPrototype.get_entity_filter_mode(selection_mode)
takes_table: falsetable_optional: falseThe entity filter mode used by this selection tool.
selection_mode: defines.selection_modePrototypeFilterMode?LuaItemPrototype.get_tile_filter_mode(selection_mode: defines.selection_mode) -> PrototypeFilterMode?
itemPrototype.get_tile_filter_mode(selection_mode)
takes_table: falsetable_optional: falseThe tile filter mode used by this selection tool.
selection_mode: defines.selection_modePrototypeFilterMode?LuaItemPrototype.get_entity_filters(selection_mode: defines.selection_mode) -> Array<LuaEntityPrototype>?
itemPrototype.get_entity_filters(selection_mode)
takes_table: falsetable_optional: falseThe entity filters used by this selection tool.
selection_mode: defines.selection_modeArray<LuaEntityPrototype>?LuaItemPrototype.get_entity_type_filters(selection_mode: defines.selection_mode) -> Dict<string, true>?
itemPrototype.get_entity_type_filters(selection_mode)
takes_table: falsetable_optional: falseThe entity type filters used by this selection tool indexed by entity type.
The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
selection_mode: defines.selection_modeDict<string, true>?LuaItemPrototype.get_tile_filters(selection_mode: defines.selection_mode) -> Array<LuaTilePrototype>?
itemPrototype.get_tile_filters(selection_mode)
takes_table: falsetable_optional: falseThe tile filters used by this selection tool.
selection_mode: defines.selection_modeArray<LuaTilePrototype>?LuaItemPrototype.get_durability(quality?: QualityID) -> double?
itemPrototype.get_durability()
takes_table: falsetable_optional: falseThe durability of this tool item prototype.
quality?: QualityIDdouble?