Skip to main content

Module concepts

Module concepts 

Source

Structs§

AccumulatorBlueprintControlBehavior
AchievementPrototypeFilter
AddRecordData
AdvancedMapGenSettings
AgriculturalTowerBlueprintControlBehavior
Alert
AlertFilter
AmmoType
ArithmeticCombinatorBlueprintControlBehavior
ArithmeticCombinatorParameters
ArtilleryTurretBlueprintControlBehavior
AssemblingMachineBlueprintControlBehavior
AsteroidChunk
AsteroidChunkPrototypeFilter
AsteroidCollectorBlueprintControlBehavior
AsteroidMapSettings
AttackParameterFluid
AttackParameters
AttackReactionItem
AutoplaceControl
AutoplaceSettings
AutoplaceSpecification
Specifies how probability and richness are calculated when placing something on the map.
AutoplaceSpecificationRestriction
BeamTarget
BlueprintEntity
The representation of an entity inside of a blueprint.
BlueprintEquipment
BlueprintInfinityInventorySettings
BlueprintInsertPlan
Defines an item type that a blueprint entity will request.
BlueprintInventoryWithFilters
BlueprintItemFilter
BlueprintItemIDAndQualityIDPair
An item prototype with optional quality specification.
BlueprintLogisticFilter
BlueprintLogisticSections
BlueprintMiningDrillFilter
BlueprintQualityID
BlueprintRollingStockConnection
BlueprintSchedule
BlueprintScheduleInterrupt
BlueprintScheduleRecord
BlueprintSignalIcon
BlueprintWireEnd
BoilerBlueprintControlBehavior
BonusUtilityConstants
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.
CargoHatchDefinition
CargoLandingPadBlueprintControlBehavior
CargoStationParameters
ChartTagSpec
Either icon, text, or both must be provided.
ChartUtilityConstants
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
CliffPlacementSettings
CloudsEffectProperties
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.
ColorFilterData
ColorHintSpecification
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.
CompiledLogisticFilter
ConfigurationChangedData
ConstantCombinatorBlueprintControlBehavior
ContainerBlueprintControlBehavior
CraftingQueueItem
CraterPlacementDefinition
CraterSegment
CustomCommandData
CustomEntityStatus
CustomTooltipField
CutsceneWaypoint
DamageParameters
Used to specify what type of damage and how much damage something deals.
DamageTypeFilters
DebugVariable
The supported subset of DebugAdapter Variable
DebugVariablePresentationHint
The supported subset of DebugAdapter VariablePresentationHint
DebugVariablesFilter
DeciderCombinatorBlueprintControlBehavior
DeciderCombinatorCondition
DeciderCombinatorOutput
DeciderCombinatorParameters
Decorative
DecorativePrototypeFilter
DecorativeResult
DetailedItemOnLine
DeviatedValue
DisplayPanelBlueprintControlBehavior
DisplayPanelMessageDefinition
DisplayResolution
DragTarget
EditorUtilityConstants
EffectReceiver
EffectValueRange
EjectedItem
An item thrown overboard on a space platform.
ElemID
EmptySlotInfo
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 Euclidean distance.
EnemySpawnerAbsorption
EnergyAndCapacityPair
EntityIDAndQualityIDPair
An entity prototype with optional quality specification.
EntityIDFilter
EntityPrototypeFilter
EntityRendererSearchBoxLimits
EntitySearchFilters
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
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.
ExplosionDefinition
Fluid
FluidBoxConnectionRecord
FluidBoxNeighbourRecord
FluidFilter
FluidProduct
FluidPrototypeFilter
FogEffectProperties
FurnaceBlueprintControlBehavior
GenericOnOffBlueprintControlBehavior
GhostShimmerConfig
GhostShimmerDistortionData
GhostShimmerOverlayData
GhostTintSet
GlobalTintEffectProperties
GuiAnchor
GuiArrowSpecification
Used for specifying where a GUI arrow should point to.
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
HeatConnectionDefinition
HeatPipeBlueprintControlBehavior
HeatSetting
The settings used by a heat-interface type entity.
IconDrawSpecification
IconSequencePositioning
InfinityInventoryFilter
A single filter used by an infinity-filters instance.
InfinityPipeFilter
A single filter used by an infinity-pipe type entity.
Ingredient
InserterBlueprintControlBehavior
InventoryPosition
InventoryWithCustomStackSizeSpecification
ItemFilter
An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
ItemHealthColorData
ItemIDAndQualityIDPair
An item prototype with optional quality specification.
ItemIDFilter
ItemInventoryPositions
ItemLocationData
ItemProduct
ItemPrototypeFilter
ItemStackDefinition
ItemStackLocation
ItemToPlace
ItemWithQualityCount
LabBlueprintControlBehavior
LabStoredDurability
LampBlueprintControlBehavior
LandMineBlueprintControlBehavior
LoaderBlueprintControlBehavior
LogisticContainerBlueprintControlBehavior
LogisticFilter
LogisticGroup
LogisticSection
LogisticSections
LogisticsNetworkSupplyCounts
LogisticsNetworkSupplyPoints
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
When reading MapGenSettings, all properties will always be present, but they can be omitted when writing.
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.
MapViewSettings
What is shown in the map view. If a field is not given, that setting will not be changed.
MarketIngredient
MineableProperties
MiningDrillBlueprintControlBehavior
ModChangeData
ModSetting
ModSettingPrototypeFilter
ModuleEffects
NeighbourConnectable
NeighbourConnectableConnection
NeighbourConnectableConnectionDefinition
NthTickEventData
Offer
A single offer on a market entity.
OldTileAndPosition
OrientedCliffPrototypeSet
PathFinderMapSettings
PathfinderFlags
PathfinderWaypoint
PerceivedPerformance
PipeConnection
A single pipe connection for a given fluidbox.
PipeConnectionDefinition
PlaceAsTileResult
PlatformBackdrop
PlatformBackdropHeroCloud
PlatformSchedule
PlayMusicSpecification
PlaySoundSpecification
PlayerColorData
Pollutant
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.
PrintSettings
ProcessionSet
ProcessionTimeline
ProgrammableSpeakerAlertParameters
ProgrammableSpeakerBlueprintControlBehavior
ProgrammableSpeakerCircuitParameters
ProgrammableSpeakerInstrument
ProgrammableSpeakerParameters
PrototypeHistory
PrototypeStrafeSettings
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.
QuickBarSlot
RadarBlueprintControlBehavior
RadiusVisualisationSpecification
RailEndGoal
RailEndStart
RailExtensionData
RailLocation
RailSignalBaseBlueprintControlBehavior
ReactorBlueprintControlBehavior
RecipeIDAndQualityIDPair
A recipe prototype with optional quality specification.
RecipePrototypeFilter
ResearchCondition
ResearchIngredient
ResearchTrigger
Resistance
RidingState
RoboportBlueprintControlBehavior
RocketSiloBlueprintControlBehavior
RollingStockDrawData
RuntimeTooltipField
SavedLogisticFilters
SavedLogisticSection
ScheduleInterrupt
ScheduleRecord
ScheduleRecordPosition
ScriptArea
An area defined using the map editor.
ScriptPosition
A position defined using the map editor.
ScriptRenderTargetTable
If an entity target of an object (except its orientation_target) is destroyed or changes surface, then the object is also destroyed.
SegmentEngineSpecification
A runtime representation of SegmentEngineSpecification.
SegmentSpecification
A runtime representation of SegmentSpecification.
SegmentedUnitAIState
A structure describing the state of a LuaSegmentedUnit’s AI.
SelectedPrototypeData
SelectorCombinatorParameters
SharedProbabilityDefinition
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
SimpleBoundingBox
SimulationDefinition
SingleFluidBoxBlueprintControlBehavior
SlotFilter
SmokeSource
SpaceConnectionAsteroidSpawnDefinition
SpaceConnectionAsteroidSpawnPoint
SpaceDustEffectProperties
SpaceLocationAsteroidSpawnDefinition
SpaceLocationPrototypeFilter
SpacePlatformHubBlueprintControlBehavior
SpacePlatformTileDefinition
SpawnPointDefinition
SpentFluidSpecification
SpiderEngineSpecification
SpiderLegSpecification
SplitterBlueprintControlBehavior
SpoilToTriggerResult
StateSteeringSettings
SteeringSettings
SurfaceCondition
SurfaceRenderParameters
TabAndContent
TechnologyModifier
The effect that is applied when a technology is researched.
TechnologyPrototypeFilter
TerritorySettings
ThrusterPerformancePoint
Tile
TileBuildabilityRule
A runtime representation of TileBuildabilityRule.
TileCollisionMask
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
TrainPathFinderConstants
TrainPathFinderOneGoalResult
TrainSchedule
TrainStopBlueprintControlBehavior
TrainStopFilter
TrainStopGoal
TrainVisualizationConstants
TransportBeltBlueprintControlBehavior
TriggerDelivery
TriggerEffectItem
TriggerEffectWithCooldown
TriggerItem
TriggerModifierData
TurretBlueprintControlBehavior
UndoRedoAction
UnitAISettings
UnitGroupMapSettings
UnitSpawnDefinition
UnlockableID
UpgradeMapperDestination
UpgradeMapperSource
UtilityConstants
Constants used by the game that are not specific to certain prototypes. See utility-constants.lua for the values used by the base game.
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
VirtualSignalPrototypeFilter
WaitCondition
WallBlueprintControlBehavior
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.

