The Loot Goblin’s Guide to Crafting: Turning Trash into Treasure with Verse
Tutorial beginner

The Loot Goblin’s Guide to Crafting: Turning Trash into Treasure with Verse

Updated beginner

The Loot Goblin’s Guide to Crafting: Turning Trash into Treasure with Verse

So, you want players to feel like actual engineers, not just button-mashing zombies? You want them to hunt for Mechanical Parts and Animal Bones, sweat over their inventory, and trade up for something shiny? That’s not just gameplay; that’s economy. And to build an economy, you need to control what drops, what stays, and what gets consumed.

In this tutorial, we’re going to build a Crafting Station. It’s a simple but powerful system where players collect "junk" consumables (the kind that sit in the top row of their resource bar) and exchange them for a "reward" consumable. We’ll use Verse to handle the logic, ensuring players can’t just spam the button—they need the right loot in their pockets.

What You'll Learn

  • Consumables vs. Crafting Items: Understanding the difference between items you use (Bandages) and items you trade (Mechanical Parts).
  • Inventory Checks: Using Verse to peek inside a player’s backpack before letting them craft.
  • The "Trade" Logic: Removing old items and granting new ones using Verse events.
  • Scene Graph Basics: How to attach logic to specific entities in your island.

How It Works

Before we touch a single line of code, let’s talk mechanics. In Fortnite, most items are Consumables—things like Medkits, Chug Jugs, or Ammo Boxes. You pick them up, you use them, they’re gone.

Crafting Consumables are a special subclass. Things like Animal Bones, Stink Sacs, Mechanical Parts, and Cube Monster Parts don’t do anything when you click them. They sit in your resource bar like currency. They have no "use" function. They are purely inventory data.

To make crafting work, we need to simulate a trade:

  1. The Check: "Does the player have 3 Mechanical Parts?" (This is a variable check).
  2. The Cost: "Remove 3 Mechanical Parts from the player." (This is state change).
  3. The Reward: "Give the player 1 Spicy Ice Cream Cone." (This is an item grant).

In UEFN, you could technically set this up with devices (Conditional Buttons, Item Granter, Item Remover). But devices are rigid. Verse gives us the Scene Graph control. We can attach a script directly to a crafting table prop, so that specific table knows how to craft, while another table nearby does something completely different.

Let's Build It

We are going to build a "Mechanic's Bench". Players bring you Mechanical Parts and Stink Sacs. You give them a Spicy Ice Cream Cone (because why not?).

Step 1: The Setup

  1. Place a Prop (like a workbench or a crate) in your island. Let's call it Crafting_Bench_01.
  2. In the Details panel, find the Verse section and click "Create Verse Script" or attach an existing one to this entity.
  3. Open the script editor.

Step 2: The Code

Here is the complete script. Don’t worry about memorizing it; we’ll break it down line-by-line.

using { /Fortnite.com/Devices }
using { /Unreal.com/Engine }
using { /Verse.org/Sim }

# This is our "Crafting Bench" entity.
# Think of it as the physical table the player stands next to.
actor CraftingBench : Actor() {
    
    # VARIABLES: The "Recipe"
    # These are constants because the recipe never changes for this bench.
    # Like a fixed storm timer, this is set once in the editor.
    const PartsNeeded : int = 3
    const SacNeeded : int = 2
    
    # The item we give back. 
    # In a real game, this might be a weapon or a special consumable.
    const RewardItem : ItemId = "SpicyIceCreamCone"
    
    # EVENTS: The "Trigger"
    # This event fires when a player interacts with this bench.
    # It's like the "Start" button on a device, but triggered by player input.
    event OnInteract(InteractingPlayer : Player) -> () {
        
        # STEP 1: CHECK INVENTORY
        # We need to see what's in the player's hand/slots.
        # Think of this as pausing the game to open their inventory menu.
        player_inventory := InteractingPlayer.GetInventory()
        
        # Get the count of specific crafting items.
        # This is like counting how many gold bars you have.
        parts_count := player_inventory.GetItemCount("MechanicalParts")
        sac_count := player_inventory.GetItemCount("StinkSac")
        
        # STEP 2: THE LOGIC CHECK
        # Do they have enough?
        # If parts_count < 3, the condition is false. Game over.
        if (parts_count >= PartsNeeded and sac_count >= SacNeeded) {
            
            # STEP 3: THE TRADE (Cost)
            # Remove the items. This is like burning the wood to build the wall.
            # We remove more than needed just to be safe, or exactly what's needed.
            player_inventory.RemoveItem("MechanicalParts", PartsNeeded)
            player_inventory.RemoveItem("StinkSac", SacNeeded)
            
            # STEP 4: THE REWARD
            # Grant the new item. This is like the loot drop after a boss fight.
            player_inventory.GrantItem(RewardItem, 1)
            
            # Optional: Feedback!
            # You could add a sound or visual effect here.
            # For now, let's just print a message in the debug console.
            Print("Crafting Complete! Enjoy your spicy treat.")
            
        } else {
            # STEP 5: THE FAIL STATE
            # Not enough loot? Tell the player why.
            # This is like the "Insufficient Ammo" warning.
            if (parts_count < PartsNeeded) {
                Print("Need more Mechanical Parts!")
            } else {
                Print("Need more Stink Sacs!")
            }
        }
    }
}

Step 3: Walkthrough

  1. actor CraftingBench : Actor(): This defines our entity. In the Scene Graph, this is the root. It’s the "Table." Everything inside this block belongs to this specific bench.
  2. const ...: We define our recipe here. const means Constant. It’s like a wall color you pick in the editor—it doesn’t change during the match. If you want to change the recipe, you edit the code, not the game.
  3. event OnInteract(InteractingPlayer : Player): This is the most important part. In UEFN, devices have "On Interact" signals. In Verse, we define what happens when a player clicks E (or your bind) on this specific actor. The InteractingPlayer variable is the person standing there.
  4. GetInventory(): This grabs the player’s current loadout. Think of it as opening the inventory screen.
  5. GetItemCount(...): This is a query. It asks, "How many of this item do I have?" It returns a number (an int).
  6. if (...): The classic decision tree. If the numbers are high enough, we proceed. If not, we skip to the else block.
  7. RemoveItem & GrantItem: These are the actions. RemoveItem takes the resources away (like the storm taking health). GrantItem gives the reward (like the bus dropping loot).

Try It Yourself

You’ve built the basic trade. Now, make it harder.

Challenge: Modify the script so that the crafting bench only works if the player is holding a specific tool (like a Pickaxe) in their hand. If they are just standing there with empty hands, they can’t craft.

Hint: You’ll need to look into the Player actor methods. Specifically, look for a method that returns the item currently in the player's hand. It’s similar to GetInventory(), but it returns the active item, not the whole list. Check the Verse API for GetActiveItem() or similar.

Recap

  • Crafting Consumables (Bones, Parts, etc.) are inventory currency, not usable items.
  • Verse Scripts allow you to attach custom logic to specific props in your Scene Graph.
  • Events like OnInteract let you react to player input.
  • Inventory Management involves checking counts (GetItemCount), removing costs (RemoveItem), and granting rewards (GrantItem).

Now go make some loot goblins pay up!

References

  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-consumables-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-crafting-consumables-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-crafting-items-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-ice-cream-consumables-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-nature-consumables-in-fortnite-creative

Verse source files

Turn this into a guided course

Add using-crafting-consumables-in-fortnite-creative to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.

Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in