Configuration
All settings live in a few Lua files inside the resource folder. Edit the file, save it and restart the script (restart kivo-weedshop).
| File | What it contains |
|---|---|
shared/config/employee.lua |
Job name, grades, duty, salary, payouts, permissions, activity log, leaderboard |
shared/config/ui.lua |
Debug panel switch, floating plant boards, computer locations |
shared/registery.lua |
Plots and tools, animations, drying racks, interior area zones, rolling and selling, restock missions |
shared/locales/en.lua |
Text of the computer interface |
server/config.lua |
Discord avatar settings |
Conventions used on this page:
vec3(x, y, z)is a world position.vec4(x, y, z, heading)adds a facing direction in degrees.- A polygon zone is a list of
vec3corner points plus athickness(vertical size in metres). - Times are in milliseconds unless the option says seconds.
- Icons use Font Awesome class names such as
fa-solid fa-droplet.
Job and employees
Section titled “Job and employees”File: shared/config/employee.lua, table EmployeeConfig.
Job and grades
Section titled “Job and grades”| Option | Default | Description |
|---|---|---|
jobName |
"skyhigh" |
Name of the framework job that counts as shop staff. It must match the job you added in the installation step. |
grades |
five grades | One entry per grade number, each with a display name and a baseSalary. |
Default grades:
| Grade | Name | Base salary |
|---|---|---|
| 0 | Trainee | 100 |
| 1 | Employee | 200 |
| 2 | Supervisor | 400 |
| 3 | Manager | 600 |
| 4 | Boss | 1000 |
The grade numbers must match the grades of the framework job. Grade 4 is the boss. If you rename a grade, also change it in the framework job and in Locales.grades (see Text and translations). The file comment groups the grades as 0 to 1 employee, 2 to 3 manager, 4 boss.
| Option | Default | Description |
|---|---|---|
requireOnDuty |
true |
When true, only employees who are on duty can use the zones, computer and actions. Set false to let off duty employees work. |
On QB-Core and QBX the duty state comes from the framework. On ESX a player counts as on duty unless the job carries an onDuty value.
Salary
Section titled “Salary”| Option | Default | Valid values | Description |
|---|---|---|---|
salaryPeriod |
"daily" |
"daily", "weekly" |
How often an employee is paid the base salary of their grade. Daily means once every 24 hours, weekly once every 7 days. |
salaryPayTime |
"00:00" |
"HH:MM", 24 hour clock |
Time of day when the salary run happens, using the clock of the machine the server runs on. |
salaryAccount |
"bank" |
"bank", "cash" |
Account that receives salary and action payouts. On ESX, "cash" is mapped to the ESX money account. |
At salaryPayTime the script pays each employee who is online the baseSalary of their grade, if their last salary payment is old enough for the chosen period. The player gets a notification. A base salary of 0 pays nothing.
Payouts per action
Section titled “Payouts per action”mintAmounts is the total value created by the server each time an employee completes an action. The boss decides which percentage goes to the employee (see the next section). The employee share is paid to salaryAccount. The rest goes to the business safe, which the boss sees in the Financials tab.
| Key | Default | Pays out when | Employee share at 70 percent |
|---|---|---|---|
water |
30.0 |
A plant is watered | 21.00 |
fertilize |
70.0 |
Fertilizer is applied | 49.00 |
plant |
140.0 |
Seeds are planted | 98.00 |
harvest |
280.0 |
A plant is harvested | 196.00 |
dry_start |
200.0 |
Plants are put on a rack | 140.00 |
dry_collect |
420.0 |
Dried plants are collected | 294.00 |
restock_complete |
700.0 |
A restock mission is completed | 490.00 |
transform |
180.0 |
One rolling batch is finished (one payout per batch, whatever the recipe size) | 126.00 |
sell_preroll |
25.0 |
Pre-rolls are sold, multiplied by the number sold | 17.50 per pre-roll |
Only these nine keys are used. They are also the nine rows the boss sees in the pay configuration.
Employee pay limits
Section titled “Employee pay limits”| Option | Default | Description |
|---|---|---|
employeePayConfig.minPercent |
40 |
Lowest employee share the boss can set for an action. |
employeePayConfig.maxPercent |
90 |
Highest employee share the boss can set. |
employeePayConfig.defaultPercent |
70 |
Share used for every action until the boss saves a change. |
The boss changes the share per action in the computer (Config tab, Pay Configuration). Values outside the limits are pulled back to the nearest limit when saved. Shares the boss already saved stay in effect when you change the limits. The new limits apply the next time the boss saves.
Permissions
Section titled “Permissions”permissions sets the minimum grade needed for each action. A player needs that grade or a higher one.
| Key | Default grade | What it allows |
|---|---|---|
water |
0 | Water plants |
fertilize |
0 | Fertilize plants |
plant |
0 | Plant seeds |
harvest |
1 | Harvest plants |
dry_start |
1 | Put plants on a drying rack |
dry_collect |
1 | Collect dried plants |
transform |
1 | Roll pre-rolls |
sell |
1 | Sell pre-rolls |
restock |
2 | Run restock missions |
hire |
2 | Hire employees |
fire |
3 | Fire employees |
promote |
3 | Promote employees |
demote |
3 | Demote employees |
manageSafe |
4 | Manage the business safe, see the business finances and set the pay percentages |
Nobody can manage themselves, and nobody can promote, demote or fire a person of equal or higher grade.
If you change a grade requirement, also update texts that mention it. For example Locales.labels.managerRequired reads “Manager (3+) required”.
Activity log and leaderboard
Section titled “Activity log and leaderboard”| Option | Default | Description |
|---|---|---|
trackActions |
true |
Together with maxActivityLogs, turns the automatic cleanup of old activity entries on or off. It does not stop activity from being recorded. Set false to keep every entry. |
maxActivityLogs |
1000 |
Activity entries kept per employee when the cleanup is on. |
leaderboardPeriod |
7 * 24 * 60 * 60 |
Time window of the leaderboard, in seconds (default 7 days). |
Interface
Section titled “Interface”File: shared/config/ui.lua, table Config.
Debug panel
Section titled “Debug panel”| Option | Default | Description |
|---|---|---|
Config.UI |
false |
Shows a debug panel in the game so the interface can be tested with mock data. Keep it false on a live server. |
Floating plant boards
Section titled “Floating plant boards”Config.PlantDui controls the status board that floats above each pot.
| Option | Default | Description |
|---|---|---|
enabled |
true |
Turns the boards on or off. Turning them off saves a little client time. |
renderer |
'dui' |
'dui' draws every board from a small web page and looks nicer. 'native' uses in-game drawing and is lighter. A missing or invalid value falls back to 'native'. |
renderDistance |
6.0 |
Metres from a pot before its board is drawn. |
heightOffset |
1.15 |
Metres above the pot position. |
size |
0.55 |
Board size in 'dui' mode. |
native.panelWidth |
0.112 |
Board width in 'native' mode (screen fraction at full scale). |
native.panelHeight |
0.108 |
Board height in 'native' mode (screen fraction at full scale). |
native.textScale |
1.0 |
Text size in 'native' mode. |
The board shows the plot name, the growth stage, health, water and fertilizer.
Computer locations
Section titled “Computer locations”Config.ComputerZones is a list. Each entry places one computer that employees open through the target system (option text “Use Computer”).
| Field | Default | Description |
|---|---|---|
coords |
two entries in the shop | Position as vec4(x, y, z, heading). The zone uses x, y and z. |
radius |
1.5 |
Size of the sphere zone. If you leave it out, 1.2 is used. |
The option only shows for employees (and only on duty if requireOnDuty is true). Add as many entries as you need.
Farming zones
Section titled “Farming zones”File: shared/registery.lua, table FarmingConfig. FarmingConfig.Zones is one list that holds the tool supply zones and the plant plots. The type field decides what an entry is.
type |
Meaning |
|---|---|
water_supply |
Where players pick up or put back the water sprayer |
fertilizer_supply |
Where players pick up or put back a fertilizer bag |
field |
A plant plot |
Supply zones
Section titled “Supply zones”Shipped entries: sprayers_supply (water), fertilizer_supply_1 and fertilizer_supply_2 (fertilizer).
| Field | Description |
|---|---|
id |
Unique name of the zone. |
label |
Text of the target option, for example “Grab Water Sprayer”. |
icon |
Icon class of the target option. |
type |
water_supply or fertilizer_supply. |
thickness |
Vertical size of the zone in metres. 2.0 is used if missing. |
points |
Polygon corners as vec3 positions. |
tool.model |
Model of the prop held in the hand. |
tool.bone |
Bone index the prop is attached to. 57005 is the right hand. |
tool.pos |
vec3 offset of the prop from the bone. |
tool.rot |
vec3 rotation of the prop. |
The grab option needs the water or fertilize permission. A player holds one tool at a time and gets a “Put back tool” option while holding one. If you change a prop, tune tool.pos and tool.rot until it sits in the hand correctly.
Plant plots
Section titled “Plant plots”Shipped entries: plot1 to plot6.
| Field | Default | Description |
|---|---|---|
id |
plot1 to plot6 |
Unique name. Plant data is stored under this name, so do not rename it on a running server. |
label |
Tend to Plot 1 and so on |
Name of the plot. The floating board shows it without the leading “Tend to “. |
type |
field |
Must be field. |
zoneType |
sphere |
sphere uses coords and radius. Any other value builds a polygon from points and thickness (0.8 if missing). Keep sphere, the floating boards are placed with coords. |
coords |
per plot | vec3 centre of the plot. |
radius |
1.1 |
Radius of the sphere zone. |
New plots are created automatically the first time the script starts with them in the list. The six plots match the plant props built into the shop interior, so keep the ids plot1 to plot6 unless you run a modified interior.
What a player can do at a plot:
| Target option | Needs | Permission key |
|---|---|---|
| Water Plant | Water sprayer in hand, plant that is not fully grown | water |
| Apply Fertilizer | Fertilizer bag in hand, plant that is not fully grown | fertilize |
| Plant Seeds | Empty plot and 6 weed_seed |
plant |
| Harvest Plant | Fully grown plant and weed_shears |
harvest |
| Inspect Plant | Nothing, available to everyone | none |
Animations
Section titled “Animations”FarmingConfig.Anims sets the animation for each plot action. The keys are water, fertilize, plant and harvest. Each has three fields:
| Field | Description |
|---|---|
dict |
Animation dictionary |
clip |
Clip name inside the dictionary |
flag |
Animation flag |
Defaults:
| Action | dict |
clip |
flag |
|---|---|---|---|
water |
anim@amb@business@weed@weed_inspecting_lo_med_hi@ |
weed_spraybottle_stand_spraying_02_inspector |
49 |
fertilize |
anim@amb@clubhouse@tutorial@bkr_tut_ig3@ |
machinic_loop_malcbike |
49 |
plant |
anim@amb@clubhouse@tutorial@bkr_tut_ig3@ |
machinic_loop_malcbike |
49 |
harvest |
amb@prop_human_parking_meter@male@base |
base |
49 |
Flag 49 is 1 (loop) plus 16 (upper body only) plus 32 (allow movement input). The legs keep the normal standing pose and the player never drops down. Use standing animations that work at plant height. Kneeling animations clash with the held tool prop.
Drying racks
Section titled “Drying racks”File: shared/registery.lua, table DryingConfig. DryingConfig.target is a list with one entry per rack. The shipped entries are dryingRack1, dryingRack2 and dryingRack3.
| Field | Default | Description |
|---|---|---|
id |
dryingRack1 to dryingRack3 |
Unique name. Rack data is stored under this name, so do not rename it on a running server. |
label |
Drying Rack 1 and so on |
Text of the target option and the rack status. |
zoneType |
sphere |
Use sphere. |
coords |
per rack | vec3 centre of the interaction zone. |
radius |
1.5 |
Radius of the sphere zone. |
entitySet |
rack1full, rack2full, rack3full |
Name of the interior entity set that shows a full rack. It is switched on while the rack is drying or ready, and off when the rack is empty. |
A rack takes 6 wet_weed_plant and gives back 6 dried_weed_plant when it is done. The drying time and the item amounts are not options in these files.
Rolling and selling
Section titled “Rolling and selling”File: shared/registery.lua, table ProcessingConfig. Both areas are polygon zones. The player stands inside and presses E.
Rolling area (transformationArea)
Section titled “Rolling area (transformationArea)”| Option | Default | Description |
|---|---|---|
label |
'Roll Pre-rolls' |
Text of the on-screen prompt. |
icon |
'fa-solid fa-joint' |
Icon of the prompt. |
duration |
8000 |
Progress bar time in milliseconds. |
requiredItem |
'dried_weed_plant' |
Item that is used up. |
requiredCount |
6 |
How many of requiredItem one batch uses. |
outputItem |
'weed_preroll' |
Item that is given. |
outputCount |
6 |
How many of outputItem one batch gives. |
thickness |
1.7 |
Vertical size of the zone in metres. |
debug |
false |
Draws the zone outline, useful while you position the zone. |
points |
four points | Polygon corners as vec3 positions. |
Selling area (sellingArea)
Section titled “Selling area (sellingArea)”| Option | Default | Description |
|---|---|---|
label |
'Sell Pre-rolls' |
Text of the on-screen prompt. |
icon |
'fa-solid fa-cash-register' |
Icon of the prompt. |
duration |
5000 |
Progress bar time in milliseconds. |
inputItem |
'weed_preroll' |
Item that is sold. |
thickness |
3 |
Vertical size of the zone in metres. |
debug |
false |
Draws the zone outline. |
points |
four points | Polygon corners as vec3 positions. |
One sale takes every inputItem the player carries. The payout is mintAmounts.sell_preroll for each item sold. Rolling pays mintAmounts.transform once per batch.
If you change an item name, add the new item to your inventory with an image (see Installation). Keep outputItem and inputItem the same item, otherwise rolled items cannot be sold. The permission keys are transform and sell. The computer shows the text “Roll Pre-rolls (x6)” for the rolling payout, so update Locales.configActions.transform if you change the batch size.
Restock missions
Section titled “Restock missions”File: shared/registery.lua, table RestockConfig. A mission is started from the computer by an employee with the restock permission. Each player can have one active mission at a time.
| Option | Default | Description |
|---|---|---|
missionDuration |
25 * 60 * 1000 |
Time in milliseconds after the vehicle spawns before the player gets an expiry warning. |
gracePeriod |
5 * 60 * 1000 |
Time in milliseconds after the warning before the mission is cancelled. |
cooldown |
0 |
Minimum time in milliseconds between two completed missions for the whole shop. 0 means no cooldown. |
stockIncreasePerMission |
25.0 |
Percentage points added to the shop stock by one completed mission. Stock stops at 100. |
boxesPerMission |
1 |
Number of boxes. The mission is built around one box, leave it at 1. |
vehicleModel |
'boxville' |
Model of the mission vehicle. |
vehicleSpawnLocation |
vec4 at the shop |
Where the vehicle spawns. |
boxProp |
'prop_cs_cardbox_01' |
Model of the box the player carries. |
entitySets |
four ranges | Stock level ranges and the interior entity set shown for each (see below). |
zones.container |
pickup point | Where the supply box is picked up. |
zones.storage |
shop storage | Where the box is stored to finish the mission. |
zones.vehicleZone |
at the shop | Area where the box is loaded into the vehicle and where the vehicle is returned. |
The vehicle gets keys through the supported key scripts (see the integration page).
Stock entity sets
Section titled “Stock entity sets”Each entry of entitySets has min, max and name. When the stock level (0 to 100 percent) is inside the range, the interior entity set name is shown. A name of nil shows nothing.
min |
max |
name |
|---|---|---|
| 0 | 0 | nil (empty shelves) |
| 1 | 30 | 'kivostoragefew' |
| 31 | 60 | 'kivostoragemid' |
| 61 | 100 | 'kivostoragefull' |
Cover the whole range 0 to 100 without gaps, and use the entity set names your interior defines.
Zone fields
Section titled “Zone fields”| Zone | Fields | Notes |
|---|---|---|
container |
coords, heading, radius (3.0), label, icon |
Sphere zone. label and icon are the target option. The shipped z is raised about 1 metre so the sphere is not buried in the ground. |
storage |
points, thickness (2.4), label, icon |
Polygon zone. label and icon are the target option. |
vehicleZone |
coords, heading, radius (3.0), label, icon |
Sphere zone. The shipped coordinates are the same as vehicleSpawnLocation. The target options in this zone use fixed text. |
Interior area zones
Section titled “Interior area zones”File: shared/registery.lua, table AreaConfig. These polygons keep the plant, rack and stock props in the interior in sync with the data, and load the interior before a player walks in. Every entry has points (a list of vec3) and thickness.
| Entry | Purpose |
|---|---|
mappingArea |
Entering it starts the requests for entity state updates. It also has a center position that the script uses to measure how far a player is from the shop. |
updateArea |
Entity states are refreshed when a player enters. |
refreshAreaFront |
Extra refresh zone at the front entrance. |
refreshAreaBack |
Extra refresh zone at the back entrance. |
streamingArea |
Boundary inside which the interior is known to be loaded. The script preloads the interior before the player reaches the door. It is large (thickness = 100.0). |
These zones are measured for the shipped interior. Do not change them unless you change the interior, and keep all five entries.
Discord avatars
Section titled “Discord avatars”File: server/config.lua, table ServerConfig.discord. The computer can show the player’s Discord avatar. Without a bot token the fallback avatar is used.
| Option | Default | Description |
|---|---|---|
botToken |
'' |
Discord bot token used to look up avatars. Leave it empty and set the convar instead (see below). An empty token turns off Discord lookups. |
cacheHours |
24 |
How many hours an avatar address is kept before it is looked up again. |
defaultAvatar |
'https://cdn.discordapp.com/embed/avatars/0.png' |
Avatar shown when the player has no Discord identifier, no avatar, or the lookup fails. |
Set the token with a convar in server.cfg, before the script starts:
set weedshop:discordToken "YOUR_BOT_TOKEN"The convar always wins over the value in the file. This keeps the token out of the config file.
Requirements for avatars to appear:
- The server can reach
discord.comover HTTPS. - The player has Discord linked to FiveM (the Discord app is running when they join), so the server sees a Discord identifier.
- The lookup happens when the player opens the computer. Results are cached in memory and the cache is empty again after a restart.
Text and translations
Section titled “Text and translations”File: shared/locales/en.lua. It holds one table, Locales, with the text of the computer interface. Change the values only. Never change the keys and keep the final return Locales line.
| Group | Used for |
|---|---|
brand |
App name (SkyHigh), company name (SkyHigh Cannabis Co.) and subtitle in the header |
tabs |
Tab names |
grades |
Grade names, keys "0" to "4" |
time |
Period names such as Today and This Week |
actions |
Names of activity and earning entries |
stages |
Plant stage names, keys "0" to "3" (Empty, Seed, Growing, Mature) |
status |
Status words such as Ready to harvest and Need water |
sections |
Section titles |
labels |
Labels and buttons, including stats, growth stages, finance and permission texts |
filters |
Filter names in the activity list |
stock |
Stock and fertilizer labels |
configActions |
Action names in the boss pay configuration |
dashboard |
Texts of the boss dashboard |
days |
Weekday abbreviations |
notifications |
Messages of the computer, such as hire and save results |
desktop |
Text on the computer start screen |
misc |
Other texts such as “No data available” |
To translate the interface, edit the values in en.lua directly. Only the computer interface uses this file. The prompts, target options, progress bars and notifications in the world use fixed English text. The parts you can change are the label and icon fields in shared/registery.lua (supply zones, rolling area, selling area, racks, restock container and storage).
