Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# EntityPrototype - Prototype Docs

## EntityPrototype abstract Example code

Abstract base of all entities in the game. Entity is nearly everything that can be on the map (except tiles).

For in game script access to entity, take a look at LuaEntity.

Inherits from Prototype « PrototypeBase
Children ArrowPrototype - 'arrow' ArtilleryFlarePrototype - 'artillery-flare' ArtilleryProjectilePrototype - 'artillery-projectile' BeamPrototype - 'beam' CharacterCorpsePrototype - 'character-corpse' CliffPrototype - 'cliff' CorpsePrototype - 'corpse' RailRemnantsPrototype - 'rail-remnants' DeconstructibleTileProxyPrototype - 'deconstructible-tile-proxy' EntityGhostPrototype - 'entity-ghost' EntityWithHealthPrototype - abstract EntityWithOwnerPrototype - abstract AccumulatorPrototype - 'accumulator' AgriculturalTowerPrototype - 'agricultural-tower' ArtilleryTurretPrototype - 'artillery-turret' AsteroidCollectorPrototype - 'asteroid-collector' AsteroidPrototype - 'asteroid' BeaconPrototype - 'beacon' BoilerPrototype - 'boiler' BurnerGeneratorPrototype - 'burner-generator' CargoBayPrototype - 'cargo-bay' CargoLandingPadPrototype - 'cargo-landing-pad' CargoPodPrototype - 'cargo-pod' CharacterPrototype - 'character' CombinatorPrototype - abstract ArithmeticCombinatorPrototype - 'arithmetic-combinator' DeciderCombinatorPrototype - 'decider-combinator' SelectorCombinatorPrototype - 'selector-combinator' ConstantCombinatorPrototype - 'constant-combinator' ContainerPrototype - 'container' LogisticContainerPrototype - 'logistic-container' InfinityContainerPrototype - 'infinity-container' TemporaryContainerPrototype - 'temporary-container' CraftingMachinePrototype - abstract AssemblingMachinePrototype - 'assembling-machine' RocketSiloPrototype - 'rocket-silo' FurnacePrototype - 'furnace' DisplayPanelPrototype - 'display-panel' ElectricEnergyInterfacePrototype - 'electric-energy-interface' ElectricPolePrototype - 'electric-pole' EnemySpawnerPrototype - 'unit-spawner' FlyingRobotPrototype - abstract CaptureRobotPrototype - 'capture-robot' CombatRobotPrototype - 'combat-robot' RobotWithLogisticInterfacePrototype - abstract ConstructionRobotPrototype - 'construction-robot' LogisticRobotPrototype - 'logistic-robot' FusionGeneratorPrototype - 'fusion-generator' FusionReactorPrototype - 'fusion-reactor' GatePrototype - 'gate' GeneratorPrototype - 'generator' HeatInterfacePrototype - 'heat-interface' HeatPipePrototype - 'heat-pipe' InserterPrototype - 'inserter' LabPrototype - 'lab' LampPrototype - 'lamp' LandMinePrototype - 'land-mine' LightningAttractorPrototype - 'lightning-attractor' LinkedContainerPrototype - 'linked-container' MarketPrototype - 'market' MiningDrillPrototype - 'mining-drill' OffshorePumpPrototype - 'offshore-pump' PipePrototype - 'pipe' InfinityPipePrototype - 'infinity-pipe' PipeToGroundPrototype - 'pipe-to-ground' PlayerPortPrototype - 'player-port' PowerSwitchPrototype - 'power-switch' ProgrammableSpeakerPrototype - 'programmable-speaker' ProxyContainerPrototype - 'proxy-container' PumpPrototype - 'pump' RadarPrototype - 'radar' RailPrototype - abstract CurvedRailAPrototype - 'curved-rail-a' ElevatedCurvedRailAPrototype - 'elevated-curved-rail-a' CurvedRailBPrototype - 'curved-rail-b' ElevatedCurvedRailBPrototype - 'elevated-curved-rail-b' HalfDiagonalRailPrototype - 'half-diagonal-rail' ElevatedHalfDiagonalRailPrototype - 'elevated-half-diagonal-rail' LegacyCurvedRailPrototype - 'legacy-curved-rail' LegacyStraightRailPrototype - 'legacy-straight-rail' RailRampPrototype - 'rail-ramp' StraightRailPrototype - 'straight-rail' ElevatedStraightRailPrototype - 'elevated-straight-rail' RailSignalBasePrototype - abstract RailChainSignalPrototype - 'rail-chain-signal' RailSignalPrototype - 'rail-signal' RailSupportPrototype - 'rail-support' ReactorPrototype - 'reactor' RoboportPrototype - 'roboport' SegmentPrototype - 'segment' SegmentedUnitPrototype - 'segmented-unit' SimpleEntityWithOwnerPrototype - 'simple-entity-with-owner' SimpleEntityWithForcePrototype - 'simple-entity-with-force' SolarPanelPrototype - 'solar-panel' SpacePlatformHubPrototype - 'space-platform-hub' SpiderLegPrototype - 'spider-leg' SpiderUnitPrototype - 'spider-unit' StorageTankPrototype - 'storage-tank' ThrusterPrototype - 'thruster' TrainStopPrototype - 'train-stop' TransportBeltConnectablePrototype - abstract LaneSplitterPrototype - 'lane-splitter' LinkedBeltPrototype - 'linked-belt' LoaderPrototype - abstract Loader1x1Prototype - 'loader-1x1' Loader1x2Prototype - 'loader' SplitterPrototype - 'splitter' TransportBeltPrototype - 'transport-belt' UndergroundBeltPrototype - 'underground-belt' TurretPrototype - 'turret' AmmoTurretPrototype - 'ammo-turret' ElectricTurretPrototype - 'electric-turret' FluidTurretPrototype - 'fluid-turret' UnitPrototype - 'unit' ValvePrototype - 'valve' VehiclePrototype - abstract CarPrototype - 'car' RollingStockPrototype - abstract ArtilleryWagonPrototype - 'artillery-wagon' CargoWagonPrototype - 'cargo-wagon' InfinityCargoWagonPrototype - 'infinity-cargo-wagon' FluidWagonPrototype - 'fluid-wagon' LocomotivePrototype - 'locomotive' SpiderVehiclePrototype - 'spider-vehicle' WallPrototype - 'wall' FishPrototype - 'fish' SimpleEntityPrototype - 'simple-entity' TreePrototype - 'tree' PlantPrototype - 'plant' ExplosionPrototype - 'explosion' FireFlamePrototype - 'fire' FluidStreamPrototype - 'stream' HighlightBoxEntityPrototype - 'highlight-box' ItemEntityPrototype - 'item-entity' ItemRequestProxyPrototype - 'item-request-proxy' LightningPrototype - 'lightning' ParticleSourcePrototype - 'particle-source' ProjectilePrototype - 'projectile' ResourceEntityPrototype - 'resource' RocketSiloRocketPrototype - 'rocket-silo-rocket' RocketSiloRocketShadowPrototype - 'rocket-silo-rocket-shadow' SmokePrototype - abstract SmokeWithTriggerPrototype - 'smoke-with-trigger' SpeechBubblePrototype - 'speech-bubble' StickerPrototype - 'sticker' TileGhostPrototype - 'tile-ghost'

