Vehicle driving: WASD never accelerates or brakes — port Darner's seat-based W/S → RT/LT remap #93
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp#93
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@omeglejason on GitHub · 2026-12-05 18:13 UTC · original
Vehicle driving with mouse & keyboard: WASD never accelerates/brakes — please port Darner's seat-based W/S → RT/LT remap
Summary
With
LARP_CONTROLS=mnkand a Darner-stylecontrols.ini, getting into a car leavesW/Son the left stick, where they do nothing, so the only way to drive is the mouse buttons (or whatever is bound toRT/LT). Darner, from the same GPL-3.0 lineage, does this automatically and with no toggle key: it reads the player's vehicle seat from title memory every frame and, only while you are in a non-aircraft driver seat, adds the left stick's up/down toRT/LT, zeros the stick's Y, and turns the mouse buttons intoLB/RBfor drive-bys.I believe this was never ported when the Darner-style mouse & keyboard support was added to larp: the key mapping and raw-input smoothing are there, the vehicle-seat input layer is not. There is no
VehicleSeat/vehicle_seatanywhere incrates/larp-hle/src/modules/gameinput/.Related: #16 (controls.ini not reflected in game), #30 (mouse look), #46 (direct mouse camera, also ported from Darner and still open).
Environment
main@84f8870),bin/larp.exeSHA-2567812152786646B40B7081A18D1F469217C3AC443AC29BF1745BFDA6217B29F71game_scarlett_master.exe1.0.2.1 (buildb99f876b74d4a77f…),--console series-sLARP_CONTROLS=mnk,LARP_CONTROLS_INI=Larp\controls.ini,LARP_PIPELINE_WAIT_MS=8,nv-profile --mb 2048controls.iniin use (the load is confirmed in the log:loaded custom controls.ini … entries=24,sensitivity=0.864 bindings=25):Steps to reproduce
LARP_CONTROLS=mnkand thecontrols.iniabove.W A S D(works), enter a car withY(get in), stay in the driver seat.W/S— nothing happens. The car does not move.C(bound toRT) — the car accelerates. Right mouse /Zbrakes.W A S Dwalk again, mouse buttons areRT/LTagain. So the mapping follows the button, not the seat.Expected
Darner's behaviour, for reference (no toggle, no extra key):
W→RT(accelerate),S→LT(brake/reverse),A/Dstay on the left stick's X (steering), the stick's Y goes to 0.RB/LB(drive-by), notRT/LT.RT/LT,W/Sare the stick).How Darner does it (reference implementation, GPL-3.0-or-later, portable to larp)
victory-hle/src/mousehook.rsreturnsVehicleSeat { None, Driver, Passenger, AircraftPilot }from pure memory reads, re-evaluated on every input poll:All reads are pointer-validated (
0x1_0000 ≤ p, sign-extended 47-bit, alignment), and there are unit tests that build a fake ped/vehicle pool in memory.Then the only behavioural change lives in the input layer (
victory-hle/src/modules/gameinput.rs:436):and in
overlay_mouse_mapping()the driver case swaps the mouse buttons to shoulders:Proposed change for larp
mousehook-style function next to the existing title hooks inlarp-loader/larp-hle, using the offsets above (they are for title build 1.0.2.1, the same build larp targets).Option<VehicleSeat>intogameinput::mouse::mnk_pad()(or into thePadStateassembly) and apply exactly the two rules above.LARP_DRIVE_WASD=1(default on/off up to you) so it can be bisected if something misbehaves in menus.Notes
@gamingwithhomie on GitHub · 2026-12-05 21:02 UTC · original
Implemented for the next release (v1.1.2) via PR #134: set
keyboard_driving = 1incontrols.ini(orLARP_KEYBOARD_DRIVING=1) - in the drivers seat W/S become RT/LT (gas/brake), Shift/Ctrl lean, LMB/RMB are LB/RB, using the same seat check as Darner. Off by default so pad driving is unchanged. Will close once v1.1.2 is out and youve confirmed.@gamingwithhomie on GitHub · 2026-12-05 21:18 UTC · original
Shipped in v1.1.2:
LARP_KEYBOARD_DRIVING=1(orkeyboard_driving = 1incontrols.ini). Please confirm W/S drive properly in the drivers seat and Ill close this.@omar2205 on GitHub · 2026-12-05 22:15 UTC · original · edited 2026-12-05 22:16 UTC
The controls.ini still doesnt work. I changed the sensitivity and it was not reflected.