DEVHUB DOCUMENTATION
Tebex StoreDevhub LIbDiscord Support
  • 🏠Home page
  • 🐌Download purchased assets
  • ⁉️Error: "You lack the required entitlement to use"
  • ⁉️Error: syntax error near '<\1>'
  • 💾Partnered FiveM Hosting
  • 💾SCRIPTS
    • 📗devhub_lib (NEEDED FOR EACH SCRIPT!)
      • 💻Installation
      • 2️⃣Migration from v1 to v2
      • ⚙️Framework
      • 🖐️Target
      • 🧭Ui
      • 🔑Vehicle Keys
      • ⛽Vehicle fuel
      • 🔊Sound System
      • 👕Clothing
      • ℹ️Logs
      • 📡SQL
      • 🎨UI Color Customization
      • 🆘Compatibility test
  • 🔧Car Tune
    • 💻Installation
    • 🛠️Configuration
    • 💾Saving Cartune Settings
  • 🚙Car Dancing
    • 💻Installation
    • 🛠️Configuration
      • Beat generating
  • 💪Skill Tree
    • 💻Installation
    • 🛠️Configuration
    • 🎫Development
      • Listeners
      • Exports
      • Example skill
      • Pre-made skills
    • ⚙️Skill Generator
    • 🎨UI Color Customization
    • ❔FAQ
  • ⛏️Miner Job
    • 💻Installation
    • 🛠️Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • 🪵Drywood Cutter Job
    • 💻Installation
    • 🛠️Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
      • zones.lua
    • 🎨UI Color Customization
  • 🌊Pool Cleaner Job
    • 💻Installation
    • 🛠️Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
      • zones.lua
    • 🎨UI Color Customization
  • 🌿[FREE] Herbal Alchemist Job
    • 💻Installation
    • 🛠️Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • 📱Who Am I?
    • 💻Installation
    • 🛠️Configuration
      • shared.lua
      • server.lua
    • 🎨UI Color Customization
  • 🎆Skill Selection
    • 💻Installation
    • 🛠️Configuration
    • 💪Skill Tree connection
    • 🎨UI Color Customization
  • 🍲3D CRAFTING TABLE
    • 💻Installation
    • 🛠️Configuration
    • ❓How to create table
    • 🌹Custom props
  • 🏋️Gym
    • 💻Installation
    • 🛠️Configuration
  • ♟️Props
    • 🖼️Paintings Pack
    • 🔪Kitchen Furniture Pack
Powered by GitBook
On this page
  • Shared Configuration (shared.lua)
  • Debug Configuration
  • DevHub Skill Tree Integration
  • Recepie Configuration
  • Client Configuration (client.lua)
  • Developer Mode
  • Skill Tree Boosts
  • Crafting Table Interaction
  • Sound Configuration
  • Camera Offsets
  • Server Configuration (server.lua)
  • Crafting Tables Configuration
  • Alternative: Triggering the Client-Side Event
  • XP System Integration
  1. 3D CRAFTING TABLE

Configuration

Shared Configuration (shared.lua)

Debug Configuration

The debug configuration controls whether debug messages are displayed and what types of messages are enabled.

Shared.Debug = {
    Enabled = true, -- Set to false to disable all debug prints
    Levels = {
        Info = true,    -- General information
        Success = true, -- Success operations
        Warning = true  -- Warnings and potential issues
    }
}
  • Enabled: Enables or disables all debug prints.

  • Levels: Controls specific debug message types:

    • Info: General information messages.

    • Success: Messages for successful operations.

    • Warning: Warnings and potential issues.


DevHub Skill Tree Integration

This setting enables integration with the DevHub Skill Tree System.

Shared.DEVHUB_SKILLTREE_ENABLED = false
  • DEVHUB_SKILLTREE_ENABLED: Set to true if you're using the DevHub Skill Tree system.


Recepie Configuration

This section contains generated code from How to create table

Shared.Recepie = { 
    -- Generated code
}
  • Recepie: Stores generated recipe data.

Client Configuration (client.lua)

Developer Mode