## Properties

- default
- sorted

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 optional | :: 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 |
build_base_evolution_requirement optional | :: double |
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.
heating_energy optional | :: 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 `graphics_set` instead of directly in the entity prototype. [...]
May also be defined inside `graphics_set` instead of directly in the entity prototype. [...]
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] |

Inherited from Prototype

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.

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[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.

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. [...]
alert_icon_scale optional | :: float |
alert_icon_shift optional | :: Vector |
allow_copy_paste optional | :: boolean |
ambient_sounds optional | :: WorldAmbientSoundDefinition or array[WorldAmbientSoundDefinition] |
ambient_sounds_group optional | :: EntityID |
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.
build_base_evolution_requirement optional | :: double |
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). [...]
build_sound optional | :: Sound |
close_sound optional | :: Sound |
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.
created_effect optional | :: Trigger | The effect/trigger that happens when the entity is placed.
The effect/trigger that happens when the entity is placed.
created_smoke optional | :: CreateTrivialSmokeEffectItem | The smoke that is shown when the entity is placed.
The smoke that is shown when the entity is placed.
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.
diagonal_tile_grid_size optional | :: TilePosition |
draw_stateless_visualisations_in_ghost optional | :: boolean |
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. [...]
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. [...]
enemy_map_color optional | :: Color |
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. [...]
flags optional | :: EntityPrototypeFlags |
friendly_map_color optional | :: Color |
heating_energy optional | :: Energy | This entity can freeze if heating_energy is larger than zero.
This entity can freeze if heating_energy is larger than zero.
hit_visualization_box optional | :: BoundingBox | Where beams should hit the entity. [...]
Where beams should hit the entity. [...]
icon optional | :: FileName | Path to the icon file. [...]
Path to the icon file. [...]
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.
icon_size optional | :: SpriteSizeType | The size of the square icon, in pixels. [...]
The size of the square icon, in pixels. [...]
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. [...]
icons_positioning optional | :: array[IconSequencePositioning] |
impact_category optional | :: string | Name of a ImpactCategory.
Name of a ImpactCategory.
map_color optional | :: Color |
map_generator_bounding_box optional | :: BoundingBox | Used instead of the collision box during map generation. [...]
Used instead of the collision box during map generation. [...]
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.
mined_sound optional | :: Sound |
mining_sound optional | :: Sound |
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. [...]
open_sound optional | :: Sound |
placeable_by optional | :: ItemToPlace or array[ItemToPlace] | Item that when placed creates this entity. [...]
Item that when placed creates this entity. [...]
placeable_position_visualization optional | :: Sprite |
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.
radius_visualisation_specification optional | :: RadiusVisualisationSpecification |
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. [...]
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. [...]
rotated_sound optional | :: Sound |
selectable_in_game optional | :: boolean |
selection_box optional | :: BoundingBox | Specification of the entity selection area. [...]
Specification of the entity selection area. [...]
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. [...]
shooting_cursor_size optional | :: double | The cursor size used when shooting at this entity.
The cursor size used when shooting at this entity.
stateless_visualisation optional | :: StatelessVisualisation or array[StatelessVisualisation] |
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.
surface_conditions optional | :: array[SurfaceCondition] |
tile_buildability_rules optional | :: array[TileBuildabilityRule] |
tile_height optional | :: int32 |
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). [...]
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.
water_reflection optional | :: WaterReflectionDefinition | May also be defined inside `graphics_set` instead of directly in the entity prototype. [...]
May also be defined inside `graphics_set` instead of directly in the entity prototype. [...]
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.

