Configuration
Every option in STG Fruit Job config.lua, from the framework and language to markers, the basket requirement and the orchard, processor and seller of each location.
All settings live in stg-fruit/config.lua. The file stays editable in the escrow version. Restart the resource after a change.
Framework
STG.Framework = "auto"Prop
Type
Language
STG.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, ar, he, jp, zh. These cover the notifications and the help text. To change a text, edit the matching file in stg-fruit/locales/.
The texts on the minigame, processor and seller screens are not part of the locale files. Edit them in stg-fruit/html/config.json.
Notifications
STG.notify = function(message, type, duration)
lib.notify({
title = "Fruit Picker",
description = message,
type = type or 'info',
duration = duration or 3000
})
end
STG.DisplayHelpText = function(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end- notify: every notification of the script goes through this function. Replace the body to use your own notification system.
- DisplayHelpText: the "Press E to ..." prompt shown at a tree, the processor and the seller. Replace it to use your own text UI.
Markers
STG.marker = {
['enabled'] = true,
['bobUpAndDown'] = false,
['faceCamera'] = true,
['rotate'] = false,
['drawDistance'] = 50,
['type'] = 21,
['color'] = { ['r'] = 173, ['g'] = 3, ['b'] = 252, ['a'] = 140 },
['scale'] = { ['x'] = 1.0, ['y'] = 1.0, ['z'] = 1.0 }
}The processor and the seller are marked with the floating STG icon streamed by the script.
Prop
Type
The other keys (bobUpAndDown, faceCamera, rotate, type, color, scale) are not read by the current version, so changing them has no effect. The icon above the active tree in the orchard is always shown within 10 metres.
Required item
STG.required_item = {
['enabled'] = false,
['item'] = {
['name'] = 'basket',
['label'] = 'Basket'
}
}Prop
Type
Locations
STG.locations is a list. Every entry is one complete chain with an orchard (picker), a processor and a seller, each with its own blip. The script ships with one apple chain.
STG.locations = {
{
['picker'] = { ... },
['processor'] = { ... },
['seller'] = { ... },
},
-- add more chains here
}Every entry needs all three parts: picker, processor and seller. Leaving one out causes errors.
Blips
The orchard, the picking spots, the processor and the seller each have a blip table with the same keys:
['blip'] = {
['name'] = 'Fruit Picker',
['sprite'] = 486,
['display'] = 4,
['scale'] = 1.0,
['color'] = 1,
['shortrange'] = true
},Prop
Type
Picker
['picker'] = {
['location_center'] = vector3(-1791.6055, 1990.0214, 123.3859),
['location_radius'] = 50.0,
['blip'] = { ... },
['item'] = {
['name'] = 'apple',
['label'] = 'Apple',
['plural'] = 'Apples',
},
['amountRandomizer'] = {
['min'] = 1,
['max'] = 6
},
['spots'] = {
['blip'] = { ... },
['locations'] = {
vector3(-1785.2722, 1977.0837, 123.4694),
vector3(-1777.6495, 1982.2770, 120.5174),
vector3(-1788.1390, 1986.5985, 122.9516),
vector3(-1794.8344, 1980.8887, 125.8370),
vector3(-1793.6548, 1970.9670, 126.8735)
}
},
},Prop
Type
Each tree can be picked 5 times, then it needs 5 minutes to regrow. This limit is shared by all players and is fixed in the script.
Processor
['processor'] = {
['location'] = vector3(-1923.2260, 2047.5359, 140.7344),
['blip'] = { ... },
['required'] = {
['name'] = 'apple',
['label'] = 'Apple',
['plural'] = 'Apples',
['amount'] = 5
},
['receive'] = {
['name'] = 'applejuice',
['label'] = 'Apple Juice',
['plural'] = 'Apple Juices',
['amount'] = 1
},
['process_time'] = 15
},Prop
Type
Seller
['seller'] = {
['location'] = vector3(-1888.8861, 2048.6338, 140.9836),
['blip'] = { ... },
['item'] = {
['name'] = 'applejuice',
['label'] = 'Apple Juice',
['plural'] = 'Apple Juices',
['earning_per_item'] = 5
},
},Prop
Type
Adding a fruit
Copy the whole apple entry in STG.locations and paste it below as a new entry.
Change the coordinates of the orchard, the picking spots, the processor and the seller, and set your own item names, labels and price.
Add the new items to your inventory, the same way as in the installation.
Add a lowercase .png for every new item to stg-fruit/html/img/items/, named after the item, for example orange.png. The minigame, processor and seller screens load their item pictures from this folder.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.