Runtime Concepts
AccumulatorBlueprintControlBehavior
AchievementPrototypeFilter
AddRecordData
AdvancedMapGenSettings
AgriculturalTowerBlueprintControlBehavior
Alert
Alignment — A string that specifies where a GUI element should be.
AmmoType
Any — Any basic type (string, number, boolean), table, or LuaObject.
AnyBasic — Any basic type (string, number, boolean) or table.
ArithmeticCombinatorBlueprintControlBehavior
ArithmeticCombinatorParameterOperation
ArithmeticCombinatorParameters
ArtilleryTurretBlueprintControlBehavior
AssemblingMachineBlueprintControlBehavior
AsteroidChunk
AsteroidChunkID — An asteroid chunk prototype may be specified in one of two ways.
AsteroidChunkPrototypeFilter
AsteroidCollectorBlueprintControlBehavior
AsteroidMapSettings
AttackParameterFluid
AttackParameters
AttackReactionItem
AutoplaceControl
AutoplaceSettings
AutoplaceSpecification — Specifies how probability and richness are calculated when placing something on the map.
AutoplaceSpecificationRestriction
BeamTarget
BeltConnectionType
BlueprintEntity — The representation of an entity inside of a blueprint.
BlueprintEquipment
BlueprintInfinityInventorySettings
BlueprintInsertPlan — Defines an item type that a blueprint entity will request.
BlueprintInventory
BlueprintInventoryWithFilters
BlueprintItemFilter
BlueprintItemIDAndQualityIDPair — An item prototype with optional quality specification.
BlueprintLogisticFilter
BlueprintLogisticSections
BlueprintMiningDrillFilter
BlueprintQualityID
BlueprintSchedule
BlueprintScheduleInterrupt
BlueprintScheduleRecord
BlueprintSignalIcon
BlueprintWire — Describes a single wire in the blueprint. The members of the tuple are, in order:
BlueprintWireEnd
boolean — Either true or false.
BoundingBox — Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with MapPosition, the names of the members may be omitted. When read from the game, the third member orientation is present if it is non-zero.
CapsuleAction
CargoDestination — The destination of a cargo pod.
CargoLandingPadBlueprintControlBehavior
ChartTagSpec — Either icon, text, or both must be provided.
ChunkPosition — Coordinates of a chunk in a LuaSurface where each integer x/y represents a different chunk. This uses the same format as MapPosition, meaning it can be specified either with or without explicit keys. A MapPosition can be translated to a ChunkPosition by dividing the x/y values by 32.
ChunkPositionAndArea — A ChunkPosition with an added bounding box for the area of the chunk.
CircuitCondition
CircuitConditionDefinition
CircuitNetworkSelection
CircularParticleCreationSpecification
CircularProjectileCreationSpecification
CliffOrientation
CliffPlacementSettings
CollisionLayerID — The name of a LuaCollisionLayerPrototype.
CollisionMask
Color — Red, green, blue and alpha values, all in range [0, 1] or all in range [0, 255] if any value is > 1. All values here are optional. Color channels default to 0, the alpha channel defaults to 1.
ColorModifier — Same as Color, but red, green, blue and alpha values can be any floating point number, without any special handling of the range [1, 255].
Command — Commands can be given to enemies and unit groups.
ComparatorString — A string that specifies how the inputs should be compared.
CompiledLogisticFilter
ConfigurationChangedData
ConstantCombinatorBlueprintControlBehavior
ContainerBlueprintControlBehavior
CraftingQueueItem
CursorBoxRenderType
CustomCommandData
CustomEntityStatus
CustomTooltipField
CutsceneWaypoint
DamageTypeFilters
DamageTypeID — A damage type prototype may be specified in one of two ways.
DeciderCombinatorBlueprintControlBehavior
DeciderCombinatorCondition
DeciderCombinatorOutput
DeciderCombinatorParameters
Decorative
DecorativeID — A decorative prototype may be specified in one of two ways.
DecorativePrototypeFilter
DecorativeResult
DetailedItemOnLine
DifficultySettings — Technology difficulty settings. Updating any of the attributes will immediately take effect in the game engine.
DisplayPanelBlueprintControlBehavior
DisplayPanelMessageDefinition
DisplayResolution
double — A double-precision floating-point number. This is the same data type as all Lua numbers use.
DragTarget
EffectReceiver
EjectedItem — An item thrown overboard on a space platform.
ElemID
ElemType — A string specifying a type for choose elem buttons. It's also used by ElemID for LuaGuiElement::elem_tooltip.
EnemyEvolutionMapSettings — These values represent a percentual increase in evolution. This means a value of 0.1 would increase evolution by 10%.
EnemyExpansionMapSettings — Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as Manhattan distance.
EntityID — An entity prototype may be specified in one of three ways.
EntityIDAndQualityIDPair — An entity prototype with optional quality specification.
EntityIDFilter
EntityPrototypeFilter
EntityPrototypeFlag — A string specifying an entity prototype flag.
EntityPrototypeFlags — A set of flags. Active flags are in the dictionary as true, while inactive flags aren't present at all.
EntitySearchFilters
EntityWithQualityID — An entity prototype with optional quality specification. Can be specified in one of four ways.
EquipmentID — An equipment prototype may be specified in one of three ways.
EquipmentIDAndQualityIDPair — An equipment prototype with optional quality specification.
EquipmentPoint — A table used to define a manual shape for a piece of equipment.
EquipmentPosition — Position inside an equipment grid. This uses the same format as MapPosition, meaning it can be specified either with or without explicit keys.
EquipmentPrototypeFilter
EquipmentWithQualityCounts
EquipmentWithQualityID — An equipment prototype with optional quality specification.
EventData — Information about the event that has been raised. The table can also contain other fields depending on the type of event. See the list of Factorio events for more information on these.
EventFilter — Used to filter out irrelevant event callbacks in a performant way.
ExplosionDefinition
FactoriopediaID
float — A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision numbers, when a function takes a float, the game engine will immediately convert the double-precision number to single-precision.
FlowStatisticsID — Identifies a statistics prototype, depending on the statistics type.
Fluid
FluidAmount — A fluid amount. The amount is stored as a fixed-size signed 64 bit integer, with 24 bits reserved for decimal precision, meaning the smallest value step is 1/2^24.
FluidBoxConnectionRecord
FluidBoxFilter
FluidBoxFilterSpec
FluidFlowDirection
FluidID — A fluid may be specified in one of three ways.
FluidProduct
FluidPrototypeFilter
ForceCondition
ForceID — A force may be specified in one of three ways.
ForceSet — Set of forces. Can be specified in one of two ways.
FurnaceBlueprintControlBehavior
GameViewSettings — Parameters that affect the look and control of the game. Updating any of the member attributes here will immediately take effect in the game engine.
GuiAnchor
GuiArrowSpecification — Used for specifying where a GUI arrow should point to.
GuiArrowType — Used by GuiArrowSpecification.
GuiDirection — Direction of a LuaGuiElement's layout.
GuiElementType
GuiLocation — Screen coordinates of a GUI element in a LuaGui. This uses the same format as TilePosition, meaning it can be specified either with or without explicit keys.
GunShift4Way
HeatConnection
HeatSetting — The settings used by a heat-interface type entity.
HeatSettingMode
IconDrawSpecification
IconSequencePositioning
IDType — All base prototype types.
InfinityInventoryFilter — A single filter used by an infinity-filters instance.
InfinityPipeFilter — A single filter used by an infinity-pipe type entity.
Ingredient
InserterBlueprintControlBehavior
int16 — 16 bit signed integer. Possible values are -32 768 to 32 767.
int32 — 32-bit signed integer. Possible values are -2 147 483 648 to 2 147 483 647.
int8 — 8-bit signed integer. Possible values are -128 to 127.
InventoryIndex
InventoryPosition
InventoryWithCustomStackSizeSpecification
ItemCountType
ItemFilter — An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
ItemID — An item prototype may be specified in one of four ways.
ItemIDAndQualityIDPair — An item prototype with optional quality specification.
ItemIDFilter
ItemInventoryPositions
ItemLocationData
ItemProduct
ItemPrototypeFilter
ItemPrototypeFlag — A string specifying an item prototype flag.
ItemPrototypeFlags — A set of flags. Active flags are in the dictionary as true, while inactive flags aren't present at all.
ItemStackDefinition
ItemStackIdentification — An item may be specified in one of three ways.
ItemStackIndex
ItemStackLocation
ItemToPlace
ItemWithQualityCount
ItemWithQualityCounts
ItemWithQualityID — An item prototype with optional quality specification. Can be specified in one of four ways.
LinkedGameControl — The internal name of a game control (key binding).
LocalisedString — Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.
LogisticContainerBlueprintControlBehavior
LogisticFilter
LogisticFilterIndex
LogisticGroup
LogisticSection
LogisticSections
LogisticsNetworkSupplyCounts
LogisticsNetworkSupplyPoints
Loot
LuaEntityClonedEventFilter
LuaEntityDamagedEventFilter
LuaEntityDeconstructionCancelledEventFilter
LuaEntityDiedEventFilter
LuaEntityMarkedForDeconstructionEventFilter
LuaEntityMarkedForUpgradeEventFilter
LuaEventType — Event name may be specified in one of four ways.
LuaObject — Any LuaObject listed on the Classes page.
LuaPlatformBuiltEntityEventFilter
LuaPlatformMinedEntityEventFilter
LuaPlayerBuiltEntityEventFilter
LuaPlayerMinedEntityEventFilter
LuaPlayerRepairedEntityEventFilter
LuaPostEntityDiedEventFilter
LuaPostSegmentedUnitDiedEventFilter
LuaPreGhostDeconstructedEventFilter
LuaPreGhostUpgradedEventFilter
LuaPrePlatformMinedEntityEventFilter
LuaPrePlayerMinedEntityEventFilter
LuaPreRobotMinedEntityEventFilter
LuaRobotBuiltEntityEventFilter
LuaRobotMinedEntityEventFilter
LuaScriptRaisedBuiltEventFilter
LuaScriptRaisedDestroyEventFilter
LuaScriptRaisedDestroySegmentedUnitEventFilter
LuaScriptRaisedReviveEventFilter
LuaScriptRaisedTeleportedEventFilter
LuaSectorScannedEventFilter
LuaSegmentedUnitCreatedEventFilter
LuaSegmentedUnitDamagedEventFilter
LuaSegmentedUnitDiedEventFilter
LuaUpgradeCancelledEventFilter
MapAndDifficultySettings — A standard table containing all MapSettings attributes plus an additional table that contains all DifficultySettings properties.
MapDifficultySettings
MapExchangeStringData — The data that can be extracted from a map exchange string, as a plain table.
MapGenPreset
MapGenSettings
MapGenSize — A floating point number specifying an amount.
MapLocation
MapPosition — Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with x, y as keys, or simply as an array with two elements.
MapSettings — Various game-related settings. Updating any of the attributes will immediately take effect in the game engine.
MapTick — math.huge represents the maximum possible tick.
MapViewSettings — What is shown in the map view. If a field is not given, that setting will not be changed.
MarketIngredient
MathExpression — A string that represents a math expression. The expression parser recognizes four basic token types (with their regex):
MineableProperties
MiningDrillBlueprintControlBehavior
ModChangeData
ModifierType — Used by TechnologyModifier.
ModSetting
ModSettingPrototypeFilter
ModuleEffects
ModuleEffectValue — The percentual increase of the attribute. A value of 0.6 means a 60% increase.
MouseButtonFlags — A set of flags. Active flags are in the dictionary as true, while inactive flags aren't present at all.
NeighbourConnectable
NeighbourConnectableConnectionDefinition
nil — Nil is the type of the value nil, whose main property is to be different from any other value. It usually represents the absence of a useful value.
NoiseExpressionSourceString — The string representation of a noise expression. More detailed information is found on the prototype docs.
NthTickEventData
number — Any kind of integer or floating point number.
Offer — A single offer on a market entity.
OldTileAndPosition
ParticleID — A particle prototype may be specified in one of two ways.
PathfinderFlags
PathFinderMapSettings
PathfinderWaypoint
PerceivedPerformance
PipeConnection — A single pipe connection for a given fluidbox.
PipeConnectionDefinition
PipeConnectionType
PipetteID
PlaceAsTileResult
PlatformSchedule
PlayerIdentification — A player may be specified in one of three ways.
PlaySoundSpecification
PollutionMapSettings — These values are for the time frame of one second (60 ticks).
PostSegmentDiedData — Information about an individual segment in a segmented unit when the unit died.
PowerSwitchBlueprintControlBehavior
PrintSettings
Product — Returns one of the subtypes, depending on the value of type.
ProductionType — Specifies how the entity will utilize this fluidbox. input-output should only be used for boilers in fluid heating mode.
ProgrammableSpeakerAlertParameters
ProgrammableSpeakerBlueprintControlBehavior
ProgrammableSpeakerCircuitParameters
ProgrammableSpeakerInstrument
ProgrammableSpeakerParameters
ProgrammableSpeakerPlaybackMode — Specifies from where the programmable speaker's sound will be heard.
PropertyExpressionNames — All other MapGenSettings feed into named noise expressions, and therefore placement can be overridden by including the name of a property in this dictionary. The probability and richness functions for placing specific tiles, entities, and decoratives can be overridden by including an entry named {tile|entity|decorative}:(prototype name):{probability|richness}.
PrototypeFilter — Types "signal" and "item-group" do not support filters.
PrototypeFilterMode
PrototypeHistory
PrototypeWithQuality
ProxyContainerBlueprintControlBehavior
PumpBlueprintControlBehavior
QualityCondition — An item filter may be specified in two ways, either as a string which is a quality prototype name or as a table.
QualityID — A quality prototype may be specified in one of two ways.
RadiusVisualisationSpecification
RailEndGoal
RailEndStart
RailExtensionData
RailLocation
RailSignalBaseBlueprintControlBehavior
RangeMode
ReactorBlueprintControlBehavior
RealOrientation — The smooth orientation. It is a float in the range [0, 1) that covers a full circle, starting at the top and going clockwise.
RecipeCategoryID — A recipe category may be specified in one of two ways.
RecipeID — A recipe may be specified in one of three ways.
RecipeIDAndQualityIDPair — A recipe prototype with optional quality specification.
RecipePrototypeFilter
RegistrationTarget — Represents an object that can be registered for the on_object_destroyed event. Each target has an associated defines.target_type and some have a unique identifier.
RenderLayer — A number between 0 and 255 inclusive, represented by one of the following named strings or the string version of the number. For example "10" and "decals" are both valid. Higher values are rendered above lower values.
ResearchIngredient
ResearchTrigger
Resistance
RidingState
RoboportBlueprintControlBehavior
RocketSiloBlueprintControlBehavior
RollingStockDrawData
ScheduleInterrupt
ScheduleRecord
ScheduleRecordPosition
ScriptArea — An area defined using the map editor.
ScriptPosition — A position defined using the map editor.
ScriptRenderMode
ScriptRenderTarget — When writing it is possible to give LuaEntity or MapPosition directly. However, reading always returns the full ScriptRenderTargetTable.
ScriptRenderTargetTable
ScrollPolicy — Scroll policy of a scroll pane.
SegmentedUnitAIState — A structure describing the state of a LuaSegmentedUnit's AI.
SegmentEngineSpecification — A runtime representation of SegmentEngineSpecification.
SegmentSpecification — A runtime representation of SegmentSpecification.
SelectedPrototypeData
SelectionModeFlags — A set of flags on a selection tool that define how entities and tiles are selected. Active flags are in the dictionary as true, while inactive flags aren't present at all.
SelectorCombinatorParameterOperation
SelectorCombinatorParameters
Signal — An actual signal transmitted by the network.
SignalFilter — A signal filter may be specified in two ways, either as a string which is a virtual signal name or item prototype name or as a table.
SignalID
SignalIDBase
SignalIDType
SimulationWidgetType
SlotFilter
SmokeSource
SoundPath — It can be either the name of a SoundPrototype defined in the data stage, or a path in the form "type/name". The latter option can be sorted into four categories.
SoundType — Defines which slider in the game's sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.
SpaceConnectionAsteroidSpawnDefinition
SpaceConnectionAsteroidSpawnPoint
SpaceConnectionID — A space connection prototype may be specified in one of two ways.
SpaceLocationAsteroidSpawnDefinition
SpaceLocationID — A space location prototype may be specified in one of two ways.
SpaceLocationPrototypeFilter
SpacePlatformHubBlueprintControlBehavior
SpacePlatformTileDefinition
SpawnPointDefinition
SpiderEngineSpecification
SpiderLegSpecification
SplitterBlueprintControlBehavior
SplitterPriority
SpoilPriority
SpoilToTriggerResult
SpritePath — It can be either the name of a SpritePrototype defined in the data stage, or a path in form "type/name" or "type.name".
SteeringMapSetting
SteeringMapSettings
StorageTankBlueprintControlBehavior
string — Strings are enclosed in double-quotes, like this "hi".
SurfaceCondition
SurfaceIdentification — A surface may be specified in one of three ways.
SurfacePropertyID — Surface property prototype may be specified in one of two ways.
SwitchState — State of a GUI switch.
TabAndContent
table — Tables are enclosed in curly brackets, like this {}.
Tags — A dictionary of string to the four basic Lua types: string, boolean, number, table.
TargetType — Target type of an AmmoType.
TechnologyID — An technology prototype may be specified in one of three ways.
TechnologyModifier — The effect that is applied when a technology is researched.
TechnologyPrototypeFilter
TerritorySettings
TextAlign — The text is aligned so that the target position is at the given side of the text.
ThrusterPerformancePoint
Tile
TileBuildabilityRule — A runtime representation of TileBuildabilityRule.
TileID — A tile may be specified in one of three ways.
TilePosition — Coordinates of a tile on a LuaSurface where each integer x/y represents a different tile. This uses the same format as MapPosition, except it rounds any non-integer x/y down to whole numbers. It can be specified either with or without explicit keys.
TilePrototypeFilter
TileSearchFilters
TrainFilter
TrainPathAllGoalsResult
TrainPathFinderGoal
TrainPathFinderOneGoalResult
TrainPathRequestType — A string specifying the type of request for LuaTrainManager::request_train_path.
TrainSchedule
TrainStopBlueprintControlBehavior
TrainStopFilter
TrainStopGoal
TransportBeltBlueprintControlBehavior
TriggerDelivery
TriggerEffectItem
TriggerEffectItemType — Used by TriggerEffectItem.
TriggerEffectWithCooldown
TriggerItem
TriggerModifierData
TriggerTargetMask — A set of trigger target masks.
TrivialSmokeID — A trivial smoke prototype may be specified in one of two ways.
TurretBlueprintControlBehavior
uint16 — 16-bit unsigned integer. Possible values are 0 to 65 535.
uint32 — 32-bit unsigned integer. Possible values are 0 to 4 294 967 295.
uint64 — 64-bit unsigned integer. Possible values are 0 to 18 446 744 073 709 551 615.
uint8 — 8-bit unsigned integer. Possible values are 0 to 255.
UndoRedoAction
UnitGroupMapSettings
UnitSpawnDefinition
UpgradeMapperDestination
UpgradeMapperSource
ValveMode — Defines the mode of operation for a ValvePrototype.
Vector — A vector is a two-element array or dictionary containing the x and y components. The game will always provide the array format. Positive x goes east, positive y goes south.
Vector3D — Reading this always returns the table with the named keys.
VehicleAutomaticTargetingParameters
VerticalTextAlign — The text is aligned so that the target position is at the given side of the text.
VirtualSignalID — A virtual signal prototype may be specified in one of two ways.
WaitCondition
WaitConditionType — Type of a WaitCondition.
WallBlueprintControlBehavior
Weight — Weight of an object. The weight is stored as a fixed-size 64 bit integer, with 16 bits reserved for decimal precision, meaning the smallest value step is 1/2^16.
WireConnection
WorkerRobotOrder
ZoomLimits — A set of limitations for the player zoom level.
ZoomSpecification — A table specifying a fixed or dynamically-computed zoom level using one of the supported methods. Used by ZoomLimits.