Configuration

How to configure script

🔧 Main Configuration

This section covers the general configuration for the building system. You can edit these values in the configuration file to adjust the system to your needs.


🐞 Debug

Config.Debug = true             -- Show debug messages in console
Config.DebugZones = false       -- Show debug zones areas
Config.DebugProps = false       -- Show debug props areas
Option
Description
Default Value

Config.Debug

Shows debug messages in the console.

true

Config.DebugZones

Visually shows building zones on the map.

false

Config.DebugProps

Visually shows the spawned props.

false

👁️ View Distances

Config.DistanceView = 300.0     -- Distance to view the props
Config.DistanceTerritory = 50.0 -- Distance to view the territory
Option
Description
Default Value

Config.DistanceView

Maximum distance to view props.

300.0

Config.DistanceTerritory

Distance to view the territory zones.

50.0

🛠️ Maintenance System

Option
Description
Default Value

Config.MaintenanceSystem

Enables or disables the maintenance system.

true

Config.DaysToMaintain

Number of days props can last before needing maintenance.

7

♻️ Removal and Material Refund

Option
Description
Default Value

Config.RemoveRefundMaterialsPercent

Percentage of materials refunded when removing a prop.

50

📖 Opening the Builder Menu

To open the building book menu, the player must have a specific item:

To open the builder menu, players must have a specific item in their inventory.

Field
Description
Example

item

The item required to open the build book.

"builderbook"

💡 You can change the item to anything you want, as long as it exists in your inventory system.

For example, you could use "constructionmanual", "blueprint", or even something lore-specific.

If you prefer not to use an item at all, you can modify the check manually in the framework.lua file. There you’ll find the logic that handles the item verification — simply remove or rewrite that part to allow opening the menu freely or through another condition (e.g., a command or keybind).

🧱 Available Materials

ID
Name
Icon
Description

wood

Wood

🪵

Harvested pine and oak

stone

Stone

🪨

Extracted from quarries

iron

Iron

⚒️

Forged in blacksmith

cloth

Cloth

🧵

Cotton fabric

💡 You can freely modify this list of materials.

  • You can add, remove, or rename materials according to your gameplay needs.

  • However, each material must have a matching item registered in your inventory system, otherwise players won’t be able to gather or use them.

  • The id field must match the item name exactly (e.g., wood, stone, etc.).

🏗️ Buildable Props

Each object in Config.Data.Props defines a structure the player can build. Here's a breakdown of each field:

Field
Description

id

The model name of the prop (must match a valid in-game model).

name

The display name shown in the builder UI.

image

Path to the image displayed in the build menu.

description

Description of the prop shown to the player.

materials

Materials required to build the prop (only checked during placement).

cost

Materials needed to maintain the prop over time (if maintenance is enabled).

jobs

Job restriction. Set it to a table like { ["builder"] = true } to restrict usage to specific jobs.

🔍 Example with Job Restriction

Only players with one of these jobs will see and be able to build the prop in the builder book.

🧠 Summary

  • ✅ The id field is the prop model you want to spawn in-game.

  • 🧱 materials define the construction cost (only required once when placing).

  • 🧾 cost is the maintenance cost, used periodically if Config.MaintenanceSystem is enabled.

  • 👷 jobs (optional) restricts the prop to certain jobs—others won't even see it in the book.

📦 Blank Prop Template (for developers)

This template helps other developers create and register their own props easily:

Tips for adding new props:

  • The id must match a valid in-game prop model.

  • image should point to a valid path in your resource files.

  • materials are used to build the prop.

  • cost is used for maintenance (if the maintenance system is enabled).

  • If you don't want job restrictions, just set jobs = false.

🧱 Prop Types & Behaviors

This section defines how each prop behaves, how it is categorized in the builder book, and any special functions or restrictions it may have.


🗂️ Prop Types

🧭 These types help categorize props in the UI and determine their in-game behavior.

🌿 Vegetation Removal

Some props automatically clear vegetation (like grass or bushes) underneath when placed:

Prop Type
Removes Vegetation

foundation

✅ Yes

⚙️ Special Prop Functions

You can assign custom interactions to props. Here's an example:

Field
Description

label

Text shown when player is near the prop

key

Control key hash to trigger the action

distance

Max distance to interact with the prop

func

Custom function executed when the key is pressed

🔐 hashPermission ensures only authorized players can interact.

🎮 Controls in Builder Book

Certain keys can remain active while the builder book is open:

Key Name
Description

0x4BC9DABB

Push to Talk allowed


❌ Disabled Controls (While Building)

To avoid interference while navigating the book, these controls are disabled:


🌍 Language Settings

This sets the default language used by the system. If you plan to localize, use this field to switch between "en", "es", etc.

Last updated