Resource nodes
Trees, ore veins and fishing spots. A node is a unit that yields items on every hit, demands the right tool and skill, and grows back after it is depleted.
Use a plain unit with a loot table for “thing dies, drops items”. Use a resource node for “chop, chop, chop”.
Authoring
- Create an Item Tag Definition for the tool, such as Axe, and add it to the tags of your axe items.
- Create a Crafting Skill such as Woodcutting if you want a skill gate and per-hit XP.
- Create → Vantage → Resources → Resource Node Definition.
| Field | Meaning |
|---|---|
| Harvest Entries / Rolls Per Hit | Weighted item pool rolled on every successful hit. |
| Required Item Tag | The attacker must have an item with this tag equipped. |
| Required Skill / Level / Xp Grant Per Hit | Skill gate and reward. |
| Accepted Damage Types | Hits of other types are ignored. |
| Respawn Seconds | 0 means the node is gone for good once depleted. |
| Alive Visual / Depleted Visual | Swapped on depletion and respawn. |
- Assign it to Resource Node on a unit definition. Give the unit enough HP for the number of hits you want, faction Neutral and aggro range 0.
Drops go straight into the attacker’s backpack, not onto the ground.
Feedback
var node = tree.GetComponent<VtResourceNode>();
node.OnHarvestFailed += (attacker, reason) => Popup("Need an axe");
node.OnHarvested += (attacker, drops) => Popup("+5 Wood");
node.OnDepleted += () => { };
node.OnRespawned += () => { };
node.IsDepleted; node.RespawnRemainingSeconds;
node.Respawn();
Nodes show ordinary damage numbers. Uncheck Emit Combat Text on the definition for a quiet harvest.