d3d12: F4 trainer player, vehicle, weapon and world items through the title's natives, money and vehicle parts (D3D12-F4-TRAINER-NATIVES) #3114

Open
matthieupl87-spec wants to merge 9 commits from upstream-pr/3114 into main
matthieupl87-spec commented 2026-12-02 11:30:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T11:30:17Z.


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:

  • Player: invisible, no ragdoll, infinite stamina, fast run, Never wanted (fixed), Money: 20 000 $. Money fills the cash Jason carries up to the game's own cap, through the title's inventory manager. The way to the cash is fraustiz/fro-trainer's (samples/trainer/trainer.hpp, trainer::cash, MIT licence), found from the title's balance native. It is rewritten here, not copied.
  • Vehicle: god mode, boost, repair, clean (dirt and marks), fix tyres, bulletproof tyres, unbreakable lights, flip upright, and Vehicle parts. Vehicle parts only reads the current vehicle's item list, as the garage leaves it, and logs it as hash x quantity.
  • Weapons: infinite ammo (the clip kept full), no reload.

Never wanted on main reads 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_PLAYER and SET_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_build checks 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's warp::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:

  • No traffic, no pedestrians, no random police, moon gravity. The *_DENSITY_MULTIPLIER_THIS_FRAME, SET_CREATE_RANDOM_COPS and SET_GRAVITY_LEVEL natives were taken without error but changed nothing on screen, so these menu items stay as they are on main.
  • Giving weapons. VI_GIVE_ITEM_TO_PED_ASYNC called from here ends the title: it needs a script's task context. The finding is posted in #2570.
  • Vehicle spawning by model. It is a separate PR on top of #3009.

Tested

