Config
Explanations and examples for the current dyno configuration.
Edit zyke_dyno/shared/config.lua. Distances are metres and durations are milliseconds. The screen, the sheet, and the Discord message show the units set under units; exports and events always use kW and Nm. Dynos that always stand are listed in zyke_dyno/shared/dynos.lua.
Framework, inventory, job, permission, notification, and language settings live in zyke_lib. The Discord webhook URL is a server convar, never a file; see webhook.
Rules of your own, such as only letting a job run the dyno while on duty, go in the hooks in client/can_checks.lua and server/can_checks.lua. See Can-Check Hooks.
#Full Default Config
#Config.Settings.dyno
#units
Units on the screen, the result sheet, the laptop app, and the Discord message.
poweris"hp","ps", or"kw",torqueis"nm"or"lbft", andspeedis"kmh"or"mph".Example:
luaunits = {power = "hp", torque = "nm", speed = "kmh"}
#formula.scale
One factor on every car's power. The default puts most vanilla cars near their real counterparts. Raise or lower it to move every car at once. See Formula & Calibration.
Example:
luascale = 0.004436
#formula.massExponent
Exponent on the car's
fMassin the formula. Fitted to GTA's balancing; changescale,classScale, ormodelsfirst.Example:
luamassExponent = 1.5
#formula.speedExponent
Exponent on the car's
fInitialDriveMaxFlatVelin the formula. Fitted to GTA's balancing; changescale,classScale, ormodelsfirst.Example:
luaspeedExponent = 4.0
#formula.classScale
Power factors by vehicle class, from
GetVehicleClass. The default lifts supercars, class7, which GTA gives light masses. Classes not listed use1.0.Example:
luaclassScale = {[7] = 1.4}
#formula.models
Power factors for single models, by model name in lower case. Models not listed use
1.0.Example:
luamodels = {sultan = 1.1} -- 10% more
#drivetrainLoss
Share of the engine's power lost before it reaches the rollers, by the wheels that drive. The drive is read from the car's powered wheels. Wheel figures are measured at the rollers, and the engine figure adds the loss back.
Example:
luadrivetrainLoss = {FWD = 0.12, RWD = 0.15, AWD = 0.20}
#rpm.idle
Engine speed the car idles at on the rollers.
Example:
luaidle = 850
#rpm.redline
Redline for classes and models without their own. The pull ends at the limiter on the redline.
Example:
luaredline = 7000
#rpm.classes
Redlines by vehicle class, from
GetVehicleClass.Example:
luaclasses = {[0] = 6800, [4] = 6200, [7] = 8500, [9] = 5800, [10] = 4500, [11] = 4500, [12] = 5500, [20] = 4000}
#rpm.models
Redlines for single models, by model name in lower case. A model's redline wins over its class's.
Example:
luamodels = {sultan = 7500}
#gear
Gear the pull runs in, or the car's top gear when it has fewer. The rollers spin up as the car would gain speed on the road in that gear.
Example:
luagear = 4
#pull.inertia
Share of the car's mass the rollers feel.
1.0pulls about as long as the car takes to gain the same speed on the road, which puts most cars at four to eight seconds in 4th. Lower values give shorter pulls with the same numbers.Example:
luainertia = 1.0
#pull.maxMs
Milliseconds a run may take before it is stopped without a result.
Example:
luamaxMs = 60000
#allowedClasses
Vehicle classes that may go on a dyno, from
GetVehicleClass. Only regular automobiles fit the rollers; bikes, boats, helicopters, planes, and trains never do. The default allows compacts, sedans, SUVs, coupes, muscle, sports classics, sports, super, off-road, and vans.Example:
luaallowedClasses = {0, 1, 2, 3, 4, 5, 6, 7, 9, 12}
#minEngineHealth
Lowest engine health a run starts at. A running pull is stopped if the engine drops below it.
Example:
luaminEngineHealth = 300.0
#lineUp
How far the car may stand from the rollers and still start:
alongandacrossare metres the front wheels may stand off the front rollers, andangleis degrees off straight.Example:
lualineUp = {along = 0.18, across = 0.30, angle = 5.0}
#jobs
Jobs that may run every dyno, and connect to it in the laptop app. Use a job name or a list.
nillets anyone. A dyno with its ownjobsuses those instead.Example:
luajobs = {"mechanic"}
#historyPerPlate
Runs kept per plate in the database, oldest out first. The car's first run is always kept, since later runs are drawn over it.
0keeps every run.Example:
luahistoryPerPlate = 25
#printout.enabled
Lets the driver print the result as an item. With
false, the print key is hidden and the item isn't usable.Example:
luaenabled = true
#printout.item
Item a printed sheet is given as. It has to exist in your inventory; using it shows the sheet. See Setup.
Example:
luaitem = "dyno_sheet"
#showDistance
Metres around the driver in which Show nearby sends the sheet to other players.
Example:
luashowDistance = 5.0
#webhook
Posts each finished run to Discord with the car, plate, peak power, peak torque, and gain.
nameis the webhook's username andcolourthe embed's colour as a decimal number. The URL is read from thezyke_dyno_webhookserver convar, so it never sits in a file. Without it, nothing is sent.cfgset zyke_dyno_webhook "https://discord.com/api/webhooks/..."Example:
luawebhook = {enabled = true, name = "Zyke Dyno", colour = 1668818}
#screen
The screen on its pillar beside a dyno: its
model, the metres its origin stands off the floor, and the corners of its picture in the model's frame, top left, top right, bottom right, and bottom left as seen from the front. Only changefacefor a screen model of your own.Example:
luascreen = { model = "zyke_dyno_screen", height = 0.0, face = {vec3(0.32, 0.1537, 1.6363), vec3(-0.32, 0.1537, 1.6363), vec3(-0.32, 0.2286, 1.2841), vec3(0.32, 0.2286, 1.2841)}, }
#streamDistance
Metres from a dyno its props stand within. Runs play for players within this distance.
Example:
luastreamDistance = 80.0
#screenDistance
Metres from a dyno its screen is drawn within. Only the nearest screen in reach is lit.
Example:
luascreenDistance = 30.0
#calibrate.command
Command that prints the formula's inputs for the car you sit in and the power they give. See Formula & Calibration.
Example:
luacommand = "dynocalibrate"
#calibrate.permission
Permission checked by the calibrate command through
zyke_lib. Use one permission or a list; any match grants access.commandis the ACE permission, and the remaining defaults are the ESX admin groups.Example:
luapermission = {"command", "admin", "superadmin", "owner"}
#laptop.enabled
Adds the Dyno app to
zyke_laptopwhile it runs. See Laptop App.Example:
luaenabled = true
#laptop.range
Metres the player at the laptop may stand from a dyno to connect to it.
nilallows any distance. Dynos out of range are listed but can't be connected to.Example:
luarange = nil
#admin.enabled
Enables the placing tool's command.
Example:
luaenabled = true
#admin.command
Command that takes out the placing tool, which places dynos where you aim and removes the ones it placed. See Placing Dynos.
Example:
luacommand = "dynos"
#admin.permission
Permission checked by the placing tool through
zyke_lib, on the command and on every dyno placed or removed. Use one permission or a list; any match grants access.commandis the ACE permission, and the remaining defaults are the ESX admin groups.Example:
luapermission = {"command", "admin", "superadmin", "owner"}
#admin.screen
Where a placed dyno's screen stands when on the left, in the dyno's frame as in
shared/dynos.lua. The tool mirrors it for the right, or leaves it out.Example:
luascreen = {offset = vec3(-2.3, 0.6, 0.0), heading = 225.0}
#Dynos
Dynos in shared/dynos.lua stand for as long as the resource runs. The list is empty by default. Dynos placed with /dynos are saved in the database instead, and other resources place dynos with CreateDyno; see Placing Dynos.
The bed needs 2.6 metres of room across and 7.2 metres along, ramps included. The car drives on from behind.
#Config.Dynos.<dyno>.coords
Point on the floor under the middle of the front rollers.
Example:
luacoords = vec3(-1352.0, -3020.0, 12.94)
#Config.Dynos.<dyno>.heading
Heading in degrees, the way a car's nose points on the dyno. Defaults to
0.0.Example:
luaheading = 240.0
#Config.Dynos.<dyno>.screen
The screen pillar beside the dyno.
offsetis metres fromcoords, withxacross to the right andyalong toward the nose, andheadingis degrees turned from the dyno's. Left out, the dyno has no screen.Example:
luascreen = {offset = vec3(-2.3, 0.6, 0.0), heading = 225.0}
#Config.Dynos.<dyno>.jobs
Jobs that may run this dyno, instead of
Config.Settings.dyno.jobs. Use a job name or a list.Example:
luajobs = {"mechanic"}
#Config.Dynos.<dyno>.label
Name of the dyno in the laptop app, up to 48 characters. Defaults to
Dyno 1and so on.Example:
lualabel = "Benny's Rolling Road"
#Full Dyno Entry
A complete
shared/dynos.luawith one dyno.Example:
luaConfig.Dynos = { { coords = vec3(-1352.0, -3020.0, 12.94), heading = 240.0, screen = {offset = vec3(-2.3, 0.6, 0.0), heading = 225.0}, jobs = {"mechanic"}, label = "Benny's Rolling Road", }, }