Skip to content

Konfiguration und Kommandozeile

Quellen und Priorität

Defaults/Production → Environment-JSON → user://client.local.json → CLI. Dateien: config/client.production.json, client.staging.json, client.local.example.json; optional lokal client.local.json. Parser akzeptiert --key=value oder --key value. Userargumente müssen nach Godots -- stehen.

Client-/Backendwerte

JSON / CLI Typ / Default Hinweis
environment / --env string / Production production/prod, staging/stage, local/dev/development
devMode / --dev-mode bool / false Production muss false sein
clientProfile / --client-profile string / default erzeugt lokale DeviceId; je Parallelclient eindeutig
backend.kind / --run-backend string / Nakama Validator akzeptiert nur Nakama
features.uploadReplays / --upload-replays bool / true Production darf per CLI nicht false sein
backend.region / --region string / eu Discovery/Registration
backend.serverRegistryUrl / --server-registry-url URL / Production-Registry Production kein Loopback
backend.nakama.scheme / --nakama-scheme string / https Production nur https
backend.nakama.host / --nakama-host string / Production-Host Production kein Loopback
backend.nakama.port / --nakama-port int / 443 Local 7350
backend.nakama.serverKey / --nakama-server-key string / Placeholder Secret/Buildwert; nie dokumentieren/committen
nur CLI --nakama-timeout-seconds int / 10 NakamaClient timeout

Serverwerte

CLI Typ / Default Beispiel/Produktion
--server-mode bool / false aktiviert Headlesspfad
--server-hub-id string / hub-eu-001 stabil pro Hubkontext
--server-port int / 7777 Local 7001; UDP erreichbar
--server-max-players int / 40 Local 5
--server-public-host string / 127.0.0.1 Produktion öffentliche DNS/IP
--server-version string / 0.1.0 Discovery/Compatibility
--server-registry-heartbeat-seconds int / 10 kleiner als Registry-TTL 15

--region und --server-registry-url laufen durch die gemeinsame RuntimeConfig. --server-mode allein setzt kein Environment; lokale Serverprofile werden durch Loopback/http als Legacy-Local erkannt. Explizites --env=local ist klarer.

Docker-/Operations-Environment

Compose verlangt LAUNCHER_API_TOKEN, POSTGRES_PASSWORD, NAKAMA_CONSOLE_PASSWORD, NAKAMA_CONSOLE_SIGNING_KEY, NAKAMA_SOCKET_SERVER_KEY. Für headless-server sind optional HEADLESS_SERVER_HUB_ID, HEADLESS_SERVER_PORT, HEADLESS_SERVER_MAX_PLAYERS, HEADLESS_SERVER_REGION, HEADLESS_SERVER_PUBLIC_HOST, HEADLESS_SERVER_VERSION und HEADLESS_SERVER_HEARTBEAT_SECONDS verfügbar. Launcher-API unterstützt außerdem LAUNCHER_API_CONFIG, MANIFEST_FILE, RELEASES_FILE, RELEASE_ROOT, PUBLIC_BASE_URL, MAX_LAUNCHER_RELEASES. Werte in .env/CI-Secrets, niemals Git/Docs.

Input Actions

project.godot definiert UI-, Movement-, Interact-, Weapon-, Combat- und Replay-Actions, darunter attack_primary, weapon_slot_1/2, weapon_next/previous, weapon_reload sowie replay_toggle_pause, replay_stop und Replay-Speed. AppBootstrap.EnsureGameplayInputActions stellt zentrale Gameplay-Actions zusätzlich für ältere lokale Projektzustände sicher. Anzeige und Rebinding laufen über UserSettingsDefaults und die Settings-Services.

Verwandt: Getting Started, Headless, Input How-to.