Core RPG handbook · Development build / version notes
Core RPG handbook
Woodcutting: create a tree that regrows
Give a level-1 player a tree to chop, award Logs and Woodcutting XP, and turn the depleted tree into a stump until it regrows.
On this page
This is the first part of the campsite example. Use the supplied Iron Axe and Logs definitions for now. The reward from this tree will be the fuel for your first fire.
Get the player ready#
Open a copy of your working gameplay scene. Give the player one GatheringTool_Iron_Axe through your existing starter inventory or shop, and leave an empty inventory slot. You can carry the axe for this example; equipping it is optional.
The axe must be a GatheringToolDefinition with Tool Type: Axe, Skill: Woodcutting, and a Required Level To Use the player meets. A basic item named “Axe” won’t qualify.
Create the tree prefab#
- Open Tools → Green Cloak Games → TileTick Core RPG → World Object Database, then click Create World Object.
- Choose Object Type: Tree first. Changing the type applies its defaults, so do this before entering your reward values.
- Set Display Name to Camp Tree and choose your own content folder, for example
Assets/MyGame/WorldObjects. - Enable Multiplayer Content. Set Primary Action Text to Chop, Required Level to 1, XP Reward to 25, and Output Item to
LootItem_Logs. - Use the supplied
Demo/Prefabs/Interactables/InteractableTreeas the Base Template if you want to retain its tree and stump. Keep Add Interaction Provider enabled. Add a collider if the template does not already have a suitable one. - Click Create World Object, then open the new prefab and select its root.
The wizard’s Tree option accepts axes by category and level. You don’t assign a specific axe asset to the tree.
Set the reward and regrow cycle#
On TreeActionHandler, use the following settings for the first check. Setting the chance to 1 temporarily makes it easier to tell whether the setup works.
| Field | First setup | What it controls |
|---|---|---|
| Required Woodcutting Level | 1 | The tree’s level requirement, separate from the axe requirement. |
| Allow Inventory Axe | Enabled | Lets a carried axe qualify. Leave Allow Equipped Axe enabled too. |
| Base Attempt Interval Ticks | 4 | The wait between attempts, adjusted by the axe’s speed multiplier. |
| Log Item / Log Quantity | LootItem_Logs / 1 | The exact item and quantity awarded on success. |
| Base Woodcutting Xp | 25 | XP per successful chop, before any axe XP bonus. |
| Base Success Chance | 1 for the first check | Change this to your intended balance after checking the setup. |
| Deplete On Successful Chop | Enabled | Makes one success turn this tree into a stump. |
| Respawn Ticks | 20 | How long the tree stays depleted. |
Assign Tree Visual to the live-tree child and Stump Visual to the stump child. Keep the root, interaction components and collider active. If Tree Visual points at the whole prefab root, depletion can disable the object that is supposed to regrow it.
Place it in the scene#
- Drag the new prefab onto reachable ground in your gameplay scene.
- On
WorldObjectInteractable, start with Interaction Range Tiles: 1. Place its Interaction Point where the player can stand close enough to the trunk. Don’t let the tree’s collider block every neighbouring tile. - Check
NetworkWorldObject. Each new scene instance needs its own Stable Scene Id. Use Generate New Stable Id for a newly duplicated instance; keep IDs already used by saved content. - Keep the scene’s
NetworkWorldObjectRegistrarand its existing session references. Scene trees use this registration path; they do not each need an NGONetworkObject. - Run Tools → Green Cloak Games → Multiplayer → Validate Networked World Objects In Scene. Fix duplicate IDs or missing action handlers before entering Play Mode.
Chop it, then wait for it to regrow#
Start the game as a host, approach the tree and choose Chop. With the temporary chance of 1, a successful attempt should add one Log and 25 Woodcutting XP, switch the tree to its stump, and stop the action. After 20 simulation ticks, the tree becomes available again. Click it once more to collect another log.
Now lower Base Success Chance to the balance you want. A new handler defaults to 0.35; the supplied tree prefab uses 0.10. The supplied Iron Axe adds 0.10, so that sample combination has a 20% chance per attempt. Several failed swings are normal at that rate.
Woodcutting does not add an automatic per-level success bonus. Levels unlock trees and tools; the tree’s chance and the axe’s bonuses determine success. Tool Power selects the preferred eligible axe when several are available. It doesn’t multiply the chance.
If something goes wrong#
| What happens | What to check |
|---|---|
| Examine works, but Chop does nothing. | Start a host session, check Multiplayer Content, and confirm the action is bound to TreeActionHandler. |
| The game says you need an axe. | Check the tool definition’s type, skill and level, and make sure Allow Inventory Axe is enabled if you are carrying it. |
| The action starts, but no Logs appear. | Try chance 1 on the test tree. Then check Log Item, inventory space, TickManager and the player’s skill action controller. |
| The tree disappears and never returns. | Assign child objects to Tree Visual/Stump Visual, and keep the root active. |
| A copied tree stops working. | Give only the new copy a new Stable Scene Id, then run network-object validation. |
| The player cannot reach it. | Move the Interaction Point onto reachable ground within range and inspect blocked neighbouring tiles. |
Turn the Logs into something useful#
Keep a Log in the inventory and add a Tinder Box. In Firemaking, you’ll connect those exact definitions to a temporary cooking fire.
