From 5df7efc198ff2789b5525727766d1637c3ce4241 Mon Sep 17 00:00:00 2001 From: Torhan Bartel Date: Tue, 20 Oct 2026 00:14:36 +0200 Subject: [PATCH] Docs: local Sacred Gold install required, no hard-coded game path README explains --game-dir and the stored GameDir; the VS Code launch uses the stored path and builds through build.ps1. Co-Authored-By: Claude Opus 5.5 (1M context) --- .vscode/launch.json | 6 ++++-- .vscode/tasks.json | 11 +++++++---- CLAUDE.md | 8 +++++--- README.md | 17 +++++++++++++++-- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index cb4287f..4866a71 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,13 +3,15 @@ "configurations": [ { // Builds, then starts the game through the launcher (no debugger in the game). + // The game folder comes from build/x86-debug/sacredK.ini: run the + // launcher once with --game-dir "" (README.md). "name": "Run Sacred (sacredK)", "type": "cppvsdbg", "request": "launch", "program": "${workspaceFolder}/build/x86-debug/sacredK.exe", - "args": ["--game-dir", "D:\\Gaming\\Sacred Gold", "log"], + "args": ["log"], "cwd": "${workspaceFolder}/build/x86-debug", - "preLaunchTask": "CMake: build", + "preLaunchTask": "Build x86-debug", "console": "internalConsole" }, { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index fb18848..a2b5edc 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,10 +2,13 @@ "version": "2.0.0", "tasks": [ { - "label": "CMake: build", - "type": "cmake", - "command": "build", - "targets": ["all"], + // build.ps1 enters the MSVC x86 environment and builds the x86-debug + // preset; unlike a CMake Tools task it needs no preset picked in VS Code. + "label": "Build x86-debug", + "type": "process", + "command": "powershell", + "args": ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "${workspaceFolder}/build.ps1", "x86-debug"], + "options": { "cwd": "${workspaceFolder}" }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": ["$msCompile"] } diff --git a/CLAUDE.md b/CLAUDE.md index 426e55e..9a0ea79 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,9 +14,11 @@ the work so far is **mods** — behaviour changes on top of the original auto-attack, skill reworks, respec, map fixes, ...). The game stays playable at every step; the user plays it to test. -- Target binary: the original `sacred.exe` in `D:\Gaming\Sacred Gold\` - (path in `build\x86-debug\sacredK.ini`, `[paths] GameDir`). Ignore the - `SacredReborn*` files in that folder. +- Target binary: the original `sacred.exe` of a local Sacred Gold 2.28 + installation (see `README.md`, Supported build). The game is not in the + repo; its folder is given to the launcher once (`--game-dir`) and kept in + `build\\sacredK.ini`, `[paths] GameDir`. Read it from there; never + hard-code a local path in code, docs or configs. - Game texts are German (Fertigkeiten, Attribute, Blitzschlag, ...); keep the game's names when talking about features. - The user's monitor is 3440x1440; the game renders about 1835x768 scaled up. diff --git a/README.md b/README.md index 3463a5a..04209dc 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,24 @@ the CMake presets. ## Running +The game is not part of this repository. You need a local installation of +Sacred Gold 2.28 with the `sacred.exe` listed under [Supported build](#supported-build) +(e.g. the Steam or GOG release), and you tell the launcher its folder once: + ```powershell -build\x86-debug\sacredK.exe --game-dir "D:\Gaming\Sacred Gold" # first run; remembered in sacredK.ini -build\x86-debug\sacredK.exe log # later runs; extra args go to the game +build\x86-debug\sacredK.exe --game-dir "" # first run; remembered in sacredK.ini +build\x86-debug\sacredK.exe log # later runs; extra args go to the game ``` +The folder is stored as `[paths] GameDir` in `sacredK.ini` next to the +launcher (one per build preset, not tracked by git). Without it, the launcher +looks for `sacred.exe` in its own folder and otherwise asks for `--game-dir`. +The VS Code launch configuration relies on this stored path too. + +Save games and the game's `Settings.cfg` live in `Documents\Sacred\save` and +`Documents\Sacred\config`; on the first start they are copied there from the +game folder (see `docs/user-folders.md`). + `sacredK.log` (next to the DLL) records what was hooked plus every message the game sends to its internal logger, even when the game's own logging is off.