Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit the config file for persistant changes #78

Closed
moojustice1 opened this issue Nov 5, 2024 · 7 comments
Closed

Can't edit the config file for persistant changes #78

moojustice1 opened this issue Nov 5, 2024 · 7 comments

Comments

@moojustice1
Copy link

I am attempting to change the config file for all the server pieces. When I change any of the values, it completely resets the config file, even knocking out the password.

@phellarv
Copy link

phellarv commented Nov 6, 2024

I have done a workaround for this. I've added an extra volume in the docker-compose.yml:

      - ./enshrouded_server.json:/home/steam/enshrouded/enshrouded_server.json

Atleast when I tested this, it worked.

@jsknnr
Copy link
Owner

jsknnr commented Nov 7, 2024

This is because in the startup process I check if the config file is present, if it is not I copy a generic one into the directory. Later in the process, I take the values you supply to the container on startup and inject those into the config overwriting whatever is present. This should only be for server name, server password, game port, query port, server slots, and server ip. Nothing else should get overwritten.

Can you guys give examples of why you are manually editing the file vs just providing the container arguments? Are there settings you are wanting to modify that I don't have options for? I can add more options if that is the case.

@willfindlay
Copy link

Some related discussion here: #79

@baine-reynolds
Copy link

baine-reynolds commented Nov 12, 2024

@jsknnr I think one of the major reasons for this is to alter the non-host specific configs (like characters/monster/boss settings or day/night cycles, aka the "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

Having said that, I see the example.json that you have present in the proton dir, is this config the one that we can make customizations to and have it get pulled in to the server on startup? I see it gets pulled into the container but it never gets updated to the expected filename (it keeps the "_example" in the name).

@jsknnr
Copy link
Owner

jsknnr commented Nov 16, 2024

@baine-reynolds It should get copied with the correct name:

if [ $EXTERNAL_CONFIG -eq 0 ]; then
    if ! [ -f "${ENSHROUDED_PATH}/enshrouded_server.json" ]; then
        echo "$(timestamp) INFO: Enshrouded server config not present, copying example"
        cp /home/steam/enshrouded_server_example.json ${ENSHROUDED_PATH}/enshrouded_server.json
    fi
fi

The example is probably out of date. I added a new argument (EXTERNAL_CONFIG=1) to container start that will not do anything to the server config file. It won't copy the example and it won't update settings based on other arguments.

@jsknnr
Copy link
Owner

jsknnr commented Nov 18, 2024

I've updated the example to include the newer settings

@baine-reynolds
Copy link

Oh awesome! Thanks for the clarification! I was just blind and missed it.

@jsknnr jsknnr closed this as completed Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants