This document describes all configuration options for the DevHub Gym resource.
Shared Configuration (configs/shared.lua)
Debug Configuration
Controls debug output for the gym system.
Shared.Debug = {
Enabled = true, -- Set to false to disable all debug prints
Levels = {
Info = true, -- General information
Success = true, -- Success operations
Warning = true -- Warning and potential issues
}
}
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.
Shared.DevhubSkillTreeEnabled = true -- Set to false if you don't want to use devhub_skillTree
DevhubSkillTreeEnabled: Set to true to use the skill tree system.
Exercises Configuration
Defines all available gym stations and their properties.
Shared.Exercises = {
{
uid = "kettlebellswing",
maxReps = 10, -- Maximum number of reps for an exercise session
placeOnTheGround = true, -- Place the prop on the ground
propName = "devhub_gym_kettlebell_rack", -- Prop model name
propCoords = vec4(...), -- x, y, z, heading
playerCoords = vec4(...), -- x, y, z, heading (optional, for some exercises)
},
-- Add more exercise stations as needed
}
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).
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)
XP System Integration
Awards XP to players after completing exercises if the skill tree system is enabled.
Config = {}
-- You can add XP logic here if needed, for example:
-- Config.AddXP = function(source, xp)
-- if Shared.DevhubSkillTreeEnabled then
-- exports['devhub_skillTree']:addXp('personal', xp, source)
-- end
-- end
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.