User:Sparr/Core Libraries

From Official Factorio Wiki
< User:Sparr
Revision as of 09:13, 31 August 2020 by Bilka (talk | contribs) (Bilka moved page Core Libraries to User:Sparr/Core Libraries without leaving a redirect: WIP pages must be in your userspace)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The factorio core data includes a collection of lua libraries that are used as part of the core and base game definitions. These libraries can be used when writing new mods.

The latest version of these libraries are visible in the Factorio Data git repository.

Usage example (for most libraries):

local lib_name = require("lib-name")
lib_name.some_method(...

autoplace_utils.lua

Helper function(s) for building autoplace specifications

biome-visualization-utils.lua

??

bonus-gui-ordering.lua

Lookup table for GUI ordering of effect bonuses

builder.lua

Class for creating entities repeatedly on a timer with a defined set of positions

camera.lua

Class for managing automatic camera zooming and panning

circuit-connector-generated-definitions.lua
circuit-connector-sprites.lua

Used to generate definitions for circuit connectors on various entities

crash-site.lua

Produces the start-of-game crash site entities

dataloader.lua

Initializes data and defines data.extend() for use in the data stage

event_handler.lua

Manages remote interfaces and event handlers for multiple libraries in the same mod

flying_tags.lua

Creates flying text entities that follow another entity

kill-score.lua

Defines scoring values for kills, relative to production-score.lua

math2d.lua

Helper functions for manipulating and operating on 2D vectors and areas

math3d.lua

Helper functions for operating on 2D, 3D, and 4D vectors

mod-gui.lua

Attempt to standardize abstractions of access to player.gui.left and player.gui.top

noise/expression-to-ascii-math.lua

??

noise.lua

Helper functions for manipulating and operating on noise expressions

production-score.lua

Calculate score value of items produced based on their ingredients

resource-autoplace.lua

Turns resource patch distribution descriptions into autoplace specifications

silo-script.lua

Handles tracking of rocket launches

story.lua
story-skeleton.lua

Helpers for building a "story" like the Compilatron tutorial

util.lua

Many miscellaneous helper functions for dealing with a wide range of things