Identify the event or call site that activates a state in a script camera tree #19
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@R0Y00 on GitHub · 2026-11-21 09:10 UTC · original
Follow-up to #18. The native path replay takes explicit requests and resolves them against the archive hierarchy. The outstanding question is how the game produces a request and whether it resolves missing or duplicate IDs using fallback or precedence.
A reproducible witness should connect an input event or caller condition to the selected context and target ID, establish its direction, and distinguish it from a camera parameter containing the same integer. Test both an activating input and a nearby input that takes a different branch. Preserve the local-only archive workflow and use synthetic fixtures when publishing tests.
@R0Y00 on GitHub · 2026-11-21 14:38 UTC · original
For a first contribution, the existing state replay is a control. It can show what happens after a context and target ID have been supplied. The missing observation is the producer of that pair. A useful report would trace one candidate event or caller to its two output IDs, then vary one input and record whether it chooses a different state. Please identify which values came from the observed data and which the test supplied. A source-built fixture and expected results are enough for a public PR.
@MarlomMedeiros on GitHub · 2026-11-21 16:10 UTC · original
Extending the script-state notes from #18 to the activation question,
using the repo's own resolve_script_path reference walker and the local
script.rpf corpus (1,012 PSIN records; single package, no second source;
everything stays local).
Corpus structure: 996 'shopcomponents' records (physical shop
interaction sites: promptposition, scenepositionheading, standflags,
locationname, weapon, kitmod), 8 'states' libraries at record indices
{10,200,232,292,773,798,872,1010}, and 8 records of other shapes. The
states libraries are hierarchical state(id=, type=) trees
whose leaves carry camera parameter nodes (0xc9fd9c54, all five probe
literals verify) or preview-offset nodes (0xd5b27926).
Call site (serialized side): 44 of the 996 shopcomponents records
declare context-key digests, 19 locationname and 25 weapon records,
disjoint. Matches land exclusively on level-1 state ids and nowhere
else in the corpus (expected chance ~1e-5 or lower; observed 5
locationname -> Rec 798 states, 28 weapon -> Rec 10 states; zero
other matches across every kind-5 digest in the file). The other six
libraries take keys from non-shopcomponents records, e.g. Rec 239 ->
Rec 1010 via 'medium'.
Activation, exercised through the repo's DLL:
44 -> camera leaf 54 in Rec 798 (0xa8638f41 is the locationname
digest carried by Rec 787's shopcomponent data).
{0xb7f05d20, medium, 0xc51a15b8, 0x9e5a1ad0} resolves to four
distinct state nodes {44,46,48,50} -> camera leaves {54,53,52,51}
with three distinct parameter sets (leaves 51 and 52 are
byte-identical).
fabricated 0xdeadbeef both return -1 with the active pointer
preserved. Each library carries exactly one id='default' state,
always at level 1 (node 2): retrying [default] lands on node 2 ->
camera leaf 3. No default exists at deeper levels in any library, so
the fallback appears to be caller-side.
return -2. In Rec 10 all 23 pairs split by differing 'type'
(item/weaponitem, itemgroup/weapongroup, ...); in Rec 872 and
Rec 1010 the two pairs have identical type, a true data ambiguity.
('true'/'false' bools) under node 344; any descent into that sibling
list returns -3.
Pointer semantics of the reference resolver (12k randomized cases vs an
independent model, zero divergences): relative paths start at *active,
'up' climbs parents but cannot pass the container, and the active-
pointer update is atomic on success only; -1/-2/-3, including mid-path
misses, leave it untouched.
The (id,type) dispatch gap, worth flagging: all 30 shop 'weapon' attrs
sit on nodes literally named 'item', and every ambiguous weapon id
splits exactly as (type=item, type=weaponitem), so a type-aware lookup
appears to resolve all 28/28 real weapon inputs uniquely, while the
id-only reference walker reports -2 on 9 of them. The serialized data
looks built for keyed (id,type) descent; the reference resolver is a
conservative id-only approximation, and its -2 on those 9 inputs is
probably a model artifact rather than broken data.
Not yet established: the native runtime event that invokes this lookup
(lives in script/engine code, not in these tables); how a given
shopcomponents record selects which states library it uses (only
inferred via the shared id domains); and the encrypted LSNS string
pool, which keeps ~40 hash names unresolved.
@R0Y00 on GitHub · 2026-11-21 16:22 UTC · original
Thanks for narrowing the lookup to a candidate (id, type) pair. Please preserve that observation and its limits in the next fixture. The remaining question is which runtime event supplies that pair. A positive case and a nearby input selecting a different state would connect the two.
@MarlomMedeiros on GitHub · 2026-11-21 16:48 UTC · original
PR #133 adds the fixture:
tests/script_dispatch_check.pybuilds asynthetic
stateslibrary plus ashopcomponents-style carrier andexercises the pair supply and both selection cases through the
unmodified reference host.
On the remaining question, the serialized data suggests the carrier
node itself supplies the pair: the carrier's node name carries the
typewhile its kind-5 attribute carries theid. Real-data anchor:Rec 1 node 40 is an
item-named node undershopcomponent -> data -> 0xbf61523dholdingweapon(0xe68a4a98)=0x9fcad864, i.e. the pair(id=0x9fcad864, type=item), which resolves to Rec 10 node 290(previewoffset leaf); the same id with
type=weaponitemselectssibling 332 instead. Which native caller performs that extraction is
still open.
Fixture coverage: id-only -> -2; (id, item) -> node 4 -> preview-offset
leaf; (id, weaponitem) -> node 6 -> deeper state -> camera leaf;
unmatched type -> -1; kind=4 bool id -> -3; 3-level
positive/divergent camera branches; relative branch switching; dropped
siblings asserted unreachable. All digests are synthetic joaat labels,
no game data.
@R0Y00 on GitHub · 2026-11-21 17:23 UTC · original
Thanks for the synthetic dispatch fixture in #133. It now gives the proposed (id, type) lookup a reproducible test; the outstanding step on the PR is CTest registration. This issue remains open for evidence of the runtime event that supplies the pair.
@Vonsek on GitHub · 2026-11-21 18:50 UTC · original
I checked how much context the serialized
mediumassociation can supply. The archive contains a kind-5 field in PSIN record 239, node 3, whosetextHashisjoaat("medium"). A nearby node, 7, carries a different kind-5 value in the same field (0x6ad38ac4). I supplied the library, root container and invocation to the source-built reference walker in each replay.mediumselects node 272 with two direct camera children whose five literal hashes verify. With library 798 supplied, it selects node 6, which has a different state type and one verified camera child.mediumreturns-1. The same digest occurs under two nested parents there. That makes the record 239 → 1010 association a shared label whose parent context still needs evidence.-1in all three libraries and preserves the active state. Supplying the original field's raw integer or a verified camera's raw priority as the lookup key also returns-1and preserves the active state.To reproduce, build
script_path_hostand runpython -B tools/script_state_probe.py <local-script.rpf> --state medium. It lists the matches in libraries 10, 798 and 1010. For the native control, userecordsandtree_arraysfromtools/script_state_probe.pyto read the four records. Take the kind-5textHashfor field0x6ad38ac4at nodes 3 and 7 of record 239. Pass the hashes one at a time toresolve_pathintests/script_dispatch_check.py, starting with node 1 as both the container and active node for each library. Carry the active node from the first result into the negative controls. An independent byte decode confirmed the source field and selected nodes. The three script CTests passed ate8895ad.The run establishes that the observed digest can select different camera states once a context is supplied. The runtime event that picks the library and parent path remains unobserved. That step still needs a trace of the caller or a captured input event with its actual lookup arguments.
@SuperCraft3M on GitHub · 2026-11-24 12:45 UTC · original
Claiming the remaining native-producer slice of #19: identify how a real runtime event or script caller supplies the
(id, type)pair to the state resolver, rather than repeating the serialized-tree analysis already covered by #133.Plan: inspect the local executable and script package offline, retain binaries, disassembly, offsets and paths locally, and look for one positive event/call path plus a nearby input that selects a different branch. Cross-check any proposed pair through the existing source-built resolver fixture; add a synthetic regression only if the observation supports a stable public contract. Report only a sanitized, evidence-limited summary.
Environment: Windows 11 build 26300.9711, x64, RTX 4070 (driver 32.0.16.2114); GPU is not required. I will work from current upstream main
cec885b2; planned validation ispython -B tests/script_dispatch_check.pyand the registered script CTest(s). This depends on the merged #18/#133 resolver baseline. I found no open PR or assignee covering the native caller. No executable, archive or extracted game data will be published.@SuperCraft3M on GitHub · 2026-11-24 12:49 UTC · original
Local-data check (2026-11-24): the existing aligned-page probe recognizes 1,012 PSIN records / supported trees in the local script archive. Its existing validation then stops on a state node whose
idattribute is not label-kind (2 occurrences); this is consistent with the source-built resolver treating such IDs as malformed, so I did not weaken that check. This archive-only result does not identify the native runtime event/call site that supplies(id, type). No game data, paths, values, or binary artifacts are attached. I am leaving the source unchanged rather than infer a caller from serialized structure.