re: runtime DATA SHEET reads the live weapon record (Route B, first capture)
Drove the retail game headless (Canary + lavapipe, vgamepad) to the Ready Room Arsenal and read the Gallery-Mode DATA SHEET for every weapon the 5%-progress save reveals. Two UI->field mappings are CONFIRMED against weapons whose values ARE on disc: Ammo Capacity == LoadingCount (9/9 exact matches) Max. Lock Ons == TriggerShotCount (FALCON 9AM 12 == wep_02; BUZZARD 22 == wep_04) That makes the panel an oracle for fields the disc leaves defaulted, and it is shown for undeveloped weapons too, so no points need spending. Recovered TriggerShotCount for wep_05 and wep_60 (both 4, on-disc absent), and bracketed the defaulted Power / MaximumRange via the Range/Damage letter classes. Ruled out first: the defaults are not in hidden/DefTables.pak (no WEAPON-schema objects there) nor in the localized GP_MAIN_GAME_* duplicates. Also adds the two analysis examples that produce the shopping list of defaulted fields, the screenshot harness used to drive the menus, and the evidence PNGs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
tools/re-capture/README.md
Normal file
20
tools/re-capture/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Runtime-capture harness (sylph-re container)
|
||||
|
||||
Screenshot-driven scripts for reading the running retail game's menus under Xenia
|
||||
Canary + lavapipe, headless. They assume the container helpers `screenshot`,
|
||||
`vgamepad`, `pad` are on `$PATH` and `HOME=/sylph-home/re`.
|
||||
|
||||
| Script | What it does |
|
||||
|---|---|
|
||||
| `skip_intro.sh` | Boot → main menu, unattended. Taps A only while the intro movie is actually playing (frame-to-frame RMSE), then once at the `PRESS Ⓐ BUTTON` title. Static logo screens are left alone, so a stray tap can never land on NEW GAME. |
|
||||
| `wait_title.sh` | Older variant: wait for the title (green Ⓐ glyph at px 625,618) and tap A. Superseded by `skip_intro.sh`. |
|
||||
| `step.sh` | One Arsenal navigation step (`down`/`up`/`next`/`prev`/`none`) + a compact capture: weapon list stacked over the `DATA SHEET`. |
|
||||
| `sweep.sh` | Walk a whole weapon-type list, capturing **only** rows that show a `DATA SHEET` — locked rows (a "Conditions to Develop" panel) are detected by the brightness of the `Range Class` label box and skipped. |
|
||||
| `type.sh` | Change weapon-type tab N times (RB) and report the header strip. |
|
||||
| `hp.sh` / `cyc.sh` | Hangar hard-point carousel: `cyc.sh` steps it (d-pad **down**, not left/right) and captures the Name + `DATA SHEET`. |
|
||||
|
||||
**Input timing under lavapipe:** the game polls input at its own low frame rate, so a
|
||||
60 ms d-pad tap is dropped roughly half the time. 200 ms is reliable; 300 ms starts to
|
||||
auto-repeat (two rows per press).
|
||||
|
||||
Findings produced with these: [`docs/re/weapon-datasheet-runtime.md`](../../docs/re/weapon-datasheet-runtime.md).
|
||||
9
tools/re-capture/cyc.sh
Executable file
9
tools/re-capture/cyc.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Step the Hangar weapons-container carousel right and capture the Name+DATA SHEET.
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
OUT=/sylph-home/re/caps; mkdir -p "$OUT"
|
||||
vgamepad dpad right; sleep 0.30; vgamepad dpad center; sleep 3.0
|
||||
screenshot /tmp/h.png >/dev/null 2>&1
|
||||
convert /tmp/h.png -crop 530x480+700+95 +repage "$OUT/$1.png"
|
||||
echo "$OUT/$1.png"
|
||||
11
tools/re-capture/hp.sh
Executable file
11
tools/re-capture/hp.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Cycle the Hangar hard-point weapon carousel one step right and capture the
|
||||
# Name + DATA SHEET panel (the mountable-weapon list for that hard point).
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
OUT=/sylph-home/re/caps; mkdir -p "$OUT"
|
||||
[ "${1:-}" = "none" ] || { vgamepad dpad right; sleep 0.20; vgamepad dpad center; }
|
||||
sleep 2.5
|
||||
screenshot /tmp/h.png >/dev/null 2>&1
|
||||
convert /tmp/h.png -crop 495x460+705+95 +repage "$OUT/$2.png"
|
||||
echo "$OUT/$2.png"
|
||||
23
tools/re-capture/skip_intro.sh
Executable file
23
tools/re-capture/skip_intro.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Drive the boot sequence to the main menu without a human in the loop.
|
||||
# - movie playing (two grabs 0.6s apart differ a lot) -> tap A to skip
|
||||
# - static screen -> if the green "PRESS (A) BUTTON" glyph is there, tap A and stop
|
||||
# Static logo screens are left alone, so a stray tap can never land on NEW GAME.
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
deadline=$(( SECONDS + ${1:-900} ))
|
||||
while [ $SECONDS -lt $deadline ]; do
|
||||
screenshot /tmp/f1.png >/dev/null 2>&1; sleep 0.6
|
||||
screenshot /tmp/f2.png >/dev/null 2>&1
|
||||
d=$(compare -metric RMSE /tmp/f1.png /tmp/f2.png null: 2>&1 | sed 's/ .*//' | cut -d. -f1)
|
||||
d=${d:-0}
|
||||
read -r r g b < <(convert /tmp/f2.png -format "%[fx:int(255*p{625,618}.r)] %[fx:int(255*p{625,618}.g)] %[fx:int(255*p{625,618}.b)]" info:)
|
||||
if [ "$g" -gt 130 ] && [ $((g - r)) -gt 45 ] && [ $((g - b)) -gt 45 ]; then
|
||||
echo "TITLE at ${SECONDS}s -> A"; vgamepad tap A 250; exit 0
|
||||
fi
|
||||
if [ "$d" -gt 1500 ]; then
|
||||
echo "movie (rmse $d) at ${SECONDS}s -> skip A"; vgamepad tap A 250; sleep 3
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "TIMEOUT"; exit 1
|
||||
22
tools/re-capture/step.sh
Executable file
22
tools/re-capture/step.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# One Arsenal navigation step + a compact capture: the weapon list (which row is
|
||||
# selected) stacked over the DATA SHEET numeric rows. Everything else is dropped.
|
||||
# Usage: step.sh <down|up|next|prev|none> <tag> [settle_s]
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
OUT=/sylph-home/re/caps; mkdir -p "$OUT"
|
||||
case "${1}" in
|
||||
down) vgamepad dpad down; sleep 0.20; vgamepad dpad center ;;
|
||||
up) vgamepad dpad up; sleep 0.20; vgamepad dpad center ;;
|
||||
next) vgamepad hold RB 0.35 ;;
|
||||
prev) vgamepad hold LB 0.35 ;;
|
||||
none) : ;;
|
||||
esac
|
||||
sleep "${3:-2.5}"
|
||||
raw="$OUT/$2.raw.png"
|
||||
screenshot "$raw" >/dev/null 2>&1
|
||||
convert "$raw" -crop 500x420+150+180 +repage /tmp/_list.png
|
||||
convert "$raw" -crop 500x200+700+100 +repage /tmp/_sheet.png
|
||||
convert /tmp/_list.png /tmp/_sheet.png -background black -append "$OUT/$2.png"
|
||||
rm -f "$raw"
|
||||
echo "$OUT/$2.png"
|
||||
21
tools/re-capture/sweep.sh
Executable file
21
tools/re-capture/sweep.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Walk down a weapon-type list N rows; capture ONLY rows that show a DATA SHEET
|
||||
# (locked rows show a "Conditions to Develop" panel instead — detected by the
|
||||
# brightness of the "Range Class" label box, ~5 when absent, >>20 when present).
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
OUT=/sylph-home/re/caps; mkdir -p "$OUT"
|
||||
pfx=$1; n=${2:-8}
|
||||
for ((i=1;i<=n;i++)); do
|
||||
vgamepad dpad down; sleep 0.20; vgamepad dpad center; sleep 3.0
|
||||
screenshot /tmp/s.png >/dev/null 2>&1
|
||||
m=$(convert /tmp/s.png -crop 150x24+730+116 +repage -colorspace Gray -format "%[fx:int(255*mean)]" info:)
|
||||
if [ "$m" -gt 45 ]; then
|
||||
convert /tmp/s.png -crop 500x420+150+180 +repage /tmp/_l.png
|
||||
convert /tmp/s.png -crop 500x200+700+100 +repage /tmp/_s.png
|
||||
convert /tmp/_l.png /tmp/_s.png -background black -append "$OUT/$pfx-r$i.png"
|
||||
echo "row $i: DATA SHEET -> $OUT/$pfx-r$i.png"
|
||||
else
|
||||
echo "row $i: locked (mean $m)"
|
||||
fi
|
||||
done
|
||||
11
tools/re-capture/type.sh
Executable file
11
tools/re-capture/type.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Change Arsenal weapon type N times (RB) and report the header strip only.
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
OUT=/sylph-home/re/caps; mkdir -p "$OUT"
|
||||
n=${1:-1}
|
||||
for ((i=0;i<n;i++)); do vgamepad hold RB 0.35; sleep 2.5; done
|
||||
sleep 1.5
|
||||
screenshot /tmp/hdr.png >/dev/null 2>&1
|
||||
convert /tmp/hdr.png -crop 420x50+130+148 +repage "$OUT/hdr.png"
|
||||
echo "$OUT/hdr.png"
|
||||
21
tools/re-capture/wait_title.sh
Executable file
21
tools/re-capture/wait_title.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Poll the framebuffer for the "PRESS (A) BUTTON" title screen (the green A glyph
|
||||
# at ~625,618) and tap A the instant it appears — the title auto-returns to the
|
||||
# attract loop after a few seconds, which is why a human-paced tap misses it.
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
TMP=/tmp/title-probe.png
|
||||
deadline=$(( SECONDS + ${1:-900} ))
|
||||
while [ $SECONDS -lt $deadline ]; do
|
||||
if screenshot "$TMP" >/dev/null 2>&1; then
|
||||
read -r r g b < <(convert "$TMP" -format "%[fx:int(255*p{625,618}.r)] %[fx:int(255*p{625,618}.g)] %[fx:int(255*p{625,618}.b)]" info:)
|
||||
if [ "$g" -gt 130 ] && [ $((g - r)) -gt 45 ] && [ $((g - b)) -gt 45 ]; then
|
||||
echo "TITLE detected (rgb $r,$g,$b) at ${SECONDS}s — tapping A"
|
||||
vgamepad tap A 200
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "TIMEOUT: title not seen"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user