Enables developer commands, such as /tablegenerator.

Config.DeveloperMode = true 
  • DeveloperMode: Set to true to enable developer commands.


Skill Tree Boosts

Defines various skill-based bonuses that apply when using the skill tree integration.

Config.SkillTreeBoosts = {
    ["table_boost1"] = { 
        attribute = "double_xp",
        chance = 10,
    },
    ["table_boost2"] = {
        attribute = "xp_multiplier",
        chance = 10,
    },
    ["table_boost3"] = {
        attribute = "double_reward",
        chance = 10,
    },
    ["table_boost4"] = {
        attribute = "needed_items_recover",
        chance = 10,
    }
}
  • SkillTreeBoosts: Defines the various skill effects that can be applied during crafting.

    • double_xp: 10% chance to earn double XP from crafting.

    • xp_multiplier: 10% XP gain multiplier.

    • double_reward: 10% chance to receive double rewards.

    • needed_items_recover: 10% chance to recover 50% of required crafting items.


Crafting Table Interaction

Table Check Interval

Defines how often the system checks if a player is near a crafting table.

Config.TablesCheckInterval = 2000 
  • TablesCheckInterval: Time in milliseconds between each proximity check (default: 2000ms).


Sound Configuration

Controls the volume of all crafting-related sound effects.

Config.SoundVolume = 0.5 
  • SoundVolume: The global volume for crafting sounds (0.0 - 1.0).


Camera Offsets

Defines camera positions for different crafting table models.

Config.CameraOffsets = {
    [`dh_alchemy_table`] = {
        cameraAimOffset = vec3(0.3, 0.0, 0.0),
        cameraOffset = vec3(0.3, -2.0, 1.75),
    },
    [`h4_prop_h4_table_isl_01a`] = {
        cameraAimOffset = vec3(0.0, 0.0, 0.0),
        cameraOffset = vec3(0.3, -2.5, 2.6),
    },
    [`bkr_prop_weed_table_01b`] = {
        cameraAimOffset = vec3(0.0, 0.0, 0.0),
        cameraOffset = vec3(0.0, -2.0, 2.2),
    },
}
  • CameraOffsets: Configures camera behavior when interacting with different crafting tables.

    • cameraAimOffset: Adjusts where the camera is aiming (relative to the table).

    • cameraOffset: Controls the position of the camera relative to the table.

Server Configuration (server.lua)

Crafting Tables Configuration

Defines crafting table locations and settings. This script can be used to spawn crafting tables, or you can spawn them via your own scripts.

Config.Tables = { 
    { coords = vec4(250.5990, -753.7527, 34.6390, 68.1239), tableUid = "herbal_table", snapToGround = true },
    -- You can add more tables with different locations and recipes
}
  • Tables: A list of predefined crafting tables.

    • coords: The vector4 position of the table in the world.

    • tableUid: A unique identifier for the table.

    • snapToGround: If true, the table will be placed on the ground automatically.

Alternative: Triggering the Client-Side Event

If you prefer not to use Config.Tables, you can manually trigger the client-side event instead:

TriggerEvent("devhub_3dCraftingTable:useTable:client", entity, tableUid)
  • Triggering this event manually allows you to use your own logic for spawning crafting tables.

  • The event takes two arguments:

    • entity: The table entity.

    • tableUid: The unique identifier of the table.

  • This provides flexibility in integrating the crafting system into custom scripts.


XP System Integration

This function awards XP to players after crafting if the DevHub Skill Tree System is enabled.

Config.AddXP = function(source, xp)
    -- Add XP to player
    if Shared.DEVHUB_SKILLTREE_ENABLED then 
        -- Server side example
        exports['devhub_skillTree']:addXp('personal', xp, source)
    end
end
  • AddXP: A function that adds XP to the player.

    • Uses exports['devhub_skillTree']:addXp() when DevHub Skill Tree is enabled.

    • XP is applied to the personal skill tree.

PreviousInstallationNextHow to create table

Last updated 2 months ago

The skill tree system can be purchased at: .

🍲
🛠️
DevHub Store