Skip to content

Commit 1efbe32

Browse files
Zayn995claude
andcommitted
SPEC: patch-file naming confirmed by the official Zone Kit Phase 2 docs
The owner supplied GSC's Zone Kit PDFs. Non-prototype files take Base.cfg_patch_* next to the base file, prototype files take a uniquely named .cfg inside the prototype's subfolder - exactly the two schemes S2Tweaker already writes. The old contradiction note is replaced. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent e7366da commit 1efbe32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/SPEC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Player : struct.begin {bpatch}
3636
struct.end
3737
```
3838

39-
**Contradiction flag (naming):** the official doc's examples use `Test.cfg_patch_mod` **next to** the base file; sdwvit's proven 2.0 mods use `<CfgName>/<CfgName>_patch_<Mod>.cfg` **subfolder** with plain `.cfg`. Both reportedly work; the sdwvit convention is field-proven on 2.0 and also satisfies the "plain `.cfg` inside prototype folders" exception. **Use the sdwvit convention.**
39+
**Naming - resolved (06.09.2026, official Zone Kit Phase 2 PDFs "How to apply modifications to vanilla .cfg files" and "How to patch contents of a .cfg file", supplied by the owner):** there are two official ways and S2Tweaker already uses both. (1) Non-prototype files (`Credits.cfg`, `CoreVariables.cfg`, `AIGlobals.cfg`): a `Base.cfg_patch_<Mod>` file **next to** the base file; the game looks for `Base.cfg_patch_*` in the same directory (our `CoreVariables.cfg_patch_<Mod>.cfg` / `AIGlobals.cfg_patch_<Mod>.cfg` match that wildcard). (2) Prototype files (`CharacterWeaponSettingsPrototypes.cfg`, `AnomalyPrototypes.cfg`, `SpawnActorPrototypes.cfg`, ...): a plain `.cfg` with a **unique name inside the prototype's subfolder**, e.g. `WeaponData/CharacterWeaponSettingsPrototypes/BuffedAK.cfg`; every file in that folder is applied as a patch (our `<Base>/<Base>_patch_<Mod>.cfg`). Same doc: `removenode` only works inside `{bpatch}`; the engine detects patch conflicts (re-adding a removed node, removing or replacing a node another patch modified) and logs them under `LogParserNodePatching`; `-ProtoLoadingMode=2` applies patches synchronously for readable logs. The old "contradiction" between the doc example and sdwvit's convention was only the prototype/non-prototype distinction.
4040

4141
Fallback/legacy mechanism (pre-1.6, still works): `refurl`/`refkey` inheritance — `MyName : struct.begin {refurl=../CoreVariables.cfg;refkey=DefaultConfig}` listing only changed keys; `{bskipref}` to replace an inherited array wholesale; same-SID full-struct override wins by load order ("Cfg files are loaded alphabetically, and what is below can use and override what is above"). Caveats: reference operators only work on structs with an SID; `CoreVariables.cfg`/`AIGlobals.cfg` `DefaultConfig` structs historically resisted refurl overrides (Nexus article 138, https://www.nexusmods.com/stalker2heartofchornobyl/articles/138; modding.wiki/en/stalker2heartofchornobyl/developers/ConfigFiles); joric: "refkey on structure with refkey works badly and leads to errors and crashes"; `[*]` auto-index lists cannot be inherited via refkey. One modding.wiki example writes `ref=` instead of `refurl=` — treat as a typo; vanilla files use `refurl=`. **Prefer `{bpatch}` everywhere; use refurl/bskipref only where bpatch is awkward.**
4242

@@ -327,7 +327,7 @@ Sources: https://www.nexusmods.com/stalker2heartofchornobyl/mods/10 · /mods/64
327327
| 4 | Weapon_BaseDamage Easy | 1.2 (1.1.3) | 1.3 (Jan-2026 dump) | Drift; read live |
328328
| 5 | Mutant_BaseDamage Easy | 0.5 (agent 2) / 0.55 (agent 6) | 0.35 (Jan-2026 dump, agent 5) | Drift + read discrepancy; read live |
329329
| 6 | BaseRepairCostModifier launch value | 1.0 at launch (low-conf web claim) | 0.7 in 1.1.3 dump (verified) | Use 0.7 |
330-
| 7 | Patch-file naming | Official: `Base.cfg_patch_x` beside base file | Proven mods: `Base/Base_patch_x.cfg` subfolder | Use subfolder convention (works with binarized folders) |
330+
| 7 | Patch-file naming | Official: `Base.cfg_patch_x` beside base file | Proven mods: `Base/Base_patch_x.cfg` subfolder | Resolved 06.09.2026: both official - `.cfg_patch_*` for non-prototype files, unique `.cfg` in the subfolder for prototype files (Zone Kit Phase 2 PDF) |
331331
| 8 | `refurl` vs `ref=` | modding.wiki one example `ref=` | vanilla + article 138 `refurl=` | Use `refurl=` (typo) |
332332
| 9 | Dump paths | FModel dumps: `Stalker2/GameLite/GameData` | mod paks: `Stalker2/Content/GameLite/GameData` | Always include `Content` in pak |
333333

0 commit comments

Comments
 (0)