@@ -33,37 +33,57 @@ Supports building on **Linux** (cross-compilation via `clang-cl` + [xwin](https:
3333
3434---
3535
36- ## Prerequisites (Developer)
36+ ## What the Starter Plugin Does
37+
38+ When loaded by Skyrim the plugin:
39+
40+ 1 . ** Writes a log** to ` Data/SKSE/Plugins/ExampleMod.log ` via spdlog.
41+ 2 . ** Hooks ` kDataLoaded ` ** (fires once all game data is loaded).
42+ 3 . ** Prints to the in-game console** (` ~ ` key): ` [ExampleMod] Loaded successfully! `
43+
44+ ---
45+
46+ ## Development
47+
48+ ### Prerequisites
3749
38- ### All platforms
50+ #### All platforms
3951- [ Git] ( https://git-scm.com/ )
4052- [ CMake] ( https://cmake.org/download/ ) 3.21+
4153- [ vcpkg] ( https://vcpkg.io/en/getting-started ) — set ` VCPKG_ROOT ` in your environment
4254
43- ### Linux
55+ #### Linux
4456- LLVM/Clang (provides ` clang-cl ` , ` lld-link ` , ` llvm-lib ` , ` llvm-rc ` , ` llvm-mt ` )
4557- [ xwin] ( https://github.com/Jake-Shadle/xwin ) — downloads the real Windows SDK and MSVC CRT headers/libs
4658- [ Ninja] ( https://ninja-build.org/ )
4759
48- ``` bash
49- # Arch / CachyOS
50- sudo pacman -S clang lld llvm ninja
60+ ``` bash
61+ # Arch / CachyOS
62+ sudo pacman -S clang lld llvm ninja
5163
52- # Install xwin (requires Rust/cargo)
53- cargo install xwin
64+ # Install xwin (requires Rust/cargo)
65+ cargo install xwin
5466
55- # Fetch Windows SDK + MSVC CRT headers to ~/.xwin (one-time, ~700 MB)
56- xwin splat --output ~ /.xwin
57- ```
67+ # Fetch Windows SDK + MSVC CRT headers to ~/.xwin (one-time, ~700 MB)
68+ xwin splat --output ~ /.xwin
69+ ```
5870
59- ### Windows
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+ #### Windows
6080- [Visual Studio 2022](https://visualstudio.microsoft.com/) with **Desktop development with C++**
6181
6282---
6383
64- ## Getting Started
84+ ### Getting Started
6585
66- ### 1. Use this template
86+ #### 1. Use this template
6787
6888Click **"Use this template"** on GitHub, or clone and re-initialise:
6989
@@ -72,7 +92,7 @@ git clone https://github.com/your-org/your-mod.git
7292cd your-mod
7393```
7494
75- ### 2. Run the init script
95+ #### 2. Run the init script
7696
7797** Linux** — run interactively or pass arguments directly:
7898
@@ -96,7 +116,7 @@ This will:
96116- Bootstrap vcpkg
97117- Copy ` .env.example ` → ` .env ` with a reminder to fill in your paths
98118
99- ### 3. Configure deploy path
119+ #### 3. Configure deploy path
100120
101121Edit the ` .env ` file created by the init script and set ` SKYRIM_MODS_FOLDER ` to your mod manager's staging folder:
102122
@@ -108,7 +128,7 @@ SKYRIM_MODS_FOLDER=$HOME/.local/share/Steam/steamapps/common/Vortex Mods/skyrims
108128# SKYRIM_MODS_FOLDER=$HOME/MO2/mods
109129```
110130
111- ### 4. Build
131+ #### 4. Build
112132
113133``` bash
114134./scripts/build.sh
@@ -119,15 +139,7 @@ cmake --build --preset release-linux
119139
120140The DLL lands in ` build/release-linux/ExampleMod.dll ` .
121141
122- > ** Note:** On first configure, ` cmake/toolchains/clang-cl-cross.cmake ` creates
123- > TitleCase symlinks inside your xwin installation, e.g.:
124- > ```
125- > ~/.xwin/sdk/lib/um/x86_64/Advapi32.lib -> advapi32.lib
126- > ```
127- > lld-link is case-sensitive but CommonLibSSE-NG references libs with mixed-case names.
128- > The originals are untouched.
129-
130- #### Deploy to mod manager
142+ ##### Deploy to mod manager
131143
132144``` bash
133145./scripts/deploy.sh
@@ -147,7 +159,7 @@ On subsequent builds (no config change needed):
147159./scripts/deploy.sh
148160```
149161
150- #### Windows (MSVC)
162+ ##### Windows (MSVC)
151163
152164``` bash
153165cmake --preset release-windows
@@ -158,41 +170,7 @@ The DLL lands in `build/msvc/Release/ExampleMod.dll`.
158170
159171---
160172
161- ## What the Starter Plugin Does
162-
163- When loaded by Skyrim the plugin:
164-
165- 1 . ** Writes a log** to ` Data/SKSE/Plugins/ExampleMod.log ` via spdlog.
166- 2 . ** Hooks ` kDataLoaded ` ** (fires once all game data is loaded).
167- 3 . ** Prints to the in-game console** (` ~ ` key): ` [ExampleMod] Loaded successfully! `
168-
169- ---
170-
171- ## GitHub Actions CI
172-
173- | Workflow | Trigger | What it does |
174- | ---| ---| ---|
175- | ` setup.yml ` | First push in a repo created from this template | Renames placeholders using the repo name, then self-deletes |
176- | ` ci.yml ` | PRs to ` main ` touching source/cmake/vcpkg | ` clang-format ` (ubuntu) → ` build ` → ` clang-tidy ` (windows, sequential) |
177- | ` release.yml ` | Push of a ` v* ` tag | Builds, packages via ` scripts/package.sh ` , publishes a GitHub Release with zip + PDB |
178- | ` nexus-upload.yml ` | Release published or manual ` workflow_dispatch ` | Downloads release zip, generates cliff release notes, uploads to Nexus Mods |
179- | ` lint.yml ` | PRs touching ` scripts/ ` | Runs shellcheck on shell scripts |
180- | ` pr-title.yml ` | PR opened/edited/reopened/synchronize | Checks PR title follows Conventional Commits (` feat ` , ` fix ` , ` chore ` , ` refactor ` ) |
181-
182- ### Nexus Mods Upload
183-
184- ` nexus-upload.yml ` triggers automatically when a GitHub Release is published, or can be run manually via ** workflow_dispatch** with a version input.
185-
186- ** Prerequisites (one-time setup):**
187- 1 . Upload your first file manually via the [ Nexus Mods web UI] ( https://www.nexusmods.com ) — this creates the file group.
188- 2 . Note the ` file_group_id ` from the URL or mod manager.
189- 3 . Add to your repository:
190- - ** Secret** ` NEXUSMODS_API_KEY ` — your Nexus Mods API key (Settings → Secrets → Actions)
191- - ** Variable** ` NEXUSMODS_FILE_GROUP_ID ` — the file group ID (Settings → Variables → Actions)
192-
193- ---
194-
195- ## Git Hooks (Lefthook)
173+ ### Git Hooks (Lefthook)
196174
197175Prerequisites:
198176
@@ -202,11 +180,13 @@ Prerequisites:
202180- ` cmake-format ` (` sudo pacman -S cmake-format ` on Arch/CachyOS; ` pip install cmakelang ` elsewhere)
203181- ` shellcheck ` (` sudo pacman -S shellcheck ` on Arch/CachyOS)
204182
205- Run ` lefthook install ` to register the hooks.
183+ ``` bash
184+ lefthook install
185+ ```
206186
207187---
208188
209- ## Neovim / clangd Setup
189+ ### Editor Setup ( clangd / Neovim)
210190
211191CMake writes ` compile_commands.json ` to the build directory automatically.
212192Copy or symlink it to the project root so clangd picks it up:
@@ -224,7 +204,7 @@ with `clangd`, and [clangd_extensions.nvim](https://github.com/p00f/clangd_exten
224204
225205---
226206
227- ## Updating CommonLibSSE-NG
207+ ### Updating CommonLibSSE-NG
228208
229209``` bash
230210git submodule update --remote lib/commonlibsse-ng
@@ -234,6 +214,31 @@ git commit -m "chore: update CommonLibSSE-NG submodule"
234214
235215---
236216
217+ ### CI
218+
219+ | Workflow | Trigger | What it does |
220+ | ---| ---| ---|
221+ | ` setup.yml ` | First push in a repo created from this template | Renames placeholders using the repo name, then self-deletes |
222+ | ` ci.yml ` | PRs to ` main ` touching source/cmake/vcpkg | ` clang-format ` (ubuntu) → ` build ` → ` clang-tidy ` (windows, sequential) |
223+ | ` release.yml ` | Push of a ` v* ` tag | Builds, packages via ` scripts/package.sh ` , publishes a GitHub Release with zip + PDB |
224+ | ` nexus-upload.yml ` | Release published or manual ` workflow_dispatch ` | Downloads release zip, generates cliff release notes, uploads to Nexus Mods |
225+ | ` lint.yml ` | PRs touching ` scripts/ ` | Runs shellcheck on shell scripts |
226+ | ` pr-title.yml ` | PR opened/edited/reopened/synchronize | Checks PR title follows Conventional Commits (` feat ` , ` fix ` , ` chore ` , ` refactor ` ) |
227+
228+ #### Nexus Mods Upload
229+
230+ ` nexus-upload.yml ` triggers automatically when a GitHub Release is published, or can be run manually via ** workflow_dispatch** with a version input.
231+
232+ ** Prerequisites (one-time setup):**
233+ 1 . Upload your first file manually via the [ Nexus Mods web UI] ( https://www.nexusmods.com ) — this creates the file group.
234+ 2 . Note the ` file_group_id ` from the URL or mod manager.
235+ 3 . Add to your repository:
236+ - ** Secret** ` NEXUSMODS_API_KEY ` — your Nexus Mods API key (Settings → Secrets → Actions)
237+ - ** Variable** ` NEXUSMODS_FILE_GROUP_ID ` — the file group ID (Settings → Variables → Actions)
238+
239+ ---
240+
237241## License
238242
239243MIT — see [ LICENSE] ( LICENSE ) .
244+
0 commit comments