On 1.0.2.1, Windows 11, diag build through scripts/build-nvidia.ps1. The build has one local commit outside this PR, in run.rs, unrelated.

  • Seen working in game, from the F4 menu:
    • Money took the carried cash from 19 105 to 20 000 (the log shows cash 19105 -> 20000 $). The real balance changes at once. The HUD figure updates at the next purchase.
    • Vehicle parts listed a Ganado's items. After a rear bumper was bought at the garage, its item appeared in the list.
    • Money again, from a later save: cash 14 -> 20000 $. The value was then saved: the next manual save holds it in Jason's inventory.
    • Invisible and fast run.
  • Money needs a cash item to fill. If the character carries no cash at all, the game has no cash item in the inventory. Money then answers "the player's cash was not found in the inventory" and changes nothing. Earning any amount in game (here 14 $) brings the item back, and Money then fills it. Creating the item from nothing would need the title's item give (see the finding in #2570).
  • Used from the menu in game; the title took each call without an error in the log (the effect was not checked one by one): vehicle repair, clean, flip, god mode, boost; infinite ammo, no reload.
  • Not yet tried in game: fix tyres, bulletproof tyres, unbreakable lights, no ragdoll, stamina. They build and their natives resolve in the title's table at start.
  • Unit tests:
    • 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)
  • No game data: python -I scripts/check_no_game_data.py passes.

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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5605505983 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T11:30:17Z. --- Claimed in the coordination issue as: [D3D12-F4-TRAINER-NATIVES](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7344000913) ### 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: - **Player:** invisible, no ragdoll, infinite stamina, fast run, **Never wanted** (fixed), **Money: 20 000 $**. Money fills the cash Jason carries up to the game's own cap, through the title's inventory manager. The way to the cash is fraustiz/fro-trainer's (`samples/trainer/trainer.hpp`, `trainer::cash`, MIT licence), found from the title's balance native. It is rewritten here, not copied. - **Vehicle:** god mode, boost, repair, clean (dirt and marks), fix tyres, bulletproof tyres, unbreakable lights, flip upright, and **Vehicle parts**. Vehicle parts only reads the current vehicle's item list, as the garage leaves it, and logs it as `hash x quantity`. - **Weapons:** infinite ammo (the clip kept full), no reload. **Never wanted** on `main` reads 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_PLAYER` and `SET_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_build` checks 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's `warp::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: - **No traffic, no pedestrians, no random police, moon gravity.** The `*_DENSITY_MULTIPLIER_THIS_FRAME`, `SET_CREATE_RANDOM_COPS` and `SET_GRAVITY_LEVEL` natives were taken without error but changed nothing on screen, so these menu items stay as they are on `main`. - **Giving weapons.** `VI_GIVE_ITEM_TO_PED_ASYNC` called from here ends the title: it needs a script's task context. The finding is posted in #2570. - **Vehicle spawning by model.** It is a separate PR on top of #3009. ### Tested On 1.0.2.1, Windows 11, diag build through `scripts/build-nvidia.ps1`. The build has one local commit outside this PR, in `run.rs`, unrelated. - **Seen working in game, from the F4 menu:** - Money took the carried cash from 19 105 $ to 20 000 $ (the log shows `cash 19105 -> 20000 $`). The real balance changes at once. The HUD figure updates at the next purchase. - Vehicle parts listed a Ganado's items. After a rear bumper was bought at the garage, its item appeared in the list. - Money again, from a later save: `cash 14 -> 20000 $`. The value was then saved: the next manual save holds it in Jason's inventory. - Invisible and fast run. - **Money needs a cash item to fill.** If the character carries no cash at all, the game has no cash item in the inventory. Money then answers "the player's cash was not found in the inventory" and changes nothing. Earning any amount in game (here 14 $) brings the item back, and Money then fills it. Creating the item from nothing would need the title's item give (see the finding in #2570). - **Used from the menu in game; the title took each call without an error in the log** (the effect was not checked one by one): vehicle repair, clean, flip, god mode, boost; infinite ammo, no reload. - **Not yet tried in game:** fix tyres, bulletproof tyres, unbreakable lights, no ragdoll, stamina. They build and their natives resolve in the title's table at start. - **Unit tests:** - `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) - **No game data:** `python -I scripts/check_no_game_data.py` passes. 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
matthieupl87-spec commented 2026-12-02 12:40:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T12:40:57Z.


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:

  • Repair works. Bulletproof tyres work: a shot tyre does not go flat.
  • Vehicle god mode stops the vehicle being destroyed, but the body still dents and the bumpers come off. Repair puts them back.
  • Never wanted (the toggle on 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_PLAYER and SET_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):

  • Spawned vehicles carry a GPS tracker and count as stolen. After a short drive the police come for them. SET_VEHICLE_IS_STOLEN(false), SET_VEHICLE_HAS_BEEN_OWNED_BY_PLAYER(true) and SET_VEHICLE_INFLUENCES_WANTED_LEVEL(false) on the current vehicle do not change that.
    • The script hash names have integrated_tracker, tracker, advanced_tracker and military_tracker. Scripts use them with three unnamed vehicle natives: _0x5F92584040AFFA8B(vehicle, int) -> int, _0xBAF45734DD937C4E(vehicle, int) and _0xF8D9720AB9633C40(vehicle, int).
    • That looks like "has tracker of kind" plus add/remove. I am trying them now. The goal is a vehicle that spawns like one bought at the garage.
  • Spawn inside does not work. GET_CLOSEST_VEHICLE returns 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.
  • Vehicle god mode: I am trying SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED, SET_ENTITY_CAN_BE_DAMAGED and SET_VEHICLE_STRONG so 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345711871 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7345711871). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T12:40:57Z. --- 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:** - Repair works. Bulletproof tyres work: a shot tyre does not go flat. - **Vehicle god mode** stops the vehicle being destroyed, but the body still dents and the bumpers come off. Repair puts them back. - **Never wanted** (the toggle on `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_PLAYER` and `SET_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):** - **Spawned vehicles carry a GPS tracker and count as stolen.** After a short drive the police come for them. `SET_VEHICLE_IS_STOLEN(false)`, `SET_VEHICLE_HAS_BEEN_OWNED_BY_PLAYER(true)` and `SET_VEHICLE_INFLUENCES_WANTED_LEVEL(false)` on the current vehicle do not change that. - The script hash names have `integrated_tracker`, `tracker`, `advanced_tracker` and `military_tracker`. Scripts use them with three unnamed vehicle natives: `_0x5F92584040AFFA8B(vehicle, int) -> int`, `_0xBAF45734DD937C4E(vehicle, int)` and `_0xF8D9720AB9633C40(vehicle, int)`. - That looks like "has tracker of kind" plus add/remove. I am trying them now. The goal is a vehicle that spawns like one bought at the garage. - **Spawn inside does not work.** `GET_CLOSEST_VEHICLE` returns 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. - **Vehicle god mode:** I am trying `SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED`, `SET_ENTITY_CAN_BE_DAMAGED` and `SET_VEHICLE_STRONG` so 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).
MoonEyes commented 2026-12-02 12:41:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:41:46Z.


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:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345733372 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7345733372). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:41:46Z. --- 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`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone 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).
Kal0s-design commented 2026-12-02 13:00:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T13:00:25Z.


