5.1 KiB
Compaction Handoff
Current date/time context: 2026-06-20/21, local timezone America/Chicago.
Current Installed State
- Latest commit:
64ddf7a Trace GPS provider filters. - Installed RED4ext plugin:
Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.dll. - Installed build is read-only. It should not alter route behavior.
- Plugin log is cleared and empty before the next test:
Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.log. - Game is cold as of the latest user message.
New Toolbox Tools
The Fedora toolbox 2077 now has:
rizin0.7.4python3-capstone5.0.5python3-pefile2024.8.26
If adding Python-only tooling, create/use a venv and maintain requirements.txt
instead of one-off pip installs.
Active Probe Configuration
In red4ext/EdgeWeightGPS/src/Main.cpp:
kEnableGpsProviderClassPatch = falsekEnableGpsProviderClassPatchTrace = falsekEnableGpsTraceHooks = truekEnableGpsQueryLifecycleHooks = falsekEnableGpsLocalSearchHooks = truekEnableRouteUiTraceHooks = false
Active hooks:
GPSSearch 0x44f054GPSRouteProducer 0x44cc7cGPSEdgeCost 0x44f838- filtered provider filter
0x44ff68 - base provider filter
0x450b08
The filter probe records pass/fail totals by GPS point class and by bits in
point + 0x10, tested against provider masks at +0x108 and +0x10a.
Why This Probe Exists
Data and behavior patches tested so far:
- Traffic
maxSpeedpatches affected NPC freeway speed but not GPS route choice. - Lane connection probability patches did not change GPS route choice.
- Global cost-table patch produced weird routing but mostly confirmed we were near the solver, not a clean highway preference knob.
- Provider class override patches fired correctly but produced no perceptible
route change after preserving vanilla class
14.
Static disassembly clarified the provider split:
- Provider vtable slot
+0x08is an admissibility filter, not cost. - Provider vtable slot
+0x10is geometric edge cost, multiplying distance byprovider[0x08 + class * 4]. - We patched only slot
+0x10inputs. If slot+0x08filtering dominates the candidate graph, those cost changes can fire and still not visibly steer GPS.
Important Native Findings
GPS pipeline landmarks:
- shared query submit:
0x70a42c - query dispatch:
0x70a570 - route producer:
0x44cc7c - local search loop:
0x44f054 - edge cost:
0x44f838 - query result fetch:
0x7094b8
The search loop is A*/Dijkstra-like:
- initialize/open list with start node
- pop best node
- check destination handle
- traverse adjacent lane handles
- call provider filter
- call provider cost
- update candidate cost/best predecessor
Provider details:
- Base provider vtable RVA:
0x2ae6120 - Filtered provider vtable RVA:
0x2ae60f8 - Base provider constructor
0x451158fills 64 class multipliers with1.0and sets mask+0x108to0xffff. - Filtered provider constructor
0x44b9b4changes vtable to0x2ae60f8. - Filtered provider commonly has class
14 = 0.05; preserve this unless deliberately testing it.
Route result records:
0x7094b8output records are 0x28-byte route segment records.h00in those records matchesworldTrafficLanePersistent.nodeRefHash.- Route records can be joined to
work/raw-segment-json/all.traffic_persistent.json. - The low byte of route-record
u08is not the same as the search point class.
Next User Test
Ask the user to run the usual routine:
- Launch game.
- Hit Continue on main menu.
- Hit Space to Continue.
- Wait for minimap/GPS to settle.
- Open map.
- Plot the usual three routes plus one custom highway-ish target.
- Close game.
Ask for timestamps for:
- Space-to-Continue
- map open
- each route click
- game cold
After the run:
- Archive the log to
logs/EdgeWeightGPS_provider_filter_probe_<time>.log. - Inspect
GPSSearch resultlines forfilterPassClasses,filterFailClasses,filterPassMaskBits, andfilterFailMaskBits. - Compare filter pass/fail classes to
edgeSrcClassesand route output records. The key question is whether the class/mask filter is selecting the graph subset before cost weighting can matter.
Useful Commands
Build/install:
toolbox run -c 2077 ./tools/build_red4ext_shim.sh
toolbox run -c 2077 ./tools/install_red4ext_shim.sh
Clear plugin log:
truncate -s 0 '/var/home/salt/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.log'
Inspect current plugin log:
tail -n 240 '/var/home/salt/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.log'
Disassemble with rizin in toolbox:
toolbox run -c 2077 rizin -q -A '/var/home/salt/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Cyberpunk 2077/bin/x64/Cyberpunk2077.exe'
Caution
- Do not revert user changes or old untracked logs unless explicitly asked.
- Commit early/often.
- Do not install Python packages one by one with pip; use
requirements.txt.