✏️Configuration

Detailed configuration information

All config files fields are explained inside the config file in commented code. Some more complicated fields are explained in this page.

Custom mods

You can create custom modifications in the config files that will affect handling fields or assign variables to vehicles when installed. By default custom mods are installed by using an inventory item. If you'd like your own implementation, you could use Additional Handlings API or edit server_config.lua Items section.

You can find custom mods data in config.luaunder Custom Mods section.

Fields

  • uniqueId: string

    • Required id to be used to identify each mod. Must be unique for each mod.

  • itemData: table

    • Contains data for inventory item.

      • consume: boolean

        • Wether or not the item should be removed from inventory after installing the mod.

      • name: ?string

        • Item name (not label) that is used to identify your inventory item. If not entered will default to uniqueId. Make sure to create the items in your database / items config for your inventory for these to work.

  • label: string

    • Label that will be shown in tablet. If not entered will default to identifier.

  • identifier: string

    • Same as slotName. This will identify what slot the part will be installed to. Meaning that if two different mods will be created with the same identifier, only one will be available to be installed at a time.

  • save: boolean

    • Wether or not to save the part in database. If the part would not be saved in database, it will disappear after respawning the vehicle.

  • installedByDefault: boolean

    • If set to true the part will be installed by default to all vehicles. Might be useful for standalone servers that do not have any inventory item system.

  • handlingData: table

    • Data that will be assigned to the vehicle. If key matches any valid handling field it will affect the vehicle's handling field e.g. fInitialDriveForce = {value = 0.01} will increase the fInitialdriveForce by 0.01. If key is equal to enableHandlingFields it will make the fields available for adjusting in tuning tablet. Othewise it will assign the variable to vehicle for any other desired implementation.

      • enableHandlingFields: string[]

        • Make the fields available for adjusting in tuning tablet

      • ['fTractionCurveMax' | 'fInitialDriveForce' | 'fInitialDriveMaxFlatVel' | <...>]: {value: ?number, mult: ?number}

        • Affects the handling value by value or adds the multiplier (mult) when the mod is installed.

      • [string]: any

        • Assigns the variable to vehicle.

Example

Permissions

Permissions will let you set up what is allowed to each group or player. Currently there are a few permissions that will allow or block players from doing certain things with the script.

You can find custom mods data in config.luaunder Permissions section.

  • readXml

    • Allows player to preview XML file output in UI.

  • writeXml

    • Allows player to write XML file data to your server files.

  • writeDefault

    • Allows player to write default handlings to server database.

  • tabletCommand

    • Allows player to use chat command to open tablet. Recommended for servers that do not have inventory system.

  • driftCommand

    • Allows player to use command to enable drift mode. This will not require for player to have a small tablet. Recommended for servers that do not have inventory system.

  • ignoreLimits

    • Allows player to change values without strict limits. This is useful if player has to adjust handlings to write them to server files.

Config.Permissions

Defines what groups have which permissions. You can find the implementation of permissions in configs/server_config.lua or adjust the getPlayerPemissions function to your liking.

  • type: 'frameworkgroup' | 'identifier' | 'ace'

    • 'frameworkgroup' - selects the group that is in value.

    • 'identifier' - selects specific player by identifier. Identifier is entered in value.

    • 'ace' - selects ace permission specified in value.

  • value: string

  • permissions: Permissions

    • Defines which permissions are assigned to the selected player or group.

Configuration files

https://github.com/daZepelin/sb-handlingtuning/blob/master/configs/config.lua

Last updated

Was this helpful?