Ran natively on Windows 11, head 609eb190b merged into current main (23a51c494, clean merge). I used a plain debug build (overflow checks on) with default features, not the diag profile with diagnostics,mimalloc from the description.

Command (from d3d12/) Result
cargo test --locked -p leonida --bins 48 passed, 0 failed (5 of them in game_actions::effects)
cargo test --locked -p leonida-menu 48 passed, 0 failed
cargo clippy --locked -p leonida --bins --tests nothing in game_actions.rs, game_actions/effects.rs or tree.rs (the one warning is in leonida-gpu/src/host.rs, already on main)
cargo clippy --locked -p leonida-menu --lib nothing in tree.rs

leonida-menu has 48 #[test] functions both on this branch and on current main, so the 49 in the description probably comes from a different base. None of the 20 ids in TOGGLES, GRAVITY and ACTIONS is matched earlier in available, value or apply, so all of them reach effects.

The memory-reading code can run without the game, so I tried it with throwaway tests in effects.rs (not committed).

  1. cash_amount_at on a synthetic inventory. I built the layout from your doc comment in heap memory: the manager map at +0x77C8/+0x77D0, the 0xC0000003 inventory with its tag at +0x0C, and an item map holding two currency_cash items. One item's parent has the player's tag at +0x40 and the other's has a different tag. cash_amount_at returned the player's +0x18 and skipped the other item, which matches what you saw in game.

  2. find_parts never tries the last offset. The scan is 0..block.len().saturating_sub(0x1C). The check needs o + 0x1C <= len, so o == len - 0x1C is 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):

    exact-fit list: None
    

    Only a one-item list ending exactly at PARTS_BLOCK_LEN hits this, so it's narrow. 0..=block.len().saturating_sub(0x1C) should cover it, since word() already gives None past the end, but I didn't run that change. Oversized counts are refused without a panic (cap/count 0x100 in a 0x800 block gives None), and blocks of every length from 0 to 63 bytes don't panic.

  3. map_slots walks count groups. 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_at returns None. That's what the function says it does, and it's right if +0x77C8 holds 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 sends false at 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. Sending no_reload || infinite_ammo from both would avoid that.

