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

Lua
Shared.SkillsCategory = {
    skill = 'weed',
    title = 'Weed',
}
  • skill: The category key. It must stay 'weed': devhub_skillTree only accepts the resource name without devhub_ 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

Lua
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

Lua
Shared.SkillLevels = {
    crossbreed = 5,
}
  • crossbreed: the Weed level a player needs before the crossbreeding station accepts them. 0 removes the requirement.

Seed Unlocks

Lua
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 false to make it crossbreedable without any skill.

Perk Cache

Lua
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

Lua
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:

FieldMeaning
uid<perk>_<tier>. The part before the last _ decides what the node does (see the table below); the tiers of one perk add up.
titleNode name in the tree. Rename freely.
descriptionNode description. Rename freely, but keep the number in it equal to effect.
effectThe node's value, in percent.
pointsSkill points needed to unlock it.
indexThe node's slot in the grid: row * 19 + column, both counted from 0, row 8 is the bottom.
iconFontAwesome class.
unLockableOnly on the root node: it can be unlocked without a neighbour.
linesWhich 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)EffectDefault tiers
more_xpMore Weed XP from every action.10, 10, 15, 15
extra_budChance to pick a second bud (plants and wild bushes).5, 5, 10, 10
pollen_chancePoints added to the pollen chance per picked bud.2, 2
care_boostWatering and feeding fill more.10, 10, 15
soil_saverChance to keep the soil when filling a pot.15, 15
shop_discountCheaper at the Weed Tools shop and the seed dealer.5, 10
seed_findMore seed finds on wild bushes.25, 25, 50
crossbreed_chancePoints added to the crossbreeding success chance.5, 10, 10
seed_golden, seed_blue, seed_red, seed_albinoUnlocks crossbreeding into that mutation.1 (unlocked)
catalyst_saverChance to keep the catalyst when a crossbreed fails.25
cross_seedsChance of one more mutation seed from a crossbreed.25, 25
drying_speedBuds you hang dry faster.10, 15, 15
packing_speedFaster packing at the table.10, 15, 15
kit_saverChance to keep the kit of a packed unit.15, 15
extra_jointChance of one more joint per joint rolled.10, 10, 15
extra_bagChance of one more bag per bag filled.10, 10
extra_brickChance of one more brick per brick pressed.5, 5
joint_timeJoint highs and their extra HP last longer.20, 20
joint_boostMore 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.