Inherited from Prototype

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.
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. [...]

Inherited from PrototypeBase

name | :: string | Unique textual identification of the prototype. [...]
Unique textual identification of the prototype. [...]
type | :: string | Specifies the kind of prototype this is. [...]
Specifies the kind of prototype this is. [...]
factoriopedia_description optional | :: LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
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.
hidden optional | :: boolean |
hidden_in_factoriopedia optional | :: boolean |
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...]
Overwrites the description set in the locale file. [...]
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...]
Overwrites the name set in the locale file. [...]
order[overridden] optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...]
Used to order prototypes in inventory, recipes and GUIs. [...]
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.
subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup.
The name of an ItemSubGroup.

## Properties

### icons :: array[IconData] optional

This will be used in the electric network statistics, editor building selection, and the bonus gui. Can't be an empty array.

Either this or `icon` is mandatory for entities that have at least one of these flags active: `"placeable-neutral"`, `"placeable-player`", `"placeable-enemy"`.

### icon :: FileName optional

Path to the icon file.

Either this or `icons` is mandatory for entities that have at least one of these flags active: `"placeable-neutral"`, `"placeable-player`", `"placeable-enemy"`.

Only loaded if `icons` is not defined.

#### Example

    icon = "__base__/graphics/icons/wooden-chest.png"

### icon_size :: SpriteSizeType optional

Default: `64`

The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.

Only loaded if `icons` is not defined.

### collision_box :: BoundingBox optional

Default: Empty = `{{0, 0}, {0, 0}}`

