Ares-core documentation

triangle-exclamation

Perfect! Now I have all the context. Here's your comprehensive GitBook documentation:


Configuration Guide

config.lua Reference

This guide covers all configuration options for ares-core. Each section includes explanations, examples, and best practices.


Framework Configuration

Config.Framework = 'auto' -- Options: 'auto', 'esx', 'qb-core'
Config.Debug = true

Framework Detection

The auto setting automatically detects your server's framework using resource state checks:

  1. ESX Detection: Checks if es_extended is started

  2. QBCore/QBOX Detection: Checks if qb-core or qbx-core is started

  3. Fallback: Returns error if no framework found

Manual Override: Set to 'esx' or 'qb-core' to skip auto-detection.

circle-info

💡 Best Practice: Use 'auto' unless you're experiencing framework detection issues.


Lobby System

What are Lobbies?

Lobbies are synchronized player instances that allow multiple players to:

  • Work together on job activities

  • Share task progress

  • Receive shared payouts at completion

Lifecycle Management

Setting
Purpose
Default

LobbyIdLength

Character length of lobby codes (e.g., "ABC123")

6

LobbyTimeout

Inactivity timer before lobby becomes eligible for cleanup

120s (2 min)

GarbageCollectorInterval

How often the system checks for stale lobbies

121s

Cleanup Logic:

  • Lobby must be inactive for 2+ minutes AND have 0 players

  • Prevents memory leaks from abandoned lobbies

  • Runs every 121 seconds (staggered from timeout to ensure proper cleanup)

⚠️ Warning: Setting GarbageCollectorInterval lower than LobbyTimeout may cause premature cleanup.


Invite System

Controls the lobby invite notification UI behavior.

  • Default: 15 seconds before auto-dismissal

  • Player Action: Can accept/decline before timeout

  • Post-Timeout: Invite automatically closes


Player Avatars

Steam Avatar Integration

Displays player Steam profile pictures in lobby UI.

Setup:

  1. Paste key into Config.SteamApiKey

Fallback: Shows player initials if no API key configured

Discord Avatar Integration

Displays custom Discord avatars in lobby UI.

Setup:

  1. Copy bot token

  2. Paste into Config.DiscordBotToken

Fallback: Shows default Discord avatar if no bot token configured

circle-exclamation

Localization

Supported Languages

  • en - English (default)

  • Additional languages coming soon

Translation Files

Located in: ares-core/shared/lang/

Custom Translations: Duplicate en.json and rename to your language code.


Garage System

Purpose

Garages manage job vehicle spawning and return locations for all Ares scripts.

Configuration Fields

Field
Type
Description

label

string

Display name in UI

center

vector3

Reference point for closest garage detection

dropoff.pos

vector3

Where players return vehicles

dropoff.radius

float

Required proximity to return vehicle

spawn.pos

vector4

Vehicle spawn coordinates + heading

spawn.radius

float

Collision check radius

Smart Spawn System

If a spawn point is occupied:

  1. Script checks next nearest garage

  2. Continues until available garage found

  3. Returns error if all garages occupied

circle-info

Error Message: "All garages are currently full. Please try again later."

Adding Custom Garages

Tips:

  • Use unique IDs (lowercase, underscores)

  • Set dropoff.radius large enough for easy access

  • Test spawn.radius to prevent clipping with nearby objects


Job Vehicle Configuration

Settings Explained

Setting
Description
Example

default

Base vehicle model for the job

"burrito"

maxVehicles

Max concurrent vehicles per lobby

2

customVehicles

Phase-specific vehicle overrides

None


Quick Reference

Use Case
Framework
Debug
LobbyTimeout
GarbageCollector

Production

auto

false

120

121

Development

auto

true

60

61

High Traffic

auto

false

180

181


Last updated