⚙️Configuration

Overview

The Advanced Gyms System is highly customizable through two main configuration files:

  • config.lua - Core framework setup

  • configGyms.lua - Gym locations, equipment, skills, and all gameplay settings

Core Configuration (config.lua)

Framework Setup

TMC = exports.core:getCoreObject()

Config = {}
Config.Gyms = {}

This file establishes the connection to your TMC Framework. Modify the export name if your core resource uses a different identifier.

Gym Locations Configuration

Adding a New Gym

Each gym location in configGyms.lua follows this structure:

Config.Gyms.Locations = {
    ['Your Gym Name'] = {
        enabled = true,  -- Set to false to disable this gym
        BusinessSetup = {
            -- Business and membership settings
        },
        Zones = {
            Building = {
                -- Zone definitions
            },
            Tasks = {
                -- Equipment locations
            }
        }
    }
}

Business Setup (Optional)

Configure gym as a player-owned business with membership system:

Configuration Options:

  • job - The job identifier that allows access to management features

  • EmployeeWorkoutFree - If true, employees can use equipment without membership

  • ReturnPaymentsPercent - Percentage of membership payments that go to the business bank account (0-100)

  • memberships - Table of available membership tiers

Membership Tiers:

  • label - Display name shown to players

  • item - Item identifier that represents the membership card

  • price - Cost per day of membership

  • maxdays - Maximum duration in days (prevents infinite memberships)

  • allowedEquiptment - Array of equipment types this membership can access

Zone Configuration

Boundary Zone

Define the perimeter of your gym building:

Tips for Boundary Zones:

  • Walk around the perimeter of your gym MLO

  • Use /coords or similar to capture corner points

  • Order points in a clockwise or counter-clockwise pattern

  • Ensure minZ/maxZ captures all floors

Membership Zone

Define where workers manage memberships:

This zone typically goes at a front desk or reception area.

Clothing Change Zone (Optional)

Create zones where players can change outfits:

Punching Machines (Optional)

Configure interactive punching machines:

Equipment Locations

Define coordinates for each type of workout equipment:

Equipment Types:

  • Weights - Strength training, builds "Stength" skill, causes "Push" fatigue

  • Treadmills - Cardio training, builds "Stamina" skill, causes "Cardio" fatigue

  • Pushups - Bodyweight push exercise, builds "Stength" skill, causes "Push" fatigue

  • Pullups - Bodyweight pull exercise, builds "Stength" skill, causes "Pull" fatigue

  • Situps - Core training, builds "Lung Capacity" skill, causes "Core" fatigue

  • Boxing Bags - Combat training, builds "Stength" skill, causes "Boxing" fatigue

Set an equipment type to false if your gym doesn't have it:

Skill System Configuration

Base Skills

Configure how skills progress and degrade:

Skill Progression Tips:

  • Lower ProgressionPerWorkout for slower, more realistic progression

  • Increase checkInterval to reduce how often skills decay

  • Set enabled = false to disable skill degradation entirely

  • Adjust decayRate for faster or slower skill loss

Equipment Configuration

Control workout duration and effects for each equipment type:

Fatigue System Configuration

Manage player exhaustion and recovery:

Fatigue Categories:

  • Push - Upper body pushing movements (weights, pushups)

  • Pull - Upper body pulling movements (pullups)

  • Core - Abdominal and core exercises (situps)

  • Cardio - Cardiovascular activities (treadmills)

  • Boxing - Combat sports training (boxing bags)

Balancing Fatigue:

  • Lower blockWorkoutThreshold to force more rest periods

  • Increase recoveryRate for faster natural recovery

  • Decrease recoveryInterval to recover fatigue more frequently

  • Adjust injuryChance values for more/less risk

Punching Machine Configuration

Minigame Settings

Configure the difficulty and scoring for the punching machine minigame:

Difficulty Tuning:

  • timeLimit - Lower for faster/harder gameplay

  • maxKeys - More keys = longer sequences

  • targetScore - Keys needed to achieve perfect score

  • maxMisses - More misses = more forgiving

  • perfectScore - The maximum score achievable

  • Multipliers - Adjust point values for partial/failed attempts

Localization Configuration

Notification Messages

Customize all player-facing notification messages:

Prompt Messages

Configure interaction prompt text:

Permission Configuration

Set required permission levels for admin commands:

Permission Levels:

  • player - All players

  • moderator - Moderator access

  • admin - Administrator access

  • god - Full admin/developer access

Advanced Configuration Tips

Creating Balanced Progression

  1. Start Low, Climb Slow - Set ProgressionPerWorkout to 1-2 for realistic progression

  2. Match Fatigue to Duration - Longer workouts should give more fatigue

  3. Vary Equipment - Have different equipment improve different skills

  4. Reasonable Decay - Daily decay of 1 point keeps players engaged without frustration

Membership Pricing Strategy

  1. Daily Pricing - Set prices per day to make calculations transparent

  2. Tier Benefits - Clearly differentiate membership tiers with equipment access

  3. Revenue Balance - Adjust ReturnPaymentsPercent based on server economy

  4. Max Duration - Prevent exploits with reasonable maxdays limits

Performance Optimization

  1. Limit Equipment Locations - Only add as many positions as your MLO supports

  2. Reduce Check Intervals - Increase degradation/recovery intervals to reduce database calls

  3. Zone Optimization - Keep boundary zones simple with fewer points

Balancing Multiple Gyms

When running multiple gym locations:

  • Give each gym unique equipment layouts

  • Vary membership prices by location prestige

  • Consider different skill progression rates per gym

  • Create location-specific benefits (e.g., boxing gym focuses on combat skills)

Next Steps

After configuring your gyms, check out the FAQarrow-up-right for common questions and troubleshooting tips.

Last updated