Core RPG handbook · Development build / version notes

Core RPG handbook

Firemaking: light a cooking fire

Use a Tinder Box on Logs to create a temporary fire, award Firemaking XP, and cook the fish from your campsite.

On this page

The interaction starts in the inventory: choose Use on a Tinder Box, then select the Logs. On a successful attempt, one Log becomes one temporary fire at the player’s current tile. The Tinder Box stays in the inventory.

Start from the supplied combination#

Find Demo/Scriptables/ItemCombos/Combo_Firemaking_Logs.asset. Use it unchanged for the first check, or duplicate it into your own folder if you’re making a different fuel recipe.

To create one from scratch, right-click your content folder and choose Create → TileTick → Inventory Combos → Firemaking Combination. There are two pairs of item fields. Assign all four:

FieldAssign
Item AYour Tinder Box definition.
Item BThe same Logs definition awarded by your tree.
Tinderbox ItemThe same definition as Item A.
Log ItemThe same definition as Item B.

The first pair finds the matching inventory combination. The second pair is used by Firemaking itself. Filling only Tinderbox Item and Log Item leaves the first match incomplete. Either item order works once both pairs agree; use two separate inventory slots.

Set the requirement, timing and XP#

FieldExampleEffect
Required Firemaking Level1The minimum Firemaking level.
Attempt Interval Ticks3Delay between lighting attempts.
Base Success Chance0.3535% at the required level. Use 1 temporarily to check the setup.
Bonus Chance Per Level Above Requirement0.01Adds one percentage point per level above the requirement.
Firemaking Xp40XP after successfully creating the fire.
Fire Lifetime Ticks180How long the fire remains; this matches the supplied combination.
Fire Definition Idtemp.fireThe supplied network fire’s definition identity.

A failed chance roll keeps the Log and tries again after the interval. A successful lighting attempt consumes one Log, grants XP and ends this action. It does not automatically light all the remaining Logs. With the example values, level 11 has a 45% chance; the final chance is clamped between 0 and 1.

A newly created definition defaults to a lifetime of 60 ticks, while the supplied combination uses 180. Choose the duration deliberately rather than relying on whichever asset you started from.

Assign the right fire prefab#

For the first pass, keep the supplied fire prefabs and their components intact:

Running modeCombination fieldSupplied prefab
Local game with no active network sessionFire PrefabDemo/Prefabs/SkillPrefabs/PlayerFirePile.prefab
Host or server sessionNetwork Fire PrefabDemo/Prefabs/Multiplayer/NetworkFire.prefab

The network prefab needs its NetworkObject, NetworkTemporaryObject and presentation components, and must be registered in the active NetworkManager’s prefab list. Keep the demo’s spawned ServerTemporaryObjectService, Player Spawner reference and session registry.

To cook on the result, the fire also needs a clickable WorldObjectInteractable and a CookingStation with Can Cook enabled.

Assign Fire Prefab even for a quick local check. With that field empty, the local path can consume a Log and grant XP without displaying a fire. A missing network fire or rejected network placement instead leaves the Log and grants no XP.

Add the combination to the player#

  1. Open the player prefab actually used by your demo. In a networked game, use the server gameplay player composition that handles item commands.
  2. Find ItemUseService and expand Item Combinations.
  3. Add the Firemaking combination asset to the list, then save the prefab.
  4. Keep one intended recipe for this item pair. The service uses the first matching combination; an older duplicate earlier in the list can hide your new recipe.

ItemUseService expects its SimpleInventory on the same GameObject. Start with the supplied player rather than rebuilding that composition for this exercise.

Light it and use it#

  1. Give the player a Tinder Box and a few Logs through your existing starter inventory or shop. Keep the two inputs in different slots.
  2. Stand on a valid, clear ground tile. A network fire is placed at the player’s current tile; you don’t select a separate ground target. Only one temporary object can occupy that tile.
  3. Choose Use on the Tinder Box, then click the Logs. Wait for a successful lighting attempt.
  4. Check that exactly one Log was consumed, the Tinder Box remains, the fire appeared, and Firemaking XP increased by the configured amount.
  5. Choose Use on Raw Shrimp and click the fire. The Cooking guide covers the ingredient’s recipe settings.
  6. Wait for the configured lifetime. The temporary fire should expire. Restore your intended success chance after the first check.

If something goes wrong#

What happensWhat to check
Using the items together does nothing.Check all four item references and the player’s Item Combinations list. Similar display names don’t make different definitions match.
The new recipe seems ignored.Remove or reorder an earlier combination matching the same item pair.
A Log disappears and XP rises, but no fire appears locally.Assign Fire Prefab. Also inspect the prefab’s visible children.
A host cannot make a fire.Check Network Fire Prefab, NetworkManager prefab registration, ServerTemporaryObjectService and a clear valid player tile.
Lighting keeps trying.Check the player’s level and chance. Failed rolls deliberately keep retrying without consuming a Log.
The fire exists, but Raw Shrimp cannot target it.Check CookingStation, Can Cook, WorldObjectInteractable, its collider and the ingredient’s CookableItemDefinition type.

Try another fuel#

Duplicate the combination and use a different Log definition in both Item B and Log Item. Give the new fuel its own level, XP and fire lifetime, and add that combination to the player. This is a data change; you don’t need a new Firemaking script for each log type.