SQL or Shared.lua items ( found in dirk core config)
AutoAddItems =true, --## ESX AND QBCORE AUTO ADD GROWING EQUIPMENT GenerateSQL = true, --## If for some reason you are not wanting to use auto adding of items then this will generate an sql file with all your setup strains etc for you to use
GenerateSharedLua = false, --## If for some reason you are not wanting to use auto adding of items then this will generate a shared.lua with all your setup strains etc for you to use -- USE THIS SITE TO CONVERT FROM JSON TO LUA TABLE http://mageddo.com/tools/json-to-lua-converter
ESXItemsTable ='items', --##Name of the table to generate sql for
These are the config options for item insertion. Currently there is no way in my script to obtain these items so you will have to put the growing equipment in stores around the city through your own scripts.
Auto Add
If you wish for items to be automatically added to your SQL or Shared.lua (Only versions with the right AddItems exports will work on QBCORE) then you can toggle AutoAddItems to true
This will automatically add items to your SQL or Shared.lua upon script start.
Manual Add
If you wish to manually add items to your Shared.lua or SQL then you willl need to generate these files upon server start by toggling either GenerateSQL or GenerateSharedLua to true.
If one of these are set to true then run the script once with all your desired Strains and it will generate an SQL or Shared.lua to the scripts directory based on the strains and grow props you have configured.
Then simply use the generated output how you wish restart your server and now you have all the correct items.
Translation
All translations can be found under usersettings/labels.lua feel free to share alternative languages in the snippets section of DirkScripts Discord
Basic Config
Framework Settings
You will need to set either UsingQBCore or UsingESX to true dependening on your framework
UsingTarget
You can set this to either "qb-target" or "q-target"
You can also set it to false and just use dirk-shn
AutoAddItems
You can disable automatic adding of items for ESX and QBCore see #sql-or-shared.lua-items for more details
Advanced Config
Adding/Editing Strains
Strains = { ['Acapulco Gold'] = { -- GENERATION OF ITEMS GeneratedAffix = 'acapulcogold', --## When the items get auto generated they will be autogenerated as -- accupulcogold_seed, accupulcogold_weed etc etc
--[[ This will generate GeneratedAffix_seed, GeneratedAffix_untrimmed_bud, GeneratedAffix_trimmed_bud, GeneratedAffix_leaf
]] StateUpdatePerTick = 55, --Under Ideal conditions the plants state will increase by this every PlantUpdateTime. Formula: (100/StateUpdatePerTick) * Config.PlantUpdateTime
--## DISEASES DiseaseChance =10, --## Chance this plant will get a disease and potentially lose health DiseaseAmount =0.1, --## Percentage of health the disease will take 0.1 = 10% --## WATER SETTINGS WaterDrain =0.4, -- Every tick how much will the water drain 0.1 = 10% MinWater =35, -- Wont grow if you have less water than this--## LIGHT AND TEMP LightMin = 10, --- Minimum amount of light before plant begins to decrease in health. Increase this to make them use loads of lights I guess.
TempMin = 20, --- If the temperature goes below this the plant will stop growing and begin to decrease in health.
TempMax = 40, --- If the temperature goes above this the plant will stop growing and begin to decrease in health.
--## SOIL SETTINGS SoilDrainHarvest =0.2, -- Upon harvesting the soil quality will reduce by 20% MinSoilQuality =20, -- Anything below this and the plant will not grow.--## TRIM SETTINGS TimeToTrim =5, --## Time to trim a bud of this strain.--## STRAIN INFO Info = 'Straight from the Guerrero Mountains of Mexico Acapulco Gold is a legendary strain with high great terpine profile and a distinct golden hue.It needs high temps between 28-35 and light spectum higher than 40%. Soil quality minimum should be 20%',
--## REWARD ITEMS UPON HARVEST RewardItems = { ['acapulcogold_untrimmed_bud'] = { Chance =100, --## Chance out of 100 you will get this item. HealthBased = 15, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, }, ['acapulcogold_leaf'] = { Chance =100, HealthBased = 10, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, }, ['acapulcogold_seed'] = { Chance =15, HealthBased = 15, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, }, },--## THERE ARE 3 STAGES TO A PLANT YOU CAN CHANGE THE MODEL FOR THESE STAGES Stages = { [1] ='bkr_prop_weed_01_small_01a', -- Pot with little sprouter [2] ='bkr_prop_weed_med_01a', -- Pot with medium plant [3] ='bkr_prop_weed_lrg_01b', -- Pot wiht large plant }, },
Generated Affix
This will be the affixed name before all autogenerated items for each strain e.g acapulcogold_leaf
acapulcogold_untrimmed_bud
StateUpdatePerTick (Effects Growth Time)
Each time all the plant updates (Config.PlantUpdateTime in minutes) the state will go up by SateUpdatePerTick if the growing conditions are optimum.
Disease
DiseaseChance
The chance out of 100 that your plant will get a disease
DisaseAmount
This is the percentage of health disease will take off the plant
Water
WaterDrain
This is the percentage of water that will drain from the plant every state update
MinWater
This is the minimum amount of water you will need to grow this plant at all.
Light and Temp
LightMin
This is the minimum amount of light this strain will need to grow
TempMin
This is the minimum temp you will need to grow this plant
TempMax
This is the maximum temp you will be able to grow this plant under
Soil
SoilDrainHarvest
Upon harvesting the plant how much in will the soil quality drain by?
e.g 0.2 = 20%,
MinSoilQuality
This is the minimum soil quality to grow this plant
Info and Stages
Info
This is the info that will be displayed for this strain in the UI and as the description for the seed
Stages
These are the models used at the 3 main stages of the plants growth
Reward Items
RewardItems = { ['acapulcogold_untrimmed_bud'] = { Chance =100, --## Chance out of 100 you will get this item. HealthBased = 15, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, }, ['acapulcogold_leaf'] = { Chance =100, HealthBased = 10, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, }, ['acapulcogold_seed'] = { Chance =15, HealthBased = 15, -- This can be false or a number if false then will just be random amount based on Min/Max if its a number then the amount they get will be the percentage health times the amount here
-- Min/Max only used if HealthBased = false Min =5, Max =10, },},
Chance
This is the chance out of 100 you will recieve this item
HealthBased
This can be a number or false
If it's a number this number will represent the max amount you can attain if the health of the plant is 100 and it will be less if health is less
Min/Max
If HealthBased is set to false then they will get a random number between Min and Max.