Config
Explanations and examples for the current angle grinder configuration.
Edit zyke_anglegrinder/shared/unlocked/config.lua. Distances are metres, durations ending in Ms are milliseconds, and durability and charge run from 0 to 100.
Keybinds can be changed in GTA / FiveM settings. Framework, inventory, target, and webhook settings live in zyke_lib. What can be cut, and how hard each cut is, is decided by the resource that offers it; see Integrations.
#Full Default Config
#Config.Settings.grinder
#enabled
Enables the resource's items. When disabled, the grinder, disc, and battery items are not registered as usable and the missing-item check is skipped.
Example:
luaenabled = true
#item
The grinder item. Using it takes the grinder out or puts it away. Keep it non-stackable/unique.
Example:
luaitem = "anglegrinder"
#discItem
The standard disc. Using it with the grinder out fits it to an empty grinder. It wears at the base rate and returns as
brokenDiscItemwhen spent. Starter grinders get this disc.Example:
luadiscItem = "anglegrinder_disc"
#discs
Further disc tiers, keyed by item name.
wearMultiplierscales the disc's wear for every integration, so0.5lasts twice as long as the standard disc.brokenItemis what a spent disc returns as;falsedestroys it.
modelsandimagesset the held prop and inventory icon for each state:loaded,broken,loadedNobatt, andbrokenNobatt. States without an entry useprop.modelsandimages. Every disc listed here is registered as usable, and its item must exist in your inventory.Example:
luadiscs = { anglegrinder_disc_pro = { wearMultiplier = 0.5, brokenItem = "anglegrinder_disc_pro_broken", models = {loaded = "zyke_anglegrinder_pro", broken = "zyke_anglegrinder_pro_broken", loadedNobatt = "zyke_anglegrinder_pro_nobatt", brokenNobatt = "zyke_anglegrinder_pro_broken_nobatt"}, images = {loaded = "anglegrinder_pro", broken = "anglegrinder_pro_broken", loadedNobatt = "anglegrinder_pro_nobatt", brokenNobatt = "anglegrinder_pro_broken_nobatt"}, }, }
#brokenDiscItem
Item a spent standard disc returns as when it is ejected. Set to
falseto destroy spent discs instead.Example:
luabrokenDiscItem = "anglegrinder_disc_broken"
#batteryItem
The battery item. Using it with the grinder out attaches it to a grinder that has none. While set, the grinder needs a fitted, charged battery to run. Set to
falseor""to remove batteries entirely: grinders then need no battery, keep their battery look, and recharging is unavailable.Example:
luabatteryItem = "anglegrinder_battery"
#batteryDrain
Charge drained per wear roll, as a flat number or a
{min, max}range. A grind spreads its rolls across its cuts, and a clean grind drains about half of one roll. Cutting outside the zone drains more.0means a fitted battery never runs out.Example:
luabatteryDrain = {min = 1, max = 3}
#durabilityLoss
Disc wear range used when the caller passes none, such as
StartGrind,/grindtest, andWearGrinderDisc. A clean pressure cut wears half of the rolled amount, and the disc'swearMultiplierapplies on top. Integrations that open their own server sessions pass their own range.Example:
luadurabilityLoss = {min = 8, max = 20}
#starterItems
Parts fitted to every new grinder, vendor purchases included. Each entry accepts
falseto leave the part out,trueor a number for a stock part, or{durability = n}for a set durability. A disc at0fits as broken.batteryonly applies whilebatteryItemis set.Example:
luastarterItems = { disc = {durability = 100}, battery = {durability = 100}, }
#prop
Hand bone, offset, and rotation of the held grinder, and the model for each state. The
Nobattmodels are used whilebatteryItemis set and no battery is attached. The models are streamed by the resource.Example:
luaprop = { bone = 57005, offset = {x = 0.144, y = 0.101, z = 0.012}, rotation = {x = 34.993, y = 1.41, z = -1.379}, models = { empty = "zyke_anglegrinder_empty", loaded = "zyke_anglegrinder", broken = "zyke_anglegrinder_broken", emptyNobatt = "zyke_anglegrinder_empty_nobatt", loadedNobatt = "zyke_anglegrinder_nobatt", brokenNobatt = "zyke_anglegrinder_broken_nobatt", }, }
#images
Inventory icon written to the grinder's
imagemetadata for each state of the standard disc. The file names match the icons inextras/items/images/256/.Example:
luaimages = { empty = "anglegrinder_empty", loaded = "anglegrinder", broken = "anglegrinder_broken", emptyNobatt = "anglegrinder_empty_nobatt", loadedNobatt = "anglegrinder_nobatt", brokenNobatt = "anglegrinder_broken_nobatt", }
#Grinding
Settings under Config.Settings.grinder.grinding control how every grind plays, looks, and sounds. Each integration still decides its own stages and disc wear. See Pressure Cut.
#grinding.minigame
"pressure"runs the pressure cut."skillcheck"runs each stage'szyke_libskill checks and progress bar instead.Example:
luaminigame = "pressure"
#grinding.pressure.keys
Keys that push the disc in while held. They are read as GTA controls, so each follows the player's own GTA key binding.
Example:
luakeys = {"LEFTMOUSE", "E", "SPACE"}
#grinding.pressure.secondsPerCheck
Seconds each skill check preset in an integration's stage adds to the cut. The stage's own
secondsare added on top.Example:
luasecondsPerCheck = 1.5
#grinding.pressure.penalty
How many times faster the disc wears outside the zone, where nothing is cut. It applies whether the player pushes too hard or lets go.
Example:
luapenalty = 6.0
#grinding.pressure.graceSeconds
Seconds at the start of each cut where being outside the zone costs nothing, to find the zone.
Example:
luagraceSeconds = 2.0
#grinding.pressure.golden
Golden band in the middle of the zone.
sizeis its share of the zone's width andspeedhow many times faster both the cut and the wear run inside it, so a clean cut wears the same but ends sooner. Set tofalseto disable.Example:
luagolden = {size = 0.25, speed = 1.5}
#grinding.pressure.difficulties
zoneis the zone's width anddrifthow far it wanders, both as a share of the gauge.lengthmultiplies the cut's time. The hardest preset a stage lists picks its difficulty, and stages without checks useeasy.Example:
luadifficulties = { easy = {zone = 0.20, drift = 0.10, length = 3.75}, medium = {zone = 0.15, drift = 0.16, length = 4.875}, hard = {zone = 0.10, drift = 0.22, length = 6.375}, }
#grinding.anim
Work animation held through the minigame.
flag = 49plays it on the upper body, and1plays a full-body animation.crouchcrouches the player unless the integration decides.reachplaces the player that many metres from the grind point, facing it. The first grind measures where the animation really holds the disc and corrects the spot. Preview animations with/grindpose.Example:
luaanim = {dict = "zyke_anglegrinder_grind", clip = "grind_loop", flag = 49, crouch = true, reach = 0.66}
#grinding.grip
Grip on the held grinder while grinding, in the same hand-bone space as
prop.falsekeeps the held grip. Tune it live with/grindpropduring/grindpose, which prints the values to paste here.Example:
luagrip = { offset = {x = -0.029, y = -0.091, z = -0.138}, rotation = {x = 173.765, y = 128.421, z = -76.805}, }
#grinding.cinematic
Close-up camera on the disc while the minigame runs.
cameraandlookare metres from the grind point:xto the player's right,ytoward the point, andzup.fovis degrees. Setenabled = falseto keep the gameplay camera for every grind, whatever an integration asks for. An integration can opt out or frame its own shot per target.Example:
luacinematic = { enabled = true, camera = {x = -1.5, y = -0.55, z = 0.75}, look = {x = 0.0, y = -0.2, z = 0.25}, fov = 32.0, blendInMs = 1000, blendOutMs = 800, }
#grinding.sparks
Sparks thrown off the disc edge, seen by every nearby player and scaled by how hard the disc bites. The first effect the game build supports is used;
buildis the lowest build that has it. The Tuners sparks need game build 2372 or newer, andent_brk_sparking_wiresis the fallback. Set tofalseto disable.Example:
luasparks = { effects = { { asset = "scr_tn_tr", name = "scr_tn_tr_angle_grinder_sparks", build = 2372, offset = {x = -0.089, y = 0.225, z = 0.002}, rotation = {x = 0.0, y = 0.0, z = 49.9}, }, {asset = "core", name = "ent_brk_sparking_wires"}, }, offset = {x = 0.0, y = 0.268, z = -0.074}, rotation = {x = 0.0, y = 0.0, z = 0.0}, scale = 1.0, }
#grinding.sound
Motor sound through Sounds, played on the grinding player for everyone within
distance: a spin-up, a grind or cut loop that follows the pressure, and a spin-down. Each entry is azyke_soundsfile path;falseleaves that part silent.Example:
luasound = { enabled = true, start = "tools/anglegrinder_start.ogg", grind = "tools/anglegrinder_grind.ogg", cut = "tools/anglegrinder_cut.ogg", stop = "tools/anglegrinder_stop.ogg", volume = 0.5, distance = 35.0, }
#grinding.spinDown
Seconds the disc keeps spinning after every grind. Until it stops,
blockUnequipkeeps the grinder out andblockVehiclekeeps the player out of vehicles.secondsmatchestools/anglegrinder_stop.ogg, so change it along with the stop sound.0turns the spin-down off.Example:
luaspinDown = { seconds = 5.2, blockUnequip = true, blockVehicle = true, }
#grinding.moveTolerance
Walking further than this from where the grind started cancels it.
Example:
luamoveTolerance = 0.75
#grinding.approachTimeout
Milliseconds the walk to an integration's grinding spot may take before it gives up.
Example:
luaapproachTimeout = 8000
#Witnesses
NPC witnesses for illegal grinds. Each integration says whether its grind is legal. A witnessed grind calls OnIllegalGrind in server/unlocked/hooks.lua once per session. See Police Alerts & Logging.
#witnesses.enabled
Enables witness checks.
Example:
luaenabled = true
#witnesses.debug
Prints witness check results to the console.
Example:
luadebug = false
#witnesses.maxDistance
Furthest a ped or driven vehicle can be to notice a grind. Integrations can override it per grind.
Example:
luamaxDistance = 40.0
#witnesses.fieldOfView
Sight cone in degrees for peds on foot.
Example:
luafieldOfView = 60.0
#witnesses.vehicleFieldOfView
Sight cone in degrees for drivers.
Example:
luavehicleFieldOfView = 120.0
#witnesses.hearingDistance
Peds this close notice the grind without line of sight. Set to
falseto disable.Example:
luahearingDistance = 8.0
#witnesses.defaultLegal
Used when an integration does not say whether its grind is legal.
falsetreats those grinds as illegal.Example:
luadefaultLegal = false
#witnesses.recheckInterval
Milliseconds between checks during a long grind.
0checks only when the disc starts.Example:
luarecheckInterval = 5000
#witnesses.blacklistedModels
Ped models that never count as witnesses.
Example:
luablacklistedModels = {"s_m_y_cop_01"}
#Keybinds & Interest Points
#keys
Default keys for the player-remappable keybinds.
usecuts the interest point the player aims at,unequipputs the grinder away, andmenuopens the grinder menu. R doubles as reload and light melee, which stay suppressed while the grinder is out. Players rebind them under Esc > Settings > Key Bindings > FiveM.Example:
luakeys = { use = {key = "E", keyType = "keyboard"}, unequip = {key = "X", keyType = "keyboard"}, menu = {key = "R", keyType = "keyboard"}, }
#points.enabled
Shows a dot on everything an integration lets the grinder cut while it is out. The use key only cuts an aimed dot, so with
falsenothing can be cut with the use key.Example:
luaenabled = true
#points.renderDistance
Metres from the player within which dots are drawn.
Example:
luarenderDistance = 8.0
#points.aimRadius
Pixels at 1080p a dot can be from the screen centre and still count as aimed at. The closest dot to the crosshair wins.
Example:
luaaimRadius = 70
#instructions.position
Where the keybind panel sits while the grinder is out:
"bottom-right","bottom-center", or"bottom-left". During a cut, the minigame keys always sit centred under the minigame.Example:
luaposition = "bottom-right"
#Hardware Supplier
Settings under Config.Settings.grinder.vendor. Item entries use item names, so renamed items need their entries updated too. See Hardware Supplier.
#vendor.enabled
Enables the vendor peds.
Example:
luaenabled = true
#vendor.recharge
Battery recharging at every vendor.
secondsis the progress bar length,priceis flat per recharge, andchargeAmountis the percent restored, capped at 100. Use100for a full recharge or a lower value for top-ups.Example:
luarecharge = {enabled = true, seconds = 8, price = 100, chargeAmount = 100}
#vendor.wornShare
Share of the vendor's own selling price paid for a used disc at 100% durability. The price drops evenly to the disc's broken item buyback price at 0%.
Example:
luawornShare = 0.8
#vendor.positions
Vendor peds. Capture
coordswhere a player stands, withwas the ped's heading; the ped is lowered onto the ground under it.scenariois the idle scenario. Removeblipto hide the map marker. Players must stay within 5 metres ofcoordsto trade.Example:
luapositions = { { label = "Hardware Supplier", model = "s_m_m_gentransport", coords = vec4(2749.5903320312, 3477.5495605469, 55.671844482422, 193.44876098633), scenario = "WORLD_HUMAN_CLIPBOARD", blip = {sprite = 52, color = 0, scale = 0.7}, items = { {name = "anglegrinder", price = 500}, {name = "anglegrinder_disc", price = 50}, {name = "anglegrinder_disc_pro", price = 100}, {name = "anglegrinder_disc_elite", price = 200}, {name = "anglegrinder_battery", price = 100}, }, buyback = { {name = "anglegrinder_disc_broken", price = 10}, {name = "anglegrinder_disc_pro_broken", price = 10}, {name = "anglegrinder_disc_elite_broken", price = 10}, }, wornBuyback = { {name = "anglegrinder_disc"}, {name = "anglegrinder_disc_pro"}, {name = "anglegrinder_disc_elite"}, }, }, }
#vendor.positions.<vendor>.items
Items the vendor sells, with the price of one piece. Add
labelto override the item's label. Players buy up to 20 at a time, paid from cash first and bank otherwise.Example:
luaitems = { {name = "anglegrinder", price = 500}, {name = "anglegrinder_disc", price = 50}, {name = "anglegrinder_battery", price = 100}, }
#vendor.positions.<vendor>.buyback
Items the vendor buys back, paid in cash per piece.
Example:
luabuyback = { {name = "anglegrinder_disc_broken", price = 10}, }
#vendor.positions.<vendor>.wornBuyback
Used discs the vendor buys back by durability, priced by
wornSharefrom the disc's price in this vendor'sitems. Each stack is sold at its own price.Example:
luawornBuyback = { {name = "anglegrinder_disc"}, {name = "anglegrinder_disc_pro"}, }