diff --git a/README.md b/README.md index 4d32301..3067f05 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,10 @@ addon SDK with guard rails. ## Status See `docs/ROADMAP.md` for milestones and `docs/ARCHITECTURE.md` for the design. -**Emberwild 0.6.0** is released (download page and player guide: -https://emberwild-95k.pages.dev, builds on the Gitea releases). Built so far: +**Cinderwild 0.6.1** is released (download page and player guide: +https://cinderwild.psbailey.uk, builds on the Gitea releases). Up to 0.6.0 it +was called Emberwild (a name already taken on Steam); before that, Valheimlike. +Built so far: - M0-M1: the island, survival, crafting, building, weather, wildlife, hunting, fishing. - M2: self-hosted multiplayer (Host Game, dedicated servers, rules, chat, admin). - P1-P5 (`docs/PROGRESSION_DESIGN.md`): iron, stone building, the wolf moon and @@ -60,7 +62,7 @@ godot --headless --path . -- --server ## Packaged builds ```bash -tools/export.sh # build/Emberwild--macos.zip and -windows.zip +tools/export.sh # build/Cinderwild--macos.zip and -windows.zip tools/export.sh macOS # or just one ("macOS" / "Windows") ``` Needs the Godot export templates for your Godot version (Editor > Manage @@ -69,17 +71,17 @@ Export Templates). The version number is `application/short_version` in - **Mac:** a universal .app, ad-hoc signed but not notarised. On another Mac, the first launch needs right-click > Open (or System Settings > Privacy & Security > Open Anyway). -- **Windows:** unzip and run `Emberwild.exe` (keep `Emberwild.pck` beside +- **Windows:** unzip and run `Cinderwild.exe` (keep `Cinderwild.pck` beside it). It's unsigned, so SmartScreen says "Windows protected your PC": More info > Run anyway. - A packaged copy is also a dedicated server: - `Emberwild.app/Contents/MacOS/Emberwild --headless -- --server` (Mac) or - `Emberwild.exe --headless -- --server` (Windows). Saves and settings live in + `Cinderwild.app/Contents/MacOS/Cinderwild --headless -- --server` (Mac) or + `Cinderwild.exe --headless -- --server` (Windows). Saves and settings live in the same user folder as a copy run from source. ## Trailer and download page ```bash -tools/trailer/make_trailer.sh # build/Emberwild-trailer.mp4: recorded in-game (Movie Maker), needs ffmpeg +tools/trailer/make_trailer.sh # build/Cinderwild-trailer.mp4: recorded in-game (Movie Maker), needs ffmpeg tools/site/make_shots.sh # build/shots/*.jpg: the page's screenshots, rendered in a window tools/site/make_site.sh # build/site/: index.html, guide.html, the shots, poster and trailer for the current release ``` diff --git a/assets/audio/CREDITS.md b/assets/audio/CREDITS.md index 24381d1..b12b9a0 100644 --- a/assets/audio/CREDITS.md +++ b/assets/audio/CREDITS.md @@ -46,7 +46,7 @@ made a little older (deeper, slower, warmer) by `tools/voice/make_voice.py`. The recordings are generated from our own text; rebuild them with `tools/voice/make_voice.sh` after changing any line. -## Emberwild's own (CC0) +## Cinderwild's own (CC0) `music/`, `ambience/` and `sfx/synth/` are synthesised from scratch by `tools/audio/make_audio.py` (no samples): the five music tracks (calm, night, storm, danger, boss), the fire crackle, the creature voices, and the diff --git a/docs/HOSTING.md b/docs/HOSTING.md index 13dd364..d0b6297 100644 --- a/docs/HOSTING.md +++ b/docs/HOSTING.md @@ -25,8 +25,8 @@ elsewhere, use **Tailscale** (recommended) or port forwarding (below). - **Leaving** (Disconnect, or quitting the game) saves the island and stops the server. Next time, Host Game carries on with the same island (the seed field is locked once it exists). -- Its files: `~/Library/Application Support/Godot/app_userdata/Emberwild/host/` - (macOS; `%APPDATA%\Godot\app_userdata\Emberwild\host\` on Windows): +- Its files: `~/Library/Application Support/Godot/app_userdata/Cinderwild/host/` + (macOS; `%APPDATA%\Godot\app_userdata\Cinderwild\host\` on Windows): `server.json`, `server.log`, and the world in `worlds/server-world/`. - macOS may ask once whether Godot may accept incoming network connections: say **Allow**, or friends can't connect. @@ -47,14 +47,14 @@ The first player to join a new server becomes its admin (so join it yourself before telling friends the address). More admins: `/admin `. **As a service** (starts on boot, restarts if it stops): -- **macOS:** `server/com.emberwild.server.plist`: edit the paths in it, - then `cp server/com.emberwild.server.plist ~/Library/LaunchAgents/` and - `launchctl load -w ~/Library/LaunchAgents/com.emberwild.server.plist`. +- **macOS:** `server/com.cinderwild.server.plist`: edit the paths in it, + then `cp server/com.cinderwild.server.plist ~/Library/LaunchAgents/` and + `launchctl load -w ~/Library/LaunchAgents/com.cinderwild.server.plist`. It runs while you're logged in (set the Mac to log in automatically for an - always-on server). Log: `~/Library/Logs/emberwild-server.log`. -- **Linux:** `server/emberwild-server.service`: the steps are in the file - (`sudo systemctl enable --now emberwild-server`; logs with - `journalctl -u emberwild-server -f`). + always-on server). Log: `~/Library/Logs/cinderwild-server.log`. +- **Linux:** `server/cinderwild-server.service`: the steps are in the file + (`sudo systemctl enable --now cinderwild-server`; logs with + `journalctl -u cinderwild-server -f`). As a service there's no terminal to type commands into: use chat in game, or edit `server.json` and restart. @@ -76,7 +76,7 @@ the ones you'll want first: | `difficulty` | normal | easy / normal / hard | | `sleep` | all_online | or `half`, `anyone`, `off` | | `backups_kept`, `backup_hours` | 10, 6 | see below | -| `check_updates` | true | at start-up, say in the log if a newer Emberwild is out (and whether its protocol differs, so new players couldn't join) | +| `check_updates` | true | at start-up, say in the log if a newer Cinderwild is out (and whether its protocol differs, so new players couldn't join) | | `allowlist`, `banned`, `admins` | | player ids (use `/ban`, `/admin` rather than editing) | ## Backups diff --git a/docs/PLAYTEST.md b/docs/PLAYTEST.md index b9f2026..9d143ce 100644 --- a/docs/PLAYTEST.md +++ b/docs/PLAYTEST.md @@ -1,14 +1,14 @@ -# Emberwild 0.6.0 playtest +# Cinderwild 0.6.0 playtest Thanks for playing. This build is the **Valley** and the **Cove**, and we'd like to know what breaks, what's confusing, and what's no fun. The -game's player guide is on the download page: https://emberwild-95k.pages.dev +game's player guide is on the download page: https://cinderwild.psbailey.uk ## Reporting a bug Press **Esc** in the game, then **Report a bug**: -- **Open the bug report page** opens a new issue on the Emberwild Gitea page +- **Open the bug report page** opens a new issue on the Cinderwild Gitea page in your browser, already filled in with your version, computer, mode, land, the in-game time and where you are. Say what happened, what you expected, and how to make it happen again, then press **Create Issue**. @@ -25,9 +25,9 @@ Where the log is: | | | |---|---| -| Mac | `~/Library/Application Support/Godot/app_userdata/Emberwild/logs/godot.log` | -| Windows | `%APPDATA%\Godot\app_userdata\Emberwild\logs\godot.log` | -| Linux | `~/.local/share/godot/app_userdata/Emberwild/logs/godot.log` | +| Mac | `~/Library/Application Support/Godot/app_userdata/Cinderwild/logs/godot.log` | +| Windows | `%APPDATA%\Godot\app_userdata\Cinderwild\logs\godot.log` | +| Linux | `~/.local/share/godot/app_userdata/Cinderwild/logs/godot.log` | A screenshot helps for anything that looks wrong (Cmd+Shift+4 on a Mac, Win+Shift+S on Windows). diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index fd4044c..a8f126b 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -121,7 +121,7 @@ an out-of-date game can't join an up-to-date server: today that means `git pull` and a restart on every machine. *Built so far (the check):* `scripts/core/updates.gd` asks the feed in -Project Settings (`emberwild/updates/feed`, now the git server's +Project Settings (`cinderwild/updates/feed`, now the git server's `releases/latest` API; Gitea, Forgejo and GitHub answer alike) once at start-up. It reads the release's `version.json` asset (written by `tools/export.sh`: version, protocol, per-platform file, sha256 and size). diff --git a/docs/SETUP_ON_NEW_MACHINE.md b/docs/SETUP_ON_NEW_MACHINE.md index 4447ff2..fb6399b 100644 --- a/docs/SETUP_ON_NEW_MACHINE.md +++ b/docs/SETUP_ON_NEW_MACHINE.md @@ -40,7 +40,7 @@ server/run_server.sh --server-name "Paul's island" --password secret --port 2424 It checks the Godot version, imports a fresh copy, then starts the server on UDP 24242 with no window. Settings live in `server.json` (its path is printed at start-up; on macOS it's under -`~/Library/Application Support/Godot/app_userdata/Emberwild/server/`). +`~/Library/Application Support/Godot/app_userdata/Cinderwild/server/`). The shared island is saved in `worlds/server-world/` in that same folder, within 10 seconds of any change (and when someone leaves). Stop it with Ctrl+C. Players join with **Join Game** on the title screen. Over @@ -82,13 +82,13 @@ godot --headless --path . --script res://tests/test_survival_stats.gd ## Save files Worlds are per machine, under -`~/Library/Application Support/Godot/app_userdata/Emberwild/worlds/` on -macOS (`%APPDATA%\Godot\app_userdata\Emberwild\worlds\` on Windows). Copy a +`~/Library/Application Support/Godot/app_userdata/Cinderwild/worlds/` on +macOS (`%APPDATA%\Godot\app_userdata\Cinderwild\worlds\` on Windows). Copy a world's folder across to move it to another machine. The game used to be called Valheimlike, and its data lived in -`app_userdata/Valheimlike/`. The first time Emberwild starts it copies worlds, -your identity and server settings across to `app_userdata/Emberwild/` +`app_userdata/Valheimlike/`. The first time Cinderwild starts it copies worlds, +your identity and server settings across to `app_userdata/Cinderwild/` (`scripts/core/boot.gd`). The old folder is left alone as a backup, and you can delete it once you're happy. diff --git a/docs/SURVIVAL_DESIGN.md b/docs/SURVIVAL_DESIGN.md index 324ec5b..cbb2e7d 100644 --- a/docs/SURVIVAL_DESIGN.md +++ b/docs/SURVIVAL_DESIGN.md @@ -275,7 +275,7 @@ small Diet bars, and a low group blinks. - **Autosave** every 2 minutes, on Save & Quit (to the title or desktop) and when the window is closed. - Saves live in `user://worlds//` (on macOS: - `~/Library/Application Support/Godot/app_userdata/Emberwild/worlds/`) as + `~/Library/Application Support/Godot/app_userdata/Cinderwild/worlds/`) as `meta.json` + `world.json`. Writes are atomic, and the previous save is kept as `world.json.bak`. - A save stores only what the player changed: player position and look, diff --git a/export_presets.cfg b/export_presets.cfg index d614067..ef58703 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="data/*.json, data/worldlets/*.json" exclude_filter="tests/*, docs/*, tools/*, server/*" -export_path="build/macos/Emberwild.zip" +export_path="build/macos/Cinderwild.zip" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -26,11 +26,11 @@ custom_template/release="" debug/export_console_wrapper=0 application/icon="" application/icon_interpolation=4 -application/bundle_identifier="com.pbailey.emberwild" +application/bundle_identifier="com.pbailey.cinderwild" application/signature="" application/app_category="Games" -application/short_version="0.6.0" -application/version="0.6.0" +application/short_version="0.6.1" +application/version="0.6.1" application/copyright="" display/high_res=true codesign/codesign=1 @@ -66,7 +66,7 @@ custom_features="" export_filter="all_resources" include_filter="data/*.json, data/worldlets/*.json" exclude_filter="tests/*, docs/*, tools/*, server/*" -export_path="build/windows/Emberwild/Emberwild.exe" +export_path="build/windows/Cinderwild/Cinderwild.exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -89,11 +89,11 @@ application/modify_resources=false application/icon="" application/console_wrapper_icon="" application/icon_interpolation=4 -application/file_version="0.6.0" -application/product_version="0.6.0" +application/file_version="0.6.1" +application/product_version="0.6.1" application/company_name="" -application/product_name="Emberwild" -application/file_description="Emberwild" +application/product_name="Cinderwild" +application/file_description="Cinderwild" application/copyright="" application/trademarks="" application/export_angle=0 diff --git a/play.sh b/play.sh index 3c5b9c6..5c61883 100755 --- a/play.sh +++ b/play.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Starts Emberwild (the game, with its window and title screen). +# Starts Cinderwild (the game, with its window and title screen). # # ./play.sh # diff --git a/project.godot b/project.godot index 6af7439..a6ad635 100644 --- a/project.godot +++ b/project.godot @@ -14,12 +14,12 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true [application] -config/name="Emberwild" +config/name="Cinderwild" config/description="Low-poly survival game — Valheim look, Rust depth, self-hosted, moddable." run/main_scene="res://scenes/title.tscn" config/features=PackedStringArray("4.7", "Forward Plus") config/icon="res://icon.svg" -config/version="0.6.0" +config/version="0.6.1" [autoload] @@ -93,7 +93,7 @@ weather_wind={ "value": 1.0 } -[emberwild] +[cinderwild] updates/feed="https://git.psbailey.uk/api/v1/repos/Admin/Emberwild/releases/latest" diff --git a/scripts/core/boot.gd b/scripts/core/boot.gd index 1d64d79..4b4a385 100644 --- a/scripts/core/boot.gd +++ b/scripts/core/boot.gd @@ -2,16 +2,17 @@ extends Node ## Autoload "Boot", first in the list: one-off start-up housekeeping that has ## to happen before anything reads user://. ## -## The game was called "Valheimlike" until it became "Emberwild". Godot names -## the user-data folder after the project, so the rename moved it from -## .../app_userdata/Valheimlike to .../app_userdata/Emberwild. The first time -## Emberwild starts, this copies saved worlds, your identity (key, name, look) -## and server settings across. It copies rather than moves, so the old folder -## stays as a backup, and it never overwrites anything already in the new -## folder. Test folders (test_*) and logs are skipped. +## The game has been renamed twice: "Valheimlike", then "Emberwild" (0.1.0 to +## 0.6.0), now "Cinderwild". Godot names the user-data folder after the +## project, so each rename moved it (.../app_userdata/). The first time +## Cinderwild starts, this copies saved worlds, your identity (key, name, +## look), settings and server settings across from the newest old folder there +## is (it already holds what came from the one before). It copies rather than moves, so the old folders stay +## as a backup, and it never overwrites anything already in the new folder. +## Test folders (test_*) and logs are skipped. -const OLD_NAME := "Valheimlike" -const MARKER := "migrated_from_valheimlike.txt" +const OLD_NAMES := ["Emberwild", "Valheimlike"] ## newest first +const MARKER := "migrated_from_%s.txt" const SKIP := ["logs", "shader_cache", "vulkan", "test_worlds", "test_net"] var copied := 0 @@ -22,14 +23,25 @@ func _enter_tree() -> void: ## Returns the number of files copied (0 if there was nothing to do). func migrate_user_data() -> int: var new_dir := OS.get_user_data_dir() - var old_dir := new_dir.get_base_dir().path_join(OLD_NAME) + for old_name in OLD_NAMES: + var old_dir := new_dir.get_base_dir().path_join(old_name) + if DirAccess.dir_exists_absolute(old_dir) and old_dir != new_dir: + # Only the newest: it already holds whatever came across from the + # one before (a world deleted since shouldn't come back). + return migrate_from(old_dir, new_dir, old_name) + return 0 + +## Copies `old_dir` into `new_dir` once (a marker file in `new_dir` says it's +## been done). Returns the number of files copied. +func migrate_from(old_dir: String, new_dir: String, old_name: String) -> int: if new_dir == old_dir or not DirAccess.dir_exists_absolute(old_dir): return 0 - if FileAccess.file_exists(new_dir.path_join(MARKER)): + var marker := new_dir.path_join(MARKER % old_name.to_lower()) + if FileAccess.file_exists(marker): return 0 copied = 0 _copy_tree(old_dir, new_dir) - var f := FileAccess.open(new_dir.path_join(MARKER), FileAccess.WRITE) + var f := FileAccess.open(marker, FileAccess.WRITE) if f != null: f.store_string("Copied %d files from %s on %s. The old folder was left as it was.\n" % [ copied, old_dir, Time.get_datetime_string_from_system()]) @@ -43,6 +55,8 @@ func _copy_tree(from: String, to: String) -> void: if da == null: return for f in da.get_files(): + if f.begins_with("migrated_from_"): + continue # (the old folder's own markers) var dst := to.path_join(f) if not FileAccess.file_exists(dst) and DirAccess.copy_absolute(from.path_join(f), dst) == OK: copied += 1 diff --git a/scripts/core/bug_report.gd b/scripts/core/bug_report.gd index 5b858ce..f743e8f 100644 --- a/scripts/core/bug_report.gd +++ b/scripts/core/bug_report.gd @@ -1,6 +1,6 @@ extends RefCounted ## Report a bug (0.6.0, the playtest; pause menu): opens a new issue on the -## Emberwild repo in your browser, already filled in with a title to edit, +## Cinderwild repo in your browser, already filled in with a title to edit, ## a few questions to answer, and the details we'd ask for anyway (version, ## computer, single-player or online, which land, the day and time, where you ## are). You read it, add what happened, and press Create Issue: nothing is @@ -46,7 +46,7 @@ static func mode(world: Node) -> String: ## The details, one per line (what's in the issue, and what "Copy" copies). static func details(world: Node) -> Dictionary: var d := { - "Version": "Emberwild %s (protocol %d)" % [String(ProjectSettings.get_setting("application/config/version", "?")), int(_al("Net").PROTOCOL)], + "Version": "Cinderwild %s (protocol %d)" % [String(ProjectSettings.get_setting("application/config/version", "?")), int(_al("Net").PROTOCOL)], "Computer": "%s %s" % [OS.get_name(), OS.get_version()], "Graphics": "%s (%s)" % [RenderingServer.get_video_adapter_name(), RenderingServer.get_current_rendering_method()], "Mode": mode(world), diff --git a/scripts/core/updates.gd b/scripts/core/updates.gd index c455cc0..c2ed2da 100644 --- a/scripts/core/updates.gd +++ b/scripts/core/updates.gd @@ -1,13 +1,13 @@ extends Node ## The update check (docs/ROADMAP.md, M4 "Updates", first step): is there a -## newer Emberwild than this one? Asked once at start-up, of the feed in -## Project Settings (`emberwild/updates/feed`). The feed is either +## newer Cinderwild than this one? Asked once at start-up, of the feed in +## Project Settings (`cinderwild/updates/feed`). The feed is either ## - a release API answer (Gitea, Forgejo or GitHub `releases/latest`): its ## `version.json` asset is fetched next, and its other assets are the ## downloads, by file name; or ## - a `version.json` itself: ## {"version": "0.2.0", "protocol": 13, "notes": "...", "page": "https://...", -## "downloads": {"macos": {"file": "Emberwild-0.2.0-macos.zip", "sha256": "...", +## "downloads": {"macos": {"file": "Cinderwild-0.2.0-macos.zip", "sha256": "...", ## "size": 61164958, "url": "(optional; else the asset)"}, ## "windows": {...}}} ## tools/export.sh writes that file next to the zips, for the release. @@ -22,7 +22,7 @@ signal checked(state: String) const TIMEOUT := 10.0 var version: String = String(ProjectSettings.get_setting("application/config/version", "0.0.0")) -var feed: String = String(ProjectSettings.get_setting("emberwild/updates/feed", "")) +var feed: String = String(ProjectSettings.get_setting("cinderwild/updates/feed", "")) var prefs_path := "user://updates.json" var enabled := true ## idle | off | checking | current | available | failed @@ -101,7 +101,7 @@ func _finish(s: String) -> void: if s == "failed": print("[updates] couldn't check for updates: ", error) elif s == "available": - print("[updates] Emberwild %s is out (this is %s)" % [latest_version(), version]) + print("[updates] Cinderwild %s is out (this is %s)" % [latest_version(), version]) checked.emit(s) func _get_json(url: String) -> Variant: @@ -112,7 +112,7 @@ func _get_json(url: String) -> Variant: var http := HTTPRequest.new() http.timeout = TIMEOUT add_child(http) - var err := http.request(url, ["Accept: application/json", "User-Agent: Emberwild/" + version]) + var err := http.request(url, ["Accept: application/json", "User-Agent: Cinderwild/" + version]) if err != OK: http.queue_free() error = "couldn't ask %s (%d)" % [url, err] diff --git a/scripts/net/net.gd b/scripts/net/net.gd index 86c4ae2..07a1a17 100644 --- a/scripts/net/net.gd +++ b/scripts/net/net.gd @@ -176,7 +176,7 @@ func _start_dedicated() -> void: func _on_update_checked(s: String) -> void: if s == "available": - print("[server] Emberwild %s is out (protocol %d); this server runs %s (protocol %d). %s" % [ + print("[server] Cinderwild %s is out (protocol %d); this server runs %s (protocol %d). %s" % [ Updates.latest_version(), Updates.latest_protocol(), Updates.version, PROTOCOL, "Players with the new version can't join until it's updated." if Updates.latest_protocol() != PROTOCOL else ""]) @@ -694,7 +694,7 @@ func _c2s_hello(d: Dictionary) -> void: return if int(d.get("protocol", 0)) != PROTOCOL: var theirs := int(d.get("protocol", 0)) - _reject(peer, "Different game version: this server runs Emberwild %s (protocol %d), you have protocol %d. %s" % [ + _reject(peer, "Different game version: this server runs Cinderwild %s (protocol %d), you have protocol %d. %s" % [ Updates.version, PROTOCOL, theirs, "Update the game to join." if theirs < PROTOCOL else "The server needs updating."]) return # (A crossing to another land comes with a one-time pass instead, checked diff --git a/scripts/net/server_config.gd b/scripts/net/server_config.gd index 287240b..159a1c4 100644 --- a/scripts/net/server_config.gd +++ b/scripts/net/server_config.gd @@ -6,7 +6,7 @@ extends RefCounted const DEFAULT_PATH := "user://server/server.json" const DEFAULTS := { - "server_name": "Emberwild server", + "server_name": "Cinderwild server", "motd": "Welcome!", "port": 24242, "max_players": 8, diff --git a/scripts/ui/pause_menu.gd b/scripts/ui/pause_menu.gd index c41fa80..73a86e2 100644 --- a/scripts/ui/pause_menu.gd +++ b/scripts/ui/pause_menu.gd @@ -127,7 +127,7 @@ func bind(p: CharacterBody3D) -> void: _main.add_child(tips_row) var upd := CheckButton.new() - upd.text = "Check for updates at start (Emberwild %s)" % Updates.version + upd.text = "Check for updates at start (Cinderwild %s)" % Updates.version upd.focus_mode = Control.FOCUS_NONE upd.button_pressed = Updates.enabled upd.add_theme_font_size_override("font_size", 16) @@ -187,7 +187,7 @@ func bind(p: CharacterBody3D) -> void: var rt := UITheme.label("Report a bug", 26) rt.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER _report.add_child(rt) - var how := UITheme.label("This opens a new issue on Emberwild's Gitea page in your browser, filled in with your version, computer and where you are in the game. Say what happened, then press Create Issue. (You'll need to be signed in there.) Nothing is sent from the game itself.", 15) + var how := UITheme.label("This opens a new issue on Cinderwild's Gitea page in your browser, filled in with your version, computer and where you are in the game. Say what happened, then press Create Issue. (You'll need to be signed in there.) Nothing is sent from the game itself.", 15) how.autowrap_mode = TextServer.AUTOWRAP_WORD how.custom_minimum_size = Vector2(380, 0) _report.add_child(how) diff --git a/scripts/ui/title_screen.gd b/scripts/ui/title_screen.gd index 27d5c79..ab65fd2 100644 --- a/scripts/ui/title_screen.gd +++ b/scripts/ui/title_screen.gd @@ -80,7 +80,7 @@ func _ready() -> void: col.offset_right = 520 col.add_theme_constant_override("separation", 14) root.add_child(col) - col.add_child(UITheme.label("EMBERWILD", 54)) + col.add_child(UITheme.label("CINDERWILD", 54)) col.add_child(UITheme.label("Survive the island. Build a home.", 18, UITheme.TEXT_DIM)) var spacer := Control.new() spacer.custom_minimum_size = Vector2(0, 24) @@ -413,7 +413,7 @@ func _host_page() -> Control: func _fill_host() -> void: var c: RefCounted = load("res://scripts/net/server_config.gd").open(Net.host_config) var n: String = c.data.server_name - _host_name.text = "%s's island" % Net.get_identity().name if n == "Emberwild server" else n + _host_name.text = "%s's island" % Net.get_identity().name if n in ["Cinderwild server", "Emberwild server"] else n _host_port.text = str(int(c.data.port)) _host_pw.text = String(c.data.password) var preset := "co-op" @@ -801,7 +801,7 @@ var version_label: Label ## The version, bottom left; and a card bottom right when a newer one is out. func _build_update_banner(root: Control) -> void: # (bottom right: the menu column runs down the left and would cover it) - version_label = UITheme.label("Emberwild %s" % Updates.version, 13, UITheme.TEXT_DIM) + version_label = UITheme.label("Cinderwild %s" % Updates.version, 13, UITheme.TEXT_DIM) version_label.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT) version_label.grow_horizontal = Control.GROW_DIRECTION_BEGIN version_label.grow_vertical = Control.GROW_DIRECTION_BEGIN @@ -842,7 +842,7 @@ func _on_update_checked(s: String) -> void: return var notes := String(Updates.latest.get("notes", "")) var how := "" if Updates.packaged() else "\nRunning from the source: git pull in the game folder, then restart." - _update_text.text = "Emberwild %s is out (you have %s).%s%s" % [Updates.latest_version(), Updates.version, + _update_text.text = "Cinderwild %s is out (you have %s).%s%s" % [Updates.latest_version(), Updates.version, ("\n" + notes) if not notes.is_empty() else "", how] _update_btn.text = "Download" if Updates.packaged() and not String(Updates.download().get("url", "")).is_empty() else "Release page" _update_btn.disabled = Updates.download_url().is_empty() @@ -858,7 +858,7 @@ static func version_advice(reason: String) -> String: if not reason.begins_with("Different game version"): return "" if Updates.state == "available": - return "\nEmberwild %s is out: Download is on the title page." % Updates.latest_version() + return "\nCinderwild %s is out: Download is on the title page." % Updates.latest_version() if reason.ends_with("Update the game to join."): return "\nThere's no newer release yet: the server may be running a newer copy from the source." return "" diff --git a/server/cinderwild-server.service b/server/cinderwild-server.service new file mode 100644 index 0000000..7c89a56 --- /dev/null +++ b/server/cinderwild-server.service @@ -0,0 +1,36 @@ +# Cinderwild dedicated server as a systemd service (Linux). +# +# 1. Put the game where it'll live, e.g. /opt/cinderwild (a git clone), and +# install Godot 4.7+ as /usr/local/bin/godot. +# 2. Make a user for it: sudo useradd -r -m -d /var/lib/cinderwild cinderwild +# 3. Copy this file: sudo cp server/cinderwild-server.service /etc/systemd/system/ +# and edit User, WorkingDirectory and GODOT below if yours differ. +# 4. Start it, and on boot: sudo systemctl enable --now cinderwild-server +# Logs: journalctl -u cinderwild-server -f +# Stop / restart: sudo systemctl stop|restart cinderwild-server +# +# server.json and the world live in the user's Godot data folder: +# /var/lib/cinderwild/.local/share/godot/app_userdata/Cinderwild/server/ +# Admin commands: join the game and use chat (/help), or edit server.json and +# restart. (The console needs a terminal, so it isn't used here.) + +[Unit] +Description=Cinderwild dedicated server +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=cinderwild +WorkingDirectory=/opt/cinderwild +Environment=GODOT=/usr/local/bin/godot +# run_server.sh checks the Godot version and imports a fresh copy first. +ExecStart=/opt/cinderwild/server/run_server.sh +Restart=on-failure +RestartSec=10 +# The world saves within 10 s of any change, so a stop loses at most that. +KillSignal=SIGINT +TimeoutStopSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/server/com.emberwild.server.plist b/server/com.cinderwild.server.plist similarity index 65% rename from server/com.emberwild.server.plist rename to server/com.cinderwild.server.plist index c6c8310..8b8766c 100644 --- a/server/com.emberwild.server.plist +++ b/server/com.cinderwild.server.plist @@ -1,17 +1,17 @@