Not checked: the game. Nothing that calls natives (keep_up, run, the vehicle resolver at 0xD35050) 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7346209746 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7346209746). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T13:00:25Z. --- Ran natively on Windows 11, head `609eb190b` merged into current `main` (`23a51c494`, clean merge). I used a plain debug build (overflow checks on) with default features, not the `diag` profile with `diagnostics,mimalloc` from the description. | Command (from `d3d12/`) | Result | |---|---| | `cargo test --locked -p leonida --bins` | 48 passed, 0 failed (5 of them in `game_actions::effects`) | | `cargo test --locked -p leonida-menu` | 48 passed, 0 failed | | `cargo clippy --locked -p leonida --bins --tests` | nothing in `game_actions.rs`, `game_actions/effects.rs` or `tree.rs` (the one warning is in `leonida-gpu/src/host.rs`, already on `main`) | | `cargo clippy --locked -p leonida-menu --lib` | nothing in `tree.rs` | `leonida-menu` has 48 `#[test]` functions both on this branch and on current `main`, so the 49 in the description probably comes from a different base. None of the 20 ids in `TOGGLES`, `GRAVITY` and `ACTIONS` is matched earlier in `available`, `value` or `apply`, so all of them reach `effects`. The memory-reading code can run without the game, so I tried it with throwaway tests in `effects.rs` (not committed). 1. **`cash_amount_at` on a synthetic inventory.** I built the layout from your doc comment in heap memory: the manager map at `+0x77C8`/`+0x77D0`, the `0xC0000003` inventory with its tag at `+0x0C`, and an item map holding two `currency_cash` items. One item's parent has the player's tag at `+0x40` and the other's has a different tag. `cash_amount_at` returned the player's `+0x18` and skipped the other item, which matches what you saw in game. 2. **`find_parts` never tries the last offset.** The scan is `0..block.len().saturating_sub(0x1C)`. The check needs `o + 0x1C <= len`, so `o == len - 0x1C` is 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): ``` exact-fit list: None ``` Only a one-item list ending exactly at `PARTS_BLOCK_LEN` hits this, so it's narrow. `0..=block.len().saturating_sub(0x1C)` should cover it, since `word()` already gives `None` past the end, but I didn't run that change. Oversized counts are refused without a panic (cap/count 0x100 in a 0x800 block gives `None`), and blocks of every length from 0 to 63 bytes don't panic. 3. **`map_slots` walks `count` groups.** 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_at` returns `None`. That's what the function says it does, and it's right if `+0x77C8` holds 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 sends `false` at 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. Sending `no_reload || infinite_ammo` from both would avoid that. Not checked: the game. Nothing that calls natives (`keep_up`, `run`, the vehicle resolver at `0xD35050`) 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).
matthieupl87-spec commented 2026-12-02 13:28:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T13:28:19Z.


Run report for the current head, as asked.

  • Head: 609eb190b, merged onto main bf7886746 (merge 3d03fa8a7). One local commit outside both, in run.rs (the LEONIDA_PATCH start-up byte patch, so my story saves load), unrelated to rendering.
  • Build: diag, scripts/build-nvidia.ps1; launched through scripts/play-d3d12.ps1 with LEONIDA_GAME_ACTIONS=1. The shader cache was rebuilt for this build before the run.
  • Rig: NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.47, Windows 11 Pro; Ryzen 5 5600X, 32 GB DDR4.
  • Time in the world: 310 s after loading (fps sampled once a second from the window title).
  • Device lost / crashes: 0. The run ended normally when I closed the window.
  • Rendered fps (window title): median 15, p10 8, p90 19. CPU about 86 % busy, GPU about 29 %: the CPU is the limit on this rig.
  • Stutter: driving fast into new areas still drops to about 1-2 fps for about 2 s while the world loads, then it recovers. There were 6 such seconds under 3 fps in the run. This looks like the streaming stutter already known on main, not the menu.
  • Menu: the F4 trainer was available in this run but not used, so the run checks the rendering only.
  • main alone: not run on this exact main yet. My earlier runs of main on this rig gave a similar 13-15 fps median.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7346932679 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7346932679). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T13:28:19Z. --- Run report for the current head, as asked. - **Head:** `609eb190b`, merged onto `main` `bf7886746` (merge `3d03fa8a7`). One local commit outside both, in `run.rs` (the `LEONIDA_PATCH` start-up byte patch, so my story saves load), unrelated to rendering. - **Build:** diag, `scripts/build-nvidia.ps1`; launched through `scripts/play-d3d12.ps1` with `LEONIDA_GAME_ACTIONS=1`. The shader cache was rebuilt for this build before the run. - **Rig:** NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.47, Windows 11 Pro; Ryzen 5 5600X, 32 GB DDR4. - **Time in the world:** 310 s after loading (fps sampled once a second from the window title). - **Device lost / crashes:** 0. The run ended normally when I closed the window. - **Rendered fps (window title):** median 15, p10 8, p90 19. CPU about 86 % busy, GPU about 29 %: the CPU is the limit on this rig. - **Stutter:** driving fast into new areas still drops to about 1-2 fps for about 2 s while the world loads, then it recovers. There were 6 such seconds under 3 fps in the run. This looks like the streaming stutter already known on `main`, not the menu. - **Menu:** the F4 trainer was available in this run but not used, so the run checks the rendering only. - **`main` alone:** not run on this exact `main` yet. My earlier runs of `main` on this rig gave a similar 13-15 fps median. AI-assisted (Claude Code).
