Configuration
Welcome to the configuration guide for DevHub 3D Crafting Table! This document will walk you through setting up and customizing your crafting experience. All primary configuration files are located in
🛠️ Configuration
📁 Configuration Files Overview:
configs/shared.lua
: Settings accessible by both the server and client (e.g., recipe definitions, debug modes).configs/client.lua
: Client-side settings (e.g., UI, camera, sound, developer mode).configs/server.lua
: Server-side settings (e.g., table locations, XP integration).
Shared Configuration (configs/shared.lua
)
configs/shared.lua
)These settings are shared between the server and the client.
Debug Configuration
Controls whether debug messages are displayed in the console.
Enabled
:true
to show debug messages,false
to hide them.Levels
: Fine-tune which types of messages you want to see:Info
: General script information.Success
: Confirmation of successful actions.Warning
: Potential issues or misconfigurations.
DevHub Skill Tree Integration
This setting enables integration with the DevHub Skill Tree System.
DEVHUB_SKILLTREE_ENABLED: Set to
true
if you're using the DevHub Skill Tree system.The skill tree system can be purchased at: DevHub Store.
Recepie Configuration
This section contains generated code from how-to-create-table.md
Recepie: Stores generated recipe data.
Multiple Recipes Configuration
The Shared.MultipleRecipes
allows you to create custom recipes with specific item requirements. This system provides more flexibility for creating multiple recipes under a single crafting table.
How to configurate multiple recepies? Multiple recepies configuration
Client Configuration (client.lua)
Developer Mode
Enables developer commands, such as /tablegenerator
.
DeveloperMode: Set to
true
to enable developer commands.
Target Interaction Text
Configures the text displayed when targeting a crafting table.
UseTableTargetText: The text shown when targeting a crafting table for interaction.
Skill Tree Boosts
Defines various skill-based bonuses that apply when using the skill tree integration.
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.
TablesCheckInterval: Time in milliseconds between each proximity check (default:
2000ms
).
Sound Configuration
Controls the volume of all crafting-related sound effects.
SoundVolume: The global volume for crafting sounds (
0.0
-1.0
).
Camera Offsets
Defines camera positions for different crafting table models.
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.
Table Configuration Options:
Tables: A list of predefined crafting tables.
coords
: The vector4 position of the table in the world.snapToGround
: Iftrue
, the table will be placed on the ground automatically.
Two Methods for Recipe Assignment:
Old Method -
tableUid
:tableUid
: A unique identifier that matches a key inShared.Recepie
.This method links the table to all recipes defined under that specific
tableUid
in the recipe configuration.
New Method -
recipeUids
:recipeUids
: An array of recipe UIDs fromShared.MultipleRecipes
.This method allows you to specify exactly which recipes are available at this table.
More flexible as you can mix and match recipes from different categories.
XP System Integration
This function awards XP to players after crafting if the DevHub Skill Tree System is enabled.
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.
Alternative: Triggering the Client-Side Event
If you prefer not to use Config.Tables
, you can manually trigger the client-side event instead:
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.
Last updated