From d210b4848f1d164e6ce41ee6b95bc0ddc8c87cd1 Mon Sep 17 00:00:00 2001 From: anon Date: Tue, 30 Jul 2024 13:29:23 -0700 Subject: [PATCH] Fixed compatibility with latest update configs --- .../proton/enshrouded_server_example.json | 59 ++++++++++++++++--- container/proton/entrypoint.sh | 2 +- container/wine/enshrouded_server_example.json | 59 ++++++++++++++++--- container/wine/entrypoint.sh | 2 +- 4 files changed, 104 insertions(+), 18 deletions(-) diff --git a/container/proton/enshrouded_server_example.json b/container/proton/enshrouded_server_example.json index 4ec24a7..eb2a748 100644 --- a/container/proton/enshrouded_server_example.json +++ b/container/proton/enshrouded_server_example.json @@ -1,10 +1,53 @@ { - "name": "Enshrouded Server", - "password": "", - "saveDirectory": "./savegame", - "logDirectory": "./logs", - "ip": "0.0.0.0", - "gamePort": 15636, - "queryPort": 15637, - "slotCount": 16 + "name": "Enshrouded Server", + "saveDirectory": "./savegame", + "logDirectory": "./logs", + "ip": "0.0.0.0", + "gamePort": 15636, + "queryPort": 15637, + "slotCount": 16, + "gameSettingsPreset": "Default", + "gameSettings": { + "playerHealthFactor": 1, + "playerManaFactor": 1, + "playerStaminaFactor": 1, + "enableDurability": true, + "enableStarvingDebuff": false, + "foodBuffDurationFactor": 1, + "fromHungerToStarving": 600000000000, + "shroudTimeFactor": 1, + "tombstoneMode": "AddBackpackMaterials", + "miningDamageFactor": 1, + "plantGrowthSpeedFactor": 1, + "resourceDropStackAmountFactor": 1, + "factoryProductionSpeedFactor": 1, + "perkUpgradeRecyclingFactor": 0.500000, + "perkCostFactor": 1, + "experienceCombatFactor": 1, + "experienceMiningFactor": 1, + "experienceExplorationQuestsFactor": 1, + "randomSpawnerAmount": "Normal", + "aggroPoolAmount": "Normal", + "enemyDamageFactor": 1, + "enemyHealthFactor": 1, + "enemyStaminaFactor": 1, + "enemyPerceptionRangeFactor": 1, + "bossDamageFactor": 1, + "bossHealthFactor": 1, + "threatBonus": 1, + "pacifyAllEnemies": false, + "dayTimeDuration": 1800000000000, + "nightTimeDuration": 720000000000 + }, + "userGroups": [ + { + "name": "Default", + "password": "", + "canKickBan": false, + "canAccessInventories": true, + "canEditBase": true, + "canExtendBase": true, + "reservedSlots": 0 + } + ] } diff --git a/container/proton/entrypoint.sh b/container/proton/entrypoint.sh index 42a19f8..072eec3 100755 --- a/container/proton/entrypoint.sh +++ b/container/proton/entrypoint.sh @@ -68,7 +68,7 @@ rm "${ENSHROUDED_PATH}/savegame/test" echo "$(timestamp) INFO: Updating Enshrouded Server configuration" tmpfile=$(mktemp) jq --arg n "$SERVER_NAME" '.name = $n' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG -jq --arg p "$SERVER_PASSWORD" '.password = $p' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG +jq --arg p "$SERVER_PASSWORD" '.userGroups[].password = $p' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg g "$GAME_PORT" '.gamePort = ($g | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg q "$QUERY_PORT" '.queryPort = ($q | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg s "$SERVER_SLOTS" '.slotCount = ($s | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG diff --git a/container/wine/enshrouded_server_example.json b/container/wine/enshrouded_server_example.json index 4ec24a7..eb2a748 100644 --- a/container/wine/enshrouded_server_example.json +++ b/container/wine/enshrouded_server_example.json @@ -1,10 +1,53 @@ { - "name": "Enshrouded Server", - "password": "", - "saveDirectory": "./savegame", - "logDirectory": "./logs", - "ip": "0.0.0.0", - "gamePort": 15636, - "queryPort": 15637, - "slotCount": 16 + "name": "Enshrouded Server", + "saveDirectory": "./savegame", + "logDirectory": "./logs", + "ip": "0.0.0.0", + "gamePort": 15636, + "queryPort": 15637, + "slotCount": 16, + "gameSettingsPreset": "Default", + "gameSettings": { + "playerHealthFactor": 1, + "playerManaFactor": 1, + "playerStaminaFactor": 1, + "enableDurability": true, + "enableStarvingDebuff": false, + "foodBuffDurationFactor": 1, + "fromHungerToStarving": 600000000000, + "shroudTimeFactor": 1, + "tombstoneMode": "AddBackpackMaterials", + "miningDamageFactor": 1, + "plantGrowthSpeedFactor": 1, + "resourceDropStackAmountFactor": 1, + "factoryProductionSpeedFactor": 1, + "perkUpgradeRecyclingFactor": 0.500000, + "perkCostFactor": 1, + "experienceCombatFactor": 1, + "experienceMiningFactor": 1, + "experienceExplorationQuestsFactor": 1, + "randomSpawnerAmount": "Normal", + "aggroPoolAmount": "Normal", + "enemyDamageFactor": 1, + "enemyHealthFactor": 1, + "enemyStaminaFactor": 1, + "enemyPerceptionRangeFactor": 1, + "bossDamageFactor": 1, + "bossHealthFactor": 1, + "threatBonus": 1, + "pacifyAllEnemies": false, + "dayTimeDuration": 1800000000000, + "nightTimeDuration": 720000000000 + }, + "userGroups": [ + { + "name": "Default", + "password": "", + "canKickBan": false, + "canAccessInventories": true, + "canEditBase": true, + "canExtendBase": true, + "reservedSlots": 0 + } + ] } diff --git a/container/wine/entrypoint.sh b/container/wine/entrypoint.sh index d487815..ff52ac3 100755 --- a/container/wine/entrypoint.sh +++ b/container/wine/entrypoint.sh @@ -68,7 +68,7 @@ rm "${ENSHROUDED_PATH}/savegame/test" echo "$(timestamp) INFO: Updating Enshrouded Server configuration" tmpfile=$(mktemp) jq --arg n "$SERVER_NAME" '.name = $n' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG -jq --arg p "$SERVER_PASSWORD" '.password = $p' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG +jq --arg p "$SERVER_PASSWORD" '.userGroups[].password = $p' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg g "$GAME_PORT" '.gamePort = ($g | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg q "$QUERY_PORT" '.queryPort = ($q | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG jq --arg s "$SERVER_SLOTS" '.slotCount = ($s | tonumber)' ${ENSHROUDED_CONFIG} > "$tmpfile" && mv "$tmpfile" $ENSHROUDED_CONFIG