Specification of the entity collision boundaries. Empty collision box means no collision and is used for smoke, projectiles, particles, explosions etc.

The `{0,0}` coordinate in the collision box will match the entity position. It should be near the center of the collision box, to keep correct entity drawing order. The bounding box must include the `{0,0}` coordinate.

Note, that for buildings, it is customary to leave 0.1 wide border between the edge of the tile and the edge of the building, this lets the player move between the building and electric poles/inserters etc.

#### Example

    collision_box = {{-0.4, -0.4}, {0.4, 0.4}}

### collision_mask :: CollisionMaskConnector optional

Defaults to the mask from UtilityConstants::default_collision_masks when indexed by the entity type.

### map_generator_bounding_box :: BoundingBox optional

Default: The value of collision_box.

Used instead of the collision box during map generation. Allows space entities differently during map generation, for example if the box is bigger, the entities will be placed farther apart.

### selection_box :: BoundingBox optional

Default: Empty = `{{0, 0}, {0, 0}}`

Specification of the entity selection area. When empty the entity will have no selection area (and thus is not selectable).

The selection box is usually a little bit bigger than the collision box. For tileable entities (like buildings) it should match the tile size of the building.

#### Example

    selection_box = {{-0.5, -0.5}, {0.5, 0.5}}

### drawing_box_vertical_extension :: double optional

Default: `0.0`

Specification of extra vertical space needed to see the whole entity in GUIs. This is used to calculate the correct zoom and positioning in the entity info gui, for example in the entity tooltip.

#### Example

    drawing_box_vertical_extension = 0.5

### sticker_box :: BoundingBox optional

Default: The value of collision_box.

Used to specify the area where the sticker animation can appear for entities that can have stickers on them.

#### Example

    sticker_box = {{-0.5, -0.5}, {0.5, 0.5}}

### hit_visualization_box :: BoundingBox optional

Default: Empty = `{{0, 0}, {0, 0}}`

Where beams should hit the entity. Useful if the bounding box only covers part of the entity (e.g. feet of the character) and beams only hitting there would look weird.

### trigger_target_mask :: TriggerTargetMask optional

Defaults to the mask from UtilityConstants::default_trigger_target_mask_by_type.

### flags :: EntityPrototypeFlags optional

### tile_buildability_rules :: array[TileBuildabilityRule] optional

### minable :: MinableProperties optional

Default: not minable

The item given to the player when they mine the entity and other properties relevant to mining this entity.

#### Example

    minable = {mining_time = 0.2, result = "boiler"}

### surface_conditions :: array[SurfaceCondition] optional

### deconstruction_alternative :: EntityID optional

Used to merge multiple entities into one entry in the deconstruction planner.

### selection_priority :: uint8 optional

Default: `50`

The entity with the higher number is selectable before the entity with the lower number.

The value `0` will be treated the same as `nil`.

### build_grid_size :: uint8 optional

Default: `1`

Supported values are 1 (for 1x1 grid) and 2 (for 2x2 grid, like rails).

Internally forced to be `2` for RailPrototype, RailRemnantsPrototype, TrainStopPrototype, RailSupportPrototype and CargoBayPrototype.

Internally forced to be `256` for SpacePlatformHubPrototype.

### remove_decoratives :: `"automatic"` or `"true"` or `"false"` optional

Default: `"automatic"`

Whether this entity should remove decoratives that collide with it when this entity is built. When set to "automatic", if the entity type is considered a building (e.g. an assembling machine or a wall) it will remove decoratives.

### emissions_per_second :: dictionary[AirbornePollutantID → double] optional

Amount of emissions created (positive number) or cleaned (negative number) every second by the entity. This is passive and currently used just for trees and fires. This is independent of the emissions of energy sources used by machines, which are created actively depending on the power consumption.

### shooting_cursor_size :: double optional

The cursor size used when shooting at this entity.

### created_smoke :: CreateTrivialSmokeEffectItem optional

Default: The "smoke-building"-smoke

The smoke that is shown when the entity is placed.

### working_sound :: WorkingSound optional

Will also work on entities that don't actually do work.

### created_effect :: Trigger optional

The effect/trigger that happens when the entity is placed.

### build_sound :: Sound optional

