Skip to content

Commit 15d31c9

Browse files
fankclaude
andauthored
docs: Add documentation for PRESET environment variable (#572)
- Add PRESET to the environment variables table - Include detailed explanation of available preset values - Add example showing how to use PRESET when generating a new map - Document that PRESET is optional and only used with GENERATE_NEW_SAVE=true Fixes #571 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 8784845 commit 15d31c9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,22 @@ sudo docker run -d \
203203
factoriotools/factorio
204204
```
205205

206+
To generate a new map with a specific preset (e.g., death-world):
207+
208+
```shell
209+
sudo docker run -d \
210+
-p 34197:34197/udp \
211+
-p 27015:27015/tcp \
212+
-v /opt/factorio:/factorio \
213+
-e LOAD_LATEST_SAVE=false \
214+
-e GENERATE_NEW_SAVE=true \
215+
-e SAVE_NAME=replaceme \
216+
-e PRESET=death-world \
217+
--name factorio \
218+
--restart=unless-stopped \
219+
factoriotools/factorio
220+
```
221+
206222
### Mods
207223

208224
Copy mods into the mods folder and restart the server.
@@ -321,6 +337,7 @@ These are the environment variables which can be specified at container run time
321337
| BIND | IP address (v4 or v6) the server listens on (IP\[:PORT]) | | 0.15+ |
322338
| RCON_PORT | TCP port the rcon server listens on | 27015 | 0.15+ |
323339
| SAVE_NAME | Name to use for the save file | _autosave1 | 0.17+ |
340+
| PRESET | Map generation preset when GENERATE_NEW_SAVE is true | | 0.17+ |
324341
| TOKEN | factorio.com token | | 0.17+ |
325342
| UPDATE_MODS_ON_START | If mods should be updated before starting the server | | 0.17+ |
326343
| USERNAME | factorio.com username | | 0.17+ |
@@ -330,6 +347,20 @@ These are the environment variables which can be specified at container run time
330347

331348
**Note:** All environment variables are compared as strings
332349

350+
#### PRESET Values
351+
352+
The `PRESET` environment variable is used when generating a new map (when `GENERATE_NEW_SAVE=true`). It corresponds to Factorio's built-in map generation presets. Common values include:
353+
354+
- `default` - Normal settings
355+
- `rich-resources` - Resources are more abundant
356+
- `marathon` - Recipes and technologies are more expensive
357+
- `death-world` - Biters are more aggressive and numerous
358+
- `death-world-marathon` - Combines death-world and marathon settings
359+
- `rail-world` - Resources are further apart, encouraging train usage
360+
- `ribbon-world` - Map height is limited for a unique challenge
361+
362+
If PRESET is not specified or left empty, the map will be generated using the settings from `map-gen-settings.json` and `map-settings.json` without a preset.
363+
333364
## Container Details
334365

335366
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).

0 commit comments

Comments
 (0)