Factorio Prototype DocsVersion 2.0.19

EntityPrototypeFlags :: array[union] Example code

An array containing the following values.

If an entity is a building and has the "player-creation" flag set, it is considered for multiple enemy/unit behaviors:

  • Autonomous enemy attacks (usually triggered by pollution) can only attack within chunks that contain at least one entity that is both a building and a player-creation.

  • Enemy expansion considers entities that are both buildings and player-creations as "enemy" entities that may block expansion.

Union members

"not-rotatable"

Can't be rotated before or after placing.

"placeable-neutral"

Determines the default force when placing entities in the map editor and using the AUTO option for the force.

"placeable-player"

Determines the default force when placing entities in the map editor and using the AUTO option for the force.

"placeable-enemy"

Determines the default force when placing entities in the map editor and using the AUTO option for the force.

"placeable-off-grid"

Refers to the fact that most entities are placed on an invisible 'grid' within the world, entities with this flag do not have to line up with this grid (like trees and land-mines).

"player-creation"

Makes it possible for the biter AI to target the entity as a distraction in distraction mode by_anything. Makes it possible to blueprint, deconstruct, and repair the entity (can be turned off again using the specific flags). Enables smoke to be created automatically when building the entity. If the entity does not have EntityPrototype::map_color set, this flag makes the entity appear on the map/minimap with the default color specified in the UtilityConstants.

"building-direction-8-way"

Uses 45 degree angle increments when selecting direction.

"filter-directions"

Used to automatically detect the proper direction, if possible. Used by base with the pump, train stop, and train signal.

"get-by-unit-number"

When set, entity will be possible to obtain by using LuaGameScript::get_entity_by_unit_number. It also changes input actions sent by a player to be selecting entity by unit number instead of a position which may help players in latency to select moving entities.

"breaths-air"

This is used to specify that the entity breathes air, and so is affected by poison (currently poison capsules are the only source).

"not-repairable"

Used to specify that the entity can not be 'healed' by repair-packs (or construction robots with repair packs)

"not-on-map"

The entity does not get drawn on the map.

"not-deconstructable"

The entity can not be deconstructed.

"not-blueprintable"

The entity can not be used in blueprints.

"hide-alt-info"

Hides the alt-info of an entity in alt-mode, for example the recipe icon.

"no-gap-fill-while-building"
"not-flammable"

Do not apply fire stickers to the entity.

"no-automated-item-removal"

Prevents inserters and loaders from taking items from this entity.

"no-automated-item-insertion"

Prevents inserters and loaders from inserting items into this entity.

"no-copy-paste"

This flag does nothing when set in the data stage because it gets overridden by EntityPrototype::allow_copy_paste. Thus, it must be set on the entity via that property.

"not-selectable-in-game"

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. This flag does nothing when set in the data stage because it gets overridden by EntityPrototype::selectable_in_game. Thus, it must be set on the entity via that property.

"not-upgradable"

The entity can't be selected by the upgrade planner.

"not-in-kill-statistics"

The entity is not shown in the kill statistics.

"building-direction-16-way"
"snap-to-rail-support-spot"
"not-in-made-in"

The entity is not shown in the made in property of recipe tooltips.

Example

flags = {"placeable-neutral", "player-creation"}

Prototypes

Types

Defines