square-sliders-verticalconfiguration

File content database.sql

iSanz Labs Configuration Documentation

Complete guide to the config.lua file with detailed explanations, Bridge system documentation, and practical examples.


Table of Contents

  • Introduction

  • Config.Base

  • Config.FatherTable

  • Config.Raids

  • Config.LaptopPenalty

  • Config.Dispatch

  • Config.Commands

  • Config.MiniGames

  • Config.Products

  • Config.Upgrades

  • Config.XP

  • Config.Ranks

  • Config.RandomLocations

  • Config.BlipSettings

  • Config.LabSettings

  • Config.Items

  • Config.FeedSettings

  • Config.Growth

  • Config.PlantSettings

  • Config.Plant

  • Config.TableInteractions

  • Config.DollCraft

  • Config.RollingPaper

  • Config.Strains

  • Config.SellingBehavior

  • Config.SellingZones

  • Config.Selling

  • Config.Interactions

  • Config.Locations

  • Bridge System

  • Best Practices

  • Troubleshooting


Introduction

This documentation covers all configuration options available in the iSanz Labs resource. The configuration is split between shared/config.lua (main configuration) and shared/locations.lua (location-specific settings).

Configuration Access

You can access the configuration from other resources using the export:


Config.Base

Purpose: Core framework dependencies and external resources configuration. This section determines which framework systems the script will use.

Structure

Available Options

Parameter
Options
Description

core

qb-core, qbx_core

Your framework name. The script auto-detects which is running.

menu

iSanz-menu, qb-menu, ox_lib

Menu system for UI interactions.

input

iSanz-input, qb-input, ox_lib

Input dialog system for text/number inputs.

interact

interact, qb-target, ox_target

Interaction system for world interactions.

inventory

qb-inventory, ox_inventory, ps-inventory, qs-inventory

Inventory system your server uses.

progressbar

qb, ox

Progress bar system for timed actions.

notify

qb, ox_lib

Notification system for player messages.

webhooks

true, false

Enable/disable Discord webhook integration.

webhookURL

string

Discord webhook URL (required if webhooks enabled).

Example

Bridge System Integration

The Bridge system automatically adapts to your Config.Base settings. For example:

  • Setting inventory = 'ox_inventory' makes the Bridge use exports.ox_inventory functions

  • Setting interact = 'qb-target' makes the Bridge use exports['qb-target'] functions


Config.FatherTable

Purpose: Main laptop location and access permissions configuration. This is where players hack the laptop to gain lab access.

Structure

Example

Details

  • coords: World coordinates where the laptop spawns. Use /tp command in-game to find exact coordinates.

  • gang: Must match the gang name in your QB-Core qb-core/shared/gangs.lua file (case-sensitive).

  • passwordLength: Random password length generated for each hack attempt.


Config.Raids

Purpose: Raid mechanics configuration for attacking other labs.

Structure

Example

Details

  • OnlyRandomRaids: If true, players can only raid random labs. If false, they can target specific gangs.

  • RaidPrice: Cost is deducted from player's cash/bank (based on Config.Products.defaultMoneyType).

  • SafePassTime: Time window to open the safe during a raid (0 = no time limit).

  • Cooldowns: All time values are in minutes.


Config.LaptopPenalty

Purpose: Configure XP loss penalty for failed laptop hacks.

Structure

Example


Config.Dispatch

Purpose: Police dispatch system configuration for suspicious sales.

Structure

Available Systems

  • qb - QB-Core dispatch (default)

  • ps - Project Sloth dispatch

  • cd - Core Dispatch

  • custom - Custom dispatch system (requires custom code)

Example

Bridge Integration

The Bridge automatically calls the correct dispatch system based on Config.Dispatch.system. See bridge/dispatch.lua for implementation details.


Config.Commands

Purpose: Command permissions and access control for admin/gang commands.

Structure

Example

Access Logic

Access is granted if ANY of the following conditions are met:

  • Player has required permission

  • Player has required job (if jobs is not empty)

  • Player is in required gang (if gangs is not empty)

  • Player identifier matches (if identifiers is not empty)


Config.MiniGames

Purpose: Minigame types for hacking lab doors and laptops.

Structure

Available Types

  • digit - Digit sequence minigame (from bl_ui resource)

  • minesweeper - Minesweeper minigame (from bl_ui resource)

  • nil - Custom (requires custom implementation in bridge/minigames.lua)

Example

Custom Minigames

To use custom minigames, set the value to nil and modify bridge/minigames.lua:


