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

# Factorio Runtime Docs Version 2.0.77

# EntityPrototypeFilter - Runtime Docs

## EntityPrototypeFilter :: table

#### Table fields

filter | :: `"flying-robot"` or `"robot-with-logistics-interface"` or `"rail"` or `"ghost"` or `"explosion"` or `"vehicle"` or `"crafting-machine"` or `"rolling-stock"` or `"turret"` or `"transport-belt-connectable"` or `"wall-connectable"` or `"buildable"` or `"placable-in-editor"` or `"clonable"` or `"selectable"` or `"hidden"` or `"entity-with-health"` or `"building"` or `"fast-replaceable"` or `"uses-direction"` or `"minable"` or `"circuit-connectable"` or `"autoplace"` or `"blueprintable"` or `"item-to-place"` or `"name"` or `"type"` or `"collision-mask"` or `"flag"` or `"build-base-evolution-requirement"` or `"selection-priority"` or `"emissions-per-second"` or `"crafting-category"` | The condition to filter on.
The condition to filter on.
mode | :: `"or"` or `"and"`? | How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
invert | :: boolean? | Inverts the condition. Default is `false`.
Inverts the condition. Default is `false`.

Other attributes may be specified depending on `filter`:

#### `name`

For use within nested filters such as the `place-result` filter of array[ItemPrototypeFilter].

To get a specific prototype by name, see LuaPrototypes::entity.

name | :: string or array[string] | The prototype name, or list of acceptable names.
The prototype name, or list of acceptable names.

#### `type`

Usage example:

    prototypes.get_entity_filtered({{filter = "type", type = "unit"}})

type | :: string or array[string] | The prototype type, or a list of acceptable types.
The prototype type, or a list of acceptable types.

#### `collision-mask`

Usage example:

    prototypes.get_entity_filtered({{filter = "collision-mask", mask = "player", mask_mode = "collides"}})

mask | :: CollisionLayerID or CollisionMask | Name of one layer or a full collision mask.
Name of one layer or a full collision mask.
mask_mode | :: `"collides"` or `"layers-equals"` or `"contains-any"` or `"contains-all"` |

#### `flag`

Usage example:

    prototypes.get_entity_filtered({{filter = "flag", flag = "placeable-player"}, {filter = "flag", flag = "placeable-enemy", mode = "and"}})

flag | :: EntityPrototypeFlag |

#### `build-base-evolution-requirement`

comparison | :: ComparatorString |
value | :: double | The value to compare against.
The value to compare against.

#### `selection-priority`

comparison | :: ComparatorString |
value | :: uint8 | The value to compare against.
The value to compare against.

#### `emissions-per-second`

pollutant | :: string | The name of a pollutant type to check.
The name of a pollutant type to check.
comparison | :: ComparatorString |
value | :: double | The value to compare against.
The value to compare against.

#### `crafting-category`

crafting_category | :: string | Matches if the prototype is for a crafting machine with this crafting category.
Matches if the prototype is for a crafting machine with this crafting category.

Concept used in

- LuaPrototypes::get_entity_filtered()
- ItemPrototypeFilter
- PrototypeFilter