πŸ› οΈConfiguration

This document describes all configuration options for the DevHub Truck robbery resource.

βš™οΈ Configuration

Shared Configuration (configs/shared.lua)

Development Mode

Shared.DevelopmentMode = false
  • DevelopmentMode: Enables the in-game admin panel for configuration editing. Set to true only during development/setup.


Categories Configuration

Shared.Categories = {
    ["all"] = {
        label = "All",
        icon = "fa-solid fa-layer-group",
        order = 0
    },
    ["weapons"] = {
        label = "Weapons",
        icon = "fa-solid fa-gun",
        order = 1
    },
    ["tools"] = {
        label = "Tools",
        icon = "fa-solid fa-wrench",
        order = 2
    },
}
  • label: Display name shown in the UI dropdown

  • icon: FontAwesome icon class for the category

  • order: Sort order in the category list (lower = first)


Blueprints Configuration

Property
Type
Description

label

string

Display name of the blueprint

description

string

Description text shown in tooltip

img

string

URL to blueprint image

rarity

string

Rarity tier: common, uncommon, rare, epic, legendary

hidden

boolean

If true, shows as "???" until unlocked

items

table

Array of required items to craft the blueprint

customUnlock

table

Optional custom conditions for unlocking


Crafts Configuration

Property
Type
Description

uid

string

Unique identifier for the recipe

ingredients

table

Array of required materials with name and amount

maxQuantity

number

Maximum craftable at once (-1 = unlimited)

time

number

Crafting duration in seconds

result

table

Output item name and amount

blueprint

string

Optional blueprint requirement

category

string

Category key for filtering

prop

string

Optional 3D prop model for preview

rarity

string

Rarity tier for visual styling


Crafting Stations Configuration

Property
Type
Description

id

string

Unique identifier for the station

label

string

Display name in UI

craftsId

string

Key referencing Shared.Crafts recipe group

queueSize.amount

number

Default queue slots

queueSize.custom

function

Optional function for dynamic queue size

coords

vector4

World position and heading

prop

string

3D prop model name

camera

table

Camera position and lookAt coordinates

attachmentsEnabled

boolean

Enable weapon attachment tab at this station

blip

table

Optional map blip configuration


Community Projects Configuration

Property
Type
Description

id

string

Unique identifier for the project

label

string

Project display name

description

string

Project description text

img

string

URL to project image

order

number

Display order (lower = first)

items

table

Required materials with target amounts


Weapon Attachments Configuration

Weapon attachments are configured in individual files under configs/attachments/. Each weapon has its own configuration file.

Property
Type
Description

label

string

Weapon display name

itemName

string

Inventory item name for the weapon

attachments

table

Categories of available attachments

name

string

GTA component/tint name

label

string

Attachment display name

itemName

string

Optional: inventory item required (if omitted, attachment is free)


Client Configuration (configs/client.lua)

UI Settings

  • ClickSoundVolume: Volume level for UI click sounds (0.0 to 1.0)

Blueprint Display

  • true = Items requiring hidden blueprints are completely hidden until unlocked

  • false = Items are shown but blueprint displays as "???" until unlocked

Feature Toggles

  • CommunityProjectsEnabled: Enable/disable the Community Projects tab

Client Functions (Hooks)

Function
Parameters
Description

CanOpenCrafting

stationId

Validate if player can open crafting (return boolean)

OnCraftingOpened

stationId

Hook when crafting UI opens

OnCraftingClosed

stationId

Hook when crafting UI closes

OnCraftStart

stationId, recipeId, amount

Hook when craft begins


Server Configuration (configs/server.lua)

Server Functions (Hooks)

Function
Parameters
Description

OnCraftStart

source, stationId, recipeId, amount

Server-side hook when crafting starts

CanCraft

source, stationId, recipeId, amount

Validate craft permission (return boolean)

OnAttachmentsApplied

source, weaponModel, weaponSlot, attachmentsApplied

Hook when attachments are saved

CanUnlockBlueprint

source, blueprintId

Validate blueprint unlock (return boolean)

OnBlueprintUnlocked

source, blueprintId

Hook when blueprint is unlocked

Community Project Completion Event


Skill Tree Configuration (configs/skillTree.lua)

Enable Skill Tree

The skill tree integration requires devhub_skillTree resource. Enable in shared.lua:

Skill Category

  • skill: Internal identifier for the skill category

  • title: Display name in skill tree UI

Skills List

Property
Type
Description

uid

string

Unique skill identifier

index

number

Grid position in skill tree

title

string

Skill display name

icon

string

FontAwesome icon class

img

string

Skill icon image URL

description

string

Skill description text

points

number

Skill points required to unlock

effect

number

Effect value (e.g., percentage)

lines

table

Connection lines to adjacent skills

unLockable

boolean

If true, skill cannot be unlocked (decorative node)

Available Skill Types

  • Fast Crafting: Reduces crafting time by X%

  • Double Craft: X% chance to receive double items

  • Experience Boost: Gain X% more XP

  • Rare Drop Chance: Increases rare item drop by X%

  • Material Preservation: X% chance to not consume materials

  • Blueprint Access: Unlocks specific weapon blueprints


Rarity Colors Reference


Configuration Best Practices

  1. Backup configs: Always backup configuration files before making changes

  2. Unique IDs: Ensure all uid, id, and key names are unique across configs

  3. Test incrementally: Change one setting at a time and test thoroughly

  4. Balance crafting times: Set appropriate times based on item value/rarity

  5. Blueprint progression: Design blueprint unlock paths that encourage gameplay

  6. Queue sizes: Balance queue slots with server economy (VIP perks, etc.)

  7. Attachment items: Decide which attachments require items vs. free (default clips)

  8. Community projects: Set realistic material goals based on player population

  9. Image URLs: Use reliable image hosting

  10. Development mode: Always disable DevelopmentMode in production

Last updated