Config.Products

Purpose: Products available in the lab shop (purchased via laptop).

Structure

Example

Important Notes

  • item: Must exactly match the item name in your qb-core/shared/items.lua (case-sensitive).

  • requiredLevel: Products are hidden if player's lab level is below this.

  • defaultMoneyType: Determines if payment is taken from cash or bank.


Config.Upgrades

Purpose: Lab upgrade configurations (purchased via laptop).

Structure

Example

Cost Calculation

Upgrade cost formula: baseCost * (costMultiplier ^ (level - 1))

Example with baseCost = 5000 and costMultiplier = 1.3:

  • Level 1: 5000 * (1.3^0) = 5000

  • Level 2: 5000 * (1.3^1) = 6500

  • Level 3: 5000 * (1.3^2) = 8450

objectsByLevel

Objects are loaded from Config.Locations.UpgradeTables or Config.Locations.UpgradePlantLamps. See Config.Locations section.


Config.XP

Purpose: Experience point rewards for successful hacks.

Structure

Example

Details

  • XP is awarded randomly within the specified range on successful hack.

  • Failed hacks result in XP loss (see Config.LaptopPenalty).

  • XP determines player rank (see Config.Ranks).


Config.Ranks

Purpose: Ranking system based on total XP earned.

Structure

Example

Important Notes

  • Ranks must be in ascending order (lowest XP first).

  • The last rank should have a very high maxXP (e.g., 999999999) to act as the maximum rank.

  • Image paths are relative to the resource root html/ folder.


Config.RandomLocations

Purpose: Random dealer locations for selling products (used when no specific zone is configured).

Structure

Example


Config.BlipSettings

Purpose: Map blip appearance and behavior for dealer locations.

Structure

Example

Common Blip Sprites

  • 140 - Drug dealer

  • 161 - Alert/Police

  • 225 - Shop

  • 303 - Money


Config.LabSettings

Purpose: General lab behavior settings.

Structure

Example


Config.Items

Purpose: Maps display names to inventory item names. Used for item checking and validation.

Structure

Example

Important Notes

  • Display names are used in menus and notifications.

  • Item names must match your database exactly (case-sensitive).


Config.FeedSettings

Purpose: Water and fertilizer consumption rates for plants.

Structure

Example

Details

  • Values are percentages (0-100).

  • LoseTime determines how often the plant loses resources.

  • Plant dies if water/fertilizer reaches 0 for too long (see Config.PlantSettings.StarveTime).


Config.Growth

Purpose: Plant growth speed and rate.

Structure

Example

Calculation

With GainAmount = 1 and GainTime = 36:

  • Plant gains 1% growth every 36 seconds

  • To reach 100% growth: 100 * 36 = 3600 seconds (60 minutes)


Config.PlantSettings

Purpose: General plant behavior settings.

Structure

Example


Config.Plant

Purpose: Individual plant type configurations.

Structure

Example

Prop Models

Prop models must exist in your stream/ folder. Available models:

  • Blue: an_weed_blue_01_small_01a, an_weed_blue_med_01b, an_weed_blue_lrg_01a

  • Purple: an_weed_purple_01_small_01a, an_weed_purple_med_01b, an_weed_purple_lrg_01a

  • White: an_weed_white_01_small_01a, an_weed_white_med_01b, an_weed_white_lrg_01a

  • Yellow: an_weed_yellow_01_small_01a, an_weed_yellow_med_01b, an_weed_yellow_lrg_01a


Config.TableInteractions

Purpose: Table interaction types and requirements for crafting.

Structure

Example

Table Types

  • bagging: Converts buds into bags (uses Config.Plant[].BudsForBag or requiredBuds)

  • joint: Converts buds into joints (uses Config.Strains)

  • doll: Converts buds into dolls (uses Config.DollCraft)


Config.DollCraft

Purpose: Doll crafting configuration (hidden drug packages).

Structure

Example


Config.RollingPaper

Purpose: Rolling paper requirements for joint crafting.

Structure

Example

Usage System

If defaultUses > 1, the system tracks uses via item metadata. When uses reach 0, the item is removed (if removeWhenEmpty = true).


Config.Strains

Purpose: Weed strain configurations for joint rolling.

Structure

Effect Types

  • health_small - Small health boost

  • health_medium - Medium health boost

  • health_large - Large health boost

  • armor_small - Small armor boost

  • armor_medium - Medium armor boost

  • armor_large - Large armor boost

  • speed - Speed boost

  • stamina - Stamina boost