### mined_sound :: Sound optional

### mining_sound :: Sound optional

### rotated_sound :: Sound optional

### impact_category :: string optional

Default: `"default"`

Name of a ImpactCategory.

### 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

Default: `false`

### build_base_evolution_requirement :: double optional

Default: `0`

### alert_icon_shift :: Vector optional

### alert_icon_scale :: float optional

### fast_replaceable_group :: string optional

Default: `""`

This allows you to replace an entity that's already placed, with a different one in your inventory. For example, replacing a burner inserter with a fast inserter. The replacement entity can be a different rotation to the replaced entity and you can replace an entity with the same type.

This is simply a string, so any string can be used here. The entity that should be replaced simply has to use the same string here.

Entities with the same fast replaceable group can be configured as upgrades for each other in the upgrade planner. Refer to the upgrade planner prototype's page the full requirements for entities to be shown in the upgrade planner.

### next_upgrade :: EntityID optional

Name of the entity that will be automatically selected as the upgrade of this entity when using the upgrade planner without configuration.

This entity may not have "not-upgradable" flag set and must be minable. This entity mining result must not contain item product with hidden set to `true`. Mining results with no item products are allowed. This entity may not be a RollingStockPrototype.

The upgrade target entity needs to have the same bounding box, collision mask, and fast replaceable group as this entity. The upgrade target entity must have least 1 item that builds it that isn't hidden.

#### Example

    next_upgrade = "fast-inserter"

### protected_from_tile_building :: boolean optional

Default: `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.

### heating_energy :: Energy optional

Default: `"0W"`

This entity can freeze if heating_energy is larger than zero.

### allow_copy_paste :: boolean optional

Default: `true`

### selectable_in_game :: boolean optional

Default: `true`

### placeable_by :: ItemToPlace or array[ItemToPlace] optional

Item that when placed creates this entity. Determines which item is picked when "Q" (smart pipette) is used on this entity. Determines which item and item amount is needed in a blueprint of this entity and to revive a ghost of this entity.

The item count specified here can't be larger than the stack size of that item.

#### Example

    placeable_by = {item = "rail", count = 4}

### remains_when_mined :: EntityID or array[EntityID] optional

The entity that remains when this one is mined, deconstructed or fast-replaced. The entity wont actually be spawned if it would collide with the entity that is in the process of being mined.

### additional_pastable_entities :: array[EntityID] optional

Names of the entity prototypes this entity prototype can be pasted on to in addition to the standard supported types.

This is used to allow copying between types that aren't compatible on the C++ code side, by allowing mods to receive the on_entity_settings_pasted event for the given entity and do the setting pasting via script.

#### Example

    additional_pastable_entities = {"steel-chest", "iron-chest"}

### tile_width :: int32 optional

Default: calculated by the collision box width rounded up.

Used to determine how the center of the entity should be positioned when building (unless the off-grid flag is specified).

When the tile width is odd, the center will be in the center of the tile, when it is even, the center is on the tile transition.

### tile_height :: int32 optional

Default: calculated by the collision box height rounded up.

### diagonal_tile_grid_size :: TilePosition optional

### autoplace :: AutoplaceSpecification optional

Default: nil (entity is not autoplacable)

Used to specify the rules for placing this entity during map generation.

### map_color :: Color optional

### friendly_map_color :: Color optional

### enemy_map_color :: Color optional

### water_reflection :: WaterReflectionDefinition optional

May also be defined inside `graphics_set` instead of directly in the entity prototype. This is useful for entities that use a `graphics_set` property to define their graphics, because then all graphics can be defined in one place.

Currently only renders for EntityWithHealthPrototype and CorpsePrototype.

### ambient_sounds_group :: EntityID optional

### ambient_sounds :: WorldAmbientSoundDefinition or array[WorldAmbientSoundDefinition] optional

### icon_draw_specification :: IconDrawSpecification optional

Used to specify where and how the alt-mode icons should be drawn.

#### 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

Used to order prototypes in inventory, recipes and GUIs. May not exceed a length of 200 characters.

The order string is taken from the items in `placeable_by` if they exist, or from an item that has its place_result set to this entity.

## 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}
      }
    }