matthieupl87-spec commented 2026-12-02 13:36:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T13:36:27Z.


Second run on the same build (head 609eb190b merged onto main bf7886746), this time using the menu.

  • Time in the world: 245 s. Rendered fps (window title): median 18, p10 13, p90 21.
  • Device lost / crashes: 0.
  • Menu items used, each taken by the title with no error in the actions log:
    • Player: infinite stamina, fast run, invisible (on, then off).
    • Weapons: infinite ammo, no reload.
    • World: moon gravity, no traffic, no peds, no random police (each on, then off, twice).
    • Also the existing spawn cheats and the teleport from main.
  • The F4 trainer draws correctly over the game, opened and closed many times.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7347147948 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7347147948). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T13:36:27Z. --- Second run on the same build (head `609eb190b` merged onto `main` `bf7886746`), this time using the menu. - **Time in the world:** 245 s. Rendered fps (window title): median 18, p10 13, p90 21. - **Device lost / crashes:** 0. - **Menu items used**, each taken by the title with no error in the actions log: - Player: infinite stamina, fast run, invisible (on, then off). - Weapons: infinite ammo, no reload. - World: moon gravity, no traffic, no peds, no random police (each on, then off, twice). - Also the existing spawn cheats and the teleport from `main`. - **The F4 trainer draws correctly** over the game, opened and closed many times. AI-assisted (Claude Code).
matthieupl87-spec commented 2026-12-02 13:39:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T13:39:50Z.


Pushed 057bd7cc2:

  • Never wanted now works on 1.0.2.1. It goes through the title's natives instead of the wanted-level read, which gave 0 while the police chased. Crimes gave no stars in game.
  • No traffic, no pedestrians and no random police are left out. Their natives were taken without error but changed nothing on screen.

I will post a new run report on this head. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7347240430 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7347240430). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T13:39:50Z. --- Pushed `057bd7cc2`: - **Never wanted** now works on 1.0.2.1. It goes through the title's natives instead of the wanted-level read, which gave 0 while the police chased. Crimes gave no stars in game. - **No traffic, no pedestrians and no random police are left out.** Their natives were taken without error but changed nothing on screen. I will post a new run report on this head. AI-assisted (Claude Code).
matthieupl87-spec commented 2026-12-02 13:59:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T13:59:39Z.


Run report on the current head feb5d5453, merged onto main bf7886746 (merge 91b782a09). As before, there is one local commit outside both, in run.rs (the LEONIDA_PATCH start-up byte patch, so my story saves load), unrelated to rendering.

  • Rig: NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.47, Windows 11 Pro; Ryzen 5 5600X, 32 GB DDR4. Diag build, scripts/play-d3d12.ps1, LEONIDA_GAME_ACTIONS=1.
  • Time: 279 s in the world, out of 331 s from launch to closing the window. The other seconds are loading and menus, where the title is capped at 30 fps; I left them out of the figures.
  • Device lost / crashes: 0. The run ended normally when I closed the window.
  • Rendered fps (window title): median 14, p10 12, p90 18. CPU about 86 %, GPU about 28 %: the CPU is the limit on this rig.
  • Stutter: 2 s under 3 fps, while driving into new areas. The same streaming stutter as on the earlier runs.

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 since 057bd7cc2 is the moon gravity item left out of effects.rs.

