From b9215bd15b0528c3452a8a6cb24476ea6fa3ed9e Mon Sep 17 00:00:00 2001 From: norimicry Date: Thu, 23 Apr 2020 18:40:11 +0200 Subject: [PATCH] :cat: --- README.md | 26 ++++++++++++----- configs/alwayson.json | 54 +++++++++++++++++------------------ configs/autoload.json | 6 ++-- configs/unlimitedplayers.json | 4 +-- docker-compose.yml | 4 ++- 5 files changed, 54 insertions(+), 40 deletions(-) mode change 100644 => 100755 configs/alwayson.json mode change 100644 => 100755 configs/autoload.json mode change 100644 => 100755 configs/unlimitedplayers.json diff --git a/README.md b/README.md index be8e453..24134cd 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ansible -i playbook.yml ### Terraform (with Hetzner Cloud) -Enter your API Token in `terraform/vars.auto.tfvars` and the resource section in `main.tf` run the following script: +Enter your API Token in `terraform/vars.auto.tfvars` and modify the resource section in `main.tf` to your liking, then run the following script: ``` ./terra.sh @@ -29,15 +29,25 @@ Enter your API Token in `terraform/vars.auto.tfvars` and the resource section i ## Game Setup -Intially you have to create or load a game once after first startup. After that the Autoload Mod jump starts into the previously loaded savegame everytime you rerun the container. You can also edit the config file of the Autoload Mod to archieve similar behaviour. +Intially you have to create or load a game once at first startup via VNC. After that the Autoload Mod jumps into the previously loaded savegame everytime you rerun the container. You can also edit the config file of the Autoload Mod to archieve similar behaviour. + +### VNC + +Use a vnc client like `TightVNC` on Windows or plain `vncviewer` on any Linux distribution to connect to the server. You can modify the VNC Port and IP address and Password in the `docker-compose.yml` file like this: + +Localhost: +``` + # Server is only reachable on localhost on port 2342... + ports: + - 127.0.0.1:2342:5900 + # ... with the password "insecure" + environment: + - VNCPASS=insecure +``` ## How it works -The game, the modloader (SMAPI), and the "Always On" Mod is pulled from my servers (I'll assume you already own the game - since you're looking for a multiplayer - so please don't rip it from there) to minimize version conflicts. Afterwards everything will be unpacked into the right places. The `docker-entrypoint.sh` script will start `Xvfb` and `x11vnc` before starting the game. You can control the game via vnc with the settings within the `docker-compose.yml` file. - -## Why Docker - -This should be simple and easily deployable, so there are only a few options. +The game, the modloader (SMAPI), and the necessary Mods are pulled from my servers (I'll assume you already own the game - since you're looking for a multiplayer - so please don't rip it from there) to minimize version conflicts. The `docker-entrypoint.sh` script will start `Xvfb` and `x11vnc` before starting the game. You can control the game via vnc with the settings within the `docker-compose.yml` file. ## Used Mods @@ -55,4 +65,6 @@ Usually you should be able to ignore any message there. If the game doesn't star Access the game via VNC to initially load or start a pregenerated savegame. You can control the Server from there or edit the config.json files in the configs folder. +### Performance +I'd recomend a VPS/Machine with at least four logical CPUs and 4GB Ram, otherwise there will be horrible lags. The minimum configuration I'd consider playable with two to four players would be two logical CPUs and 1GB of Ram. diff --git a/configs/alwayson.json b/configs/alwayson.json old mode 100644 new mode 100755 index 655a4e7..bf480ab --- a/configs/alwayson.json +++ b/configs/alwayson.json @@ -1,28 +1,28 @@ -{ - "serverHotKey": "F9", - "profitmargin": 50, - "upgradeHouse": 0, - "petname": "funnysnek", - "farmcavechoicemushrooms": true, - "communitycenterrun": true, - "timeOfDayToSleep": 2200, - "lockPlayerChests": true, - "clientsCanPause": false, - "copyInviteCodeToClipboard": true, - "festivalsOn": true, - "eggHuntCountDownConfig": 120, - "flowerDanceCountDownConfig": 120, - "luauSoupCountDownConfig": 120, - "jellyDanceCountDownConfig": 120, - "grangeDisplayCountDownConfig": 120, - "iceFishingCountDownConfig": 120, - "endofdayTimeOut": 300, - "fairTimeOut": 1200, - "spiritsEveTimeOut": 900, - "winterStarTimeOut": 900, - "eggFestivalTimeOut": 120, - "flowerDanceTimeOut": 120, - "luauTimeOut": 120, - "danceOfJelliesTimeOut": 120, - "festivalOfIceTimeOut": 120 +{ + "serverHotKey": "F9", + "profitmargin": 50, + "upgradeHouse": 0, + "petname": "mypetnyame", + "farmcavechoicemushrooms": false, + "communitycenterrun": true, + "timeOfDayToSleep": 2200, + "lockPlayerChests": true, + "clientsCanPause": false, + "copyInviteCodeToClipboard": true, + "festivalsOn": true, + "eggHuntCountDownConfig": 120, + "flowerDanceCountDownConfig": 120, + "luauSoupCountDownConfig": 120, + "jellyDanceCountDownConfig": 120, + "grangeDisplayCountDownConfig": 120, + "iceFishingCountDownConfig": 120, + "endofdayTimeOut": 300, + "fairTimeOut": 1200, + "spiritsEveTimeOut": 900, + "winterStarTimeOut": 900, + "eggFestivalTimeOut": 120, + "flowerDanceTimeOut": 120, + "luauTimeOut": 120, + "danceOfJelliesTimeOut": 120, + "festivalOfIceTimeOut": 120 } \ No newline at end of file diff --git a/configs/autoload.json b/configs/autoload.json old mode 100644 new mode 100755 index 74ebbe9..24a30b7 --- a/configs/autoload.json +++ b/configs/autoload.json @@ -1,5 +1,5 @@ { - "LastFileLoaded": null, - "LoadIntoMultiplayer": true, - "ForgetLastFileOnTitle": true + "LastFileLoaded": null, + "LoadIntoMultiplayer": true, + "ForgetLastFileOnTitle": true } diff --git a/configs/unlimitedplayers.json b/configs/unlimitedplayers.json old mode 100644 new mode 100755 index 34e2f7e..c7bb445 --- a/configs/unlimitedplayers.json +++ b/configs/unlimitedplayers.json @@ -1,3 +1,3 @@ -{ - "PlayerLimit": 10 +{ + "PlayerLimit": 10 } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 2f37eec..8c10e60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: environment: - VNCPASS=nyanyanya ports: - - 5902:5900 + - 5900:5900 - 24642:24642/udp volumes: - ./config:/root/.config/i3/config @@ -15,4 +15,6 @@ services: - ./configs/alwayson.json:/data/Stardew/Stardew Valley/Mods/Always On Server/config.json - ./configs/unlimitedplayers.json:/data/Stardew/Stardew Valley/Mods/UnlimitedPlayers/config.json - ./configs/autoload.json:/data/Stardew/Stardew Valley/Mods/AutoLoadGame/config.json + # add another mod + # - ./ModFolder:/data/Stardew/Stardew Valley/Mods/ModFolder