skillTree.lua
Connects Weed to devhub_skillTree. The script runs perfectly fine without it: when the skill tree is not running, every perk counts as 0 and nothing is locked.
The master switch is not in this file. It is Shared.SkillTreeEnabled in shared.lua.
devhub_skillTree keeps the category it received first. After changing this file, restart devhub_weed and then devhub_skillTree, or simply restart the server.
Skills Category
Shared.SkillsCategory = {
skill = 'weed',
title = 'Weed',
}- skill: The category key. It must stay
'weed': devhub_skillTree only accepts the resource name withoutdevhub_as the key, and refuses the category otherwise (the server console tells you so). - title: The category name players see in the skill tree. Rename it freely.
Weed XP
Shared.SkillXP = {
sow = 15, -- a seed planted
harvestTop = 3, -- a bud picked off a plant
wildTop = 3, -- a bud picked off a wild bush
dryBud = 3, -- a dry bud taken off a rack
joint = 3, -- a joint rolled
bag = 6, -- a bag filled
brick = 45, -- a brick pressed
crossbreed = 75, -- a crossbreed that worked
crossbreedFail = 15, -- a crossbreed that didn't
}- Description: XP in the Weed category for each action. Levels and skill points come from devhub_skillTree itself (one point per level by default). The whole tree costs 58 points.
Level Requirements
Shared.SkillLevels = {
crossbreed = 5,
}- crossbreed: the Weed level a player needs before the crossbreeding station accepts them.
0removes the requirement.
Seed Unlocks
Shared.SeedUnlocks = {
golden = 'seed_golden', -- Kush -> Golden
blue = 'seed_blue', -- Haze -> Blue
red = 'seed_red', -- Purple -> Red
albino = 'seed_albino', -- Frost -> Albino
}- Description: Crossbreeding into a mutation strain needs its skill. Set a mutation to
falseto make it crossbreedable without any skill.
Perk Cache
Shared.SkillCacheSeconds = 300- Description: How often, per player, the unlocked perks are read again from devhub_skillTree. Unlocking or resetting a skill refreshes it straight away, so you never need to lower this.
Skills List
Shared.SkillsList = {
["weed"] = {
{
uid = 'more_xp_1',
index = 161, -- row 8, column 9
unLockable = true,
title = 'Weed Student',
icon = 'fas fa-book-open',
description = 'Earn 10% more weed XP.',
points = 1,
effect = 10,
lines = { left = false, right = false, top = false, },
},
...
},
}The node grid of the Weed tree. Each entry is one node:
| Field | Meaning |
|---|---|
| uid | <perk>_<tier>. The part before the last _ decides what the node does (see the table below); the tiers of one perk add up. |
| title | Node name in the tree. Rename freely. |
| description | Node description. Rename freely, but keep the number in it equal to effect. |
| effect | The node's value, in percent. |
| points | Skill points needed to unlock it. |
| index | The node's slot in the grid: row * 19 + column, both counted from 0, row 8 is the bottom. |
| icon | FontAwesome class. |
| unLockable | Only on the root node: it can be unlocked without a neighbour. |
| lines | Which connector lines are drawn from this slot. |
Entries with only index and lines are pure connectors: empty grid slots that just draw a line between two real nodes.
Changing index moves nodes around and rearranges the connector lines. To retune the tree, edit effect, points, title and description and leave the layout alone.
What every perk does
The default tree has 49 nodes. Every tier of a perk adds its effect to the previous ones.
Perk (uid prefix) | Effect | Default tiers |
|---|---|---|
more_xp | More Weed XP from every action. | 10, 10, 15, 15 |
extra_bud | Chance to pick a second bud (plants and wild bushes). | 5, 5, 10, 10 |
pollen_chance | Points added to the pollen chance per picked bud. | 2, 2 |
care_boost | Watering and feeding fill more. | 10, 10, 15 |
soil_saver | Chance to keep the soil when filling a pot. | 15, 15 |
shop_discount | Cheaper at the Weed Tools shop and the seed dealer. | 5, 10 |
seed_find | More seed finds on wild bushes. | 25, 25, 50 |
crossbreed_chance | Points added to the crossbreeding success chance. | 5, 10, 10 |
seed_golden, seed_blue, seed_red, seed_albino | Unlocks crossbreeding into that mutation. | 1 (unlocked) |
catalyst_saver | Chance to keep the catalyst when a crossbreed fails. | 25 |
cross_seeds | Chance of one more mutation seed from a crossbreed. | 25, 25 |
drying_speed | Buds you hang dry faster. | 10, 15, 15 |
packing_speed | Faster packing at the table. | 10, 15, 15 |
kit_saver | Chance to keep the kit of a packed unit. | 15, 15 |
extra_joint | Chance of one more joint per joint rolled. | 10, 10, 15 |
extra_bag | Chance of one more bag per bag filled. | 10, 10 |
extra_brick | Chance of one more brick per brick pressed. | 5, 5 |
joint_time | Joint highs and their extra HP last longer. | 20, 20 |
joint_boost | More armor and extra HP from joints. | 20, 30 |
Every perk is checked on the server. The client never sends a bonus, so editing the tree on one player's machine does nothing.