s2cfgtojson 7.0.18 → 7.0.19
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
|
@@ -108,6 +108,7 @@ If the user asks for variants, provide a primary plan first, then 1-2 alternativ
|
|
|
108
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
109
|
- When a node has named outputs, bind the exact output `Name`.
|
|
110
110
|
- When a simple gate is enough, prefer `Condition`; when explicit `True` / `False` routing is needed, prefer `If`.
|
|
111
|
+
- When emitting actual cfg structs through this repo's `Struct` serializer, mark each top-level struct with `__internal__.isRoot = true` so the renderer writes `RawName : struct.begin` for that struct. Nested child structs should normally leave `isRoot` unset, because `isRoot` suppresses the parent-key form and treats the struct as a root entry.
|
|
111
112
|
|
|
112
113
|
## Default Planning Heuristics
|
|
113
114
|
|
|
@@ -54,6 +54,21 @@ Placement rules:
|
|
|
54
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
55
|
- if the exact base cfg file cannot be resolved quickly, ask the user instead of inventing one
|
|
56
56
|
|
|
57
|
+
## Struct Rendering Note
|
|
58
|
+
|
|
59
|
+
When the plan turns into actual authoring with this repo's `Struct` helpers:
|
|
60
|
+
|
|
61
|
+
- set `__internal__.rawName` to the engine-facing struct SID or name that should appear before `: struct.begin`
|
|
62
|
+
- set `__internal__.isRoot = true` on each top-level struct being emitted into the cfg patch
|
|
63
|
+
- leave `isRoot` unset on ordinary nested child structs
|
|
64
|
+
|
|
65
|
+
Role of `__internal__.isRoot`:
|
|
66
|
+
|
|
67
|
+
- it makes `Struct.toString()` render the struct as a root entry like `SomeSID : struct.begin`
|
|
68
|
+
- it also prevents the parent from re-rendering that struct's field key, which would otherwise duplicate the name at the nesting site
|
|
69
|
+
|
|
70
|
+
Practical rule: use `isRoot` for structs that should exist as standalone cfg entries in the patch file, not for normal nested properties inside another struct.
|
|
71
|
+
|
|
57
72
|
## Content Grouping
|
|
58
73
|
|
|
59
74
|
Keep the guidance grouped by target cfg family. Do not describe the quest as if unrelated edits should be scattered arbitrarily.
|