Cuxial Gym is tuned in three places: shared/config.lua for behaviour, the data/ files for the gym and factory values, and the /gymadmin panel for live balancing. Restart the resource after changing a file.
Fatigue, stats, body parts, streaks, achievements, exercise values, supplements and tutorial are also edited in game with /gymadmin. What you save there is stored in the database and fully replaces that section of the data/ file until you reset it from the panel.
General
| Option | Type | Default | What it does |
|---|---|---|---|
debug | boolean | false | Console traces, SQL detail and the /gymaudio and /gymmap test commands. Also enabled with the cuxial_gym_debug convar set to 1. |
Modules · modules
| Option | Type | Default | What it does |
|---|---|---|---|
shop | boolean | true | Drinks and supplements shop. |
helper | boolean | true | Spotter: another player can assist a set. |
admin | boolean | true | Staff settings panel and the /gymadmin command. |
Interface · ui
| Option | Type | Default | What it does |
|---|---|---|---|
brand | string | 'IRONPULSE' | Brand name shown on the tablet and panels. |
logo | string | 'brand/ironpulse.webp' | Interface logo, as a path inside web/dist/img/. |
accent | string (hex) | configurable | Interface accent colour. |
currency.symbol | string | '$' | Currency symbol next to amounts. |
currency.locale | string | 'es-ES' | Number format for amounts, as a language code ('en-US', 'es-ES'...). |
To use your own brand, copy your logo into web/dist/img/ and change brand, logo and accent. Nothing else in the interface needs to change.
Interface sounds · sounds
Volumes from 0.0 to 1.0.
| Option | Type | Default | What it does |
|---|---|---|---|
master | number | 1.0 | Multiplies all the others. |
click | number | 0.35 | Click. |
start | number | 0.6 | Set start. |
success | number | 0.7 | Success. |
fail | number | 0.7 | Failure. |
Exercise sounds · audio
Native in-world sounds while training. They come from cuxial_gym_assets.
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | false mutes exercise sounds. |
networked | boolean | false | true lets nearby players hear the character's impacts and breathing. |
volume | number | 1.0 | Factor on the base volume of each sound (0-1). |
debugCommand | string | 'gymaudio' | With debug, /gymaudio oneshots or /gymaudio loops plays a whole bank. |
breath.every | number | 3 | The character breathes every N reps. |
breath.delayMs | number | 600 | Breath delay from the start of the rep (ms). |
banks, breath.male, breath.female, rep and loops are the sound names in the assets pack; each exercise picks its own in its file.
Logs · logs
| Option | Type | Default | What it does |
|---|---|---|---|
convar | string | 'cuxial_gym_webhook' | Server convar holding the Discord webhook URL. |
exercise | boolean | true | Logs every finished set. |
batchMinutes | number | 5 | Sets are grouped and sent every N minutes. |
Staff · admin
| Option | Type | Default | What it does |
|---|---|---|---|
permission | string | 'admin' | Framework permission that opens the settings panel and the staff commands. |
auditDays | number | 60 | Days the staff action log is kept. |
Anti-spam limits · rateLimits
Each entry is { requests, window_ms }: the maximum requests of that kind a player can make within the window. Above it, the request is rejected.
| Option | Default | Action |
|---|---|---|
default | { 10, 10000 } | Any action without its own entry |
sync | { 6, 10000 } | Request the config or player data |
openGym | { 3, 10000 } | Open the gym panel |
membership | { 5, 10000 } | Buy the membership |
perk | { 5, 10000 } | Unlock a perk |
exercise | { 5, 10000 } | Start and stop a set |
rep | { 20, 10000 } | Each rep |
phase | { 12, 5000 } | Animation phases of each rep |
effects | { 3, 10000 } | Clear effort effects on going down |
help | { 5, 10000 } | Start and stop spotting |
helpResult | { 20, 10000 } | Spotter minigame |
supplement | { 5, 10000 } | Take a supplement |
shopOpen | { 5, 10000 } | Open the shop |
shopBuy | { 10, 10000 } | Buy or pay the cart |
admin | { 20, 10000 } | Settings panel |
Commands · commands
Each command has a name. Set another name to rename it, or false to disable it.
| Option | Default | Command |
|---|---|---|
admin.name | 'gymadmin' | Settings panel |
effects.name | 'gymfx' | Effort effects test |
level.name | 'gymnivel' | Set level or attribute |
max.name | 'gymmax' | Attributes to 100 % |
Usage of each one in Commands & permissions.
Keys · keys
Default keys. Each player can change them in the FiveM key bindings.
| Option | Default | What it does |
|---|---|---|
cancel | 'X' | Leaves the set or stops spotting. |
sprint | 'LSHIFT' | Sprint; triggers the Endurance stamina regeneration. |
climb | 'SPACE' | Jump; triggers the Speed fast climbing. |
Items · items
| Option | Type | Default | What it does |
|---|---|---|---|
imageUrl | string | 'nui://ox_inventory/web/images/%s.webp' | Item image in the interface. %s is the item name. |
World · world
| Option | Type | Default | What it does |
|---|---|---|---|
tickMs | number | 1000 | How often the script checks whether the player is in the gym zone (ms). |
mapFindRadius | number | 0.15 | Radius used to find each map equipment at its position (m). |
mapDebugCommand | string | 'gymmap' | With debug, /gymmap lists the equipment found and its offset. |
blockScenarios | boolean | false | true removes the NPCs working out in the zone. |
Panel · panel
| Option | Type | Default | What it does |
|---|---|---|---|
maxDistance | number | 10.0 | Maximum distance to the tablet to use the panel (m). |
leaderboardSize | number | 10 | Leaderboard rows. |
leaderboardSeconds | number | 60 | Seconds the leaderboard is cached. |
Tablet · tablet
| Option | Type | Default | What it does |
|---|---|---|---|
dui | boolean | true | true draws the panel on the glass of the gym screen. false opens it as a full-screen interface. |
model | string | 'cuxial_gym_screen' | Screen prop. Its position is in data/gym.lua. |
txd / texture | string | 'cuxial_gym_screen' / 'cuxial_gym_screen_dui' | Glass texture replaced while in use. |
offset, yaw, pitch, width, height | — | fitted to the prop | Centre, rotation, tilt and size of the glass. Change them only if you use another prop. |
maxDistance | number | 3.0 | Maximum distance to keep using the screen (m). |
releaseMs | number | 10000 | Wait after leaving the screen before its browser is released (ms). |
overlay | boolean | false | true draws the screen over the glass without world lighting. |
pixels | number | 921600 | Pixels of the screen browser; width and height follow the glass ratio. |
camera.distance | number | 1.1 | Camera distance in front of the glass (m). |
camera.frame | table | { width = 1.028, height = 0.720 } | Camera framing (m). |
camera.margin | number | 1.05 | Margin over the framing. |
camera.fov | number | false | false | Fixed FOV; false derives it from the framing. |
drawCursor | boolean | false | true also draws the pointer inside the screen. |
wheelStep | number | 120 | Scroll per wheel notch; a negative value inverts it. |
exitKeys | string[] | { 'Escape', 'Backspace' } | Keys that close the screen. |
Minigame · minigame
| Option | Type | Default | What it does |
|---|---|---|---|
ui.position | string | 'bottom-right' | Minigame corner: 'bottom-right', 'bottom-left', 'top-right', 'top-left' or 'center'. |
ui.scale | number | 0.8 | Scale; 1 is natural size. |
ui.offset | table | { x = 24, y = 24 } | Distance from the edge (px). |
Membership · membership
| Option | Type | Default | What it does |
|---|---|---|---|
account | string | 'cash' | Account charged. |
price | number | 1000 | Price before the level discount. |
days | number | 7 | Pass days per purchase. |
required | boolean | true | true requires an active pass to train. false lets everyone train. |
Exercise · exercise
| Option | Type | Default | What it does |
|---|---|---|---|
anchorModel | string | 'prop_tick' | Invisible model that syncs the equipment over the network. |
startDistance | number | 4.0 | Maximum distance to the equipment to start (m). |
maxDistance | number | 6.0 | If the player moves further away, the set ends (m). |
minRepMs | number | 1500 | Minimum time between reps (ms). |
minigameMinMs | number | 1500 | Minimum accepted minigame duration (ms). |
autoPassMs | number | 500 | Minimum duration of an auto-passed minigame (ms). |
minigameEvery | number | 2 | A minigame in one of every N reps. The first rep of the set always has one. |
maxFails | number | 3 | Consecutive failed minigames that end the set. The failed rep does not count. |
toleranceMs | number | 250 | Network margin for timing checks (ms). |
idleTimeoutSeconds | number | 120 | With no reps for this long, the server closes the set (s). |
defaultMaxReps | number | 20 | Rep limit if the exercise does not declare one. |
requestTimeoutMs | number | 10000 | If the server does not answer in time, the set closes and controls are released (ms). |
targetDistance | number | 2.0 | Interaction distance for the equipment (m). |
lockdown.allowed | number[] | camera, movement and chat, among others | Controls left free during the set and while spotting. |
lockdown.blocked | number[] | { 199, 200, 322 } | Controls always blocked during the set. |
lockdown.pauseMenu | boolean | false | true allows opening the pause menu while training. |
Bonus caps · bonuses
Caps on the sum of supplements, streak and perks.
| Option | Type | Default | What it does |
|---|---|---|---|
maxMinigameChance | number | 90 | Maximum chance to skip the minigame (%). |
maxXpBonus | number | 200 | Maximum extra XP (%). |
maxConditionBonus | number | 200 | Maximum extra condition per rep (%). |
maxFatigueReduction | number | 50 | Maximum fatigue reduction per rep (%). |
Stats · stats
| Option | Type | Default | What it does |
|---|---|---|---|
baseMaxHealth | number | 200 | Character base max health, before the Strength bonus. |
xpBonusToStats | boolean | false | true also applies the supplement and streak XP bonus to level XP. With false only perks do. |
healthGuardMs | number | 15000 | If another resource changes max health, the Strength bonus is restored after this margin (ms). |
Level, condition and the effects of each attribute live in data/defaults.lua (below).
Downed player · vital
| Option | Type | Default | What it does |
|---|---|---|---|
bags | string[] | { 'isDead', 'cuxial:state' } | Player state bags that mark them as downed. Add your medical system's one. |
downValues | table | { true, 'dead', 'laststand' } | Values of those state bags that count as downed. Going down ends the set; max health is restored on getting up. |
Perks · perks
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | true enables the perk tree in data/perks.lua and its tab on the tablet. |
xpPerPoint | number | 500 | Training XP per perk point. |
Supplements · supplements
| Option | Type | Default | What it does |
|---|---|---|---|
useMs | number | 4000 | Progress bar duration when taking one (ms). |
stackSame | boolean | false | true adds up two doses of the same supplement. With false, the new one replaces the previous one and renews the duration. |
anim.drink | table | drink from bottle | Animation for drinks that do not declare their own. |
anim.supplement | table | shake and drink | Animation for supplements that do not declare their own. |
Spotter · helper
| Option | Type | Default | What it does |
|---|---|---|---|
maxDistance | number | 3.0 | Maximum distance between the spotter and the player training (m). |
animSwapMs | table | { 10000, 15000 } | How often the spotter animation changes, minimum and maximum (ms). |
extraDistance | number | 1.0 | Margin over maxDistance accepted by the server (m). |
reps | number | 2 | Free reps per spotter minigame beaten. |
Tutorial · tutorial
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | Guided tour the first time the tablet opens. This is the factory value; it can also be changed in /gymadmin. |
Preview videos · previews
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | true shows a video of each exercise in the catalogue. |
baseUrl | string | '' | Base URL. The video is baseUrl .. clip .. extension. |
extension | string | '.mp4' | Video extension. |
clips | string[] | {} | Available clips. |
Compatibility · compat
For resources that use the AddSkillToPlayer, GetPlayerSkills and MaxAllSkills exports.
| Option | Type | Default | What it does |
|---|---|---|---|
skills | table | { Strength = 'strength', Stamina = 'endurance', Running = 'speed' } | Skill received by the export → gym attribute (strength, endurance, speed, lungs or combat). |
xpPerPoint | number | 10 | Level XP per skill point. |
maxSkillsItems | string[] | { 'gym_max_power' } | Items that set all five attributes to 100 % through MaxAllSkills. |
Shop · shop
| Option | Type | Default | What it does |
|---|---|---|---|
account | string | 'cash' | Payment account. |
maxCartLines | number | 30 | Maximum cart lines. |
maxAmount | number | 100 | Maximum units per line. |
items | table | six drinks and supplements | Catalogue: { item, price, label?, image? }. Without label or image, the inventory ones are used. |
The final price includes the level discount from data/defaults.lua.
shop = {
account = 'bank',
maxCartLines = 30,
maxAmount = 100,
items = {
{ item = 'gym_hydration_station', price = 40 },
{ item = 'gym_mass_gainer', price = 600, label = 'Mass Gainer XL' },
},
},Effort effects · effects
Face · effects.face
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | Three-level effort face during the set and an exhausted face after a hard set. |
hardFatigue / maxFatigue | number | 50 / 80 | Main body part fatigue that moves to effort 2 and 3 (0-100). |
hardProgress / lastProgress | number | 0.6 / 0.9 | Set progress that moves to effort 2 and 3 (0-1). |
tiredFatigue | number | 70 | Fatigue at the end from which the exhausted face appears (0-100). |
tiredMs | number | 20000 | Exhausted face duration (ms). |
replayMs | number | 2500 | How often the expression is replayed for other players (ms). |
dicts, fallback, clips, fallbackClips and tiredDicts are the native facial animations used.
Voice · effects.voice
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | Panting and grunting with the audio.breath sounds. |
volume | number | 1.0 | Volume (0-1). |
cooldownMs | number | 4000 | Minimum time between two sounds (ms). |
chance | number[] | { 35, 60, 100 } | Chance per rep at effort levels 1, 2 and 3 (%). |
sounds | number[] | { 1, 1, 2, 2 } | Breath sound (1 or 2) per effort level 1-4. |
withBreath | number | 3 | Minimum level on exercises that already breathe on their own. |
Exhaustion · effects.exhaustion
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | After a hard set: less stamina and a darkened screen. |
durationMs | number | 180000 | Duration (ms). |
tickMs | number | 5000 | Countdown interval (ms). |
restFactor | number | 2.0 | At rest, time runs down this many times faster. |
restSpeed | number | 0.5 | Maximum speed that counts as resting (m/s). |
supplementCut | number | 0.5 | Share of the remaining time removed by a supplement (0-1). |
stamina | number | 0.6 | Max stamina multiplier while it lasts. |
timecycle | string | 'rply_vignette' | Screen filter; '' for none. |
strength | number | 0.35 | Initial filter strength, which fades (0-1). |
postfx | string | '' | Extra screen effect; '' for none. |
Native stats · effects.gameStats
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | Writes the native GTA stats (0-100): stamina, lung capacity and shooting come from Endurance, Lungs and Combat. |
slot | string | 'MP0' | Stats slot: 'MP0' or 'MP1'. |
fixed | table | { STRENGTH = 0 } | Stats with a fixed value for everyone. Native strength stays at 0 because damage is handled by the Strength attribute. |
Panel caps · limits
| Option | Type | Default | What it does |
|---|---|---|---|
supplements | number | 64 | Maximum supplements saved from the panel. |
effects | number | 8 | Maximum effects per supplement. |
achievements | number | 200 | Maximum achievements. |
Data files
All of them are in data/ and ship with the values for the included gym.
| File | Content | Edited in /gymadmin |
|---|---|---|
gym.lua | The gym: name, zone polygon, blip, tablet position and every map equipment with its exercises and minigames. | No |
exercises.lua and exercises/*.lua | Catalogue order and one file per exercise: category, body part, fatigue, XP, attribute split, rep limit, animations and sounds. | Values (XP, fatigue, reps, split) |
minigames.lua | The 13 minigames and their settings across the 8 difficulty levels. | No |
defaults.lua | Global fatigue, level and XP curve, condition, each attribute's effects, level discount, inactivity loss and streaks. | Yes |
bodyparts.lua | The seven body parts: fatigue cap and recovery per minute. | Yes |
supplements.lua | Drinks and supplements: item, kind, duration, effects, prop and animation. | Yes |
achievements.lua | Achievements: counter, tier, target and icon. | Yes |
perks.lua | Perk tree: bonus, value, cost and prerequisite. | No |
helper.lua | Spotter animations. | No |
hints.lua | On-screen key hints during the set and while spotting. | No |
The gym · data/gym.lua
equipment lists the equipment that is part of the cuxial_gym_assets map. The script finds each one by model at its position; there is no need to create them. For each piece you can change its exercises and minigames:
minigames = {
{ id = 'rhythm', min = 1, max = 4 },
{ id = 'grip', min = 2, max = 6 },
},min and max are the difficulty (1-8) at the start and at the end of the set. The name (label) and the blip (blip.enabled, sprite, color, scale) are also changed here.
Do not move the equipment or zone coordinates: they are fitted to the included map. If a piece is no longer found, enable debug and use /gymmap to see its offset.
Level, condition and effects · data/defaults.lua
- Overall level.
stats.levelCap(100),baseXpToNext(100 XP from level 1 to 2),xpMultiplier(×1.15 per level) andbaseXpPerRep(5). - Condition of each attribute, from 0 to 100 %. It rises with each rep following the exercise's split (
condition.perRep, pluslevelBonusby level) and drops continuously, offline too:percent(30 %) everyhours(12 h). - Effects of each attribute by condition, as interpolated
{ level, value }points: extra max health and melee damage (Strength), stamina and regeneration (Endurance), sprint and climbing (Speed), swimming and lung capacity (Lungs), knockdown resistance and aim (Combat; aim applies withrecoilEnabled = true). - Level discount in the shop and on the membership: 5 % at level 25, 10 % at 50 and 20 % at 100.
- Level loss from inactivity (
decay): off by default. - Streaks:
minRepsPerDay(15) and the XP bonuses for consecutive days, from 5 % at 3 days to 50 % at 60.
Common changes
Let players train without a membership
membership = { account = 'cash', price = 1000, days = 7, required = false },Charge the membership and the shop from the bank
membership = { account = 'bank', price = 1500, days = 30, required = true },And in shop, account = 'bank'.
Open the panel full screen instead of on the gym screen
In tablet, set dui = false.
Keep attributes from dropping over time
In /gymadmin, stats section, set the condition loss to 0. From the file, in data/defaults.lua:
condition = { enabled = true, percent = 0, hours = 12, perRep = 1.0, levelBonus = 0.5 },