#[Dedi Server] Improve Save Path Behavior and Config Structure

1 messages · Page 1 of 1 (latest)

brisk ore
#

By default, settings.ini sets SavePath="", which (as expected) points to the platform's local save path:

  • Linux: ~/.local/share/godot/app_userdata/Starground/saves
  • Windows: C:\Users\<user>\AppData\Roaming\Godot\app_userdata\Starground\saves

However, when the server is run headlessly:

  • It fails to create a save if one does not exist.
  • Setting SavePath to a full folder path (e.g. /home/container/.local/share/godot/app_userdata/Starground/saves) results in an error like:
World node created!
Loading info and converting from /home/container/.local/share/godot/app\_userdata/Starground/saves
Save file not found or unreadable!

This happens even though the directory is fully writable.

🎯 Root Cause:
The server expects SavePath to point to the file (e.g. world.dat), not just the directory. But this isn’t standard for game servers, and it causes issues when a fresh world doesn’t exist.

Suggested Fix: Replace SavePath with two clearer settings:

  • SaveDir: The directory to look in for existing saves (defaults to platform's user path)
  • SaveName: The save file name without extension (defaults to world → looks for world.dat)

🔄 On startup:

  • Server checks if {SaveDir}/{SaveName}.dat exists.
  • If found → Load it and log to console its found the save + log progress
  • If not found → Create a new one automatically and log to Console its progress
#

[Dedi Server] Improve Save Path Behavior and Config Structure

robust token
#

one thing that would be nice that on first start the server would generate the settings.ini and the users.ini best for dedicated server is to put a save folder in the working dir of the server so u can run multiple servers

brisk ore
#

That'd be handled by SaveDir ^^ ; generating a default config on run would be nice ~ but not really related to this post 😅 ; example file would cover it

Though Settings.ini including the same configuration as the client would be nice as well to avoid a manual upload
something like:

;==============================
; Starground Dedicated Server Config
;==============================

[Network]
; IP - The public IP the server will bind to on startup.
; Use "*" to listen on all interfaces (default).
IP="*"
; Port - The port the server will bind to on startup.
Port=4430
; RequireSteamUsers - If true, only users with a valid Steam ID can join.
; Recommended to keep enabled for public servers.
RequireSteamUsers=true

[Server]
; SaveDir - The folder where the save file is stored.
; Leave blank ("") to use the default user path:
;   Linux: ~/.local/share/godot/app_userdata/Starground/saves
;   Windows: C:\Users\<user>\AppData\Roaming\Godot\app_userdata\Starground\saves
SaveDir=""
; SaveName - Name of the save file (without .dat extension).
; The server will look for <SaveName>.dat inside SaveDir.
; If not found, it will generate a new save using GenerationSettings.
SaveName="world"
; GenerationSettings - Used when creating a new world.
; Only applies if <SaveName>.dat is not found.
; Fields: seed, worldsize, terrain_scale, water_level
; Seed = 0 -> Random Seed
; WorldSize = 32.0x32.0 <-> 256.0x256.0
; Terrain Scale = 0.1 <-> 10.0
; Water Level = 0.0 <-> 1.0
GenerationSettings=(seed="0",worldsize="128.0x128.0",terrain_scale="2.0",water_level="0.5")
; EnableCommands - If true, players can use in-game commands.
; WARNING: Enabling this will disable achievements for all players.
EnableCommands=false
#

The more a server can do, the better 😅

robust token
#

yeah that would be great

mental epoch
#

I really appreciate both of your help. I think all of these ideas are great additions, so I’ll work on getting it all up and running.

Generating all the extra files on launch would be a good idea I think. The less needs to be downloaded for the server to work, the better.

brisk ore
#

Love to hear it ❤️ thanks!

brisk ore