Configuration

Settings are in shared/config.lua. Restart the resource after changing them. shared/config.lua and shared/adapter.lua are sent to players, so never put secrets in them.

Camp placement

Option

Meaning

campSpawnDistance

Distance at which a camp's props spawn for a player

campAllowPlacementDistance

How close you must be to your camp to place items. Keep it lower than campSpawnDistance

otherNearbyCampDistance

Minimum distance between two players' camps

allowCampsInTowns

true lets players place camps inside the blocked areas

blockedAreas

Towns where camps are not allowed. Each entry has coords and range

Blips (blipData)

blipName, sharedCampName, blipSprite, blipStyle, sharedBlipStyle, areaRadius, areaModifier, areaColor, sharedAreaColor.

Cooking (Cooking)

Camp cooking items show a prompt that opens your own crafting script.

Option

Meaning

promptLabel

Text of the prompt

eventType

"client" or "server"

event

Your event, for example "my_crafting:client:openCooking". Empty means no prompt

args

Optional arguments passed first

The event always receives a last argument: { model, coords }.

Degradation and maintenance

Option

Meaning

degradation.enabled

Turn degradation on or off

maxCondition, startingCondition

Condition scale (default 100)

degradationRatePerHour

Condition lost per hour (0.5 is about 8 days from 100 to 0)

thresholds

Levels for good, worn, damaged, critical

featureLockouts

Features locked at each level: storage, missions, cooking, npcs

autoDestroy, autoDestroyGracePeriodHours

Destroy a camp at 0 condition after the grace period

warnings

Messages shown when the condition passes a threshold

maintenance.itemCosts, moneyCost

Cost of a full maintenance

maintenance.partialMaintenance

Cheaper maintenance: enabled, conditionRestored, itemCosts, moneyCost

Placeables (Placeables)

Every prop or NPC a player can place. The key is the item name and must exist as an item.

Field

Meaning

label

Display name

vegModifierRadius

Clears vegetation around the prop

campCreationProp = true

The item that creates a camp

upgradeStages

On the campfire. Each stage has upgradeCost and rewardItemsToGive

requiredStage

Camp stage needed to use the item

uniqueSlot = true

Only one per camp

isStorage, stashData = { weight, slots }

A storage prop

isCooking = true

A cooking prop

isMission = true, missionEvent

The mission book

isPed = true, occupation

An NPC. occupation has id, promptLabel and optionally eventType and event

trader = { priceLists = { ... } }

NPC that trades through gm_ecosystem

To add a prop: add it to Placeables, add the item to your inventory, and optionally add it to the store list.

Missions (missions)

{ title = "My Mission", event = "my_script:client:start", requiredStage = 8, hasCooldown = true, cooldownMinutes = 30 },

Field

Meaning

title

Name in the menu

event

Client event triggered when started

requiredStage

Camp stage needed

hasCooldown, cooldownMinutes

Built-in cooldown for the camp. Your mission must trigger gm_camping:missionStarted on the client when it really starts

robbery

Instead of event: starts a gm_robberies robbery

Cooldowns are kept in memory and are cleared by a server restart.

Integration (shared/adapter.lua)

Everything that talks to other systems lives here: notifications, identifiers, usable items, giving and removing items, money, storage, input dialog, progress bar, gizmo, item labels and the doctor locations. It is written for jo_libs. Change a function here to integrate another system.

Discord webhooks (server/webhooks.lua)

This file is server only and never sent to players.

Option

Meaning

default

Webhook used by every event without its own

events

One webhook per event: Camp Created, Camp Destroyed, Camp Share Accepted, Camp Share Removed, Camp Upgraded, Camp Maintained, Item Purchased

botName, avatar, footer

Look of the message

colors

Embed colors

An empty "" turns a log off. Logs are always printed to the server console too.

Permissions (permissionData)

Do not change. It defines the sharing permissions and matches the database columns.

Last updated