Skip to content

Instantly share code, notes, and snippets.

@boneskull
Last active January 16, 2024 23:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save boneskull/18639b887878355a0dd5bfb5c1ea45b4 to your computer and use it in GitHub Desktop.
Save boneskull/18639b887878355a0dd5bfb5c1ea45b4 to your computer and use it in GitHub Desktop.
workaround for Empyrion workshop subscription limit (bash/shell/WSL)

There are many threads about this, but in a nutshell, the problem is that only a relatively small number of subscriptions can be shown in the blueprint library. I found myself having subscribed to some 700-odd blueprints before I realized this.

The workaround is to just copy the workshop blueprints into the game's blueprints folder. Each workshop blueprint is in its own folder, and only the files in those folders should be copied. But with 700 blueprints, doing this manually is unappealing.

I did this with a Bash script instead. It can be done with a one-liner, but I've split it up a bit to hopefully make it more approachable. Maybe there's an easier way?

Before starting, you'll need to determine:

  • The workshop download directory for Empyrion. On my system this is C:\Program Files (x86)\Steam\steamapps\workshop\content\383120. You may have to do some poking around, since I'm not sure if the number is constant.
  • The blueprint directory. On my system this is C:\Program Files (x86)\Steam\steamapps\common\Empyrion - Galactic Survival\Saves\Blueprints\76561198080011352
  • In WSL, the C drive is located at /mnt/c; this may be different on your system or whatever you're using to run bash (git bash, cygwin, whatever)
  1. Paste the following code into a new file (e.g., copy-blueprints.sh).
  2. Replace the right-side of the C, SRC and DEST assignments with directories suitable for your system.
  3. Save the file somewhere then run it with in your shell (again, not PowerShell or cmd) bash /path/to/copy-blueprints.sh.
  4. This will copy all workshop items into your blueprints folder under appropriate directory names. Activity is printed to STDOUT

I don't know how to use PowerShell to do this, but I'm sure it's pretty easy. Anybody got?

#!/bin/bash
set -e
# replace these w/ whatever is appropriate for your system.
# it's likely to be the same
C="/mnt/c"
SRC="${C}/Program Files (x86)/Steam/steamapps/workshop/content/383120"
DEST="${C}/Program Files (x86)/Steam/steamapps/common/Empyrion - Galactic Survival/Saves/Blueprints/76561198080011352"
for SRC_EPB in "${SRC}"/*/*.epb; do
# derive jpg filename from epb filename
SRC_JPG="${SRC_EPB%.epb}.jpg"
BASE_EPB=$(basename "${SRC_EPB}") # foo.epb
NAME="${BASE_EPB%.epb}" # foo
TARGET_DIR="${DEST}/${NAME}" # $DEST/foo/
TARGET_EPB="${TARGET_DIR}/${BASE_EPB}" # $DEST/foo/foo.epb
mkdir -p "${TARGET_DIR}"
# only copy if workshop file differs
if cmp -s "${SRC_EPB}" "${TARGET_EPB}"; then
echo "${BASE_EPB} ok"
else
cp -v "${SRC_EPB}" "${TARGET_EPB}"
fi
# check if jpg exists (it might not)
if [[ -e ${SRC_JPG} ]]; then
BASE_JPG=$(basename "${SRC_JPG}") # foo.jpg
TARGET_JPG="${TARGET_DIR}/${BASE_JPG}" # $DEST/foo/foo.jpg
if cmp -s "${SRC_JPG}" "${TARGET_JPG}"; then
echo "${BASE_JPG} ok"
else
cp -v "${SRC_JPG}" "${TARGET_JPG}"
fi
else
echo "${BASE_JPG} not found"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment