Setup & Configuration - TrevorBarns/luxart-vehicle-control GitHub Wiki (2024)

Configuration of SETTINGS.lua

Open SETTINGS.lua and configure settings to your liking. Items with prefix/postfix 'default' means the end player will be able to modify/override these later.

Set a Community ID

A community ID is required for version 3.2.3 and later. This unique set of characters for your community will be used for profile saving.

  • The ID should be 4-6 alphanumerical characters however, more should work within reason.
  • Spaces are not allowed and will not work, dashes can be used instead.
  • Some examples may be your servers abbreviation, name, etc.
    • Examples:
      'LCPS', 'LCPSR', 'SARP', 'LSDOJ', 'JakesRP', etc.
  • The purpose of this string is to differentiate the client side saves between servers. Since it is possible (and likely) that servers may use the same profile names, but different profile siren assignments.
    • Example:
      John plays on two servers: server1 and server2. Both servers have LVC vehicle profiles 'pd1', but both have different siren configurations. John saves a profile on server1 with siren settings pertaining to tone IDs 1,2,3,4. Then jumps on server2 which has approved tones 6,7,8,9. LVC will display a warning stating that the save is not compatible as tones 1,2,3,4 are not approved in the SIREN_ASSIGNEMENTS. To prevent this we pre/postfix the save string with community_id which ensures the correct profile for the server is loaded.

⚠️ This string should be set once, and never changed as it will result in loss of LVC saves for all players. It is not public facing so even if the server name changes it does not need to change.

Configuration of SIRENS table: (SIRENS.lua)

Siren String - WAV File Name Lookup

Default IDGeneric NameStringWAV File Name
1AirhornSIRENS_AIRHORNAIRHORN_EQD
2WailVEHICLES_HORNS_SIREN_1SIREN_PA20A_WAIL
3YelpVEHICLES_HORNS_SIREN_2SIREN_2
4PriorityVEHICLES_HORNS_POLICE_WARNINGPOLICE_WARNING
5CustomARESIDENT_VEHICLES_SIREN_WAIL_01SIREN_WAIL_01
6CustomBRESIDENT_VEHICLES_SIREN_WAIL_02SIREN_WAIL_02
7CustomCRESIDENT_VEHICLES_SIREN_WAIL_03SIREN_WAIL_03
8CustomDRESIDENT_VEHICLES_SIREN_QUICK_01SIREN_QUICK_01
9CustomERESIDENT_VEHICLES_SIREN_QUICK_02SIREN_QUICK_02
10CustomFRESIDENT_VEHICLES_SIREN_QUICK_03SIREN_QUICK_03
11PowercallVEHICLES_HORNS_AMBULANCE_WARNINGAMBULANCE_WARNING
12FireHornVEHICLES_HORNS_FIRETRUCK_WARNINGFIRE_TRUCK_HORN
13FiresirenRESIDENT_VEHICLES_SIREN_FIRETRUCK_WAIL_01SIREN_FIRETRUCK_WAIL_01
14Firesiren2RESIDENT_VEHICLES_SIREN_FIRETRUCK_QUICK_01SIREN_FIRETRUCK_QUICK_01
SIRENS = {--[[1]] { Name = "Airhorn", String = "SIRENS_AIRHORN", Ref = 0 }, --1--[[2]] { Name = "Wail", String = "VEHICLES_HORNS_SIREN_1", Ref = 0 }, --2--[[3]] { Name = "Yelp", String = "VEHICLES_HORNS_SIREN_2", Ref = 0 }, --3--[[4]] { Name = "Priority", String = "VEHICLES_HORNS_POLICE_WARNING", Ref = 0 }, --4--[[5]] { Name = "Futura", String = "RESIDENT_VEHICLES_SIREN_WAIL_01", Ref = 0 }, --5--[[6]] { Name = "Hetro", String = "RESIDENT_VEHICLES_SIREN_WAIL_02", Ref = 0 }, --6--[[7]] { Name = "Sweep-1", String = "RESIDENT_VEHICLES_SIREN_WAIL_03", Ref = 0 }, --7--[[8]] { Name = "Sweep-2", String = "RESIDENT_VEHICLES_SIREN_QUICK_01", Ref = 0 }, --8--[[9]] { Name = "Hi-Low",String = "RESIDENT_VEHICLES_SIREN_QUICK_02",Ref = 0 }, --9--[[10]] { Name = "Whine Down",String = "RESIDENT_VEHICLES_SIREN_QUICK_03", Ref = 0 }, --10--[[11]] { Name = "Powercall", String = "VEHICLES_HORNS_AMBULANCE_WARNING", Ref = 0 }, --11--[[12]] { Name = "QSiren", String = "VEHICLES_HORNS_FIRETRUCK_WARNING", Ref = 0 }, --12--[[13]] { Name = "Fire Yelp", String = "RESIDENT_VEHICLES_SIREN_FIRETRUCK_WAIL_01", Ref = 0 }, --13--[[14]] { Name = "Fire Yelp", String = "RESIDENT_VEHICLES_SIREN_FIRETRUCK_QUICK_01", Ref = 0 }, --14}
  • For most users, Name is the only field that needs to be modified. It determines the default name for each tone and will be displayed in LVC Menu, these can be generic like "Siren 1, Siren 2, etc." or specific based on departments recommended siren. The end user will be able to change these.
  • For advanced users:
    • String and Ref can be changed to change which audio file is pulled based on tone. Rearranging default resident.rpf names is not recommended as it serves no benefit. Instead rearranging the siren assignments order would be easier. The only time changing String and Ref would be recommended is for integration of server side siren integration. See Server Sided Audio Integration.

    • Option an additional key can be added to each tones table determines the default option state that each tone is in. The end user can change these later.
      Example:{ Name = "CustomName", String = "SIREN_STRING", Ref = 0, Option = 1 },

      Option ValueBehavior
      1Cycle & Button
      2Cycle Only
      3Button Only
      4Disabled

