First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row or F7 (off by default, build 1.0.2.1) #447

Open
Sheppard wants to merge 2 commits from Sheppard/Darner:feature/first-person-toggle into Main
First-time contributor

Title:
[pr-feature][input] First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row, F7 or both sticks clicked (off by default, build 1.0.2.1)

Contributor role (optional)

  • Fluxer ID: 1577758856375697410

What it changes

  • The problem on main: there is no way into the title's own first-person view except the known pad glitch (phone up in a car, then B and the view button together). Read from the code and seen in the game.

The title's own test for first person (0x140b79480) is true when the view mode at [0x145073c20() + 0x98] is 2; its camera selector (0x1408317a0) then picks the first-person camera. A new module, crates/darner-hle/src/fptrace.rs, puts an entry hook on that selector (the same callhook::hook_entry the native mouse hook uses, prologue checked) and keeps the view mode at 2 while the toggle is on. Switched off, it puts back the value it found. No camera is added and nothing else in the title is written.

Three ways to switch it, all the same toggle:

  • DARNER_FIRST_PERSON=1, and a live F1 row FIRST-PERSON VIEW on the controls page (wired like DARNER_VEHICLE_AUTO_CENTER, saved with the other settings);
  • F7;

On another build the prologue differs, the hook is not installed and the log says so. The module's doc records what was tried and did not work, so nobody repeats it.

