The Alchemist’s Trap: Build a Crafting Station That Actually Works
Unverified — this example may not compile as-is.
The Verse code below did not pass our automated compile check, so it isn't marked verified and is hidden from the guide listing. The explanation may still be useful, but treat the code as a draft and adapt it before use.
The Alchemist's Trap: Build a Crafting Station That Actually Works
So, you want to build an island where players don't just shoot each other, but actually do something? Welcome to the world of crafting. In Fortnite Creative, crafting isn't just a menu option; it's a gameplay loop. It's the difference between finding a shotgun in a chest and having to hunt for bones and mechanical parts to build one yourself.
In this tutorial, we're going to build a Conditional Crafting Station. Think of it like a vending machine that only dispenses loot if you pay the correct "price" in crafting materials. We'll use Animal Bones and Mechanical Parts to craft a Shield Potion. No magic, just logic. By the end, you'll have a working system where players gather resources, bring them to a button, and get rewarded. It's basic economics, but in Fortnite, it's also basic survival.
What You'll Learn
- Crafting Items vs. Consumables: Why some items go into your inventory but never get "eaten" directly.
- The Conditional Button: How to set up a device that checks your pockets before it acts.
- Item Spawning: How to give players new loot based on what they just sacrificed.
- Game Loop Logic: The cycle of Gather → Trade → Use.
How It Works
To understand crafting in Verse (and UEFN generally), you need to understand the difference between a Consumable and a Crafting Item.
Imagine a Shield Potion. It's a consumable. You pick it up, you drink it, your shield goes up, and the item disappears. That's straightforward.
Now imagine Animal Bones. You can pick them up, and they show up in your resource bar (that top row of icons). But you can't just "eat" a bone to get health. You can't use it to shoot. It has no direct function except to be traded. This is what makes it a Crafting Item. It's currency. It's fuel. It's a key.
In our system, we aren't writing complex code from scratch. We are wiring devices together. Think of it like setting up a trap. You have a Trigger (the button), a Lock (the Conditional Button checking for items), and a Reward (the Item Spawner).
Here is the flow:
- Player picks up Animal Bones and Mechanical Parts.
- Player presses a button.
- The System checks: Does the player have 1 Bone AND 1 Mechanical Part?
- If YES: The system takes those items away (consumes them) and gives the player a Shield Potion.
- If NO: Nothing happens. The player gets nothing. No refund. No pity party.
This is the essence of crafting: Exchange. You give up one thing to get another thing that is more powerful or useful.
Let's Build It
We are going to build a single "Crafting Station." You'll need three devices from the Creative Inventory:
- Conditional Button (Under Devices > Triggers)
- Item Spawner (Under Devices > Items)
- Prop Mover (Optional, just to make the button look like a crafting altar)
Note: While we use the visual editor for this, understanding the logic helps when you want to scale this up to Verse scripts later.
Step 1: The Setup
Place your Conditional Button on the ground. Name it CraftingButton.
Place your Item Spawner nearby. Name it RewardSpawner.
Step 2: Configuring the "Lock" (The Conditional Button)
Click on the CraftingButton. In the details panel, look for Requirements. This is where we define the "price."
- Click Add Requirement.
- Select Item.
- Choose Animal Bones.
- Set the quantity to
1. - Click Add Requirement again.
- Select Item.
- Choose Mechanical Parts.
- Set the quantity to
1.
Your button now has a "lock." It won't open unless the player has both items in their inventory.
Step 3: Configuring the "Reward" (The Item Spawner)
Click on the RewardSpawner.
- In Item Type, select Shield Potion (or any consumable you want to reward).
- Set Amount to
1. - Make sure Enable on Game Start is checked, so it's ready to go.
Step 4: Wiring the Logic
Now we connect the lock to the reward. We want the Spawner to fire only when the Button is successfully pressed.
- Select the
CraftingButton. - Find the On Pressed event in the details panel (or the "Events" tab).
- Click the + next to On Pressed.
- Select Activate as the action.
- In the target selector, choose
RewardSpawner.
Wait, there's a catch. The Conditional Button's "On Pressed" event only fires if the requirements are met. If the player doesn't have the items, the event never triggers. This is perfect. It means you don't need extra logic to "check" if they have items—the device does it for you.
Step 5: Consuming the Items
By default, the Conditional Button checks if you have the items, but it might not take them unless configured. In most modern UEFN setups, the Conditional Button automatically consumes the required items upon a successful press. If you find the items aren't disappearing, check the Consume Items toggle in the Conditional Button's settings and ensure it's ON.
The Verse Connection
You might be wondering, "Where's the Verse code?"
In this simple scenario, the visual editor handles the logic. But imagine if you wanted to craft a unique item that doesn't exist in the default pool, or if you wanted to give different rewards based on how many bones the player brought. That's where Verse comes in.
In Verse, you would write a function that listens for the button press, checks the player's inventory using Player.GetInventory(), and then uses Player.GrantItem() to give the reward. The visual editor is just a pre-compiled Verse script that Epic made easy to tweak.
Here is what that logic would look like in plain English (pseudo-Verse):
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# crafting_station is a Verse device you place in your level.
# Wire CraftingButton and RewardSpawner to it in the UEFN editor.
crafting_station := class(creative_device):
# Drag the Conditional Button device into this slot in the editor.
@editable
CraftingButton : conditional_button_device = conditional_button_device{}
# Drag the Item Spawner device into this slot in the editor.
@editable
RewardSpawner : item_spawner_device = item_spawner_device{}
# OnBegin runs once when the game starts.
OnBegin<override>()<suspends> : void =
# Subscribe to the button's success event.
# ButtonInteractedWithEvent fires only when ALL requirements are met.
CraftingButton.ItemRemovedEvent.Subscribe(OnCraftingSuccess)
# This is called when the Conditional Button fires its success event.
# The Conditional Button already consumed the required items at this point
# (assuming Consume Items is ON in the device settings).
OnCraftingSuccess(Player : player) : void =
# Spawn the reward item at the RewardSpawner's location.
# The item_spawner_device does not take a player argument for SpawnItem;
# it spawns at its world position and the player can walk over it.
RewardSpawner.SpawnItem()
# note: To spawn directly into a player's inventory, pair this with
# a fort_character grant_item call once UEFN exposes that API fully.
Try It Yourself
You've built the basic station. Now, make it harder.
Challenge: Create a "Upgrade Station."
- Set up a new Conditional Button.
- Require 3 Animal Bones.
- Reward the player with a Tactical Shotgun (or a better weapon).
- The Twist: Add a second requirement. The player must also have a Mechanical Part.
- Test it: What happens if you press the button with only bones? What happens if you press it with only mechanical parts? What happens if you have both?
Hint: The Conditional Button is strict. If ANY requirement isn't met, the whole thing fails. It's an AND gate, not an OR gate.
Recap
- Crafting Items (Bones, Parts) are resources used for trading, not direct consumption.
- Conditional Buttons act as gates that check your inventory before allowing an action.
- Item Spawners are the payout mechanism, giving players new items based on the trigger.
- The logic is simple: Check Requirements → Consume Input → Grant Output.
Now go forth and balance your economy. Or don't. Let the players suffer. It's more fun that way.
References
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-crafting-items-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/using-egg-items-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-ranged-weapon-items-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-items-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add using-crafting-items-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.
References
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.