EntityPrototype abstract changedExample code
| icons optional | :: array[IconData] | This will be used in the electric network statistics, editor building selection, and the bonus gui. [...] |
This will be used in the electric network statistics, editor building selection, and the bonus gui. [...] | ||
| 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. [...] | ||
| collision_box optional | :: BoundingBox | Specification of the entity collision boundaries. [...] |
Specification of the entity collision boundaries. [...] | ||
| collision_mask optional | :: CollisionMaskConnector | Defaults to the mask from UtilityConstants::default_collision_masks when indexed by the entity type. |
Defaults to the mask from UtilityConstants::default_collision_masks when indexed by the entity type. | ||
| map_generator_bounding_box optional | :: BoundingBox | Used instead of the collision box during map generation. [...] |
Used instead of the collision box during map generation. [...] | ||
| selection_box optional | :: BoundingBox | Specification of the entity selection area. [...] |
Specification of the entity selection area. [...] | ||
| drawing_box_vertical_extension optional | :: double | Specification of extra vertical space needed to see the whole entity in GUIs. [...] |
Specification of extra vertical space needed to see the whole entity in GUIs. [...] | ||
| sticker_box optional | :: BoundingBox | Used to specify the area where the sticker animation can appear for entities that can have stickers on them. |
Used to specify the area where the sticker animation can appear for entities that can have stickers on them. | ||
| hit_visualization_box optional | :: BoundingBox | Where beams should hit the entity. [...] |
Where beams should hit the entity. [...] | ||
| trigger_target_mask optional | :: TriggerTargetMask | Defaults to the mask from UtilityConstants::default_trigger_target_mask_by_type. |
Defaults to the mask from UtilityConstants::default_trigger_target_mask_by_type. | ||
| flags optional | :: EntityPrototypeFlags | |
| tile_buildability_rules optional | :: array[TileBuildabilityRule] | |
| minable optional | :: MinableProperties | The item given to the player when they mine the entity and other properties relevant to mining this entity. |
The item given to the player when they mine the entity and other properties relevant to mining this entity. | ||
| surface_conditions | :: array[SurfaceCondition] | |
| deconstruction_alternative optional | :: EntityID | Used to merge multiple entities into one entry in the deconstruction planner. |
Used to merge multiple entities into one entry in the deconstruction planner. | ||
| selection_priority optional | :: uint8 | The entity with the higher number is selectable before the entity with the lower number. [...] |
The entity with the higher number is selectable before the entity with the lower number. [...] | ||
| build_grid_size optional | :: uint8 | Supported values are 1 (for 1x1 grid) and 2 (for 2x2 grid, like rails). [...] |
Supported values are 1 (for 1x1 grid) and 2 (for 2x2 grid, like rails). [...] | ||
| remove_decoratives optional | :: "automatic" or "true" or "false" | Whether this entity should remove decoratives that collide with it when this entity is built. [...] |
Whether this entity should remove decoratives that collide with it when this entity is built. [...] | ||
| emissions_per_second optional | :: dictionary[AirbornePollutantID → double] | Amount of emissions created (positive number) or cleaned (negative number) every second by the entity. [...] |
Amount of emissions created (positive number) or cleaned (negative number) every second by the entity. [...] | ||
| shooting_cursor_size optional | :: double | The cursor size used when shooting at this entity. |
The cursor size used when shooting at this entity. | ||
| created_smoke optional | :: CreateTrivialSmokeEffectItem | The smoke that is shown when the entity is placed. |
The smoke that is shown when the entity is placed. | ||
| working_sound optional | :: WorkingSound | Will also work on entities that don't actually do work. |
Will also work on entities that don't actually do work. | ||
| created_effect optional | :: Trigger | The effect/trigger that happens when the entity is placed. |
The effect/trigger that happens when the entity is placed. | ||
| build_sound optional | :: Sound | |
| mined_sound optional | :: Sound | |
| mining_sound optional | :: Sound | |
| rotated_sound optional | :: Sound | |
| impact_category optional | :: string | Name of a ImpactCategory. |
Name of a ImpactCategory. | ||
| open_sound optional | :: Sound | |
| close_sound optional | :: Sound | |
| placeable_position_visualization optional | :: Sprite | |
| radius_visualisation_specification optional | :: RadiusVisualisationSpecification | |
| stateless_visualisation optional | :: StatelessVisualisation or array[StatelessVisualisation] | |
| draw_stateless_visualisations_in_ghost optional | :: boolean | |
| alert_icon_shift optional | :: Vector | |
| alert_icon_scale optional | :: float | |
| fast_replaceable_group optional | :: string | This allows you to replace an entity that's already placed, with a different one in your inventory. [...] |
This allows you to replace an entity that's already placed, with a different one in your inventory. [...] | ||
| next_upgrade optional | :: EntityID | Name of the entity that will be automatically selected as the upgrade of this entity when using the upgrade planner without configuration. [...] |
Name of the entity that will be automatically selected as the upgrade of this entity when using the upgrade planner without configuration. [...] | ||
| protected_from_tile_building optional | :: boolean | When this is true, this entity prototype should be included during tile collision checks with tiles that have TilePrototype::check_collision_with_entities set to true. |
When this is true, this entity prototype should be included during tile collision checks with tiles that have TilePrototype::check_collision_with_entities set to true. | ||
| tallnew optional | :: boolean | When this is true, this entity prototype will be translucent and unselectable when "Hide tall entities" mode is active. [...] |
When this is true, this entity prototype will be translucent and unselectable when "Hide tall entities" mode is active. [...] | ||
| show_fluid_visualization_when_in_cursornew optional | :: boolean | When this is true, fluid pipelines will be visualized when this entity is held in the cursor. |
When this is true, fluid pipelines will be visualized when this entity is held in the cursor. | ||
| heating_energy | :: Energy | This entity can freeze if heating_energy is larger than zero. |
This entity can freeze if heating_energy is larger than zero. | ||
| allow_copy_paste optional | :: boolean | |
| selectable_in_game optional | :: boolean | |
| placeable_by optional | :: ItemToPlace or array[ItemToPlace] | Item that when placed creates this entity. [...] |
Item that when placed creates this entity. [...] | ||
| remains_when_mined optional | :: EntityID or array[EntityID] | The entity that remains when this one is mined, deconstructed or fast-replaced. [...] |
The entity that remains when this one is mined, deconstructed or fast-replaced. [...] | ||
| additional_pastable_entities optional | :: array[EntityID] | Names of the entity prototypes this entity prototype can be pasted on to in addition to the standard supported types. [...] |
Names of the entity prototypes this entity prototype can be pasted on to in addition to the standard supported types. [...] | ||
| tile_width optional | :: int32 | Used to determine how the center of the entity should be positioned when building (unless the off-grid flag is specified). [...] |
Used to determine how the center of the entity should be positioned when building (unless the off-grid flag is specified). [...] | ||
| tile_height optional | :: int32 | |
| diagonal_tile_grid_size optional | :: TilePosition | |
| autoplace optional | :: AutoplaceSpecification | Used to specify the rules for placing this entity during map generation. |
Used to specify the rules for placing this entity during map generation. | ||
| map_color optional | :: Color | |
| friendly_map_color optional | :: Color | |
| enemy_map_color optional | :: Color | |
| water_reflection optional | :: WaterReflectionDefinition | May also be defined inside |
May also be defined inside | ||
| ambient_sounds_group optional | :: EntityID | |
| ambient_sounds optional | :: WorldAmbientSoundDefinition or array[WorldAmbientSoundDefinition] | |
| icon_draw_specification optional | :: IconDrawSpecification | Used to specify where and how the alt-mode icons should be drawn. |
Used to specify where and how the alt-mode icons should be drawn. | ||
| icons_positioning optional | :: array[IconSequencePositioning] | |
| factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...] |
The ID type corresponding to the prototype that inherits from this. [...] | ||
| custom_tooltip_fields optional | :: array[CustomTooltipField] | Allows to add extra description items to the tooltip and Factoriopedia. |
Allows to add extra description items to the tooltip and Factoriopedia. | ||
| 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[overridden] 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. [...] | ||
| factoriopedia_description optional | :: LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
| subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup. |
The name of an ItemSubGroup. | ||
| hidden optional | :: boolean | |
| hidden_in_factoriopedia optional | :: boolean | |
| parameter optional | :: boolean | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. |
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. | ||
| factoriopedia_simulation optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI. |
The simulation shown when looking at this prototype in the Factoriopedia GUI. | ||
Properties
icons :: array[IconData] optional 
icon :: FileName optional 
Example
icon = "__base__/graphics/icons/wooden-chest.png"
icon_size :: SpriteSizeType optional 
collision_box :: BoundingBox optional 
Example
collision_box = {{-0.4, -0.4}, {0.4, 0.4}}
collision_mask :: CollisionMaskConnector optional 
map_generator_bounding_box :: BoundingBox optional 
selection_box :: BoundingBox optional 
Example
selection_box = {{-0.5, -0.5}, {0.5, 0.5}}
drawing_box_vertical_extension :: double optional 
Example
drawing_box_vertical_extension = 0.5
sticker_box :: BoundingBox optional 
Example
sticker_box = {{-0.5, -0.5}, {0.5, 0.5}}
hit_visualization_box :: BoundingBox optional 
trigger_target_mask :: TriggerTargetMask optional 
flags :: EntityPrototypeFlags optional 
tile_buildability_rules :: array[TileBuildabilityRule] optional 
minable :: MinableProperties optional 
Example
minable = {mining_time = 0.2, result = "boiler"}
surface_conditions :: array[SurfaceCondition] optional 