How it was tested

  • Tested revision: 4400617 (this branch, on main 47d21cd).
  • Commands and results: see the gates below; cargo xtask policy --staged: 9 files ok.
  • Changes a default: no. Off unless switched on.
  • A/B result: not a change of a default and no speed claim. Checked by switching it on and off in the game (below).
  • Gates run on that revision (the three in AGENTS.md; there is no CI): GATES_LINE
  • Gameplay: RTX 3090 Ti, Windows 11, Xbox pad, Series S profile, DLSS performance, no frame generation, no ray tracing, release build. On foot and driving: the F1 row, F7 and both sticks each switch first person on and off, several times in a row. There is a short black cut at the change.
  • Shader wave sizes tested: not relevant.
  • Hardware dependence: likely general (it writes one value of the title's, no GPU work); untested on AMD and Intel cards.
  • Coverage gaps: not tested: aiming and shooting, cutscenes, missions, saving and loading with it on, the Series X profile, keyboard and mouse aiming in first person. Both sticks keep their own game actions while pressed. F7 is fixed, not in bindings.ini.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none on first person (searched open and closed issues and pull requests for "first person", "first-person", "camera", "view mode"). The same files are touched by #154, #302, #429 (F1 menu and input) and #75, #143, #431 (F1 rows and locales); none changes the same lines' meaning.
  • Replaces or overlaps: none found

🤖 Generated with Claude Code

Title: [pr-feature][input] First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row, F7 or both sticks clicked (off by default, build 1.0.2.1) ## Contributor role (optional) - Fluxer ID: 1577758856375697410 ## What it changes - The problem on main: there is no way into the title's own first-person view except the known pad glitch (phone up in a car, then B and the view button together). Read from the code and seen in the game. The title's own test for first person (`0x140b79480`) is true when the view mode at `[0x145073c20() + 0x98]` is 2; its camera selector (`0x1408317a0`) then picks the first-person camera. A new module, `crates/darner-hle/src/fptrace.rs`, puts an entry hook on that selector (the same `callhook::hook_entry` the native mouse hook uses, prologue checked) and keeps the view mode at 2 while the toggle is on. Switched off, it puts back the value it found. No camera is added and nothing else in the title is written. Three ways to switch it, all the same toggle: - `DARNER_FIRST_PERSON=1`, and a live F1 row FIRST-PERSON VIEW on the controls page (wired like `DARNER_VEHICLE_AUTO_CENTER`, saved with the other settings); - F7; On another build the prologue differs, the hook is not installed and the log says so. The module's doc records what was tried and did not work, so nobody repeats it. ## How it was tested - Tested revision: 4400617 (this branch, on main 47d21cd). - Commands and results: see the gates below; `cargo xtask policy --staged`: 9 files ok. - Changes a default: no. Off unless switched on. - A/B result: not a change of a default and no speed claim. Checked by switching it on and off in the game (below). - Gates run on that revision (the three in AGENTS.md; there is no CI): GATES_LINE - Gameplay: RTX 3090 Ti, Windows 11, Xbox pad, Series S profile, DLSS performance, no frame generation, no ray tracing, release build. On foot and driving: the F1 row, F7 and both sticks each switch first person on and off, several times in a row. There is a short black cut at the change. - Shader wave sizes tested: not relevant. - Hardware dependence: likely general (it writes one value of the title's, no GPU work); untested on AMD and Intel cards. - Coverage gaps: not tested: aiming and shooting, cutscenes, missions, saving and loading with it on, the Series X profile, keyboard and mouse aiming in first person. Both sticks keep their own game actions while pressed. F7 is fixed, not in bindings.ini. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none on first person (searched open and closed issues and pull requests for "first person", "first-person", "camera", "view mode"). The same files are touched by #154, #302, #429 (F1 menu and input) and #75, #143, #431 (F1 rows and locales); none changes the same lines' meaning. - Replaces or overlaps: none found 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The title's own test for first person (0x140b79480) is true when the view
mode at [0x145073c20() + 0x98] is 2; its camera selector (0x1408317a0) then
picks the first-person camera. An entry hook on the selector keeps the mode
at 2 while the toggle is on and puts the old value back when it goes off.
On foot and driving on an RTX 3090 Ti, with a pad: all three ways switch it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Sheppard changed title from First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row, F7 or both sticks clicked (off by default, build 1.0.2.1) to [pr-feature][input] First-person view toggle 2026-12-04 23:28:37 +00:00
Sheppard changed title from [pr-feature][input] First-person view toggle to [pr-feature][input] F7 First-person view toggle 2026-12-04 23:28:46 +00:00
Sheppard changed title from [pr-feature][input] F7 First-person view toggle to [pr-feature][input] First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row or F7 (off by default, build 1.0.2.1) 2026-12-04 23:29:27 +00:00
Sheppard added spent time 2026-12-04 23:42:25 +00:00
3 hours
TrustNo1 changed title from [pr-feature][input] First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row or F7 (off by default, build 1.0.2.1) to First-person view toggle: DARNER_FIRST_PERSON=1, an F1 row or F7 (off by default, build 1.0.2.1) 2026-12-06 03:28:57 +00:00
Owner

Test needed — commit a370eac5; what to check:

  • The problem on main: there is no way into the title's own first-person view except the known pad glitch (phone up in a car, then B and the view button together). Read from the code and seen in the game.

The title's own test for first person (0x140b79480) is true when the view mode at [0x145073c20() + 0x98] is 2; its camera selector (0x1408317a0) then picks the first-person camera. A new module, crates/darner-hle/src/fptrace.rs, puts an entry hook on that selector (the same callhook::hook_entry the native mouse hook uses, prologue checked) and keeps the view mode at 2 while the toggle is on. Switched off, it puts back the value it found. No camera is added and nothing else in the title is written.

Three ways to switch it, all the same toggle:

  • DARNER_FIRST_PERSON=1, and a live F1 row FIRST-PERSON VIEW on the controls page (wired like DARNER_VEHICLE_AUTO_CENTER, saved with the other settings);
  • F7;

On another build the prologue differs, the hook is not installed and the log says so. The module's doc records what was tried and did not work, so nobody repeats it.

Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.

Reply testing to take this run; it's free again after 24 h with no results.

**Test needed** — commit `a370eac5`; what to check: - The problem on main: there is no way into the title's own first-person view except the known pad glitch (phone up in a car, then B and the view button together). Read from the code and seen in the game. The title's own test for first person (`0x140b79480`) is true when the view mode at `[0x145073c20() + 0x98]` is 2; its camera selector (`0x1408317a0`) then picks the first-person camera. A new module, `crates/darner-hle/src/fptrace.rs`, puts an entry hook on that selector (the same `callhook::hook_entry` the native mouse hook uses, prologue checked) and keeps the view mode at 2 while the toggle is on. Switched off, it puts back the value it found. No camera is added and nothing else in the title is written. Three ways to switch it, all the same toggle: - `DARNER_FIRST_PERSON=1`, and a live F1 row FIRST-PERSON VIEW on the controls page (wired like `DARNER_VEHICLE_AUTO_CENTER`, saved with the other settings); - F7; On another build the prologue differs, the hook is not installed and the log says so. The module's doc records what was tried and did not work, so nobody repeats it. Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture. Reply `testing` to take this run; it's free again after 24 h with no results.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feature/first-person-toggle:Sheppard-feature/first-person-toggle'
git switch 'Sheppard-feature/first-person-toggle'

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 'Sheppard-feature/first-person-toggle'
git switch 'Sheppard-feature/first-person-toggle'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'Sheppard-feature/first-person-toggle'
git switch 'Sheppard-feature/first-person-toggle'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'Sheppard-feature/first-person-toggle'
git switch 'Main'
git merge --squash 'Sheppard-feature/first-person-toggle'
git switch 'Main'
git merge --ff-only 'Sheppard-feature/first-person-toggle'
git switch 'Main'
git merge 'Sheppard-feature/first-person-toggle'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 3 hours
Sheppard
3 hours
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!447
No description provided.