About Factorio Standard Library
From Factorio Mod PortalUnofficial fork of the Factorio Standard Library, which was a project to bring Factorio modders high-quality, commonly-required utilities and tools. Compatibility with older mods which relied on the original stdlib mod is not guaranteed.
Donations appreciated, but never required
#Main Info This is an unofficial fork of the original Factorio Standard Library, primarily updated to work with my own mods which required it, and has since been expanded with additional functionality for use within my own mods.
#Notes If you are a brand new modder, I strongly checking out one of the other standard libraries instead, made by more experienced and knowledgeable developers, depending on your specific use case:
- Factorio Library by Raiguard
- GUI Library by CodeGreen
- Factorio Data Standards Library by SafTheLamb
- Extended Runtime Event Library by Protocol1903
- Blueprint Manipulation Library and Things API by The_LORD_thy_GOD
- PlanetsLib by thesixthroc
Many thanks to goakiller900 for setting up nearly the entire backend of the github repo, allowing me to synchronize github and mod portal releases, as well as providing several runtime fixes that had slipped through the cracks between Factorio versions 2.0 and 2.1
FAQ
Documentation
Available on the homepage via: https://kryzeth.github.io/kry_stdlib/
How to use
From within your mod, add a require line for each module you wish to use at the top of each file where you plan to use them. These are some of the most common modules used during data, data-updates, and data-final-fixes:
local Data = require('__kry_stdlib__/stdlib/data/data')
local Item = require('__kry_stdlib__/stdlib/data/item')
local Recipe = require('__kry_stdlib__/stdlib/data/recipe')
local Tech = require('__kry_stdlib__/stdlib/data/technology')
local Entity = require('__kry_stdlib__/stdlib/data/entity')
local Setting = require('__kry_stdlib__/stdlib/data/mod-setting')
These can only be used when Space Age is enabled:
local Planet = require('__kry_stdlib__/stdlib/data/planet')
local Location = require('__kry_stdlib__/stdlib/data/space-location')
local Connection = require('__kry_stdlib__/stdlib/data/space-connection')
These are all considered "wrappers" for Factorio data.raw objects of the same type. For example, these two definitions are generally equivalent:
Recipe("iron-gear-wheel")
data.raw.recipe["iron-gear-wheel"]
In both cases, you can access their fields directly, the biggest difference is the additional functionality Instead of modifying the ingredients table directly, it can be accessed more safely
data.raw.recipe["iron-gear-wheel"].ingredients = {{name="iron-plate",amount=2,type='item"}}
Recipe("iron-gear-wheel"):set_ingredient_amount("iron-plate", 2)
Readme (old)
From the original mod, still partially true, available at: https://github.com/Afforess/Factorio-Stdlib/wiki/Home/0c08eb0a751d2721c4572ff286f302fbc5657421
Highlights
From source dataGame versions
Built for Factorio 2.1.
Footprint
Rated a light load on a server.
License
Published under MIT.
Factorio Standard Library on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
- Server side
- Required on the server
- Server load
- light
- Smallest plan we suggest
- Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 2.2.25, released 2026-10-12
Recent builds
| Build | Released | Game versions | Loaders |
|---|---|---|---|
| 2.2.25 | 2026-10-12 | 2.1 | n/a |
| 2.2.24 | 2026-10-06 | 2.1 | n/a |
| 2.2.23 | 2026-09-25 | 2.1 | n/a |
| 2.2.22 | 2026-09-24 | 2.1 | n/a |
| 2.2.21 | 2026-09-23 | 2.1 | n/a |
| 2.2.20 | 2026-09-22 | 2.1 | n/a |
Dependencies
- Optional: PlanetsLib
Declared by the newest build that lists any. Required ones are installed with it on one-click installs.
Run Factorio Standard Library on a Factorio server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogLibraries & compatibility
Foundations and fixes other mods build on. Usually installed because something else needs it.
Runs on your server
From source side supportFactorio Mod Portal lists Factorio Standard Library as required on the server. Check its Factorio Mod Portal page to see whether players need it too.
Compatibility
- Game
- Factorio
- Runs on
- Serverrequired on the server
- Game versions
- 2.1
Verified at the source
- ✓Factorio Mod PortalOfficial listing, checked 2026-10-15Open ↗
- ✓AuthorKryzeth, as published on Factorio Mod Portal
- ✓LicenseMITFree
