Repository navigation
What's New
Conditional buttons with requiredExtras
Buttons can now require one or more externally controlled extras before they are shown. This is particularly useful for vehicle variants—for example, hiding lightbar-pattern controls on a slick-top vehicle—or for hiding pattern controls whenever the lightbar itself is disabled.
buttons = {
{
label = "PATTERN",
key = 1,
extra = 8,
color = "green",
-- This button is only visible and usable while extra 10 is enabled.
requiredExtras = {10},
},
},Every listed extra must be enabled for the button to appear in the ULC HUD and for its numpad keybind to work. ULC checks when the player enters the vehicle and detects externally changed requirements within one second.
This field is optional: existing buttons behave exactly as before.
requiredExtrasare intended for extras controlled outside of ULC. Do not use an extra that ULC already manages through a button, stage, horn, brake, reverse, park, signal, or door configuration.
Horn press and release timing
Horn extras can now be configured to activate only after holding the horn for a chosen amount of time, then remain active briefly after the horn is released. This works for both hornExtras and disableExtras.
For example, this setup activates extra 12 and disables extra 11 after the horn has been held for 250 ms. The effects remain active for 1.5 seconds after release:
hornConfig = {
useHorn = true,
hornExtras = {12},
disableExtras = {11},
hornPressDelay = 250,
hornReleaseDelay = 1500,
},You can set server-wide defaults in ULC's config.lua:
HornSettings = {
hornPressDelay = 0,
hornReleaseDelay = 0,
},A vehicle-level value overrides the matching global default. Set a delay to 0 for instant behavior, or use nil/omit the field to inherit the global setting.
If the horn is released before hornPressDelay expires, the extras do not activate. If the horn is pressed again during hornReleaseDelay, the pending restoration is cancelled and the extras stay active. #65
Local development configuration
Developers running ULC from a cloned repository can now create an optional ulc/config.local.lua file for local-server overrides. It loads after config.lua, is ignored by Git, and lets you keep personal development settings out of the shared configuration.
Config.hideHud = true
Config.ExternalVehResources = {
"my-development-vehicle",
}The file is optional; installations without it continue to use the default configuration. Do not include secrets in it, as it is loaded by both the server and clients. #54
Improvements & Bug Fixes
- Fixed park-pattern synchronization using the wrong vehicle or speed when checking nearby vehicles.
- Fixed park patterns not restarting correctly after lights are toggled while parked.
- Fixed default stages applying to the wrong vehicle.
- Fixed forced stage changes incorrectly toggling linked or off extras when the extra was already in its requested state. #55
- Fixed rapid horn presses potentially restoring the wrong extra state or leaving overlapping release timers. #65
- Improved detection and troubleshooting guidance when a vehicle config was accidentally saved as
ulc.lua.txt. #57 - Added safeguards and clear warnings for incomplete or invalid vehicle configuration data, preventing client-side errors. #59
- Improved project documentation and contributor guidance. #54
- Updated the sync preview. #61
Links
New Contributors
- @BreadsticksAU made their first contribution in #65.
Full Changelog: v1.8.0...v1.9.0