This commit is contained in:
norimicry 2020-04-23 18:40:11 +02:00
parent 369b79a89c
commit b9215bd15b
5 changed files with 54 additions and 40 deletions

View File

@ -21,7 +21,7 @@ ansible -i <your_inventori> playbook.yml
### Terraform (with Hetzner Cloud) ### 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 ./terra.sh
@ -29,15 +29,25 @@ Enter your API Token in `terraform/vars.auto.tfvars` and the resource section i
## Game Setup ## 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 ## 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. 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.
## Why Docker
This should be simple and easily deployable, so there are only a few options.
## Used Mods ## 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. 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.

4
configs/alwayson.json Normal file → Executable file
View File

@ -2,8 +2,8 @@
"serverHotKey": "F9", "serverHotKey": "F9",
"profitmargin": 50, "profitmargin": 50,
"upgradeHouse": 0, "upgradeHouse": 0,
"petname": "funnysnek", "petname": "mypetnyame",
"farmcavechoicemushrooms": true, "farmcavechoicemushrooms": false,
"communitycenterrun": true, "communitycenterrun": true,
"timeOfDayToSleep": 2200, "timeOfDayToSleep": 2200,
"lockPlayerChests": true, "lockPlayerChests": true,

6
configs/autoload.json Normal file → Executable file
View File

@ -1,5 +1,5 @@
{ {
"LastFileLoaded": null, "LastFileLoaded": null,
"LoadIntoMultiplayer": true, "LoadIntoMultiplayer": true,
"ForgetLastFileOnTitle": true "ForgetLastFileOnTitle": true
} }

0
configs/unlimitedplayers.json Normal file → Executable file
View File

View File

@ -7,7 +7,7 @@ services:
environment: environment:
- VNCPASS=nyanyanya - VNCPASS=nyanyanya
ports: ports:
- 5902:5900 - 5900:5900
- 24642:24642/udp - 24642:24642/udp
volumes: volumes:
- ./config:/root/.config/i3/config - ./config:/root/.config/i3/config
@ -15,4 +15,6 @@ services:
- ./configs/alwayson.json:/data/Stardew/Stardew Valley/Mods/Always On Server/config.json - ./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/unlimitedplayers.json:/data/Stardew/Stardew Valley/Mods/UnlimitedPlayers/config.json
- ./configs/autoload.json:/data/Stardew/Stardew Valley/Mods/AutoLoadGame/config.json - ./configs/autoload.json:/data/Stardew/Stardew Valley/Mods/AutoLoadGame/config.json
# add another mod
# - ./ModFolder:/data/Stardew/Stardew Valley/Mods/ModFolder