From 690feb8684271c11572baedad4eef1d353494f33 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Fri, 26 Jun 2026 22:24:10 -0500 Subject: [PATCH] Document spatial cost inversion result --- README.md | 8 + docs/compaction-handoff.md | 58 ++- docs/traffic-system-debrief.md | 19 +- ...spatial_inversion_no_route_change_1845.log | 406 ++++++++++++++++++ red4ext/EdgeWeightGPS/src/Main.cpp | 2 +- 5 files changed, 469 insertions(+), 24 deletions(-) create mode 100644 logs/EdgeWeightGPS_spatial_inversion_no_route_change_1845.log diff --git a/README.md b/README.md index 507174c..dbcadf5 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ route pipeline, not the script-facing `RunGPSQuery`/`UpdateGPSQuery` helpers. The shim can log the query lifecycle, async traffic result handoff, and route postprocess stages. +A later spatial edge-cost prototype hooked the native local GPS edge-cost +callback at `0x44f838` and successfully changed thousands of candidate edge +costs in live route-producer calls. A controlled in-game inversion test still +produced byte-identical final `GPSQueryResultFetch` route records before and +after flipping highway weights from nearly free to extremely expensive. Treat +that hook as a useful local-search diagnostic, not the final player GPS +weighting surface. + An experimental traffic candidate scorer hook at RVA `0x8d46cc` proved the game does consult traffic lane flags while selecting route/projection candidates: highway, road, and pavement flags were visible live and the hook changed their diff --git a/docs/compaction-handoff.md b/docs/compaction-handoff.md index a14e93f..40fe245 100644 --- a/docs/compaction-handoff.md +++ b/docs/compaction-handoff.md @@ -88,16 +88,33 @@ Important caveat: `query_f78=10` and `query_ptr98_rva=0x8d76c4` mostly produces tiny connector searches, not the whole route. Do not gate the spatial patch only on that caller unless a later test proves it covers the desired route segment. +- Live inversion test log: + `logs/EdgeWeightGPS_spatial_inversion_no_route_change_1845.log`. + The plugin reloaded highway-free weights at `+74681ms` + (`H=0.05`, all others `19.0`), then highway-expensive weights at `+235135ms` + (`H=19.0`, all others `0.05`). The four repeated map routes after the flip + produced final `GPSQueryResultFetch 0x7094b8` route records that were exactly + identical to the pre-flip route records: + route 3 vs 7, 4 vs 8, 5 vs 9, and 6 vs 10 all had identical lane handles and + packed metadata. +- Practical conclusion: the spatial `0x44f838` detour is active and changes + many local route-producer edge costs, but it does not change the final + selected world-map route records for the tested player GPS routes. Treat this + hook as a local-search/connector lever, not the decisive full-route weighting + surface. ## Current Installed State - Installed RED4ext plugin is disabled: `Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.dll.disabled`. +- The latest tested DLL is also preserved disabled as: + `Cyberpunk 2077/red4ext/plugins/EdgeWeightGPS/EdgeWeightGPS.dd1423b.dll.disabled`. - There is no active `EdgeWeightGPS.dll` in the plugin directory. -- Source defaults are currently safe/read-only. They should not alter route - behavior unless rebuilt with hook toggles changed. +- Source defaults are currently read-only for route behavior again: + `kEnableGpsSpatialEdgeWeightPatch = false`. Focused final-route result tracing + remains available behind `kEnableGpsQueryResultTraceHooks = true`. - Latest archived test log: - `logs/EdgeWeightGPS_resolve_handle_probe_4650.log`. + `logs/EdgeWeightGPS_spatial_inversion_no_route_change_1845.log`. - Game is cold as of the latest user message. ## New Toolbox Tools @@ -118,16 +135,17 @@ In `red4ext/EdgeWeightGPS/src/Main.cpp`: - `kEnableGpsProviderClassPatch = false` - `kEnableGpsProviderClassPatchTrace = false` - `kEnableGpsTraceHooks = true` -- `kEnableGpsQueryLifecycleHooks = true` +- `kEnableGpsQueryLifecycleHooks = false` - `kEnableGpsRouteJobLifecycleHooks = false` - `kEnableGpsRouteJobStartTrace = false` +- `kEnableGpsQueryResultTraceHooks = true` - `kEnableGpsSpatialEdgeWeightPatch = false` - `kEnableGpsLocalSearchHooks = false` - `kEnableRouteUiTraceHooks = false` -If rebuilt with the current defaults, active hooks are query/async lifecycle -only. The spatial edge-cost patch requires `kEnableGpsSpatialEdgeWeightPatch = -true`. The full local search/cost hooks below require +If rebuilt with the current defaults, active hooks are focused map-route submit +and final route-result fetch tracing only. The spatial edge-cost patch requires +`kEnableGpsSpatialEdgeWeightPatch = true`. The full local search/cost hooks below require `kEnableGpsLocalSearchHooks = true`: - query lifecycle: @@ -348,20 +366,18 @@ Resolver sample findings: ## Next Work -- Install the updated resolver-window probe and run the usual map route - routine. -- Archive the plugin log as - `logs/EdgeWeightGPS_resolve_window_probe_