One bound key in Assetto Corsa that rolls your car's windows, plays the motor sound, and switches the audio mix between cabin and exterior — all in sync, on the Custom Shaders Patch (CSP) Lua apps system.
- Download
OpenedWindow_v1.1.3.zipfrom Releases; unzip theOpenedWindowfolder into<Assetto Corsa>\apps\lua\(the folder must be namedOpenedWindow). - Restart Assetto Corsa and open OpenedWindow from the CSP apps bar.
- Bind
OpenedWindow.toggleto a key (Content Manager → Settings → Controls) and press it in-game.
Full guide with structure checks and troubleshooting: docs/INSTALL.md.
- Rolls the car's windows visually — drives the car's own
.ksanimwindow animation. Requires the car to ship a window animation (e.g. Nissan 240SX, Datsun 510); cars without one keep the full audio behavior and no window animation plays. - Plays the window motor sound — one-shot open/close recordings with volume control.
- Switches the audio mix — closed = cabin mix; open = exterior sounds (traffic, opponents, track ambience, tyres) ramp up over a 3.5 s motor-like ramp. Tyres are 1.75× quieter in interior mode and return to default volume fully open.
A wind layer (speed-dependent, crossfading low/high loops, open-window only) is implemented and activates automatically once wind_low / wind_high loopable recordings are placed in sounds/.
- Assetto Corsa (Steam)
- Custom Shaders Patch — tested with CSP 0.2.11
- Content Manager recommended (for enabling the app and binding the key)
Recommended: unzip the Releases zip so the app lands at:
<Assetto Corsa>\apps\lua\OpenedWindow\OpenedWindow.lua
The app folder must be named OpenedWindow and contain OpenedWindow.lua directly (no double nesting). Restart AC after installing. Step-by-step with structure check: docs/INSTALL.md.
- The app exposes one control:
OpenedWindow.toggle— bind it in Content Manager → Settings → Controls (keyboard, wheel or gamepad). CSP stores the binding; it works in-game even with the app window closed. - Press once: windows roll down, motor sound plays, mix ramps to "window open" over 3.5 s. Press again: everything reverses. Mid-roll reversal is smooth from the current position.
- Camera in/out and cockpit-only changes snap the mix instantly; the main toggle keeps the 3.5 s ramp.
- The header status line shows the detected window animation for the current car; the app re-detects on car swap.
| Setting | Range | Default | What it does |
|---|---|---|---|
| Interior mix volume | 0–150 % | 100 % | Scales the cabin (interior) channels in closed-window mode |
| Outside sounds gain | 1.0–4.0× | 2.0× | Multiplier for exterior sounds (traffic, opponents, track) in open mode |
| Window motor volume | 0–100 % | 80 % | Loudness of the motor one-shots (live test loop available) |
| Wind volume (at high speed) | 0–100 % | 70 % | Loudness of the wind loops at full speed (open window only) |
| Wind starts fading in at | 0–100 km/h | 40 km/h | Speed where wind begins to fade in |
| Full wind reached at | 20–200 km/h | 120 km/h | Speed where wind reaches full volume |
| Only apply when camera is inside the car | on/off | on | Mix applies to interior camera only (snaps instantly on camera switch) |
| Blend real exterior game audio | on/off | on | Blends CSP's built-in exterior audio in open mode |
| Enable window/wind sounds | on/off | on | Master switch for the motor/wind sound layers |
| Animate car windows with the toggle | on/off | on | Drives the car's own window ksanim (Extra tab) |
Transition time is fixed at 3.5 s (matches the motor sound + tail; the slider was removed after testing). All sliders support middle-click reset; a Re-baseline action re-captures the car's current channel volumes as the closed-window baseline; settings persist across restarts.
- CSP global channel volumes are capped at 1.0 — channels can be attenuated below baseline but not boosted past it.
- Cars without window
.ksanimfiles get audio only — window geometry is car-specific. - Wind loop recordings (
wind_low,wind_high) are not included; the wind layer activates automatically once you add them tosounds/. - Other apps that also set car audio volumes (e.g. Car Volume Adjuster) can fight this app for the same channels — run one mix app at a time.
- Window state is per-session: car swap and game restart reset to closed/interior.
App not listed, key dead, windows not moving, app conflicts — see the troubleshooting table in docs/INSTALL.md.
| Path | Purpose |
|---|---|
OpenedWindow.lua |
the app (v1.1.3) |
manifest.ini |
CSP app manifest |
icon.png |
app icon |
LICENSE |
MIT code license |
sounds/ |
motor one-shots + asset credits |
docs/INSTALL.md |
full installation & key-binding guide |
docs/test_suite.md |
manual in-game test suite (all PASS on v1.1.3) |
- Made by prcd with AI assistance — the app was designed, coded and debugged together with an AI agent running the qwen3.8-flash-next model (Hermes Agent, Nous Research). All in-game verification was done manually by the author.
- Custom Shaders Patch (CSP) by the ac-custom-shaders-patch team — the Lua apps system, audio APIs (
ac.setAudioVolume,ac.AudioEvent,ac.INIConfig.scriptSettings) andsetAnimationthis app builds on. - Assetto Corsa by Kunos Simulazioni — the game and its per-car
.ksanimwindow animations. - No third-party example apps were copied into this codebase; the CSP audio and app APIs were used directly.
- Sound files in
sounds/are not covered by the MIT code license — see sounds/README.md for source/license status. - Code license: MIT (see LICENSE).
