From 99c446e60747fe89bea8e3e2f9461666e0bce425 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Wed, 9 Jul 2025 21:47:54 +0900 Subject: [PATCH] Fix duplicate mod error with Space Age DLC mods (#576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip downloading built-in DLC mods (elevated-rails, quality, space-age) when UPDATE_MODS_ON_START is enabled. These mods are included with the Space Age DLC and attempting to download them separately causes "Duplicate mod" errors. - Modified update-mods.sh to skip DLC built-in mods during updates - Added documentation note explaining the automatic handling of DLC mods 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 2 ++ docker/files/update-mods.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6933631..4c8d0c2 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ Copy mods into the mods folder and restart the server. As of 0.17 a new environment variable was added ``UPDATE_MODS_ON_START`` which if set to ``true`` will cause the mods get to updated on server start. If set a valid [Factorio Username and Token](https://www.factorio.com/profile) must be supplied or else the server will not start. They can either be set as docker secrets, environment variables, or pulled from the server-settings.json file. +**Note:** When using the Space Age DLC, the built-in mods (`elevated-rails`, `quality`, and `space-age`) are automatically skipped during mod updates to prevent conflicts. These mods are included with the DLC and should not be downloaded separately. + ### Scenarios If you want to launch a scenario from a clean start (not from a saved map) you'll need to start the docker image from an alternate entrypoint. To do this, use the example entrypoint file stored in the /factorio/entrypoints directory in the volume, and launch the image with the following syntax. Note that this is the normal syntax with the addition of the --entrypoint setting AND the additional argument at the end, which is the name of the Scenario in the Scenarios folder. diff --git a/docker/files/update-mods.sh b/docker/files/update-mods.sh index 512be7f..6c58ff5 100755 --- a/docker/files/update-mods.sh +++ b/docker/files/update-mods.sh @@ -227,9 +227,12 @@ update_mod() return 0 } +# Process all enabled mods from mod-list.json, but skip built-in mods +# The Space Age DLC includes built-in mods (elevated-rails, quality, space-age) that should not be downloaded if [[ -f $MOD_DIR/mod-list.json ]]; then jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do - if [[ $mod != base ]]; then + # Skip base mod and DLC built-in mods + if [[ $mod != base ]] && [[ $mod != elevated-rails ]] && [[ $mod != quality ]] && [[ $mod != space-age ]]; then update_mod "$mod" || true fi done