Factorio API Docs

1.1.68 <>

Builtin Types

The basic types used in the Factorio API. While Lua only supports the boolean, number, string, and table types (as they relate to the types listed below), the API docs will specify what C++ types these are converted from or to internally.

Throughout the API docs, the terms "array" and "dictionary" are used. These are fundamentally just Lua tables, but have a limitation on which kind of table keys can be used. An array is a table that uses continuous integer keys starting at 1, while a dictionary can use numeric or string keys in any order or combination.

float

A floating-point number.


double

A double-precision floating-point number.


int

32-bit signed integer.


int8

8-bit signed integer.


uint

32-bit unsigned integer.


uint8

8-bit unsigned integer.


uint16

16-bit unsigned integer.


uint64

64-bit unsigned integer.


number

Any kind of integer or floating point number.


string

Strings are enclosed in double-quotes, like this "hi".


boolean

Either true or false.


nil

Nil is the type of the value nil, whose main property is to be different from any other value.


table

Tables are enclosed in curly brackets, like this {}.


LuaObject

Any LuaObject listed on the Classes page.

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.


double

A double-precision floating-point number. This is the same data type as all Lua numbers use.


int

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.


uint

32-bit unsigned integer. Possible values are 0 to 4,294,967,295.


uint8

8-bit unsigned integer. Possible values are 0 to 255.


uint16

16-bit unsigned integer. Possible values are 0 to 65535.


uint64

64-bit unsigned integer. Possible values are 0 to 18,446,744,073,709,551,615.


number

Any kind of integer or floating point number.


string

Strings are enclosed in double-quotes, like this "hi".


boolean

Either true or false.


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.


table

Tables are enclosed in curly brackets, like this {}.


LuaObject

Any LuaObject listed on the Classes page.

|<

Classes

Events

Concepts

Defines

Builtin types

>|