Skip to content

feat: add Cabin Walk effect - #4

Merged
aefly merged 5 commits into
mainfrom
feat/cabinwalk
Oct 3, 2026
Merged

aefly merged 5 commits into
mainfrom
feat/cabinwalk

Conversation

@aefly

@aefly aefly commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Cabin Walk: with the truck parked, the player can get up from the driver's seat, walk around the cabin with WASD, crouch (C), and sit in the passenger seat or on the bunk, with footstep sounds. Based on SPF_CabinWalk.

  • Every ETS2/ATS truck model has its own cabin layout, calibrated by hand in game (CabinPresets). A new truck falls back to a layout built from telemetry. Players can adjust layouts in the Quick Settings window (Advanced panel); they're saved to data/cabin_layouts.json.
  • Effects that only make sense in the driver's seat (driving, road, mirror checks, manual looks) now fade out while the player is away from the wheel (NeedsDriverSeat() / EffectManager::SetAtWheel).
  • Releasing the parking brake (optional) or rolling sends the player back to the wheel.
  • The walking keys use the "manual" consume policy and are only blocked from the game while the player is up.
  • SPF_API/ headers re-vendored from SPF Framework 1.2.5.

Requires SPF Framework 1.2.5: it blocks keyboard keys from DirectInput (TrackAndTruckDevs/SPF-Framework#13) and fixes the stale camera after a truck switch (TrackAndTruckDevs/SPF-Framework#14). Info_SetMinFrameworkVersion.

Type of change

  • New effect
  • Refactor / Cleanup
  • Build / CI
  • Localization
  • Docs

Affected effect(s)

Cabin Walk (new). Every effect that overrides NeedsDriverSeat(): Head Motion, Body Dynamics, Steering Camera, Speed Shake, Road Irregularity, Suspension, Mirror Check, Manual Look, Blindspot Viewer.

Checklist

  • Effect is toggleable via its own "enabled" setting
  • Effect is active in cabin view only
  • Effect doesn't conflict with existing effects
  • Setting declared in settings::kAll (src/core/SettingsSchema.hpp)
  • New effect listed in kEffects (src/ui/EffectTabs.cpp)
  • Text added to every localization/*.json file
  • Checked ./SPF_API docs before implementing/modifying an SDK interaction

aefly added 5 commits October 3, 2026 21:44
Add `Effect::NeedsDriverSeat()` and `EffectManager::SetAtWheel()`:
driving motion, road motion, mirror checks and manual looks fade out
while the player is elsewhere in the cabin, and are reset once faded.
Get up from the driver's seat with the parking brake on, walk the
cabin with WASD, crouch, and sit in the passenger seat or on the bunk,
with footstep sounds. Each truck model has a hand-calibrated cabin
layout, adjustable from the Quick Settings window.

Based on SPF_CabinWalk.
@aefly aefly self-assigned this Oct 3, 2026
@aefly aefly added enhancement New feature or request new effect Implement a new effect labels Oct 3, 2026
@aefly
aefly merged commit ecb2169 into main Oct 3, 2026
3 checks passed
@aefly
aefly deleted the feat/cabinwalk branch October 3, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new effect Implement a new effect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant