Configuration
This document describes all configuration options for the DevHub Gym resource.
Shared Configuration (configs/shared.lua
)
configs/shared.lua
)Debug Configuration
Controls debug output for the gym system.
Enabled: Enables/disables all debug prints.
Levels: Controls specific debug message types.
DevHub Skill Tree Integration
Enable or disable integration with the DevHub Skill Tree system.
DevhubSkillTreeEnabled: Set to
true
to use the skill tree system.
Exercises Configuration
Defines all available gym stations and their properties.
uid: Unique identifier for the exercise type.
maxReps: Maximum repetitions per session.
placeOnTheGround: Whether to place the prop on the ground.
propName: The prop model name.
propCoords: World coordinates for the prop.
playerCoords: Where the player stands during the exercise (optional, required for some exercises).
Client Configuration (configs/client.lua
)
configs/client.lua
)Blip Configuration
Controls the map blip for the gym.
sprite: Blip icon.
scale: Blip size.
color: Blip color.
name: Blip label.
coords: Blip coordinates.
enabled: Show/hide the blip.
Force Stop Key
Defines the key used to interrupt an ongoing exercise manually.
ForceStopKey: The key code to cancel an exercise session. Common values include:
200
= ESC177
= BACKSPACE73
= X
Player StateBag
LocalPlayer.state.gymExercise
LocalPlayer.state.gymExercise
Indicates whether the player is currently performing a gym activity.
Type:
boolean
Default:
false
Description:
true
â the player is currently doing an exercise.false
â the player is not exercising.
Usage: This state can be checked to block certain actions during training or to trigger animations/UI elements.
Minigames
Defines the available minigames and their settings for each difficulty.
settings: Each minigame has settings for
easy
,medium
, andhard
difficulties.
Exercise Types
Maps each exercise to its minigames and skill tree XP rewards.
minigames: List of minigame IDs for the exercise.
skillTrees: XP rewards for each skill tree.
Prop Spawn Distance
Controls how far from the player props will spawn.
Props Menu Offset
Offsets for the weight selection menu for each prop model.
key: Prop model hash.
value: Offset vector for menu display.
Weight Boosts
Defines XP and difficulty scaling for different weights.
skillUid: Skill required to use this weight (or
false
for no requirement).boost: XP multiplier for the weight.
difficulty: Minigame difficulty for the weight.
Server Configuration (configs/server.lua
)
configs/server.lua
)XP System Integration
Awards XP to players after completing exercises if the skill tree system is enabled.
AddXP: (Optional) Function to add XP to a player, using the skill tree system if enabled.
Exercise Flow
Player approaches a gym prop (e.g., kettlebell, punch bag).
Minigame starts based on exercise type and weight.
Player completes reps; XP is calculated and awarded.
Skill tree integration (if enabled) grants XP to the appropriate skill.
Customization
Add or remove exercises in
shared.lua
.Adjust minigame settings and difficulties in
client.lua
.Integrate with other systems by modifying the XP function in
server.lua
.Adjust prop spawn distance and menu offsets as needed.
Last updated