Skip to content

Commit 375365f

Browse files
authored
docs: polish README for release (#3)
1 parent ebcdd68 commit 375365f

1 file changed

Lines changed: 105 additions & 102 deletions

File tree

‎README.md‎

Lines changed: 105 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,104 @@
11
# QuickMap
22

3-
Hold the gamepad **Start button** for a configurable duration to open the **world map**. A short press opens whatever Start is natively bound to (Journal Menu or Tween Menu) as normal.
3+
Hold the gamepad **Start button** for a configurable duration to open the **world map**. A short press opens the Journal Menu (or Tween Menu) as normal.
44

5-
Inspired by Red Dead Redemption 2's hold-start-to-open-map mechanic.
5+
> **Gamepad only.** Keyboard and mouse users are unaffected — vanilla behaviour is fully preserved.
66
7-
Supports building on **Linux** (cross-compilation via `clang-cl` + [xwin](https://github.com/Jake-Shadle/xwin)) and **Windows** (MSVC).
7+
Inspired by Red Dead Redemption 2's hold-Start-to-open-map mechanic.
88

99
---
1010

11-
## Prerequisites
11+
## Requirements
1212

13-
### All platforms
13+
- [Skyrim Special Edition](https://store.steampowered.com/app/489830) or Anniversary Edition
14+
- [SKSE64](https://skse.silverlock.org/)
15+
- [Address Library for SKSE Plugins](https://www.nexusmods.com/skyrimspecialedition/mods/32444)
16+
17+
## Installation
18+
19+
**Mod manager (recommended):**
20+
1. Install the requirements above.
21+
2. Install QuickMap via your mod manager.
22+
3. Launch Skyrim via SKSE.
23+
24+
**Manual:**
25+
1. Install the requirements above.
26+
2. Copy `QuickMap.dll` and `QuickMap.ini` to `Data\SKSE\Plugins\`.
27+
3. Launch Skyrim via SKSE.
28+
29+
## Configuration
30+
31+
Edit `Data\SKSE\Plugins\QuickMap.ini`:
32+
33+
```ini
34+
[General]
35+
; Duration in seconds the Start button must be held to open the map (default: 1.0)
36+
fHoldDuration=1.0
37+
```
38+
39+
Logs are written to:
40+
```
41+
%USERPROFILE%\Documents\My Games\Skyrim Special Edition\SKSE\QuickMap.log
42+
```
43+
44+
---
45+
46+
## Development
47+
48+
### Prerequisites
49+
50+
#### All platforms
1451
- [Git](https://git-scm.com/)
1552
- [CMake](https://cmake.org/download/) 3.21+
16-
- [vcpkg](https://vcpkg.io/en/getting-started) — set `VCPKG_ROOT` in your environment
53+
- vcpkg — set `VCPKG_ROOT` in your environment
1754

18-
### Linux
19-
- LLVM/Clang (provides `clang-cl`, `lld-link`, `llvm-lib`, `llvm-rc`, `llvm-mt`)
20-
- [xwin](https://github.com/Jake-Shadle/xwin) — downloads the real Windows SDK and MSVC CRT headers/libs
55+
#### Linux
56+
- LLVM/Clang (`clang-cl`, `lld-link`, `llvm-lib`, `llvm-rc`, `llvm-mt`)
57+
- [xwin](https://github.com/Jake-Shadle/xwin) — downloads the Windows SDK and MSVC CRT headers/libs
2158
- [Ninja](https://ninja-build.org/)
2259

23-
```bash
24-
# Arch / CachyOS
25-
sudo pacman -S clang lld llvm ninja
60+
```bash
61+
# Arch / CachyOS
62+
sudo pacman -S clang lld llvm ninja
2663

27-
# Install xwin (requires Rust/cargo)
28-
cargo install xwin
64+
# Install xwin (requires Rust/cargo)
65+
cargo install xwin
2966

30-
# Fetch Windows SDK + MSVC CRT headers to ~/.xwin (one-time, ~700 MB)
31-
xwin splat --output ~/.xwin
32-
```
67+
# Fetch Windows SDK + MSVC CRT headers to ~/.xwin (one-time, ~700 MB)
68+
xwin splat --output ~/.xwin
69+
```
3370

34-
### Windows
71+
> **Note:** On first CMake configure, `cmake/toolchains/clang-cl-cross.cmake` creates TitleCase symlinks inside your xwin installation (e.g. `Advapi32.lib → advapi32.lib`). The originals are untouched. This is required because `lld-link` is case-sensitive but CommonLibSSE-NG references libs with mixed-case names.
72+
73+
#### Windows
3574
- [Visual Studio 2022](https://visualstudio.microsoft.com/) with **Desktop development with C++**
3675

3776
---
3877

39-
## Getting Started
78+
### Getting Started
79+
80+
#### Linux
4081

41-
### 1. Clone
82+
##### 1. Clone
4283

4384
```bash
4485
git clone --recurse-submodules https://github.com/codepuncher/QuickMap.git
4586
cd QuickMap
4687
```
4788

48-
### 2. Configure deploy path
89+
##### 2. Configure deploy path
4990

5091
Edit `.env` and set `SKYRIM_MODS_FOLDER` to your mod manager's staging folder:
5192

5293
```bash
5394
# Vortex (Linux, Steam):
54-
SKYRIM_MODS_FOLDER=$HOME/.local/share/Steam/steamapps/common/Vortex Mods/skyrimse
95+
SKYRIM_MODS_FOLDER="$HOME/.local/share/Steam/steamapps/common/Vortex Mods/skyrimse"
5596

5697
# MO2 (Linux):
57-
# SKYRIM_MODS_FOLDER=$HOME/MO2/mods
98+
# SKYRIM_MODS_FOLDER="$HOME/MO2/mods"
5899
```
59100

60-
### 3. Build
101+
##### 3. Build
61102

62103
```bash
63104
./scripts/build.sh
@@ -68,33 +109,15 @@ cmake --build --preset release-linux
68109

69110
The DLL lands in `build/release-linux/QuickMap.dll`.
70111

71-
> **Note:** On first configure, `cmake/toolchains/clang-cl-cross.cmake` creates
72-
> TitleCase symlinks inside your xwin installation, e.g.:
73-
> ```
74-
> ~/.xwin/sdk/lib/um/x86_64/Advapi32.lib -> advapi32.lib
75-
> ```
76-
> lld-link is case-sensitive but CommonLibSSE-NG references libs with mixed-case names.
77-
> The originals are untouched.
78-
79-
#### Deploy to mod manager
112+
##### Deploy to mod manager
80113

81114
```bash
82115
./scripts/deploy.sh
83116
# or directly (deploy.sh sources .env for you; cmake does not):
84117
source .env && cmake --workflow --preset deploy
85118
```
86119

87-
This configures, builds, and copies `QuickMap.dll` + `QuickMap.pdb` directly into:
88-
```
89-
$SKYRIM_MODS_FOLDER/QuickMap/SKSE/Plugins/
90-
```
91-
92-
Vortex will detect the new mod folder automatically. Enable it in Vortex, then launch Skyrim.
93-
94-
On subsequent builds (no config change needed):
95-
```bash
96-
./scripts/deploy.sh
97-
```
120+
Copies `QuickMap.dll`, `QuickMap.pdb`, and `QuickMap.ini` into `$SKYRIM_MODS_FOLDER/QuickMap/SKSE/Plugins/`.
98121

99122
#### Windows (MSVC)
100123

@@ -107,83 +130,35 @@ The DLL lands in `build/msvc/Release/QuickMap.dll`.
107130

108131
---
109132

110-
## What QuickMap Does
111-
112-
When loaded by Skyrim the plugin:
113-
114-
1. **Writes a log** to `%USERPROFILE%\Documents\My Games\Skyrim Special Edition\SKSE\QuickMap.log` via spdlog.
115-
2. **Registers an input sink** at `kInputLoaded` to intercept gamepad Start button events.
116-
3. **Refreshes the short-press binding** at `kInputLoaded`, `kPostLoadGame`, and `kNewGame` by querying `ControlMap`.
117-
118-
Hold duration is configurable via `Data/SKSE/Plugins/QuickMap.ini`:
119-
120-
```ini
121-
[General]
122-
fHoldDuration=1.0
123-
```
124-
125-
---
126-
127-
## GitHub Actions CI
128-
129-
| Workflow | Trigger | What it does |
130-
|---|---|---|
131-
| `setup.yml` | First push in a repo created from this template | Renames placeholders using the repo name, then self-deletes |
132-
| `build.yml` | PRs to `main` touching source/cmake/vcpkg | Builds on Windows (MSVC + vcpkg), uploads DLL + PDB |
133-
| `release.yml` | Push of a `v*` tag (or manual `workflow_dispatch`) | Same build, publishes a GitHub Release with DLL + PDB; opt-in Nexus Mods upload via dispatch input |
134-
| `format.yml` | PRs touching `src/**` or `.clang-format` | Checks C++ formatting with clang-format |
135-
| `tidy.yml` | PRs touching `src/**`, cmake, or `.clang-tidy` | Runs clang-tidy static analysis on Windows (MSVC headers) |
136-
| `lint.yml` | PRs touching `scripts/` | Runs shellcheck on shell scripts |
137-
| `pr-title.yml` | PR opened/edited/reopened/synchronize | Checks PR title follows Conventional Commits (`feat`, `fix`, `chore`, `docs`, `refactor`, `ci`, `build`, `perf`, `test`, `style`, `revert`) |
138-
139-
### Nexus Mods Upload
140-
141-
`release.yml` includes an optional Nexus Mods upload step, triggered only when running via **workflow_dispatch** with `upload_to_nexus: true`.
142-
143-
**Prerequisites (one-time setup):**
144-
1. Upload your first file manually via the [Nexus Mods web UI](https://www.nexusmods.com) — this creates the file group.
145-
2. Note the `file_group_id` from the URL or mod manager.
146-
3. Add to your repository:
147-
- **Secret** `NEXUSMODS_API_KEY` — your Nexus Mods API key (Settings → Secrets → Actions)
148-
- **Variable** `NEXUSMODS_FILE_GROUP_ID` — the file group ID (Settings → Variables → Actions)
149-
150-
> **Note:** The Nexus Mods v3 API is currently in evaluation. The upload step is opt-in and will be skipped on normal tag pushes.
151-
152-
---
153-
154-
## Git Hooks (Lefthook)
133+
### Git Hooks (Lefthook)
155134

156135
Prerequisites:
157-
158136
- `go install github.com/evilmartians/lefthook@latest`
159-
- `clang-format` (part of LLVM — already required for development)
160-
- `clang-tidy` (part of LLVM — already required for development)
137+
- `clang-format` and `clang-tidy` (part of LLVM)
161138
- `cmake-format` (`sudo pacman -S cmake-format` on Arch/CachyOS; `pip install cmakelang` elsewhere)
162139
- `shellcheck` (`sudo pacman -S shellcheck` on Arch/CachyOS)
163140

164-
Run `lefthook install` to register the hooks.
141+
```bash
142+
lefthook install
143+
```
165144

166145
---
167146

168-
## Neovim / clangd Setup
147+
### Editor Setup (clangd / Neovim)
169148

170-
CMake writes `compile_commands.json` to the build directory automatically.
171-
Copy or symlink it to the project root so clangd picks it up:
149+
CMake writes `compile_commands.json` to the build directory. Symlink it to the project root:
172150

173151
```bash
174-
# After configuring:
175152
ln -sf build/release-linux/compile_commands.json compile_commands.json
176153
```
177154

178-
The `.clangd` file already sets `--target=x86_64-pc-windows-msvc` so clangd
179-
resolves Windows headers correctly on Linux.
155+
The `.clangd` file sets `--target=x86_64-pc-windows-msvc` so clangd resolves Windows headers correctly on Linux.
180156

181-
Recommended Neovim plugins: [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
182-
with `clangd`, and [clangd_extensions.nvim](https://github.com/p00f/clangd_extensions.nvim).
157+
Recommended plugins: [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) with `clangd`, [clangd_extensions.nvim](https://github.com/p00f/clangd_extensions.nvim).
183158

184159
---
185160

186-
## Updating CommonLibSSE-NG
161+
### Updating CommonLibSSE-NG
187162

188163
```bash
189164
git submodule update --remote lib/commonlibsse-ng
@@ -193,6 +168,34 @@ git commit -m "chore: update CommonLibSSE-NG submodule"
193168

194169
---
195170

171+
### CI
172+
173+
| Workflow | Trigger | What it does |
174+
|---|---|---|
175+
| `ci.yml` | PRs to `main` touching source/cmake/vcpkg | clang-format (ubuntu) → clang-tidy + build (windows, parallel) |
176+
| `release.yml` | Push of a `v*` tag or manual `workflow_dispatch` | Builds release DLL, publishes GitHub Release; opt-in Nexus Mods upload via dispatch input |
177+
| `lint.yml` | PRs touching `scripts/` | shellcheck on shell scripts |
178+
| `pr-title.yml` | PR opened/edited/synchronised | Validates PR title follows Conventional Commits |
179+
180+
#### Nexus Mods Upload
181+
182+
Triggered via **workflow_dispatch** with `upload_to_nexus: true` and the `version` input set (e.g. `1.0.0`). One-time setup:
183+
184+
1. Upload your first file manually via the [Nexus Mods web UI](https://www.nexusmods.com) to create the file group.
185+
2. Add to your repository:
186+
- **Secret** `NEXUSMODS_API_KEY` — your Nexus Mods API key
187+
- **Variable** `NEXUSMODS_FILE_GROUP_ID` — the file group ID
188+
189+
---
190+
191+
## Credits & Inspirations
192+
193+
- Inspired by the hold-Start-to-open-map mechanic in **Red Dead Redemption 2**
194+
- [CommonLibSSE-NG](https://github.com/alandtse/CommonLibVR) by alandtse and contributors
195+
- [NADS-SSE](https://github.com/EliasRipley/NADS-SSE) by EliasRipley — `PrependEventSink` + chrono timing pattern
196+
197+
---
198+
196199
## License
197200

198201
MIT — see [LICENSE](LICENSE).

0 commit comments

Comments
 (0)