d3d12: F4 trainer player, vehicle, weapon and world items through the title's natives, money and vehicle parts (D3D12-F4-TRAINER-NATIVES) #3114
Closed
leonida/mandy
matthieupl87-spec wants to merge 9 commits from
github-pr/3114 into main
pull from: github-pr/3114
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!3114
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3114"
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?
Pull request closed
Please reopen this pull request to perform a merge.
Claimed in the coordination issue as: D3D12-F4-TRAINER-NATIVES
What and why
The F4 trainer's player, vehicle, weapon and world items had no effect on 1.0.2.1. This wires them through the title's own natives, run from the game-actions update on the title's thread (
d3d12/apps/leonida/src/game_actions/effects.rs), plus two items read or written in memory:samples/trainer/trainer.hpp,trainer::cash, MIT licence), found from the title's balance native. It is rewritten here, not copied.hash x quantity.Never wanted on
mainreads the wanted level at a place that gives 0 on 1.0.2.1 while the police chase, so it never cleared anything. It now goes through the title's natives:_SET_DISABLE_PLAYER_WANTED_LEVEL,SET_POLICE_IGNORE_PLAYERandSET_MAX_WANTED_LEVEL(0), with the old maximum put back when it is turned off. Seen in game: crimes gave no stars.A toggle is given again now and then, because a new ped or vehicle (after a death, a character switch or another car) does not carry it. A toggle whose subject is missing (no vehicle) waits quietly.
The memory places are 1.0.2.1's only.
known_buildchecks the player place before anything is read or written; on another build those items say they are not available. This is the same check as #3009'swarp::supported_build. The player place is found by its pattern at start, so it lands on that exact address only in this build. The native hashes are from the community nativedb (CC BY 4.0) and were checked against the title's native table at start.Not in this PR:
*_DENSITY_MULTIPLIER_THIS_FRAME,SET_CREATE_RANDOM_COPSandSET_GRAVITY_LEVELnatives were taken without error but changed nothing on screen, so these menu items stay as they are onmain.VI_GIVE_ITEM_TO_PED_ASYNCcalled from here ends the title: it needs a script's task context. The finding is posted in #2570.Tested
On 1.0.2.1, Windows 11, diag build through
scripts/build-nvidia.ps1. The build has one local commit outside this PR, inrun.rs, unrelated.to 20 000(the log showscash 19105 -> 20000 $). The real balance changes at once. The HUD figure updates at the next purchase.cash 14 -> 20000 $. The value was then saved: the next manual save holds it in Jason's inventory.cargo test --locked --profile diag -p leonida --features diagnostics,mimalloc -- game_actions vehicle item_names(15 passed)cargo test --locked --profile diag -p leonida-menu(49 passed)python -I scripts/check_no_game_data.pypasses.GPUs tested: NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.47, Windows 11 Pro
AI-assisted: yes. Claude Code (Claude Opus 5.5) wrote the code with me. A separate read-only Claude reviewer agent read the diff before this PR.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Progress from more play-testing on 1.0.2.1, and where the menu is going next. Same rig as in the description.
Confirmed in game since the description:
main) alone does not stop stars: crimes still bring the police. On my local branch, a toggle that also calls_SET_DISABLE_PLAYER_WANTED_LEVEL,SET_POLICE_IGNORE_PLAYERandSET_MAX_WANTED_LEVEL(0)works, but only with Never wanted on as well. With both on, no police come at all. I will bring it here once I know which of those calls does the work.Open problems I am working on (local branch, not in this PR yet):
SET_VEHICLE_IS_STOLEN(false),SET_VEHICLE_HAS_BEEN_OWNED_BY_PLAYER(true)andSET_VEHICLE_INFLUENCES_WANTED_LEVEL(false)on the current vehicle do not change that.integrated_tracker,tracker,advanced_trackerandmilitary_tracker. Scripts use them with three unnamed vehicle natives:_0x5F92584040AFFA8B(vehicle, int) -> int,_0xBAF45734DD937C4E(vehicle, int)and_0xF8D9720AB9633C40(vehicle, int).GET_CLOSEST_VEHICLEreturns 0 on this build every time: within 4 m of the spot where the vehicle was just created, both with flags 70 and 0. So the spawned vehicle's handle has to come another way.SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED,SET_ENTITY_CAN_BE_DAMAGEDandSET_VEHICLE_STRONGso the body does not dent.Each piece will come as a separate PR once it works in game.
A word from me (Pooldead): my PC is a Ryzen 5 5600X, an RTX 5070 Ti and 32 GB of DDR4. The game runs at about 15 fps here. I am waiting for the optimisations the project brings, and meanwhile I prefer to contribute to the menu: I can run it and do the tests in game. Thank you all for contributing to this project. It is magnificent.
AI-assisted (Claude Code).
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Ran natively on Windows 11, head
609eb190bmerged into currentmain(23a51c494, clean merge). I used a plain debug build (overflow checks on) with default features, not thediagprofile withdiagnostics,mimallocfrom the description.d3d12/)cargo test --locked -p leonida --binsgame_actions::effects)cargo test --locked -p leonida-menucargo clippy --locked -p leonida --bins --testsgame_actions.rs,game_actions/effects.rsortree.rs(the one warning is inleonida-gpu/src/host.rs, already onmain)cargo clippy --locked -p leonida-menu --libtree.rsleonida-menuhas 48#[test]functions both on this branch and on currentmain, so the 49 in the description probably comes from a different base. None of the 20 ids inTOGGLES,GRAVITYandACTIONSis matched earlier inavailable,valueorapply, so all of them reacheffects.The memory-reading code can run without the game, so I tried it with throwaway tests in
effects.rs(not committed).cash_amount_aton a synthetic inventory. I built the layout from your doc comment in heap memory: the manager map at+0x77C8/+0x77D0, the0xC0000003inventory with its tag at+0x0C, and an item map holding twocurrency_cashitems. One item's parent has the player's tag at+0x40and the other's has a different tag.cash_amount_atreturned the player's+0x18and skipped the other item, which matches what you saw in game.find_partsnever tries the last offset. The scan is0..block.len().saturating_sub(0x1C). The check needso + 0x1C <= len, soo == len - 0x1Cis never tried. Here is a 0x1C-byte block that holds a complete one-item list (cap 1, count 1, first 9, 0, then the item with id 9):Only a one-item list ending exactly at
PARTS_BLOCK_LENhits this, so it's narrow.0..=block.len().saturating_sub(0x1C)should cover it, sinceword()already givesNonepast the end, but I didn't run that change. Oversized counts are refused without a panic (cap/count 0x100 in a 0x800 block givesNone), and blocks of every length from 0 to 63 bytes don't panic.map_slotswalkscountgroups. This one is a question. With the player's inventory in the second group of a two-group map and the count word set to 1,cash_amount_atreturnsNone. That's what the function says it does, and it's right if+0x77C8holds the number of groups. If it holds the number of entries, an inventory in a later group would not be found. Do you know which it is?From reading the code (no test): No reload and Infinite ammo both call
SET_PED_INFINITE_AMMO_CLIP(ped, on). With both on, switching one off sendsfalseat the next update, and the clip stays finite until the other toggle's next refresh. That's up to 15 updates if Infinite ammo is still on, up to 60 if No reload is. It could look like turning off No reload also turned off Infinite ammo. Sendingno_reload || infinite_ammofrom both would avoid that.Not checked: the game. Nothing that calls natives (
keep_up,run, the vehicle resolver at0xD35050) can run without the title, and I had no 1.0.2.1 image, so the hashes and places weren't checked against the binary either.GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
Run report for the current head, as asked.
609eb190b, merged ontomainbf7886746(merge3d03fa8a7). One local commit outside both, inrun.rs(theLEONIDA_PATCHstart-up byte patch, so my story saves load), unrelated to rendering.scripts/build-nvidia.ps1; launched throughscripts/play-d3d12.ps1withLEONIDA_GAME_ACTIONS=1. The shader cache was rebuilt for this build before the run.main, not the menu.mainalone: not run on this exactmainyet. My earlier runs ofmainon this rig gave a similar 13-15 fps median.AI-assisted (Claude Code).
Second run on the same build (head
609eb190bmerged ontomainbf7886746), this time using the menu.main.AI-assisted (Claude Code).
Pushed
057bd7cc2:I will post a new run report on this head. AI-assisted (Claude Code).
Run report on the current head
feb5d5453, merged ontomainbf7886746(merge91b782a09). As before, there is one local commit outside both, inrun.rs(theLEONIDA_PATCHstart-up byte patch, so my story saves load), unrelated to rendering.scripts/play-d3d12.ps1,LEONIDA_GAME_ACTIONS=1.Together with the two runs above on
057bd7cc2(0 crashes, medians 15 and 18 fps), this head has shown no rendering problem here. The only change since057bd7cc2is the moon gravity item left out ofeffects.rs.In game, the menu items in this PR:
AI-assisted (Claude Code).
@MoonEyes, a note on scope, so the run above is not misread: vehicle spawning by model is not in this PR, and it was not in the build I ran. In that build, Spawn selected still behaves as on
main(the model is not found on 1.0.2.1).The spawn fix is offered to #3009 instead, since it builds on Phlanka's spawner: one commit,
623779c2a, on top of #3009's head29bcd2471(comment). With it, the 315 models of 1.0.2.1 spawn on the ground in front of the player; I tested that separately (0 crashes).The run report above covers only this PR's head
feb5d5453.AI-assisted (Claude Code).
@Kal0s-design, thank you for the review. Pushed
5bd4b50f4:no_reload || infinite_ammotoSET_PED_INFINITE_AMMO_CLIP, so turning one off no longer takes the clip from the other. There is a unit test for it.find_partsexact fit: the range is now0..=block.len().saturating_sub(0x1C). A one-item list that ends exactly at the end of the block is in the test.+0x77C8: it is the number of groups. That is how fraustiz/fro-trainer reads the title's balance native (_0x816B3FF0E9A2B799): itscash::Carriedwalks that many groups of 16 control bytes plus 16 slots, the same asmap_slotshere. The item map's+0x60is read the same way. In game, on 1.0.2.1, this found Jason's inventory and his cash every time I used Money. I did not log the count's value, though, so the game runs do not prove it on their own: if Jason's inventory sits in the first group, both readings find it.Tests: the
leonidafilter (16 passed),leonida-menu(48 passed),check_no_game_data.pypasses. Not run in game yet; the change touches only these two items.AI-assisted (Claude Code).
@MoonEyes, one small addition while you review. Pushed
c4ebe52de:_0x5F92584040AFFA8Basks,0xBAF45734DD937C4Eand0xF8D9720AB9633C40set). It gives the slot's kind and 0 to each setter, then the kind and the tracker it holds, and logs each step.Seen in game (my local build, which also has #3009's spawn and one local commit outside this PR, in
run.rs, unrelated): spawned cars, then got in. The car is no longer tracked and counts as the player's (Jason / Lucia). Also seen when spawning while already driving an earlier spawned car. Not proven: the ask native still returns the same value after the setters, so which setter does the work is not known yet; the log shows all of them.For #3009: the automatic removal hangs on one call,
effects::spawned(self, frame). In this PR it is on the cheat spawn path. Once both PRs are in, the same line after #3009's spawn (whenvehicle_spawn::take_spot()gives a spot) covers its 315 models. Happy to send that as a follow-up.Tests: the
leonidafilter (16 passed), the menu crate (48 passed),check_no_game_data.pypasses. Not run in game on this branch itself.AI-assisted (Claude Code).
RUN (in game, batch of eleven render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #3071c2065b540, #298265155eceb, #296400a068106, #310779333e26b, #2833823087ec3, #2947b07f64346, #291933e2e4c13, #2962a4a26ec63, #2847c8b950cb4, #3114c4ebe52de, #26640e2b6287c. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps today on main with single pull requests or other batches. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; free system memory was low (median 0.6 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of this batch is not counted: two runs were started at the same time by mistake on one GPU (no device loss in either, but the measure is not clean).
AI-assisted (Claude Code).
Light code review only, not built (Windows-only
leonidaapp). Ready, on the in-game gate already passed.c4ebe52de, merge base8422def75, 206 behind currentmain45dc41f95. A trial merge is clean.action_required).#3114 c4ebe52de, this exact head. More than 300 s in the world, 0 device lost, verdict PASS. The author also ran it in game on earlier heads.Review of
d3d12/apps/leonida/src/game_actions/effects.rs(757 new lines),game_actions.rsandleonida-menu/src/tree.rs:known_build, the same check aswarp::supported_build, so a different build reports "not available" instead of writing. That is the right guard for build-specific offsets.Verdict: ready.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@MoonEyes for information, not a change to this PR: on my local branch I now have a working No traffic for 1.0.2.1. It came out of this PR, where No traffic was removed for having no effect. The details are in #3009: https://github.com/ProjectLeonida/mandy/pull/3009#issuecomment-7360322933. In short:
CLEAR_AREAwith the flag0xffff, every 2 s around the player, and the player's own vehicle kept.In game, the game felt smoother with the roads empty: 22-25 fps at moments, where this area usually gives 14-18. To be fair, the median over one measured run did not move: 14 fps without it (225 s) and 14 with it (500 s). So I can only say it costs nothing; a gain is not shown yet. If it is wanted, I can open it as a separate PR after #3114, with a full run report.
AI-assisted (Claude Code).
VERIFY-3114 — Windows nativo: la suite de la app pasa, el commit no trae ningún test, y hay una decisión que merece revisión
c4ebe52de—game_actions/effects.rs(+96),game_actions.rs(+4),leonida-menu/src/tree.rs(+1)Ran
But note what that number is: the existing suite. This commit adds no
#[test]and no test function — I searched the diff for both. Sored not constructible, and the behaviour is a native call against the title's memory, which no test here can reach.What it adds: an F4 action
vehicle.trackerthat queries the current vehicle'strackerslot throughTRACKER_QUERY, and if it is not zero tries six setter/argument shapes in order (TRACKER_SET_BandTRACKER_SET_A, with[slot, 0],[held],[0]), re-querying after each and stopping at the first that changes the value. The comment says the two setters are "void (add / remove, which is which not known yet)".Two things I would not let through without a sentence in the body, and neither is a refusal:
if after != before { break; }— if a setter replaces the tracker with a different one instead of removing it, the query changes, the loop stops, and the action reports what looks like a removal. The action is named after removing; a check of "it changed" is weaker than "it is zero", and the zero case is the one the code already knows how to test (before == 0→(none)).nativedbdoes not name them; the argument lists here are the author's inference. A wrong arity or a wrong kind in a native call is not a no-op — the safest shape for a probe is the one the code already has (log before, try, log after, and stop), and it does that — but the F4 entry reads like a finished feature, and on this evidence it is a probe. The description or the entry should say so.The part I want to credit: it checks
before != 0first, logs every attempt with the setter and the arguments ({setter:#018x}{rest:x?} -> {after:#010x}), and stops on the first change instead of running all six blindly. That is how a probe should be written.What I could not test
Written with an AI assistant.
@fiestorra thanks for the review of
c4ebe52de. Both points are fair. What changed, in58b8f1ccd(pushed to this branch):0. The log line ends with(removed)when it ended empty and(still held)otherwise, so a setter that swaps the tracker for another one is no longer reported as a removal.Remove tracker: the description says it tries to take the tracker off, and the log line now says honestly whether the slot ended empty. The natives stay unnamed and their argument shapes guessed (said in the code comment).Still true: no test. The behaviour is native calls on a live vehicle, so I have no red test to offer for it.
One thing from my own runs (02-03/12, several sessions, no crash): in every log the slot read
0xbcd8a25fbefore and after all six tries, also when the tracker looked gone in game. So either the query does not read what I think it reads, or no setter shape removes it. With this code (run today in my local build, not on this branch's head) the action now says(still held)in that case instead of claiming success.AI-assisted (Claude Code).
Hi, Pooldead here, the author of this pull request (it shows as "matthieupl87-spec" since the move from GitHub). I'm still around and following it from this account. I'm waiting for the maintainers' feedback before I go on with the F4 menu work.
Closing as a duplicate of #3391, which is the same change re-posted by the same author on this forge: the newer one carries these commits plus weapons.rs and docs/mod-menu.md. Review and merge happen on #3391.
Closed by Moon's agent during PR triage, on Moon's written authorization.