Enums§

AmmoCategoryID
An ammo category may be specified in one of two ways.
AsteroidChunkID
An asteroid chunk prototype may be specified in one of two ways.
DamageTypeID
A damage type prototype may be specified in one of two ways.
DecorativeID
A decorative prototype may be specified in one of two ways.
EntityID
An entity prototype may be specified in one of three ways.
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.
EquipmentWithQualityID
An equipment prototype with optional quality specification.
FactoriopediaID
FlowStatisticsID
Identifies a statistics prototype, depending on the statistics type.
FluidID
A fluid may be specified in one of three ways.
ForceID
A force may be specified in one of three ways.
ForceSet
Set of forces. Can be specified in one of two ways.
ItemID
An item prototype may be specified in one of four ways.
ItemStackIdentification
An item may be specified in one of three ways.
ItemWithQualityID
An item prototype with optional quality specification. Can be specified in one of four ways.
LuaEventType
Event name may be specified in one of four ways.
ParticleID
A particle prototype may be specified in one of two ways.
PipetteID
PlayerIdentification
A player may be specified in one of three ways.
Product
Returns one of the subtypes, depending on the value of type.
QualityID
A quality prototype may be specified in one of two ways.
RecipeCategoryID
A recipe category may be specified in one of two ways.
RecipeID
A recipe may be specified in one of three ways.
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.
ScriptRenderTarget
When writing it is possible to give LuaEntity or MapPosition directly. However, reading always returns the full ScriptRenderTargetTable.
SpaceConnectionID
A space connection prototype may be specified in one of two ways.
SpaceLocationID
A space location prototype may be specified in one of two ways.
SurfaceIdentification
A surface may be specified in one of three ways.
SurfacePropertyID
Surface property prototype may be specified in one of two ways.
TechnologyID
An technology prototype may be specified in one of three ways.
TileID
A tile may be specified in one of three ways.
TrainPathFinderGoal
TrivialSmokeID
A trivial smoke prototype may be specified in one of two ways.
VirtualSignalID
A virtual signal prototype may be specified in one of two ways.

Type Aliases§

CollisionLayerID
The name of a LuaCollisionLayerPrototype.
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.
FluidStorageIndex
Valid values are from 1 up to LuaEntity::fluids_count.
InventoryIndex
ItemCountType
ItemStackIndex
LogisticFilterIndex
MapTick
math.huge represents the maximum possible tick.
MathExpression
A string that represents a math expression. The expression parser recognizes four basic token types (with their regex):
ModuleEffectValue
The percentual increase of the attribute. A value of 0.6 means a 60% increase.
NoiseExpressionSourceString
The string representation of a noise expression. More detailed information is found on the prototype docs.
ProcessionID
The name of a ProcessionPrototype.
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.
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.
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”.
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.