Skip to content

Commit

Permalink
Load mod config on every container boot
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielo committed Nov 11, 2017
1 parent c5fe89f commit 5e6d8df
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ return {
-- configuration_options={
-- ["CustomModSetting"]="value"
-- },
-- enabled=true
-- enabled=true
-- },
}
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ RUN ./steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login ano

VOLUME ["/home/dst/.klei/DoNotStarveTogether"]

COPY ["mods/dedicated_server_mods_setup.lua", "/home/dst/server_dst/mods/"]

COPY ["start-container-server.sh", "/home/dst/"]

ENTRYPOINT ["/home/dst/start-container-server.sh"]
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,20 @@ All the customizable files are:
- leveldataoverride.lua
- Caves/
- leveldataoverride.lua
- mods/
- dedicated_server_mods_setup.lua
- modoverrides.lua
```

## Managing Mods

### Mods must be "installed"

Happens in [`mods/dedicated_server_mods_setup.lua`](./mods/dedicated_server_mods_setup.lua). See the instructions in the file to install the mods you want.
Happens in [`DSTClusterConfig/mods/dedicated_server_mods_setup.lua`](./DSTClusterConfig/mods/dedicated_server_mods_setup.lua). See the instructions in the file to install the mods you want.

### Mods must be "enabled" (and can be configured)

Check [`DSTClusterConfig/modoverrides.lua`](./DSTClusterConfig/modoverrides.lua).
Check [`DSTClusterConfig/mods/modoverrides.lua`](./DSTClusterConfig/mods/modoverrides.lua).

#### Enabling a mod

Expand All @@ -103,7 +106,7 @@ Unfortunately there's no _super simple_ way to figure out what options are avail
* Mac/Linux: `~/.klei/DoNotStarveTogether/Cluster_{N}/Master/modoverrides.lua`
* Windows: `C:\Users\<your name>\Documents\Klei\DoNotStarveTogether\Cluster_{N}\Master\modoverrides.lua`
* `Cluster_{N}`: `{N}` is the number of the slot you used to host the game (1-5)
1. Open this file to see the settings, you may use it as-is! Just paste it into `DSTClusterConfig/modoverrides.lua` before starting up your server!
1. Open this file to see the settings, you may use it as-is! Just paste it into `DSTClusterConfig/mods/modoverrides.lua` before starting up your server!

## TODO:

Expand Down
11 changes: 9 additions & 2 deletions start-container-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
# able to see it on the server list. If that happens just restart the containers and you should get the latest version
/home/dst/steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir /home/dst/server_dst +app_update 343050 validate +quit

# Setup modoverrides.lua
modoverrides="$HOME/.klei/DoNotStarveTogether/DSTWhalesCluster/modoverrides.lua"
# Copy modoverrides.lua
ds_mods_setup="$HOME/.klei/DoNotStarveTogether/DSTWhalesCluster/mods/dedicated_server_mods_setup.lua"
if [ -f "$ds_mods_setup" ]
then
cp $ds_mods_setup "$HOME/server_dst/mods/"
fi

# Copy modoverrides.lua
modoverrides="$HOME/.klei/DoNotStarveTogether/DSTWhalesCluster/mods/modoverrides.lua"
if [ -f "$modoverrides" ]
then
cp $modoverrides "$HOME/.klei/DoNotStarveTogether/DSTWhalesCluster/Master/"
Expand Down

0 comments on commit 5e6d8df

Please sign in to comment.