Factorissimo 3 Exclusively
A scenario that starts you on a Factorissimo 3 factory floor with nothing outside of it.
Inspired by this video.
Screenshots of the scenario, at the start and early in the game (click for full size):
Features
- Start on a floor that copies the biggest factory building, with nothing else in the world
- Factories built on that floor need no recursion research, since it is not a real factory. Deeper nesting follows Factorissimo's rules
- Resources come in through the gaps in the walls, chosen with the combinator just outside each gap
- Items are fed onto belts, fluids into pipes
- A picker that only offers what the world gives and no recipe makes, anything else is cleared from the combinators
- Resources unlock with the building that would harvest them
- Uranium ore needs sulfuric acid, like mining it does: picking it builds pipes around the combinator to deliver it to
- Oil processing and uranium processing, which normally need the resource mined, are researched as soon as it unlocks
Usage
- Start a new game from the Factorissimo 3 Exclusively scenario
- Place a belt or pipe on a gap in the factory wall
- Open the combinator just outside that gap and pick an ore or fluid
Switch the combinator off or clear it to stop the input.
For uranium ore, also deliver sulfuric acid: pipes are built around the combinator, with a pipe to ground on each side facing the factory. Connect to either one with a pipe to ground inside the wall. Every ore that comes in uses 1 acid.
Unlocking resources
The list is worked out from the game's prototypes, so resources added by other mods follow the same rules:
| Resource | Unlocks with |
|---|---|
| Iron ore, copper ore, coal, stone, wood, fish | Available from the start, since they can be gathered by hand |
| Water | The offshore pump (steam power) |
| Crude oil | The pumpjack (oil gathering) |
| Uranium ore | The electric mining drill together with uranium mining |
Mining is impossible in here, so a technology that asks for a resource to be mined is researched as soon as the resource unlocks and its prerequisites are done: oil processing and uranium processing.
Updating
Update the mod and load your game: the scripts run from the mod, and the game is brought up to date on loading. If something seems to have been missed, an admin can run /f3e-resync to do that again.
Games started on version 0.4.9 or earlier keep working, but a save keeps its own copy of the scripts it was started with, so they do not get new features.
Optional mods
- Personal Transformer2 charges armor from the power network you stand in, on the main floor and inside factories. Portable solar panels do not work in here, so this is the way to power armor. It unlocks with chemical science.
Configuration
The feed rates and spawn point are in shared/config.lua. It is read every time a game is loaded, and an update of the mod replaces your changes.
Development
git clone --recursive https://github.com/CTNOriginals/Factorissimo3Exclusively.git
- Copy
.env.exampleto.envand fill in the paths - Run
make helpto see the available commands
Requires make, git and awk. make package uses zip, or the tar.exe that comes with Windows when zip is missing.
Layout
src is the mod as it ships: a build copies it, adds the license and this readme, and fills in the version.
| Path | Holds |
|---|---|
src/scenario.lua, src/runtime, src/shared |
All the code |
src/locale |
The strings of the mod |
src/data.lua |
The prototypes |
src/scenarios/factorissimo3-exclusively |
The scenario: a loader, the map, the preview image and its own strings |
A save keeps a copy of the scenario's scripts and locale, which updating the mod leaves as they were. So the scenario's control.lua only runs src/scenario.lua, and all code lives outside of the scenario folder. Keep it that way, anything else in there is stuck in the games already started. Saved games require scenario.lua by its path, so it does not move or get renamed.
The scenario's locale folder only holds what is read from there: its name and description in the menu, and the messages of the freeplay script. Every other string goes in src/locale.
The mod's code must only run in games started from the scenario, so keep src itself without a control.lua or migrations folder. Its prototypes and locale are loaded in every game though, so give new names there a prefix, like the f3e- locale sections.
A change that needs a running game to be adjusted gets a step at the end of the list in src/runtime/migrations/init.lua. A step has to be safe to run twice. Steps run when the mod version changed, which also goes for the scenario map: it carries the storage it was saved with.
Changelog
Changes go into the entry at the top of src/changelog.txt, which has Version: $(VERSION) until it is released. Builds fill in the current version. Leave the placeholder in place, releasing replaces it.
Releasing
Merge into stable, check it out, pull, and run one of:
| Command | Releases |
|---|---|
make release-patch |
The last patch number plus the commits since it |
make release-minor |
The next minor version |
make release-major |
The next major version |
That heads the unreleased entry with the version and date, commits and tags it, starts the next entry, pushes stable with the tag and publishes the GitHub release. It needs gh, logged in.
GitHub writes the release notes from the pull requests merged since the previous release, so open a pull request for anything that should be listed in them.
Merge stable back into dev right afterwards. A changelog line added on dev before that is merged into the released entry without a conflict.
If the push or the publishing failed, the version is already committed and tagged, so do not run it again: push stable with the tag, then run make release, which publishes the latest tag.
Editing the map
The map editor only opens scenarios from the user scenarios folder, and saving writes its loaded copy of the scripts back there. So the map is edited in a copy, and only the map files are brought back into the scenario folder in src:
make editdeploys the mod and copies the scenario to the user scenarios folder- Open and save it in the map editor
make pullcopies the saved map back into the scenario folder
Inside the editor, these commands set up the map:
/setup-floorbuilds the main factory floor with its power pole and input combinators, after clearing the area/setup-inputsplaces an input combinator behind every wall gap of the floor or factory you are standing in
Known issues
- The main floor imitates a factory but is not one: it follows the lights and greenhouse upgrades, but does not get the construction robots Factorissimo gives its factories.
- Solar panels only work after the greenhouse upgrade, which only exists with Space Age, like inside Factorissimo's factories. Factories built on the floor then get a quarter of the planet's solar power instead of half. This includes portable solar panels in armor, see Optional mods above.
- Not tested with Space Age. It may work, but other planets and space platforms are untested.
- Not tested in multiplayer.
- Inputs always feed normal quality resources.
- Fluid resources that take a fluid to mine are fed for free. The base game has none.
- The unlocked resources are updated when research changes, so a recipe that another script enables on its own is only picked up with the next research.
- Splitters on a wall gap are not fed, use a belt, underground belt or loader instead.
- Two uranium inputs only a few tiles apart can end up sharing their sulfuric acid, since the pipes behind them connect.
- A combinator without a resource is only picked up again when its window is closed, so a resource set on it some other way (by a script or a logistic group edit) is not fed until then.
AI disclosure
This project was built together with an AI assistant, as one long, continuous back and forth rather than a single generated result. The idea, the design of each feature and the project structure are my own: I decided what to build and how it should play, and the AI wrote most of the code to those directions. Every change was reviewed and tested in game by me, and many were sent back with fixes or a different approach. The map itself, the balancing and the decisions on what to keep were done by hand.
The AI also did not work from scratch. The project structure, the make tooling (including the log filter) and the code style all come from my own Color Coded Combinators mod, and the code here was written to follow it. That way this project builds on my own earlier work rather than on code taken from others.
License
BSD 3-Clause, see LICENSE.md

