s2cfgtojson 7.0.16 → 7.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s2cfgtojson",
3
- "version": "7.0.16",
3
+ "version": "7.0.18",
4
4
  "description": "Converts Stalker 2 Cfg file into POJOs",
5
5
  "keywords": [
6
6
  "stalker",
@@ -50,7 +50,8 @@
50
50
  },
51
51
  "files": [
52
52
  "dist",
53
- "readme.md"
53
+ "readme.md",
54
+ "skills/public"
54
55
  ],
55
56
  "scripts": {
56
57
  "build": "node ./scripts/build.mjs",
package/readme.md CHANGED
@@ -58,6 +58,28 @@ console.log(parsed.TriggeredCooldowns);
58
58
 
59
59
  ---
60
60
 
61
+ ## Quest Node Planner Skill
62
+
63
+ This package includes a **Quest Node Planner** skill for AI-assisted quest authoring. It turns plain-language quest descriptions into complete S.T.A.L.K.E.R. 2 quest content packages — quest node graphs, dialog chains, journal entries, markers, rewards, and all supporting structs.
64
+
65
+ Describe a quest in plain language and the planner will:
66
+
67
+ 1. Resolve real content IDs from your local `GameLite` data (NPCs, items, dialogs, journals, markers)
68
+ 2. Determine every struct the quest needs (nodes, dialog, journal, globals, rewards, generators)
69
+ 3. Produce a structured plan with concrete SIDs, a node graph, edges, placement guidance, and validation risks
70
+
71
+ Example prompt:
72
+
73
+ > Plan a fetch quest where Barkeep in the Skadovsk asks the player to retrieve a unique PDA from a bandit camp, with a money reward on turn-in and an option to decline.
74
+
75
+ ### Key design principles
76
+
77
+ - All new structs must patch an **existing base cfg file** — the game won't read arbitrary new files.
78
+ - The skill prefers **reusing existing content** (items, markers, generators) over creating new prototypes.
79
+ - If something can't be resolved from local data, the skill asks you instead of guessing.
80
+
81
+ ---
82
+
61
83
  ## Development
62
84
 
63
85
  ### Tests
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: quest-node-planner
3
+ description: "Plan and author complete S.T.A.L.K.E.R. 2 quest content packages from human quest descriptions using the quest prototype docs and local GameLite data in this repository. Use when Codex needs to convert plain-language quest intent into all required structs: quest nodes, dialog chains and topics, journal entries, markers, globals, reward generators, stash or item generators, quest prototypes, supporting references, and new items or supporting data when existing content does not cover the need."
4
+ ---
5
+
6
+ # Quest Node Planner
7
+
8
+ Turn human quest intent into a complete quest content package grounded in this repo's quest documentation and local `GameLite` content. Produce whatever structs are required for the quest to exist coherently, not just the quest graph.
9
+
10
+ ## Workflow
11
+
12
+ 1. Read the user's quest intent and restate it as:
13
+ - trigger
14
+ - progression steps
15
+ - success/fail outcomes
16
+ - actors, items, locations, or interactables
17
+ - persistence or repeatability needs
18
+ 2. Resolve real content IDs before planning whenever the workspace contains game data:
19
+ - NPC or object placeholders from `GameLite/GameData/SpawnActorPrototypes/**`
20
+ - object or actor prototype SIDs from `GameLite/GameData/ObjPrototypes/**`
21
+ - item SIDs from `GameLite/GameData/ItemPrototypes/**` or other concrete prototype sources
22
+ - dialog chain or infotopic IDs from `GameLite/GameData/DialogPrototypes/**`
23
+ - journal quest or stage IDs from `GameLite/GameData/JournalQuestPrototypes/**`
24
+ - existing globals, guideway flags, or precondition names from local quest, dialog, world, and support data
25
+ - region, marker, or hub guidance data from `GameLite/GameData/MarkerPrototypes.cfg`, `FastTravelLocationPrototypes.cfg`, and related world data
26
+ - if the user gives a display name but no exact internal SID, search for the exact internal ID before treating it as an assumption
27
+ 3. Determine the full struct surface the quest needs:
28
+ - quest node graph
29
+ - accept entry
30
+ - reminder or in-progress entry
31
+ - turn-in entry
32
+ - cancel or decline entry when the quest should support backing out
33
+ - journal quest and stage definitions
34
+ - globals or other state carriers
35
+ - markers, search areas, or region guidance
36
+ - reward generators, item generators, stash generators, or direct items
37
+ - any supporting quest prototype, actor reference, or item prototype that must exist for the design to work
38
+ 4. Reuse existing structs where they fit. Create new structs only when the existing content does not cover the need cleanly.
39
+ - Even when a struct is new, place it into a patch for an existing cfg file in the correct family. Do not plan brand-new standalone cfg files that the game will not read.
40
+ - In implementation mode, resolve the exact existing base cfg filename for each struct family being patched.
41
+ 5. If core inputs are still missing after local lookup, make the smallest safe assumptions and label them clearly.
42
+ - For quest-objective stashes or reward stashes, do a brief local lookup first.
43
+ - If a suitable stash cannot be found quickly, ask the user whether to reuse a known stash, point to a specific stash, or author a new stash-related struct.
44
+ - If implementation guidance is requested and the exact base cfg filename for a required patch cannot be found quickly, ask the user instead of guessing.
45
+ 6. Read only the references needed for the task:
46
+ - Start with `references/workflow.md`.
47
+ - Read `references/patterns.md` when the quest has branching, synchronization, journals, dialog, or reusable subgraphs.
48
+ - Read `references/node-selection.md` when node choice is the hard part.
49
+ - Read `references/constraints.md` when wiring, GUIDs, or evidence strength matters.
50
+ - Read `references/examples.md` when the quest needs a concrete template from local content.
51
+ - Read `references/poi-and-rewards.md` when the quest needs regional guidance, marker logic, or composed rewards.
52
+ - Read `references/mod-workflow.md` and `references/patch-layout.md` when the user wants actual mod placement guidance.
53
+ - Read `references/environment-prompts.md` when environment-specific paths or target mod location are unknown.
54
+ 7. Build the package in this order:
55
+ - IDs and reusable existing content
56
+ - journal and state model
57
+ - dialog surface
58
+ - quest node graph
59
+ - navigation and marker layer
60
+ - rewards and supporting generators
61
+ - any missing supporting structs
62
+ - explicit termination and cleanup
63
+ 8. Prefer structures that are easy to patch or extend later:
64
+ - use `Technical` as glue
65
+ - use exact launcher targeting
66
+ - keep helper subgraphs explicit
67
+ - prefer additive structure over giant rewrites
68
+
69
+ ## Output Contract
70
+
71
+ Always return these sections:
72
+
73
+ - `Intent summary`: one short paragraph
74
+ - `Resolved IDs`: concrete SIDs, GUIDs, dialog chains, journal identifiers, markers, or generator references found locally
75
+ - `Assumptions`: only unresolved or inferred details after local lookup
76
+ - `Required structs`: every struct family the quest needs, split into reuse vs new authoring
77
+ - `Dialog surface`: accept / reminder / turn-in / cancel entries and whether they reuse existing dialog or need new entries
78
+ - `POI guidance`: region, hub, marker, search point, or location references if navigation matters
79
+ - `Recommended graph`: short narrative of flow
80
+ - `Nodes`: a table with `SID`, `NodeType`, purpose, key fields, and notable pins
81
+ - `Supporting structs`: journal quests, markers, globals, reward generators, item generators, stash generators, items, or other supporting content
82
+ - `Placement guidance`: where each new or patched struct family should live in the mod layout, including the exact existing base cfg file being patched whenever implementation guidance is in scope
83
+ - `Edges`: upstream `SID` plus output `Name` for each launcher binding
84
+ - `State and references`: globals, journal state, signals, bridges, GUID placeholders
85
+ - `Validation risks`: anything that remains inference or needs live verification
86
+
87
+ If the user asks for variants, provide a primary plan first, then 1-2 alternatives with the tradeoff.
88
+
89
+ ## Constraints
90
+
91
+ - Stay within real game content systems. Do not invent non-schema systems.
92
+ - Treat the repo docs as the authority for node names and field shapes.
93
+ - Separate `Schema-confirmed`, observed practice, and inference when confidence matters.
94
+ - Do not imply exact runtime semantics unless the docs support them.
95
+ - Distinguish user-facing names from internal SIDs. Do not present a display name as if it were already the engine-facing item or actor ID.
96
+ - Distinguish player GUID usage from NPC or object placeholders.
97
+ - Treat quest-facing dialog as part of the quest design, not as optional flavor text.
98
+ - When the quest requires new conversation content, plan both the quest node hooks and the dialog chain/topic skeleton.
99
+ - When extending an existing NPC, prefer placing new dialog chains and dialog structs next to that NPC's existing dialog file family.
100
+ - For NPC giver interactions, prefer dialog-triggered state changes: expose the dialog with `SetDialog`, then drive accept, turn-in, cancel, or defer outcomes from `LastPhraseSID` outputs or dialog-linked events.
101
+ - Do not default to quest-state nodes auto-firing giver conversations. Reserve forced or auto-started dialog for explicit comment, radio, cutscene, or user-requested cases.
102
+ - Treat journal, marker, reward, and generator structs as part of the quest package, not as optional extras.
103
+ - Create new item or support prototypes only when existing items, markers, generators, or world references are insufficient.
104
+ - When the user wants implementation guidance, explain the expected mod folder structure and patch file family placement.
105
+ - The game will not read arbitrary brand-new cfg files. Every new or changed struct must be emitted into a patch derived from an existing base cfg file in the correct family.
106
+ - In implementation mode, the exact existing base cfg filename is mandatory for each patched struct family.
107
+ - Do not invent a specific quest stash or reward stash if local lookup does not surface one quickly; ask the user instead.
108
+ - If a quest grants a stash as a reward, do not plan it as pre-lootable world content with the final reward already inside; use `SetItemGenerator` in the quest completion flow to populate or unlock the stash reward at completion time.
109
+ - When a node has named outputs, bind the exact output `Name`.
110
+ - When a simple gate is enough, prefer `Condition`; when explicit `True` / `False` routing is needed, prefer `If`.
111
+
112
+ ## Default Planning Heuristics
113
+
114
+ - For automatic startup, begin with `Technical { LaunchOnQuestStart = true }` unless an event root is clearly better.
115
+ - For reactive quests, prefer `event -> If/Condition -> actions`.
116
+ - For multi-outcome flow, prefer nodes with named outputs such as `If`, `SetDialog`, `Random`, or `Container`.
117
+ - For waiting or joins, prefer `BridgeEvent`, bridge conditions, node-state conditions, or signals instead of brittle linear chaining.
118
+ - For staged progression, use journal state or globals rather than hidden incidental ordering.
119
+ - For compatibility-minded plans, isolate risky behavior in helper subgraphs entered by one explicit edge or signal.
120
+ - For fetch quests, usually separate three states: quest offered/accepted, objective item acquired, and turn-in resolution.
121
+ - When the user implies abandon or backing out, include an explicit cancel or decline path rather than assuming only success/failure.
122
+ - For NPC-given quests, plan the dialog entry points first, then connect them to quest-state nodes.
123
+ - Use `SetDialog`, `OnDialogStartEvent`, and `OnInfotopicFinishEvent` when dialog is the natural trigger or branch surface.
124
+ - For accept, turn-in, and cancel flows, prefer player-initiated conversation that changes quest state after the relevant dialog phrase finishes, rather than quest state launching the conversation itself.
125
+ - For existing NPCs, prefer extending their established dialog chain family instead of inventing a disconnected dialog namespace.
126
+ - For local regions and hubs, prefer concrete region, hub, or search-area data over vague place text.
127
+ - For rewards, choose the gameplay fantasy explicitly: direct item grant, inventory package, or stash reveal.
128
+ - For rewards in this repo, treat money reward generators as first-class authored content, not as an afterthought.
129
+ - For stash rewards, prefer `SetItemGenerator`-driven completion gating so the player cannot loot the final reward before finishing the quest.
130
+ - Default to reusing existing items, markers, reward generators, and location structures before inventing new prototypes.
131
+ - If the quest cannot work without a missing struct, call it out and specify the minimal new struct needed.
132
+ - If implementation paths are unknown, ask the user for the GameLite source path, implementation repo path, and target mod folder rather than guessing.
133
+
134
+ ## Response Style
135
+
136
+ - Use concrete SIDs that are readable and consistent, such as `<QuestSID>_Start`, `<QuestSID>_CheckHasItem`, or `<QuestSID>_Reward`.
137
+ - Keep node lists concise. Include only fields needed to communicate the design.
138
+ - When dialog must be created, include a short dialog chain/topic outline with entry purpose, final phrase, and branch result, not full prose unless the user asks for writing.
139
+ - When support structs must be created, group them by file family such as journal, markers, rewards, generators, or items.
140
+ - When implementation placement matters, group the answer by `GameData` family and target mod path.
141
+ - When naming placements, identify the existing base cfg file being patched, not just the folder family.
142
+ - If the exact base cfg file is unknown, say so and ask instead of inventing one.
143
+ - If the user wants a `readme.md`, keep it short and make sure it describes the quest flow, main stages, and reward/cancel outcomes.
144
+ - End by naming the smallest next implementation step, such as cfg authoring, patch insertion, or GUID resolution.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Quest Node Planner"
3
+ short_description: "Plan S.T.A.L.K.E.R. 2 quest-node graphs"
4
+ default_prompt: "Use $quest-node-planner to turn a human quest concept into a quest-node-only graph plan."
@@ -0,0 +1,54 @@
1
+ # Constraints
2
+
3
+ Read this file when precision matters.
4
+
5
+ ## Source of Truth
6
+
7
+ - Treat this repo's quest documentation as the authority for node names and field shapes.
8
+ - Treat statements labeled as inference as design guidance, not proof of exact engine behavior.
9
+
10
+ ## Launchers
11
+
12
+ - `Launchers` encode inbound edges.
13
+ - A launcher connection identifies an upstream `SID` and an output `Name`.
14
+ - Empty `Name` usually means ordinary pass-through.
15
+ - `True` and `False` matter for `If`.
16
+ - Custom names matter for nodes such as `Random`, `SetDialog`, `Container`, and other named-output nodes.
17
+
18
+ ## Conditions
19
+
20
+ - `Condition` and `If` both use `Conditions`.
21
+ - Use `Condition` when the graph only needs to pass or stop.
22
+ - Use `If` when the graph needs explicit branch outputs.
23
+
24
+ ## GUIDs and Targets
25
+
26
+ Common target fields include:
27
+
28
+ - `TargetQuestGuid`
29
+ - `TargetCharacter`
30
+ - `TargetNPC`
31
+ - `InteractableQuestGuid`
32
+ - `TriggerQuestGuid`
33
+ - `SignalSenderGuid`
34
+ - `SignalReceiverGuid`
35
+
36
+ Observed convention:
37
+
38
+ - `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA` refers to the player
39
+
40
+ Do not assume target fields are interchangeable even when they point at the same logical actor.
41
+
42
+ ## Evidence Rules For IDs
43
+
44
+ - Prefer concrete IDs found in local `GameLite` files over guessed placeholders.
45
+ - If an actor is found through spawn data, report both the `SpawnedPrototypeSID` and the `PlaceholderActorGuid` when relevant.
46
+ - If a display name cannot be matched to an internal item SID, keep the plan generic and call out the unresolved mapping.
47
+
48
+ ## Practical Guardrails
49
+
50
+ - Prefer exact launcher targeting.
51
+ - Prefer helper `Technical` nodes over rewriting large chains.
52
+ - Keep helper subgraphs explicit and clearly named.
53
+ - Prefer additive patching patterns over destructive rewrites.
54
+ - Prefer stateful joins through globals, journal state, signals, or bridges over brittle linear chaining.
@@ -0,0 +1,27 @@
1
+ # Environment Prompts
2
+
3
+ Read this file when the skill is moving from design to implementation guidance.
4
+
5
+ ## Ask The User When Unknown
6
+
7
+ Ask for these values if they are needed and cannot be inferred safely:
8
+
9
+ - implementation repo path
10
+ - GameLite source folder path
11
+ - target mod folder or mod name
12
+ - whether the quest should be a new mod or part of an existing mod
13
+ - whether the user wants design-only output or implementation-ready placement guidance
14
+
15
+ ## Do Not Ask By Default
16
+
17
+ Do not stop to ask for:
18
+
19
+ - exact coordinates when broad area guidance is acceptable
20
+ - exact reward values when placeholders are acceptable
21
+ - exact dialog prose when the user only needs structure
22
+
23
+ Instead:
24
+
25
+ - use broad region or marker-radius guidance
26
+ - propose placeholder reward values
27
+ - provide dialog chain and phrase skeletons
@@ -0,0 +1,61 @@
1
+ # Examples
2
+
3
+ Read this file when the user wants a plan that should follow an existing local quest pattern.
4
+
5
+ ## SQ86: Full Fetch Quest With Dialog State
6
+
7
+ Primary files:
8
+
9
+ - `GameLite/GameData/QuestNodePrototypes/SQ86.cfg`
10
+ - `GameLite/GameData/DialogPrototypes/SQ86_Dialog_Genij_FirstMeet.cfg`
11
+ - `GameLite/GameData/DialogPrototypes/SQ86_Comment_Genij_AfterSecondDialog.cfg`
12
+
13
+ What to reuse:
14
+
15
+ - `SetDialog` with explicit `OutputPinNames`
16
+ - `LastPhrases` mapped to named outputs
17
+ - multiple dialog phases represented by different chains or comments
18
+ - dialog-side conditional routing using `Bridge` conditions and `LinkedNodePrototypeSID`
19
+ - quest state exposed through dialog availability instead of auto-fired giver conversations
20
+
21
+ Use this as the main template for:
22
+
23
+ - a full fetch quest
24
+ - in-progress recontact
25
+ - state-dependent reminder or alternate lines
26
+ - dialog branches that need to trigger or reflect quest progress
27
+
28
+ ## RSQ06: Sidorovich Turn-In And Cancel Confirmation
29
+
30
+ Primary files:
31
+
32
+ - `GameLite/GameData/QuestNodePrototypes/RSQ06_C05___B_B.cfg`
33
+ - `GameLite/GameData/DialogPrototypes/RSQ06_Dialog_Sidorovich_C10_Finish.cfg`
34
+
35
+ What to reuse:
36
+
37
+ - finish dialog presented via `SetDialog`
38
+ - `LastPhraseSID` mapped back into quest-node outputs
39
+ - multi-step cancel confirmation inside the dialog chain
40
+ - quest completion triggered from the finish phrase
41
+ - turn-in state changes happening after the player-selected finish line, not by auto-launching a giver conversation
42
+
43
+ Use this as the main template for:
44
+
45
+ - turn-in conversations
46
+ - "not yet" fallback responses
47
+ - cancel confirmation branches
48
+ - Sidorovich-style giver interactions
49
+
50
+ Placement rule:
51
+
52
+ - when extending an existing quest giver, place the new `DialogChainPrototypeSID` and dialog structs alongside that NPC's existing dialog file family
53
+ - do not default to a separate quest-only dialog namespace unless there is a concrete reason
54
+
55
+ ## Example Reading Rule
56
+
57
+ When the user asks for:
58
+
59
+ - a complete fetch quest: start with `SQ86`
60
+ - a turn-in with cancellation or confirmation: start with `RSQ06`
61
+ - both: use `SQ86` for the broader flow and `RSQ06` for the turn-in/cancel surface
@@ -0,0 +1,51 @@
1
+ # Mod Workflow
2
+
3
+ Read this file when the user wants guidance for turning a quest package into an actual mod layout.
4
+
5
+ ## Scope
6
+
7
+ This skill teaches the authoring model used in the local mod repo. It does not assume packaging, SDK cooking, or publishing should happen in this repo.
8
+
9
+ ## Expected Mod Layout
10
+
11
+ The implementation repo uses a per-mod folder under:
12
+
13
+ - `Mods/<ModName>/`
14
+
15
+ In the local implementation repo, generated content is typically stored under:
16
+
17
+ - `Mods/<ModName>/raw/Stalker2/Content/GameLite/...`
18
+
19
+ The important game-facing content tree inside that layout is:
20
+
21
+ - `Stalker2/Content/GameLite/...`
22
+
23
+ Other files such as metadata, package manifests, readmes, images, or publishing files are repo-specific and optional for mod creation guidance in this skill.
24
+
25
+ If the user does want a `readme.md`, treat it as lightweight supporting documentation. It should summarize:
26
+
27
+ - the quest premise
28
+ - the main quest stages or flow
29
+ - the success, failure, or cancel outcomes
30
+ - notable rewards or side effects
31
+
32
+ Generated cfg patches live under:
33
+
34
+ - `Mods/<ModName>/raw/Stalker2/Content/GameLite/...`
35
+
36
+ Example:
37
+
38
+ - quest node patches end up under `Stalker2/Content/GameLite/GameData/QuestNodePrototypes/...`
39
+ - dialog patches end up under `Stalker2/Content/GameLite/GameData/DialogPrototypes/...`
40
+
41
+ ## Source GameLite Path
42
+
43
+ The implementation repo reads base cfg files from the SDK GameLite tree:
44
+
45
+ - `SDK_PATH/Stalker2/Content/GameLite`
46
+
47
+ If the user asks for implementation guidance and the actual path is not known, ask for:
48
+
49
+ - the implementation repo path
50
+ - the GameLite source path
51
+ - the target mod folder or mod name
@@ -0,0 +1,87 @@
1
+ # Node Selection
2
+
3
+ Read this file when choosing concrete node families.
4
+
5
+ ## Control
6
+
7
+ - `Technical`: safest glue node for bootstrap, delay, pass-through, and replacement logic
8
+ - `Condition`: simple gate
9
+ - `If`: explicit branching with `True` / `False`
10
+ - `Random`: weighted or named branching
11
+ - `BridgeEvent`: synchronization
12
+ - `Container` / `ScheduledContainer`: multi-output or grouped flow where container semantics fit
13
+
14
+ ## Events
15
+
16
+ Reach for an event node when the quest should react to something instead of auto-starting. Particularly useful families include:
17
+
18
+ - item events
19
+ - trigger or overlap events
20
+ - dialog-related events
21
+ - journal-related events
22
+ - signal receive nodes
23
+
24
+ ## State / Progression
25
+
26
+ - `SetGlobalVariable`: phase or flag changes
27
+ - `SetJournal`: objective and quest-stage updates
28
+ - `TrackJournal`: tracked objective changes
29
+ - `SendSignal` / `OnSignalReceived`: cross-fragment control
30
+ - journal quest prototype structs
31
+ - global variable definitions or reused variable namespaces
32
+
33
+ ## Inventory / Reward
34
+
35
+ - `ItemAdd`
36
+ - `ItemRemove`
37
+ - `SetItemGenerator`
38
+ - `GiveCache`
39
+ - money-related conditions or events when affordability or payment gating matters
40
+ - reward generator structs
41
+ - stash and item-generator structs
42
+ - item prototypes when a genuinely new item must exist
43
+
44
+ ## World / Interaction
45
+
46
+ - spawn-family nodes
47
+ - `Despawn`
48
+ - `ActivateInteractableObject`
49
+ - `ForceInteract`
50
+ - trigger-related nodes
51
+
52
+ ## Character / AI
53
+
54
+ - `SetCharacterParam`
55
+ - `SetCharacterEffect`
56
+ - `SetAIBehavior`
57
+ - `ChangeRelationships`
58
+ - `ChangeFaction`
59
+
60
+ ## Dialog / Narrative
61
+
62
+ - `SetDialog`
63
+ - dialog-start or infotopic-finish events
64
+ - `SetJournal` for stage reflection after dialog
65
+ - dialog-chain/topic structs when new conversation content must be authored
66
+
67
+ ## Navigation / POI
68
+
69
+ - `SetJournal` with embedded markers
70
+ - `ShowMarker`
71
+ - `SearchPoint`
72
+ - region or hub data from local world definitions
73
+ - marker prototype structs or reused marker families
74
+
75
+ ## Supporting Content
76
+
77
+ - quest prototype and container structs when the quest must be registered in a broader quest family
78
+ - NPC prototype or spawn references when the quest depends on a specific giver or target
79
+ - world or support structs only when the quest cannot function by referencing existing data
80
+
81
+ ## Selection Rule
82
+
83
+ Prefer the smallest node set that communicates the design cleanly. If two approaches work, prefer the one that uses:
84
+
85
+ - explicit launchers
86
+ - fewer inferred semantics
87
+ - clearer patch points
@@ -0,0 +1,59 @@
1
+ # Patch Layout
2
+
3
+ Read this file when the user wants to know where new cfg patches and supporting structs should go.
4
+
5
+ ## Core Rule
6
+
7
+ Patch files are generated per target cfg family and stored under the mod's `raw/` tree, preserving the `GameLite/GameData` folder family.
8
+
9
+ The game does not read arbitrary new cfg files. New structs still have to be written into a patch whose target is an existing base cfg file from the relevant family.
10
+
11
+ For implementation guidance, the exact base cfg filename is mandatory. Do not stop at the family name alone.
12
+
13
+ Base pattern:
14
+
15
+ - `Mods/<ModName>/raw/Stalker2/Content/GameLite/GameData/...`
16
+
17
+ Observed processor behavior from `S2Mods/src/get-cfg-file-processor.mts`:
18
+
19
+ - it starts from a real source cfg file path
20
+ - it preserves that file's family and base name
21
+ - it writes the patch under a folder derived from the base file name
22
+ - it names the patch from the existing file name, not from the new struct name
23
+
24
+ ## File Family Placement
25
+
26
+ Place content by family:
27
+
28
+ - quest nodes: `GameData/QuestNodePrototypes/...`
29
+ - dialog structs: `GameData/DialogPrototypes/...`
30
+ - journal quests: `GameData/JournalQuestPrototypes/...`
31
+ - item and reward generators: `GameData/ItemGeneratorPrototypes/...`
32
+ - markers: `GameData/MarkerPrototypes...` or embedded in journal updates when appropriate
33
+ - item prototypes: `GameData/ItemPrototypes/...`
34
+ - quest prototypes: `GameData/QuestPrototypes/...` if the quest package needs registration there
35
+
36
+ ## Patch Naming
37
+
38
+ Observed implementation pattern:
39
+
40
+ - ordinary cfg family: `<BaseName>_patch_<ModName>.cfg`
41
+ - special case for `CoreVariables.cfg`: `<BaseName>.cfg_patch_<ModName>`
42
+
43
+ Do not invent a different naming pattern unless the user explicitly wants one.
44
+
45
+ ## New Struct Placement
46
+
47
+ Placement rules:
48
+
49
+ - add new dialog chains and dialog structs next to the existing NPC dialog family
50
+ - add new journal quest structs in the journal quest family
51
+ - add new reward generators in the quest reward or item-generator family
52
+ - add new quest nodes in the quest node family
53
+ - add new items only when existing items cannot satisfy the design
54
+ - for every one of the above, choose an existing base cfg file in that family and place the new structs in that file's patch
55
+ - if the exact base cfg file cannot be resolved quickly, ask the user instead of inventing one
56
+
57
+ ## Content Grouping
58
+
59
+ Keep the guidance grouped by target cfg family. Do not describe the quest as if unrelated edits should be scattered arbitrarily.
@@ -0,0 +1,140 @@
1
+ # Patterns
2
+
3
+ Read this file when the quest is more than a straight line.
4
+
5
+ ## Start-of-Quest Bootstrap
6
+
7
+ Use:
8
+
9
+ - `Technical { LaunchOnQuestStart = true, StartDelay = 0 }`
10
+ - downstream actions or helper branches
11
+
12
+ Use it to initialize globals, stage delayed work, or start a reusable subsystem.
13
+
14
+ ## Event -> Condition -> Action
15
+
16
+ Use:
17
+
18
+ - event root
19
+ - `If` or `Condition`
20
+ - one or more actions
21
+
22
+ This is the default reactive quest pattern.
23
+
24
+ ## Action Fanout
25
+
26
+ One upstream node can launch several downstream nodes. Use this to split one moment into parallel outcomes such as journal update, reward, marker update, and state change.
27
+
28
+ ## Named-Branch Routing
29
+
30
+ Use named outputs when different follow-up consequences matter.
31
+
32
+ High-value branch nodes:
33
+
34
+ - `If`
35
+ - `Random`
36
+ - `SetDialog`
37
+ - `Container`
38
+
39
+ ## Delay Insertion
40
+
41
+ Use `Technical { StartDelay = ... }` when two operations should not happen on the same tick.
42
+
43
+ ## Bridge / Synchronization
44
+
45
+ Use a side branch plus:
46
+
47
+ - `BridgeEvent`
48
+ - bridge condition
49
+ - node-state condition
50
+
51
+ Use this when the main branch should continue only after helper work completes.
52
+
53
+ ## Signal Bus
54
+
55
+ Use:
56
+
57
+ - `SendSignal`
58
+ - `OnSignalReceived`
59
+
60
+ Use this to decouple fragments without direct launcher rewiring.
61
+
62
+ ## Stateful Quest Machine
63
+
64
+ Use:
65
+
66
+ - event or trigger
67
+ - `If` / `Condition` on a global
68
+ - `SetGlobalVariable`
69
+
70
+ Use this for phases, repeatable loops, and one-shot guards.
71
+
72
+ ## Journal-Driven Progression
73
+
74
+ Use:
75
+
76
+ - `SetJournal`
77
+ - optional `TrackJournal`
78
+ - optional marker updates
79
+ - `If` / `Condition` on `JournalState`
80
+
81
+ ## Dialog to World Consequence
82
+
83
+ Use:
84
+
85
+ - `SetDialog` with named outputs
86
+ - branch-specific action nodes
87
+
88
+ This is the standard player-choice pattern.
89
+
90
+ ## Dialog-Driven Quest Surface
91
+
92
+ Use:
93
+
94
+ - existing or new accept entry
95
+ - in-progress reminder entry
96
+ - turn-in entry
97
+ - optional decline or cancel entry
98
+ - `OnInfotopicFinishEvent` or another dialog-linked event for state transitions
99
+
100
+ Treat these as part of the quest contract. The node graph and the dialog surface should agree on which branch accepts, completes, cancels, or defers the quest.
101
+
102
+ Implementation guidance:
103
+
104
+ - use a `SetDialog` node when the quest must expose a dialog state directly
105
+ - map `LastPhraseSID` values to named output pins
106
+ - prefer the NPC conversation itself to be player-initiated; the quest should usually expose dialog availability, not auto-launch the giver's conversation
107
+ - let accept, complete, cancel, and "not yet" outcomes flow from the chosen final phrase or dialog-linked event into quest-state changes
108
+ - use separate chains or comments for major state transitions when needed
109
+ - use dialog-side `If` nodes or bridge conditions when the dialog itself should react to quest state
110
+ - when the quest giver already has dialog content, add new chains and dialog structs alongside that existing dialog family
111
+ - reserve forced dialog, comments, or radio-style conversation for cases where vanilla also treats the line as an unsolicited event rather than a normal NPC interaction
112
+
113
+ ## Fetch And Return
114
+
115
+ Use:
116
+
117
+ - accept or start event
118
+ - `SetJournal` for the first objective
119
+ - `SetGlobalVariable` or journal-state gate for quest phase
120
+ - `OnPlayerGetItemEvent` for objective acquisition
121
+ - second `SetJournal` for return-to-giver progression
122
+ - `SetDialog` to expose the giver's quest conversation
123
+ - final phrase output or dialog-linked event on the quest giver
124
+ - `If` checking both quest phase and item possession
125
+ - `ItemRemove` for turn-in
126
+ - reward and completion nodes
127
+
128
+ Optional branches:
129
+
130
+ - reminder branch when the player talks to the giver too early
131
+ - decline branch before acceptance
132
+ - cancel branch if the player should be allowed to back out after acceptance
133
+
134
+ Use this pattern when the quest should not spawn the item itself and only needs to track acquisition and delivery.
135
+
136
+ Reward add-ons:
137
+
138
+ - `ItemAdd` for direct money-like or item-like payout if locally appropriate
139
+ - `SetItemGenerator` for a packaged reward
140
+ - `GiveCache` when the reward should arrive as a stash reveal
@@ -0,0 +1,75 @@
1
+ # POI And Rewards
2
+
3
+ Read this file when the quest needs navigation guidance or explicit reward composition.
4
+
5
+ ## Regions, Hubs, And Places
6
+
7
+ Common place names can map to different kinds of data:
8
+
9
+ - region enum
10
+ - hub or fast-travel location
11
+ - marker prototype
12
+ - world stash or search-point location
13
+
14
+ Do not assume these are interchangeable.
15
+
16
+ ## Resolving Places
17
+
18
+ Useful local sources:
19
+
20
+ - `GameLite/GameData/JournalQuestPrototypes/*.cfg` for quest region usage
21
+ - `GameLite/GameData/MarkerPrototypes.cfg` for marker and region marker definitions
22
+ - `GameLite/GameData/FastTravelLocationPrototypes.cfg` for hub locations and player coordinates
23
+ - `GameLite/GameData/SpawnActorPrototypes/WorldMap_WP/**` for concrete world placements and stash generators
24
+ - `GameLite/GameData/CorpseClueStashPrototypes.cfg` for region-linked stash categories
25
+
26
+ Use these rules:
27
+
28
+ - if the player only needs broad regional guidance, use journal region and marker guidance
29
+ - if the player needs a base or hub destination, use the fast-travel or hub location data
30
+ - if the player needs a specific stash or search area, prefer a concrete stash generator, marker target, or search point
31
+ - if the user names a place that could mean several things, resolve whether they mean a region, hub, marker, or specific world location before planning
32
+ - if exact coordinates are unnecessary, prefer a broad area target with a radius over inventing a precise point
33
+ - if the quest depends on a specific stash and local lookup does not reveal a clear candidate quickly, stop and ask the user which stash or stash family to use
34
+
35
+ ## Reward Composition
36
+
37
+ High-value reward patterns:
38
+
39
+ - direct deterministic item: `ItemAdd`
40
+ - inventory package or loadout: `SetItemGenerator`
41
+ - stash reveal or cache fantasy: `GiveCache`
42
+ - money payout authored through a quest reward generator with `MoneyGenerator`, then delivered via `SetItemGenerator`
43
+
44
+ Practical reward planning:
45
+
46
+ - for money-only rewards, prefer an authored reward generator using `MoneyGenerator`
47
+ - for "money plus stash" rewards, split the reward into two explicit actions
48
+ - for armor rewards such as a plain exoskeleton, prefer an item generator or stash reveal over inventing ad hoc delivery logic
49
+ - if the reward fantasy depends on a stash reveal but no suitable stash can be identified quickly, ask the user before inventing one
50
+ - if the reward is a stash, do not leave the final reward items sitting in a lootable stash from the beginning of the quest
51
+ - prefer `SetItemGenerator` in the quest completion branch to populate or unlock the stash reward so it only becomes available after quest completion
52
+
53
+ Observed local pattern:
54
+
55
+ - `EQ50` delivers alternate money rewards through `SetItemGenerator` nodes targeting reward generators such as `EQ50_reward_var2_MoreMoney`
56
+ - quest reward generator files under `GameLite/GameData/ItemGeneratorPrototypes/QuestRewardsPrototypes/**` commonly use `MoneyGenerator`
57
+ - money card item SIDs exist in `GameLite/GameData/ItemPrototypes/MoneyPrototypes.cfg`
58
+
59
+ ## Recommendation For This Repo
60
+
61
+ When the user wants a combined reward:
62
+
63
+ 1. look for an existing quest reward generator pattern
64
+ 2. model the money portion as its own reward generator
65
+ 3. if a stash is part of the fantasy, use `SetItemGenerator` in the completion flow with the dedicated stash or reward generator that makes the stash reward available
66
+ 4. if the reward should go straight to the player, use `SetItemGenerator` or `ItemAdd`
67
+
68
+ ## Missing Struct Rule
69
+
70
+ If the quest needs a reward, marker, journal entry, variable, or item that does not already exist:
71
+
72
+ 1. reuse the closest existing local pattern
73
+ 2. define the minimal new struct family needed
74
+ 3. keep names scoped to the quest SID
75
+ 4. avoid creating unrelated support content
@@ -0,0 +1,80 @@
1
+ # Workflow
2
+
3
+ Use this file first for most requests.
4
+
5
+ ## Input Checklist
6
+
7
+ Extract or infer:
8
+
9
+ - quest goal
10
+ - start condition
11
+ - exact internal SIDs or GUIDs for actors, items, and key interactables
12
+ - required dialog surface for accept, in-progress, turn-in, decline, or cancel behavior
13
+ - required dialog chains, topics, or final phrase hooks if new dialog must be created
14
+ - progression stages
15
+ - branch conditions
16
+ - rewards or penalties
17
+ - fail or reset behavior
18
+ - point-of-interest or navigation requirements
19
+ - actors, items, triggers, dialog, or world objects
20
+ - whether the quest is one-shot, repeatable, or stateful
21
+ - every supporting struct family the quest will require
22
+ - whether the user needs design-only output or actual mod placement guidance
23
+
24
+ ## Minimal Mental Model
25
+
26
+ Default flow:
27
+
28
+ 1. Event or `Technical` starts a branch.
29
+ 2. `If` or `Condition` decides whether the branch continues.
30
+ 3. Action nodes change journal, inventory, AI, world state, or globals.
31
+ 4. Named-output nodes create branching.
32
+ 5. Bridges, node-state checks, or signals synchronize branches.
33
+ 6. `End` closes the fragment.
34
+
35
+ ## Quick Routing
36
+
37
+ If the user wants:
38
+
39
+ - automatic startup: `Technical` with `LaunchOnQuestStart = true`
40
+ - yes/no branch: `If`, or `Condition` when a simple gate is enough
41
+ - more than two outcomes: `Random`, `SetDialog`, `Container`, `ScheduledContainer`, or another node with `OutputPinNames`
42
+ - NPC conversation states: `SetDialog`, `OnDialogStartEvent`, or `OnInfotopicFinishEvent`
43
+ - wait-for-completion behavior: `BridgeEvent`, bridge conditions, or node-state checks
44
+ - quest updates and map guidance: `SetJournal`, `TrackJournal`, `ShowMarker`, `SearchPoint`, `AddNote`
45
+ - cross-fragment communication: `SendSignal`, `OnSignalReceived`, globals, or `BridgeEvent`
46
+ - location or hub guidance: journal `Region`, `Markers`, marker prototypes, and fast-travel location data
47
+ - complete quest package authoring: journal quests, globals, reward generators, item generators, stash generators, and support prototypes
48
+ - mod placement guidance: target mod folder, `raw/` tree layout, and patch family placement
49
+
50
+ ## ID Resolution
51
+
52
+ Before treating names as assumptions, search local game data for:
53
+
54
+ - NPC placeholders in `SpawnActorPrototypes`
55
+ - NPC or object prototype SIDs in `ObjPrototypes`
56
+ - item SIDs in `ItemPrototypes` or concrete spawn/prototype data
57
+ - dialog chains and dialog node IDs in `DialogPrototypes`
58
+ - journal quest and stage IDs in `JournalQuestPrototypes`
59
+ - region, marker, hub, and fast-travel data when the user names a place
60
+ - existing reward, stash, and item generator patterns before inventing new ones
61
+ - target mod layout and patch family placement when the user wants implementation guidance
62
+
63
+ If a requested item name does not appear anywhere in local data, say so explicitly and keep the plan generic until the exact internal SID is known.
64
+
65
+ ## Planning Order
66
+
67
+ Build plans in this order:
68
+
69
+ 1. Resolve concrete IDs.
70
+ 2. Resolve place data if navigation matters.
71
+ 3. Identify all required struct families.
72
+ 4. If needed, ask the user for implementation repo path, GameLite path, and target mod folder.
73
+ 5. Define the journal and state model.
74
+ 6. Define the dialog surface.
75
+ 7. Choose the entry point.
76
+ 8. Choose the first gate or branch.
77
+ 9. Choose the action and reward nodes.
78
+ 10. Add any helper delays with `Technical`.
79
+ 11. Add joins or side-branch synchronization.
80
+ 12. Add explicit end nodes where the fragment should stop.