Factorio Stdlib
Factorio Standard Library
The Factorio Standard Library aims to extend the Factorio Lua API with well-tested, documented, and easy-to-use functions to make modding easier.
Modules
Area.Area
Area.Chunk
Area.Direction
Area.Orientation
Area.Position
Area.Surface
Area.Tile
Core
Data.Pipes
Data.Sprites
Data.Util
Entity.Entity
Entity.Inventory
Entity.Resource
Event.Changes
Event.Event
Event.Force
Event.Gui
Event.Filters
Event.Player
Event.Surface
Event.Trains
Game
Misc.Config
Misc.Logger
Misc.Migrate
Misc.Queue
Utils.Color
defines.anticolor
defines.color
defines.lightcolor
defines.time
Utils.Globals
Utils.Is
Utils.Iter
Utils.math
Utils.string
Utils.table
vendor.version
Scripts
Developer
quickstart
Classes
Data.Category
Data
Data.Entity
Data.Fluid
Data.Item
Data.Recipe
Data.Technology
LinkedList
string_array
unique_array
Vendor.Enumerable
Topics
readme.md
changelog.txt
LICENSE
contributing.md
style-guide.md
Examples
event.lua
Contents of
Data.Util
#
Functions
Top
Data.Util
module
Data Utilities
Functions
duplicate(data_type, orig_name, new_name[, mining_result])
Quickly duplicate an existing prototype into a new one.
Functions
#
duplicate(data_type, orig_name, new_name[, mining_result])
Quickly duplicate an existing prototype into a new one.
Parameters:
data_type
:
(
string
) The type of the object to duplicate
orig_name
:
(
string
) The name of the object to duplicate
new_name
:
(
string
) The new name to use.
mining_result
:
(
string
or
boolean
) If true set mining_result to new_name, if truthy set mining_result to value (
optional
)