Config
The default configruation provided with Possible Territories.
The resource folder on your server must be named exactly possible-territories.
The default configruation provided with Possible Territories.
return { Debug = true, -- Enable debug mode Framework = "qb", -- qb for QBCore/ QBOX, esx for ESX Emotes = 'scully_emotemenu', -- rpemotes for rpemotes-reborn, scully_emotemenu for scully_emotemenu loggingModule = { enabled = true, service = '', -- 'oxlib' or 'your_webhook_discord' }, TerritoryCap = { Enabled = true, -- When enabled, gangs can only own a limited number of territories MaxTerritories = 3 -- Maximum number of territories a gang can own }, GangLevelCap = { Enabled = true, -- When enabled, a gang's level will determine how many territories they can own BaseAmount = 2, -- Minimum number of territories any gang can own regardless of level LevelsPerTerritory = 100, -- How many levels needed per territory (level 100 = 1 territory, level 200 = 2 territories) GangCap = 12 -- Maximum number of territories a gang can own regardless of level }, PeacefulTerritories = false, -- When true, all gangs are peaceful in all territories by default ForceHostility = { Enabled = true, -- When enabled, territories become peaceful if gang influence drops below threshold MakePeacefulAt = 25 -- Percentage threshold (0-100) below which territory becomes peaceful }, GangMDTv2 = false, -- When true, stash access uses possible-gang-mdt hasPermission ('open_territory_stash'); when false, use StashAccess grade TerritoryLocations = { Mode = 'config', -- 'config' = zones from config.Zones | 'database' = zones from DB (required for MDT map create/edit/delete) AllowMdtManagement = false, -- When true, MDT zone CRUD exports are enabled -- Seed once when the DB is empty, then set this to false (see note below) SeedFromConfigOnStart = true, }, StashAccess = 2, -- Minimum gang grade required to access territory stashes (only used when GangMDTv2 is false) InfluenceDecay = { Enabled = true, -- Enable influence decay on resource start Percentage = 10 -- Percentage of influence to decay (0-100) }, -- Define your Gangs here and blip colours for them (https://docs.fivem.net/docs/game-references/hud-colors/) Gangs = { { name = "ballas", color = 7 }, { name = "families", color = 25 }, { name = "vagos", color = 5 }, { name = "aztecas", color = 68 }, { name = "lostmc", color = 40 }, { name = "armenians", color = 20 }, { name = "triads", color = 59 }, { name = "marrabunda", color = 63 }, }, -- Define your Gang Menu Colours here GangMenuColours = { ballas = "purple", families = "green", vagos = "yellow", triads = "red", lostmc = "black", aztecas = "lightblue", marrabunda = "blue", armenians = "gray" }, -- Uses DRAW_MARKER - https://docs.fivem.net/natives/?_0x28477EC23D892089 EnemyMarkers = { Enabled = true, -- Enable/disable enemy markers feature MarkerType = 3, -- https://docs.fivem.net/docs/game-references/markers/ MarkerColor = {255, 0, 0}, -- Red color for the marker MarkerSize = {0.5, 0.5, 0.5}, -- Size of the marker MarkerBobUpAndDown = false, -- Whether the marker should move up and down MarkerDistance = 50.0, -- Max distance to render markers (in meters) RefreshRate = 1000, -- How often to refresh marker data (in ms) MarkerOffset = 1.5, -- Height offset above player's head UseRotation = true, -- Use rotation instead of direction vector RotationX = 180.0, -- X rotation (pitch) - for type 3, 180 is UP, 0 is DOWN RotationY = 0.0, -- Y rotation (roll) RotationZ = 0.0, -- Z rotation (yaw) FaceCamera = true, -- Make marker always face the player's camera }, Zones = { { name = "LSIA", zoneType = "poly", -- Changed to polygon type poly = { points = { vec3(-1154.55, -1887.88, 50.0), vec3(-503.03, -2336.36, 50.0), vec3(-746.97, -2734.85, 50.0), vec3(-646.97, -2798.48, 50.0), vec3(-828.79, -3098.48, 50.0), vec3(-607.58, -3204.55, 50.0), vec3(-940.91, -3768.18, 50.0), vec3(-2198.48, -3131.82, 50.0), vec3(-1628.79, -2140.91, 50.0) } }, sphere = { coords = vec3(-149.28, -1621.43, 41.96), radius = 125.0, }, box = { coords = vec3(-149.28, -1621.43, 41.96), size = vec3(250.0, 250.0, 50.0), rotation = 0.0 }, debug = true, propModel = "hei_prop_drug_statue_box_big", propLocation = vec3(-947.0021, -2705.0217, 13.8310), stashSlots = 50, stashWeight = 0 }, -- Add more zones as needed... }, NotifyPosition = "top", -- The position of the notification TerritoryMapCommand = true, -- Enable/disable the territory map command (for those using the MDT - https://www.possible-scripts.com/product/6676609)}TerritoryLocations (database / MDT)
If you edit territories in-game (Gang MDT admin map, or the zone CRUD exports), set:
TerritoryLocations = { Mode = 'database', AllowMdtManagement = true, SeedFromConfigOnStart = true, -- first boot only},SeedFromConfigOnStart copies config.Zones into the database when there is nothing usable there yet. That is handy for the first migrate.
Once the DB is seeded and you start creating / editing / deleting territories in game, set SeedFromConfigOnStart = false.
If you leave it on, a resource restart can put deleted territories back (or overwrite in-game changes) from whatever is still listed in config.Zones. Keep the config list as a template if you want — just do not keep seeding after the DB is your source of truth.