Configure SIREN_ASSIGNMENTS table: (SIRENS.lua)

SIREN_ASSIGNMENTS = {--['<gameName>'] = { <airhorn tone>, <siren tone-1>, <siren tone-2>, ... <siren tone-n> },['DEFAULT'] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, ['FIRETRUK'] = { 12, 13, 14, 11 }, ['AMBULAN'] = { 1, 2, 3, 4, 11 }, ['LGUARD'] = { 1, 2, 3, 4, 11 },}

⚠️ The default or fallback key ['DEFAULT'] should always be present and never removed. Doing so will result in issues.

  • In this table you can add additional vehicles for assignment using the vehicles <gameName> exactly as found in vehicles.meta. It is case sensitive.
  • Both R* and LVC however, truncate down to 11 characters. It is important that the first 11 characters are unique.
    • Example:
      If my addon vehicles <gameName> is "2008 Ford CVPI CHP" and I have another vehicle "2008 Ford CVPI LSPD" both of these after truncate equate to "2008 Ford C" therefor LVC will not be able to differentiate these. A more appropriate name may be "LSPDCVPI1". Of course the naming convention is going to be highly dependent on the number of vehicles you have.
  • In the example above, you can see that the first tone in the vehicles tone table tells LVC what to use as a horn, followed by a number of sirens.

Wildcards

Supported Wildcards:

  • # represents 1 or more digits.

How it works:

  1. LVC checks for vehicle profile matching game name. e.g. ['2008fpiu1']
  2. If not found, attempts wildcard search, meaning wildcards will be used secondary to custom profiles. e.g. ['2008fpiu#']
  3. If not found, attempts a less specific wildcard search, leading and trailing numbers. e.g. ['#fpiu#'] (v3.2.7)
  4. If not found, use default profile. e.g. ['DEFAULT']

Example:
* ['veh#'] = { ... } will be used for vehicles with game names veh1, veh2, ..., veh9999, etc. where exact profile not found.

Examples and premade packs can be found here: https://github.com/TrevorBarns/luxart-vehicle-control-extras/

Additional Configuration Options (advanced)

Resource Convars (fxmanifest.lua)

  • experimental will mute experimental messages for server console.
  • debug_mode increases console logging for client, prints <gameName> of vehicle if no profile was found.

Toggling these require the refresh command to be ran first, then restart the resource for changes to take effect.

Setup & Configuration - TrevorBarns/luxart-vehicle-control GitHub Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6022

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.