About Surfaces
From Factorio Mod PortalMy own reimplementation of the surfaces mod.
Surfaces
A mod that provides an interface for other mods to create new surfaces on different "layers" of "planets". It provides transportation of entities, items and fluids between these surfaces.
Heavily inspired by the Surfaces mod by Simcra, but it has other goals, so I decided to write my own mod from scratch.
In order to play with this mod, addon mods must be used.
- Define new surfaces with custom generation
- Surface registration: register ownership of certain layers of certain planets
- Transport: various types of "portals" enabling transport of players, items, fluids and energy.
Getting Started
To get started immediately, download one of the Configuration Mods.
For more a more customized experience, you can create your own Configuration mod.
For modders, see Documentation.
Addon mods
Surface generation
These mods generate new surfaces. They can expose an interface allowing the main library to call them when they are needed.
Surfaces Caves (source) Surfaces Original (source)
Transport
These mods add new entities for transportation. They can register portals such that all the transportation of players, items, etc. will be handled by the library.
Configuration mods
In order to actually play the game, you will want to use a configuration mod. These mods will pull all dependencies and decide which layer of which planet will be managed by which addon mod. For example: you could have caves right beneath the main surface provided by one mod, an open sky provided by another mod right above and perhaps even space provided by yet another mod.
Surfaces Cave Configuration (source) Surfaces Default Configuration (source)
Modding
Creating your own configuration mod
The easiest way to way to get started is by cloning or downloading the Configuration Template. Make sure to extract the archive if you downloaded it as a zip file.
- Rename the downloaded folder to
<your mod name>_1.0.0whereyour mod nameis the name of your mod. - Place this folder in the
modsfolder of the game. (see Factorio Wiki for more information) - Edit
info.json.namemust match with the name you chose earlier. You can also fill in title, author and description fields. In the dependencies field you must enter all mods Surfaces addons you would like to include.
In the template, Surfaces Original and Surfaces Transport were added, feel free to replace them. You can find the name of a mod by checking the URL on the Mod portal page.
- Now we can move on to
control.lua. Read the text inside the file and make the modification you want. - If everything went well, you can now run the game and enable you mod.
API Documentation
The Surfaces API is exposed through interfaces (more information: LuaRemote).
register_surface(name, main_surface, layers, owner)
Registers a surface generator for a given main surface on given layers. Usually called by configuration mods, not by the surface generation mods.
name: A unique name shared between the layers of the given main surface. This name will be sent to the generation mods when the surface needs to be created or generated. main_surface: The main surface is the "0-layer" surface. For example: "nauvis" layers: Select which layers should be controlled by the given surface owner. Must either be a number or a table {<from>, <to>} where <from> and <to> are either a number, "bottom" or "top". Negative numbers are below the main surface and positive numbers are above the main surface. owner: The owner of the surface is an interface provided by a surface generation addon mod. This interface will control all the specified layers of the given main surface.
get_main_surfaces()
Returns a table with all main surfaces ("0-layer" surfaces like nauvis) configured by the user in the mod settings.
get_main_surface(surface)
Get the name of the main surface to which the given surface belongs. For example, get_main_surface("nauvis-caves:3") might return the string "nauvis".
surface: A LuaSurface object or name of an existing surface.
get_surface_layer(surface)
Get the index of a surface (LuaSurface) as a layer of a main surface. For example, get_surface_layer("nauvis-caves:3") might return 3.
surface: A LuaSurface object or name of an existing surface.
get_surface(main_surface, index)
Get the layer of the given main surface with at the given index. For example, get_surface("nauvis", -4) might return the LuaSurface with name "nauvis-caves:-4" if the caves mod is configured to be used at layer -4. Note: the surface will only be returned if it has been created. For example, if the player has not yet visited layer 42, get_surface("nauvis", 42) will return nil. If you wish to create the surface in case it does not exist yet, use get_or_create_surface instead.
main_surface: A LuaSurface object or name of an existing surface that is registered as a main surface (e.g. nauvis).
Highlights
From source dataGame versions
Built for Factorio 1.1.
Footprint
Rated a light load on a server.
License
Published under GNU LGPLv3.
Surfaces 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
- 1.0.6, released 2023-09-23
Run Surfaces 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 catalogGameplay & overhauls
New mechanics, content and overhauls that change how the game plays.
Runs on your server
From source side supportFactorio Mod Portal lists Surfaces 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
- 1.1
Verified at the source
- ✓Factorio Mod PortalOfficial listing, checked 2026-10-08Open ↗
- ✓AuthorDanacus, as published on Factorio Mod Portal
- ✓LicenseGNU LGPLv3Free