Example


Config.SellingBehavior

Purpose: Selling behavior and risk mechanics.

Structure

Example

Scam Chance Calculation

Final scam chance = stealChanceBase - (lab_level * stealReductionPerLevel), minimum stealMinChance

Example with level 5 lab: 35 - (5 * 2) = 25% (minimum 5%)


Config.SellingZones

Purpose: Selling zone locations and settings.

Structure

Example

Notes

  • Large radius values (like 10000000.0) effectively make the zone work anywhere in the area.

  • Blips are created on the map when zones are enabled.


Config.Selling

Purpose: Items that can be sold and their pricing.

Structure

Example

Price Calculation

Final price = random(priceMin, priceMax) + (lab_level * Config.SellingBehavior.priceBonusPerLevel)


Config.Interactions

Purpose: Interaction sprite/texture configuration for world interactions.

Structure


Best Practices

  1. Always backup config before changes - Create a backup of your config.lua file before making modifications.

  2. Test on development server first - Never test configuration changes on a production server.

  3. Keep item names consistent - Ensure item names match your database exactly (case-sensitive).

  4. Verify coordinates in-game - Test coordinates using /tp command before setting them in config.

  5. Balance prices with server economy - Adjust prices to match your server's economic balance.

  6. Document custom changes - Add comments to document any custom modifications you make.

  7. Use proper data types - Ensure numbers are numbers, strings are strings, and booleans are booleans (no quotes on booleans).

  8. Validate webhook URLs - Test Discord webhook URLs before enabling webhooks.

  9. Check Bridge compatibility - Ensure your Bridge settings match your installed resources.

  10. Test all systems - After changing Bridge settings, test menus, inventories, interactions, etc.


Troubleshooting

Items not working

Problem: Items don't appear or function correctly.

Solution:

  • Verify item names match database exactly (case-sensitive)

  • Check that items exist in your items.lua file

  • Ensure item names in config match exactly with database entries

  • Check server console for item-related errors

Coordinates not working

Problem: Locations don't spawn or are incorrect.

Solution:

  • Test coordinates using /tp x y z command in-game

  • Verify vector3/vector4 format is correct

  • Check for typos in coordinate values

  • Ensure coordinates are within the game world bounds

Webhooks not sending

Problem: Discord webhooks don't send messages.

Solution:

  • Ensure webhooks = true in Config.Base

  • Verify webhookURL is set correctly

  • Test webhook URL in browser or Discord webhook tester

  • Check server console for webhook errors

Upgrades not showing

Problem: Lab upgrades don't appear in menu.

Solution:

  • Check requiredLevel matches player's lab level

  • Verify upgrade is enabled in Config.Upgrades

  • Ensure player has sufficient funds

  • Check that upgrade hasn't reached maxLevel

  • Verify objectsByLevel references Config.Locations correctly

Plants not growing

Problem: Plants don't grow or grow incorrectly.

Solution:

  • Verify Config.Growth settings are correct

  • Check Config.FeedSettings values

  • Ensure plant props exist in stream folder

  • Verify plant type is defined in Config.Plant

  • Check server console for plant-related errors

Dispatch not working

Problem: Police dispatch doesn't trigger.

Solution:

  • Verify dispatch system matches your server (qb/ps/cd/custom)

  • Check that dispatch resource is running

  • Ensure Config.Dispatch settings are correct

  • Test dispatch system independently

  • Check Bridge.Dispatch implementation for your system

Bridge system not working

Problem: Menus, inventory, or interactions don't work.

Solution:

  • Verify resource names in Config.Base match your installed resources exactly

  • Check that required resources are started before iSanz_Labs

  • Ensure resource names match fxmanifest.lua dependency names

  • Check server console for Bridge-related errors

  • Test Bridge functions directly in server console

Interaction textures not showing

Problem: Interaction icons don't appear.

Solution:

  • Verify texture files exist in html/images/interactions/

  • Check texture names match Config.Interactions exactly

  • Ensure texture files are PNG format

  • Verify NUI files are loaded correctly

  • Check browser console (F8) for texture loading errors


Support

  • Documentation: This file

  • Version: v3.0.0-BETA

  • Last Updated: 2025


Note: This documentation is based on the latest version of iSanz Labs. Always refer to the latest config file for the most up-to-date configuration options. For Bridge system modifications, refer to the individual Bridge files in the bridge/ folder.

Last updated

Was this helpful?