Power Window Controls

If you liked this item, please rate it up on Steam Workshop page.

Author: Wolf

Last revision: 12 Jun, 2021 at 08:11 UTC

File size: 1.1 MB

On Steam Workshop

Description:

This is a simple lua script that enables the player in the first (driver) seat of a vehicle to control all openable windows with additional buttons on the vehicle radial menu, much like in any modern car.

I’m told power window controls were commonspread enough in the early nineties, so hopefully seeing them on every car won’t feel anachronistic, but regardless of that, this was made primarily as a workaround for a technical limitation in vanilla Zomboid.
By default, to see if you should be given control over a window, the game checks what seat you’re in, then checks if that seat has a door on the same spot and, if it does, checks if that door has an openable (and unbroken) window on the same spot.
So let’s say you’re Filibuster Rhymes, coding whole 4 openable windows into your RV that… only has one door. What you end up with is 3 factually unusable windows.

The method this mod employs eliminates the middleman in the door and, when you are in the driver seat, directly scans for window parts with the following IDs:
WindowFrontLeft
WindowFrontRight
WindowMiddleLeft
WindowMiddleRight
WindowRearLeft
WindowRearRight
and adds the options to open/close them to the radial menu if they are present, not broken and can be opened/closed.
(if you make a vehicle with openable windows with different IDs, hit me up)

The front left (driver’s) window will show up with the normal "Open/Close Window" segment, while others will display a custom prompt and a modified icon to indicate which window it is. The text prompts are currently provided for the EN, DE, RU and CN localizations.
Apparently someone has also released a separate localized verison: Power Window Controls PTBR.

The mod was made and tested on b41 IWBUMS, but theoretically it should also work with the stable build, it doesn’t do all that much (if you do try it on b40, especially with other mods, let me know how it goes). Load order is irrelevant.

Credit goes to:
Aiteron and their Better Towing, where I spied a method to inject my code into the radial menu.
Filibuster Rhymes and their Used Cars, or more specifically, their Fleetwood Bounder RV which basically inspired this mod.
My friend Peach for helping with the localization.
Steam user Bazooka for the Simplified Chinese translation.

Tags:B41,Cars,Vehicles,Tweak

Workshop ID: 2511087277
Mod ID: WolfWindowControls