In game, the menu items in this PR:

  • Work: Money, Vehicle parts, Never wanted, Repair, Bulletproof tyres, Invisible, Fast run.
  • Used without an error, effect not checked one by one: Clean, Flip, Vehicle god mode, Boost, Infinite ammo, No reload, Stamina.
  • Left out: No traffic, No pedestrians, No random police and Moon gravity. They changed nothing in game.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7347805764 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7347805764). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T13:59:39Z. --- Run report on the current head `feb5d5453`, merged onto `main` `bf7886746` (merge `91b782a09`). As before, there is one local commit outside both, in `run.rs` (the `LEONIDA_PATCH` start-up byte patch, so my story saves load), unrelated to rendering. - **Rig:** NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.47, Windows 11 Pro; Ryzen 5 5600X, 32 GB DDR4. Diag build, `scripts/play-d3d12.ps1`, `LEONIDA_GAME_ACTIONS=1`. - **Time:** 279 s in the world, out of 331 s from launch to closing the window. The other seconds are loading and menus, where the title is capped at 30 fps; I left them out of the figures. - **Device lost / crashes:** 0. The run ended normally when I closed the window. - **Rendered fps (window title):** median 14, p10 12, p90 18. CPU about 86 %, GPU about 28 %: the CPU is the limit on this rig. - **Stutter:** 2 s under 3 fps, while driving into new areas. The same streaming stutter as on the earlier runs. 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 since `057bd7cc2` is the moon gravity item left out of `effects.rs`. **In game, the menu items in this PR:** - **Work:** Money, Vehicle parts, Never wanted, Repair, Bulletproof tyres, Invisible, Fast run. - **Used without an error, effect not checked one by one:** Clean, Flip, Vehicle god mode, Boost, Infinite ammo, No reload, Stamina. - **Left out:** No traffic, No pedestrians, No random police and Moon gravity. They changed nothing in game. AI-assisted (Claude Code).
matthieupl87-spec commented 2026-12-02 14:02:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T14:02:52Z.


@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 head 29bcd2471 (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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7347894700 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7347894700). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T14:02:52Z. --- @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 head `29bcd2471` ([comment](https://github.com/ProjectLeonida/mandy/pull/3009#issuecomment-7347464156)). 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).
matthieupl87-spec commented 2026-12-02 14:10:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T14:10:55Z.


@Kal0s-design, thank you for the review. Pushed 5bd4b50f4:

  • No reload / Infinite ammo: both now send no_reload || infinite_ammo to SET_PED_INFINITE_AMMO_CLIP, so turning one off no longer takes the clip from the other. There is a unit test for it.
  • find_parts exact fit: the range is now 0..=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): its cash::Carried walks that many groups of 16 control bytes plus 16 slots, the same as map_slots here. The item map's +0x60 is 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 leonida filter (16 passed), leonida-menu (48 passed), check_no_game_data.py passes. Not run in game yet; the change touches only these two items.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7348121276 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7348121276). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T14:10:55Z. --- @Kal0s-design, thank you for the review. Pushed `5bd4b50f4`: - **No reload / Infinite ammo:** both now send `no_reload || infinite_ammo` to `SET_PED_INFINITE_AMMO_CLIP`, so turning one off no longer takes the clip from the other. There is a unit test for it. - **`find_parts` exact fit:** the range is now `0..=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`): its `cash::Carried` walks that many groups of 16 control bytes plus 16 slots, the same as `map_slots` here. The item map's `+0x60` is 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 `leonida` filter (16 passed), `leonida-menu` (48 passed), `check_no_game_data.py` passes. Not run in game yet; the change touches only these two items. AI-assisted (Claude Code).
matthieupl87-spec commented 2026-12-02 15:33:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T15:33:10Z.


@MoonEyes, one small addition while you review. Pushed c4ebe52de:

  • Remove tracker (Vehicle page): takes the GPS tracker off the vehicle the player is in. The natives are the unnamed ones the title's scripts call with a vehicle and a tracker kind (_0x5F92584040AFFA8B asks, 0xBAF45734DD937C4E and 0xF8D9720AB9633C40 set). It gives the slot's kind and 0 to each setter, then the kind and the tracker it holds, and logs each step.
  • Done by itself after a spawn: after the menu's vehicle spawn, the next vehicle the player gets into has its tracker taken out (waited for a few minutes; never the one the player was already in). The menu item stays for other vehicles.

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 (when vehicle_spawn::take_spot() gives a spot) covers its 315 models. Happy to send that as a follow-up.

Tests: the leonida filter (16 passed), the menu crate (48 passed), check_no_game_data.py passes. Not run in game on this branch itself.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7350519180 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7350519180). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T15:33:10Z. --- @MoonEyes, one small addition while you review. Pushed `c4ebe52de`: - **Remove tracker (Vehicle page):** takes the GPS tracker off the vehicle the player is in. The natives are the unnamed ones the title's scripts call with a vehicle and a tracker kind (`_0x5F92584040AFFA8B` asks, `0xBAF45734DD937C4E` and `0xF8D9720AB9633C40` set). It gives the slot's kind and 0 to each setter, then the kind and the tracker it holds, and logs each step. - **Done by itself after a spawn:** after the menu's vehicle spawn, the next vehicle the player gets into has its tracker taken out (waited for a few minutes; never the one the player was already in). The menu item stays for other vehicles. **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 (when `vehicle_spawn::take_spot()` gives a spot) covers its 315 models. Happy to send that as a follow-up. Tests: the `leonida` filter (16 passed), the menu crate (48 passed), `check_no_game_data.py` passes. Not run in game on this branch itself. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 17:07:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T17:07:01Z.


