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.

Run this one as a host. Built-in tree chopping uses the networked gathering workflow. A local-only Tree created by the wizard can be examined, but its local action does not chop logs.

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#

  1. Open Tools → Green Cloak Games → TileTick Core RPG → World Object Database, then click Create World Object.
  2. Choose Object Type: Tree first. Changing the type applies its defaults, so do this before entering your reward values.
  3. Set Display Name to Camp Tree and choose your own content folder, for example Assets/MyGame/WorldObjects.
  4. Enable Multiplayer Content. Set Primary Action Text to Chop, Required Level to 1, XP Reward to 25, and Output Item to LootItem_Logs.
  5. Use the supplied Demo/Prefabs/Interactables/InteractableTree as 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.
  6. 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.

FieldFirst setupWhat it controls
Required Woodcutting Level1The tree’s level requirement, separate from the axe requirement.
Allow Inventory AxeEnabledLets a carried axe qualify. Leave Allow Equipped Axe enabled too.
Base Attempt Interval Ticks4The wait between attempts, adjusted by the axe’s speed multiplier.
Log Item / Log QuantityLootItem_Logs / 1The exact item and quantity awarded on success.
Base Woodcutting Xp25XP per successful chop, before any axe XP bonus.
Base Success Chance1 for the first checkChange this to your intended balance after checking the setup.
Deplete On Successful ChopEnabledMakes one success turn this tree into a stump.
Respawn Ticks20How 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#

  1. Drag the new prefab onto reachable ground in your gameplay scene.
  2. 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.
  3. 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.
  4. Keep the scene’s NetworkWorldObjectRegistrar and its existing session references. Scene trees use this registration path; they do not each need an NGO NetworkObject.
  5. 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 happensWhat 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.