deconstruction_alternative :: EntityID optional 
selection_priority :: uint8 optional 
build_grid_size :: uint8 optional 
emissions_per_second :: dictionary[AirbornePollutantID → double] optional 
shooting_cursor_size :: double optional 
created_smoke :: CreateTrivialSmokeEffectItem optional 
working_sound :: WorkingSound optional 
created_effect :: Trigger optional 
build_sound :: Sound optional 
mined_sound :: Sound optional 
mining_sound :: Sound optional 
rotated_sound :: Sound optional 
impact_category :: string optional 
open_sound :: Sound optional 
close_sound :: Sound optional 
placeable_position_visualization :: Sprite optional 
radius_visualisation_specification :: RadiusVisualisationSpecification optional 
Example
radius_visualisation_specification =
{
sprite =
{
filename = "__base__/graphics/entity/electric-mining-drill/electric-mining-drill-radius-visualization.png",
size = 10
},
distance = 6
}
stateless_visualisation :: StatelessVisualisation or array[StatelessVisualisation] optional 
draw_stateless_visualisations_in_ghost :: boolean optional 
alert_icon_shift :: Vector optional 
alert_icon_scale :: float optional 
fast_replaceable_group :: string optional 
next_upgrade :: EntityID optional 
Example
next_upgrade = "fast-inserter"
protected_from_tile_building :: boolean optional 
tall :: boolean optional new
show_fluid_visualization_when_in_cursor :: boolean optional new
heating_energy :: Energy optional 

