Factorio Prototype DocsVersion 1.1.107

ItemPrototype - 'item'

Possible configuration for all items.

Inherits from PrototypeBase
Children

Properties

stack_size :: ItemCountType

Count of items of the same name that can be stored in one inventory slot. [...]

Count of items of the same name that can be stored in one inventory slot. [...]

icons optional :: array[IconData]

Can't be an empty array.

Can't be an empty array.

icon optional :: FileName

Path to the icon file. [...]

Path to the icon file. [...]

icon_size optional :: SpriteSizeType

The size of the square icon, in pixels. [...]

The size of the square icon, in pixels. [...]

icon_mipmaps optional :: IconMipMapType

Icons of reduced size will be used at decreased scale. [...]

Icons of reduced size will be used at decreased scale. [...]

dark_background_icons optional :: array[IconData]

Inside IconData, the property for the file path is dark_background_icon instead of icon. [...]

Inside IconData, the property for the file path is dark_background_icon instead of icon. [...]

dark_background_icon optional :: FileName

If this is set, it is used to show items in alt-mode instead of the normal item icon. [...]

If this is set, it is used to show items in alt-mode instead of the normal item icon. [...]

place_result optional :: EntityID

Name of the EntityPrototype that can be built using this item. [...]

Name of the EntityPrototype that can be built using this item. [...]

placed_as_equipment_result optional :: EquipmentID
subgroup optional :: ItemSubGroupID

The name of the subgroup this item should be sorted into in item selection GUIs like logistic requests. [...]

The name of the subgroup this item should be sorted into in item selection GUIs like logistic requests. [...]

fuel_category optional :: FuelCategoryID

Must exist when a nonzero fuel_value is defined.

Must exist when a nonzero fuel_value is defined.

burnt_result optional :: ItemID

The item that is the result when this item gets burned as fuel.

The item that is the result when this item gets burned as fuel.

place_as_tile optional :: PlaceAsTile
pictures optional :: SpriteVariations

Used to give the item multiple different icons so that they look less uniform on belts. [...]

Used to give the item multiple different icons so that they look less uniform on belts. [...]

flags optional :: ItemPrototypeFlags

Specifies some properties of the item.

Specifies some properties of the item.

default_request_amount optional :: ItemCountType
wire_count optional :: ItemCountType

The number of items needed to connect 2 entities with this as wire. [...]

The number of items needed to connect 2 entities with this as wire. [...]

fuel_value optional :: Energy

Amount of energy the item gives when used as fuel. [...]

Amount of energy the item gives when used as fuel. [...]

fuel_acceleration_multiplier optional :: double
fuel_top_speed_multiplier optional :: double
fuel_emissions_multiplier optional :: double
fuel_glow_color optional :: Color

Colors the glow of the burner energy source when this fuel is burned. [...]

Colors the glow of the burner energy source when this fuel is burned. [...]

open_sound optional :: Sound
close_sound optional :: Sound
rocket_launch_products optional :: array[ItemProductPrototype]
rocket_launch_product optional :: ItemProductPrototype

Only loaded if rocket_launch_products is not defined.

Only loaded if rocket_launch_products is not defined.

Inherited from PrototypeBase
type :: string

Specifies the kind of prototype this is. [...]

Specifies the kind of prototype this is. [...]

name :: string

Unique textual identification of the prototype. [...]

Unique textual identification of the prototype. [...]

order optional :: Order

Used to order prototypes in inventory, recipes and GUIs. [...]

Used to order prototypes in inventory, recipes and GUIs. [...]

localised_name optional :: LocalisedString

Overwrites the name set in the locale file. [...]

Overwrites the name set in the locale file. [...]

localised_description optional :: LocalisedString

Overwrites the description set in the locale file. [...]

Overwrites the description set in the locale file. [...]

Properties

stack_size :: ItemCountType

Count of items of the same name that can be stored in one inventory slot. Must be 1 when the "not-stackable" flag is set.

Example

stack_size = 64

icons :: array[IconData] optional

Can't be an empty array.

icon :: FileName optional

Path to the icon file.

Mandatory if icons is not defined.

icon_size :: SpriteSizeType optional

The size of the square icon, in pixels. E.g. 32 for a 32px by 32px icon.

This definition applies to all icon-type properties, both on here and on any children.

Mandatory if icons is not defined, or if icon_size is not specified for all instances of icons.

icon_mipmaps :: IconMipMapType optional

Default: 0

Icons of reduced size will be used at decreased scale.

This definition applies to all icon-type properties, both on here and on any children.

dark_background_icons :: array[IconData] optional

Inside IconData, the property for the file path is dark_background_icon instead of icon. Can't be an empty array.

Uses the basic icon_size and icon_mipmaps properties.

dark_background_icon :: FileName optional

If this is set, it is used to show items in alt-mode instead of the normal item icon. This can be useful to increase the contrast of the icon with the dark alt-mode icon outline.

Path to the icon file.

Only loaded if dark_background_icons is not defined.

Uses the basic icon_size and icon_mipmaps properties.

place_result :: EntityID optional

Default: ""

Name of the EntityPrototype that can be built using this item. If this item should be the one that construction bots use to build the specified place_result, set the "primary-place-result" item flag.

The localised name of the entity will be used as the in-game item name. This behavior can be overwritten by specifying localised_name on this item, it will be used instead.

Example

place_result = "wooden-chest"

placed_as_equipment_result :: EquipmentID optional

Default: ""

subgroup :: ItemSubGroupID optional

Default: "other"

The name of the subgroup this item should be sorted into in item selection GUIs like logistic requests.

Empty text of subgroup is not allowed. (You can omit the definition to get the default "other").

fuel_category :: FuelCategoryID optional

Default: ""

Must exist when a nonzero fuel_value is defined.

burnt_result :: ItemID optional

Default: ""

The item that is the result when this item gets burned as fuel.

place_as_tile :: PlaceAsTile optional

PlaceAsTile :: struct

Properties

result :: TileID

condition :: CollisionMask

condition_size :: int32

pictures :: SpriteVariations optional

Used to give the item multiple different icons so that they look less uniform on belts. For inventory icons and similar, icon/icons will be used. Maximum number of variations is 16.

The expected size for icons of items on belts is 16px. So when using sprites of size 64 (same as base game icons), the scale should be set to 0.25.

flags :: ItemPrototypeFlags optional

Specifies some properties of the item.

Example

flags = { "hidden" }

default_request_amount :: ItemCountType optional

Default: The stack size of this item.

wire_count :: ItemCountType optional

Default: 0

The number of items needed to connect 2 entities with this as wire. In the base game, green wire, red wire and copper cable have this set to 1.

fuel_value :: Energy optional

Default: "0J"

Amount of energy the item gives when used as fuel.

Mandatory if fuel_acceleration_multiplier, fuel_top_speed_multiplier or fuel_emissions_multiplier or fuel_glow_color are used.

Example

fuel_value = "12MJ"

fuel_acceleration_multiplier :: double optional

Default: 1.0

fuel_top_speed_multiplier :: double optional

Default: 1.0

fuel_emissions_multiplier :: double optional

Default: 1.0

fuel_glow_color :: Color optional

Colors the glow of the burner energy source when this fuel is burned. Can also be used to color the glow of reactors burning the fuel, see ReactorPrototype::use_fuel_glow_color.

open_sound :: Sound optional

close_sound :: Sound optional

rocket_launch_products :: array[ItemProductPrototype] optional

rocket_launch_product :: ItemProductPrototype optional

Only loaded if rocket_launch_products is not defined.

Prototypes

Types