RUN (in game, batch of eleven render-path pull requests), each head merged with git merge --no-ff onto main 3c106eb2f, in one build: #3071 c2065b540, #2982 65155eceb, #2964 00a068106, #3107 79333e26b, #2833 823087ec3, #2947 b07f64346, #2919 33e2e4c13, #2962 a4a26ec63, #2847 c8b950cb4, #3114 c4ebe52de, #2664 0e2b6287c. 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.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 16.2, mean 16.1
Rendered fps, last 120 s median 15.1

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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7352921107 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7352921107). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T17:07:01Z. --- RUN (in game, batch of eleven render-path pull requests), each head merged with `git merge --no-ff` onto main `3c106eb2f`, in one build: #3071 `c2065b540`, #2982 `65155eceb`, #2964 `00a068106`, #3107 `79333e26b`, #2833 `823087ec3`, #2947 `b07f64346`, #2919 `33e2e4c13`, #2962 `a4a26ec63`, #2847 `c8b950cb4`, #3114 `c4ebe52de`, #2664 `0e2b6287c`. 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. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 16.2, mean 16.1 | | Rendered fps, last 120 s | median 15.1 | 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).
MoonEyes commented 2026-12-02 18:02:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:15Z.


Light code review only, not built (Windows-only leonida app). Ready, on the in-game gate already passed.

  • Head: c4ebe52de, merge base 8422def75, 206 behind current main 45dc41f95. A trial merge is clean.
  • CI: the runs on this head are waiting for maintainer approval (action_required).
  • In-game gate: MoonEyes's batch of eleven (17:07) includes #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.rs and leonida-menu/src/tree.rs:

  • Effects run on the title's thread from the game-actions update, through the title's own natives. Memory places are gated by known_build, the same check as warp::supported_build, so a different build reports "not available" instead of writing. That is the right guard for build-specific offsets.
  • Native hashes are checked against the title's native table at start. The cash path is rewritten from an MIT-licensed reference, with attribution in the PR body.
  • Items that showed no effect in game (density, random cops, gravity) were left out instead of being shipped as no-ops. That is consistent with "fix, don't disable".
  • Clean-room: no game data is added. Offsets and hashes are facts measured from the user's own copy.