allow_copy_paste :: boolean optional 
selectable_in_game :: boolean optional 
placeable_by :: ItemToPlace or array[ItemToPlace] optional 
Example
placeable_by = {item = "rail", count = 4}
additional_pastable_entities :: array[EntityID] optional 
Example
additional_pastable_entities = {"steel-chest", "iron-chest"}
tile_width :: int32 optional 
tile_height :: int32 optional 
diagonal_tile_grid_size :: TilePosition optional 
autoplace :: AutoplaceSpecification optional 
map_color :: Color optional 
friendly_map_color :: Color optional 
enemy_map_color :: Color optional 
water_reflection :: WaterReflectionDefinition optional 
ambient_sounds_group :: EntityID optional 
ambient_sounds :: WorldAmbientSoundDefinition or array[WorldAmbientSoundDefinition] optional 
icon_draw_specification :: IconDrawSpecification optional 
Example
icon_draw_specification = {shift = {0, 0.5}, scale = 0.75, scale_for_many = 0.5, render_layer = "entity-info-icon"}
icons_positioning :: array[IconSequencePositioning] optional 
Example
icons_positioning =
{
{inventory_index = defines.inventory.lab_modules, shift = {0, 0.9}},
{inventory_index = defines.inventory.lab_input, shift = {0, 0.0}, max_icons_per_row = 6, separation_multiplier = 0.9}
}
Overridden Properties
order :: Order optional 
Example 
{
type = "container",
name = "wooden-chest",
icon = "__base__/graphics/icons/wooden-chest.png",
flags = { "placeable-neutral", "player-creation" },
minable = { mining_time = 1, result = "wooden-chest" },
max_health = 100,
corpse = "small-remnants",
collision_box = { {-0.35, -0.35}, {0.35, 0.35} },
fast_replaceable_group = "container",
selection_box = { {-0.5, -0.5}, {0.5, 0.5} },
inventory_size = 16,
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
picture =
{
filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
priority = "extra-high",
width = 46,
height = 33,
shift = {0.25, 0.015625}
}
}

