Skilltree Wormwood
Based on game build 722832 | Last updated: 2026-04-28
Overview
skilltree_wormwood.lua is a data configuration file that defines the complete skill tree structure for the Wormwood character. The file exports a BuildSkillsData factory function that generates skill definitions with UI positions, group assignments, connection paths, and activation/deactivation callbacks. Skills are organized into four groups: crafting, gathering, allegiance1, and allegiance2. The skill tree data is consumed by the skill tree UI system and the skilltreeupdater component to track activated skills and apply their effects.
Usage example
-- Require the skill tree data module:
local SkillTreeWormwood = require("prefabs/skilltree_wormwood")
-- Build the skills data with SkillTreeFns helper:
local SkillTreeFns = require("components/skilltree_fns")
local data = SkillTreeWormwood(SkillTreeFns)
-- Access skills table:
local skills = data.SKILLS
local root_skill = skills.wormwood_identify_plants2
-- Access orders for UI layout:
local orders = data.ORDERS
Dependencies & tags
External dependencies:
STRINGS.SKILLTREE.WORMWOOD-- localized skill titles and descriptionsTUNING-- balance constants for skill effects (damage resist, bloom duration, insulation)SkillTreeFns-- passed as parameter; providesMakeCelestialChampionLock,CountTagshelpers
Components used:
bloomness-- modified by blooming speed skills viaSetDurations()skilltreeupdater-- checked viaIsActivated()for conditional skill effectsdamagetyperesist-- modified by allegiance skills viaAddResist()/RemoveResist()damagetypebonus-- modified by allegiance skills viaAddBonus()/RemoveBonus()temperature-- modified by overheat protection skill viainherentsummerinsulation
Tags:
farmplantidentifier-- added/removed by identify plants root skillplayer_lunar_aligned-- added/removed by lunar allegiance skillsfarmplantfastpicker-- added/removed by farm range skill- Skill group tags:
crafting,blooming,allegiance,lunar,lunar_favor,lock
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
UI_LEFT | constant (local) | -207 | Left boundary for skill UI positioning. |
SKILLTREESTRINGS | constant (local) | STRINGS.SKILLTREE.WORMWOOD | Alias for localized skill tree strings; used in all skill title/desc fields. |
UI_RIGHT | constant (local) | 223 | Right boundary for skill UI positioning. |
UI_VERTICAL_MIDDLE | constant (local) | 8 | Calculated horizontal center: (UI_LEFT + UI_RIGHT) * 0.5. |
UI_TOP | constant (local) | 168 | Top boundary for skill UI positioning. |
UI_BOTTOM | constant (local) | 0 | Bottom boundary for skill UI positioning. |
TILE_SIZE | constant (local) | 34 | Size of skill tile in pixels. |
TILE_HALFSIZE | constant (local) | 16 | Half tile size for positioning calculations. |
ORDERS | table | {...} | Array of skill group definitions with group name and base position. Groups: crafting, gathering, allegiance1, allegiance2. |
SKILLS (returned) | table | --- | Table of all skill definitions keyed by skill ID. Each skill contains title, desc, icon, pos, group, tags, connects, onactivate, ondeactivate. |
Main functions
BuildSkillsData(SkillTreeFns)
- Description: Factory function that constructs the complete Wormwood skill tree data. Takes
SkillTreeFnshelper module as parameter to generate lock conditions and count-based unlocks. Returns a table containingSKILLS(all skill definitions) andORDERS(group layout order). Skills include activation callbacks that modify character components (bloomness, temperature, damage resist/bonus) and add/remove entity tags. - Parameters:
SkillTreeFns-- skill tree helper module providingMakeCelestialChampionLock,CountTagsfunctions
- Returns: Table with
SKILLSandORDERSkeys - Error states: Errors if
SkillTreeFnsis nil or missing required functions (MakeCelestialChampionLock,CountTags).
onactivate(owner, from_load) (skill callback)
- Description: Activation callback defined on individual skills. Called when the skill is activated by the player. Behavior varies by skill:
wormwood_identify_plants2-- addsfarmplantidentifiertag to ownerwormwood_allegiance_lunar_*-- addsplayer_lunar_alignedtag, applies lunar resist vs shadow bonus viadamagetyperesist/damagetypebonuswormwood_blooming_speed*-- callsbloomness:SetDurations()with upgraded bloom stage durationswormwood_blooming_overheatprotection-- setstemperature.inherentsummerinsulationtoTUNING.INSULATION_MED_LARGEif in full bloomwormwood_blooming_photosynthesis-- starts watchingisdayworld state, callsUpdatePhotosynthesisStatewormwood_blooming_farmrange1-- addsfarmplantfastpickertag to owner
- Parameters:
owner-- player entity instancefrom_load-- boolean indicating if activation is from save load (some skills behave differently)
- Returns: None
- Error states: Errors if
owneris missingbloomnessorskilltreeupdatercomponents (no nil guards before access in blooming speed skills).damagetyperesistanddamagetypebonusare guarded with nil checks and will not error.
ondeactivate(owner, from_load) (skill callback)
- Description: Deactivation callback defined on individual skills. Called when the skill is deactivated (respec or manual toggle). Reverses the effects of
onactivate:- Removes tags added on activation (
farmplantidentifier,player_lunar_aligned,farmplantfastpicker) - Removes damage resist/bonus via
damagetyperesist:RemoveResist()/damagetypebonus:RemoveBonus() - Resets
temperature.inherentsummerinsulationtoTUNING.INSULATION_SMALLor0based on bloom state - Stops watching
isdayworld state for photosynthesis skill
- Removes tags added on activation (
- Parameters:
owner-- player entity instancefrom_load-- boolean indicating if deactivation is from save load
- Returns: None
- Error states: Errors if
owneris missingskilltreeupdatercomponent (no nil guard in allegiance skills).damagetyperesist,damagetypebonus, andtemperatureare guarded with nil checks or conditional logic.
lock_open(prefabname, activatedskills, readonly) (lock callback)
- Description: Conditional unlock function for allegiance lock skills. Determines if a locked skill should be unlocked based on activated skill count:
wormwood_allegiance_count_lock_1-- unlocks when 5+ skills withcraftingtag are activatedwormwood_allegiance_count_lock_2-- unlocks when 5+ skills withbloomingtag are activated
- Parameters:
prefabname-- string prefab name of the characteractivatedskills-- table of currently activated skill IDsreadonly-- boolean indicating if this is a read-only check
- Returns: Boolean
trueif lock should be open,falseotherwise - Error states: None — uses
SkillTreeFns.CountTags()which handles nil inputs gracefully.
Events & listeners
World state watchers:
isday-- watched bywormwood_blooming_photosynthesisskill; triggersUpdatePhotosynthesisStateto toggle photosynthesis behavior based on day/night cycle. Watcher is started inonactivateand stopped inondeactivate.