βš™οΈFull Configuration Breakdown

πŸš€ X-NPC_Control Configuration Breakdown All settings are in config.lua – tweak values to match your server’s needs.


1. Debug Settings

For troubleshooting/development:

Config.Debug = {  
    RemoveAllNPCs = false,   -- [true/false] Wipe all NPCs on script start (use sparingly!)  
    Mode = false,            -- [true/false] Show debug text (FPS impact!)  
    Radius = 250.0,          -- Radius (meters) to scan for NPCs  
    RefreshRate = 1000       -- Debug UI update speed (ms)  
}  

Usage:

  • Set RemoveAllNPCs = true only to test performance.

  • Enable Mode = true to see NPC counts near players.


2. Population Control

Adjust NPC/vehicle density globally or dynamically:

Config.Population = {  
    PedBudget = 2,           -- 0=None, 1=Low, 2=Medium, 3=High  
    VehicleBudget = 2,       -- Same scale as above  
    MinBudgetLevel = 1,      -- Never go below this level  

    -- Dynamic adjustments:  
    EnableDynamicPopulation = true,   -- Master switch  
    PlayersPerLevel = 50,    -- Reduce density by 1 level per 50 players  
    NightTimeReduction = 1   -- Reduce by 1 level during nighttime  
}  

Recommended Presets:

Server Type
PedBudget
Dynamic Mode

Zombie Apocalypse

0

false

City Roleplay

2

true

Battle Royale

1

true


3. NPC-Free Zones

Create areas where NPCs vanish

Config.NPCFreeZones = {  
    Enabled = true,  
    RefreshRate = 2500,      -- How often zones are checked (ms)  
    ExemptImportantPeds = true, -- Protect shopkeepers/etc.  
    Zones = {  
        {  
            name = "Hospital",  
            coords = vector3(323.26, -595.57, 44.86), -- Center point  
            radius = 75.0,   -- Meters  
            removePeds = true, -- Clear NPCs  
            removeVehicles = false  
        }  
    }  
}  

Pro Tips:

  • Use /tp 323.26 -595.57 44.86 in-game to verify coordinates.

  • Set DrawZones = true temporarily to visualize boundaries.


4. Dispatch Services

Disable emergency responses:

Config.DisableDispatchServices = true -- Master switch  
Config.DispatchServices = {  
    [1] = true,  -- Police cars  
    [2] = true,  -- Police helicopters  
    [3] = true,  -- Fire trucks  
    -- ... (see full list in config.lua)  
}  

Key IDs:

  • [1] Police cars

  • [5] Ambulances

  • [11] Gang activity


5. Scenario Control

Block annoying NPC behaviors:

Config.Scenarios = {  
    WORLD_VEHICLE_STREETRACE = true,   -- Disable street races  
    WORLD_HUMAN_PAPARAZZI = true,      -- Remove photographers  
    WORLD_VEHICLE_POLICE_BIKE = true   -- No police bikes  
}  

Popular Scenarios to Disable:

  • WORLD_VEHICLE_MECHANIC – NPCs repairing cars

  • WORLD_VEHICLE_AMBULANCE – Random EMS spawns

  • WORLD_VEHICLE_BUSINESSMEN – Suit-clad NPCs


6. Gang Relationships

Control hostility levels:

Config.Relationships = {  
    AMBIENT_GANG_BALLAS = 5, -- 5=Hate (attack on sight)  
    COP = 1,                 -- 1=Respect (ignore crimes)  
    MEDIC = 2                -- 2=Like (help players)  
}  

Relationship Scale:

  • 0 Companion

  • 1 Respect

  • 2 Like

  • 3 Neutral

  • 4 Dislike

  • 5 Hate


7. Performance Tweaks

Reduce server strain:

-- Disable random spawns:  
Config.RandomVehicles = {  
    CreateGarbageTrucks = false,  
    CreateRandomCops = false  
}  

-- Cleanup vehicle generators:  
Config.VehicleGenerators = {  
    RemoveFromLocations = true -- Hospitals/police stations  
}  

8. Routing Buckets

Disable NPCs in specific dimensions (MLOs):

Config.RoutingBuckets = {  
    Enabled = true,  
    DisabledBuckets = {5, 6} -- IDs of restricted dimensions  
}  

Common Uses:

  • Interior dimensions (e.g., apartments)

  • Event zones


❗ Troubleshooting

Issue
Quick Fix

NPCs still in zones

Increase zone radius by 10-20 meters

Police respond despite config

Set Config.DispatchServices[1] = true

FPS drops

Set PedBudget = 1 and disable scenarios


Need Help? Join FiveWorld Discord for config reviews and optimization! πŸš—πŸ’¨

Last updated