Verdict: ready.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353882181 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7353882181). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:02:15Z. --- **Light code review only, not built (Windows-only `leonida` app). Ready, on the in-game gate already passed.** - Head: `c4ebe52de`, merge base `8422def75`, 206 behind current `main` `45dc41f95`. A trial merge is clean. - CI: the runs on this head are waiting for maintainer approval (`action_required`). - In-game gate: MoonEyes's batch of eleven (17:07) includes `#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.rs` and `leonida-menu/src/tree.rs`:** - Effects run on the title's thread from the game-actions update, through the title's own natives. Memory places are gated by `known_build`, the same check as `warp::supported_build`, so a different build reports "not available" instead of writing. That is the right guard for build-specific offsets. - Native hashes are checked against the title's native table at start. The cash path is rewritten from an MIT-licensed reference, with attribution in the PR body. - Items that showed no effect in game (density, random cops, gravity) were left out instead of being shipped as no-ops. That is consistent with "fix, don't disable". - Clean-room: no game data is added. Offsets and hashes are facts measured from the user's own copy. Verdict: **ready**. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
matthieupl87-spec commented 2026-12-02 22:10:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-02T22:10:54Z.


@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_AREA with the flag 0xffff, 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360336316 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7360336316). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-02T22:10:54Z. --- @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_AREA` with the flag `0xffff`, 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).
fiestorra commented 2026-12-02 23:28:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:28:52Z.


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

Own commit c4ebe52de — game_actions/effects.rs (+96), game_actions.rs (+4), leonida-menu/src/tree.rs (+1)

Ran

cargo test -p leonida     48 passed (the binary's own tests); 0 failed

But note what that number is: the existing suite. This commit adds no #[test] and no test function — I searched the diff for both. So red 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.tracker that queries the current vehicle's tracker slot through TRACKER_QUERY, and if it is not zero tries six setter/argument shapes in order (TRACKER_SET_B and TRACKER_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:

  1. The loop reads any change as success. 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)).
  2. These are unnamed natives with guessed argument shapes, called on a live vehicle. nativedb does 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 != 0 first, 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

  • Any of it in the game: no title, and the natives are unnamed — the only way to know which setter removes is a run with a vehicle and a tracker, which is what the logging exists for.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7362051218 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7362051218). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T23:28:52Z. --- ## 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 | | | |---|---| | Own commit | `c4ebe52de` — `game_actions/effects.rs` (+96), `game_actions.rs` (+4), `leonida-menu/src/tree.rs` (+1) | **Ran** ``` cargo test -p leonida 48 passed (the binary's own tests); 0 failed ``` **But note what that number is**: the **existing** suite. **This commit adds no `#[test]` and no test function** — I searched the diff for both. **So `red 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.tracker` that **queries the current vehicle's `tracker` slot** through `TRACKER_QUERY`, and if it is not zero **tries six setter/argument shapes in order** (`TRACKER_SET_B` and `TRACKER_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:** 1. **The loop reads *any* change as success.** `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)`). 2. **These are unnamed natives with guessed argument shapes, called on a live vehicle.** `nativedb` does 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 != 0` first**, **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 - **Any of it in the game**: no title, and the natives are unnamed — **the only way to know which setter removes is a run with a vehicle and a tracker**, which is what the logging exists for. Written with an AI assistant.
matthieupl87-spec commented 2026-12-03 12:36:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by matthieupl87-spec on 2026-12-03T12:36:55Z.


@fiestorra thanks for the review of c4ebe52de. Both points are fair. What changed, in 58b8f1ccd (pushed to this branch):

  1. Any change read as success. The loop now stops only when the slot reads 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.
  2. A probe, not a finished feature. I kept the entry's name as 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 0xbcd8a25f before 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7378576391 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3114#issuecomment-7378576391). Originally posted by [matthieupl87-spec](https://github.com/matthieupl87-spec) on 2026-12-03T12:36:55Z. --- @fiestorra thanks for the review of `c4ebe52de`. Both points are fair. What changed, in `58b8f1ccd` (pushed to this branch): 1. **Any change read as success.** The loop now stops only when the slot reads `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. 2. **A probe, not a finished feature.** I kept the entry's name as `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 `0xbcd8a25f` before 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).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3114:upstream-pr/3114'
git switch 'upstream-pr/3114'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3114'
git switch 'upstream-pr/3114'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3114'
git switch 'upstream-pr/3114'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3114'
git switch 'main'
git merge --squash 'upstream-pr/3114'
git switch 'main'
git merge --ff-only 'upstream-pr/3114'
git switch 'main'
git merge 'upstream-pr/3114'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!3114
No description provided.