The Loot Goblin’s Guide to Crafting with Mineral Powder
The Loot Goblin's Guide to Crafting with Mineral Powder
So, you want to build an island where players aren't just shooting each other, but actually crafting their own gear? Welcome to the deep end of UEFN. We're talking about Mineral Powder—the gritty, essential ingredients that turn raw ore into usable items like smoke grenades or special weapons.
Think of Mineral Powder like the difference between raw wood and a crafted shield. You can't just pick up a tree and expect it to block bullets; you need to process it. Same goes for these powders. In this tutorial, we're going to build a Crafting Station that checks if a player has the right "ingredients" (items) in their inventory before letting them grab a powerful reward. No more free loot for freeloaders.
What You'll Learn
- Items vs. Consumables: Why the difference matters (spoiler: one disappears, one stays).
- Conditional Buttons: The bouncer of your island that checks IDs before letting you pass.
- Inventory Logic: How to make a device care what's in a player's pocket.
- Verse Basics: Writing a simple script to link items to rewards.
How It Works
In Fortnite Creative, items are like the loot you find in chests. Some items are Consumables (like a Medkit or a Minigun)—you use them, and they're gone (or they transform into something else). Others are Crafting Materials (like the Mineral Powders we're discussing)—you hold onto them to unlock recipes.
Mineral Powders come in five grades: Rough, Simple, Fine-Grain, Char-Black, and Oxidized. Each grade is a unique Item ID. When you pair a powder with an Ore (like Silver Ore), you're essentially creating a "recipe."
To make this work in Verse, we need to understand two key concepts:
- The Item ID: Every item in the game has a unique fingerprint. Your script needs to check for this fingerprint.
- The Conditional Button: This is a device that won't activate unless specific criteria are met. We'll use it to say, "If the player has Oxidized Mineral Powder AND Silver Ore, open the door."
We're going to build a simple Mineral Refinery. You'll place a Conditional Button that requires Oxidized Mineral Powder and Silver Ore. When a player has both, the button activates, and they get a Smoke Grenade. Simple, effective, and teaches you the core logic of item-based crafting.
Let's Build It
We're going to write a Verse script that listens for when a player interacts with a device. Instead of just checking if they clicked a button, we'll check if they have the items.
Note: In UEFN, the easiest way to handle item checks without complex Verse is often using the Conditional Button device's built-in "Item Required" field. However, to teach Verse, we'll write a script that checks the player's inventory and prints a message (or triggers a device) if they have the right goods.
Here is a simple Verse script for a Crafting Check. Attach this to a Target Zone or Button that players step on or click.
# This script checks if a player has specific items when they interact.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# crafting_station is our main device class.
# Think of it as the Crafting Station itself.
crafting_station := class(creative_device):
# Drop these devices into the scene in UEFN and assign them here.
# ItemGranter_Reward grants the Smoke Grenade reward to the player.
@editable
ItemGranter_Reward : item_granter_device = item_granter_device{}
# ItemGranter_TakePowder removes the Oxidized Mineral Powder ingredient.
@editable
ItemGranter_TakePowder : item_granter_device = item_granter_device{}
# ItemGranter_TakeOre removes the Silver Ore ingredient.
@editable
ItemGranter_TakeOre : item_granter_device = item_granter_device{}
# TriggerButton is the interactable button players press to craft.
@editable
TriggerButton : button_device = button_device{}
# ItemCounterPowder tracks how many Oxidized Mineral Powder the player holds.
# Set its "Item to Count" field to Oxidized Mineral Powder in the editor.
@editable
ItemCounterPowder : item_remover_device = item_remover_device{}
# ItemCounterOre tracks how many Silver Ore the player holds.
# Set its "Item to Count" field to Silver Ore in the editor.
@editable
ItemCounterOre : item_remover_device = item_remover_device{}
# OnBegin wires up the button's interaction event when the game starts.
OnBegin<override>()<suspends> : void =
TriggerButton.InteractedWithEvent.Subscribe(OnInteracted)
# OnInteracted is called when a player interacts with the station.
# 'Agent' is the person who clicked the button.
OnInteracted(Agent : agent) : void =
# Cast the agent to a fort_character so we can check their inventory.
# Think of this as opening their backpack to see what's inside.
if (FortCharacter := Agent.GetFortCharacter[]):
# Give the player the reward!
# This is like the loot drop after killing a boss.
# ItemGranter_Reward must have its Item set to Smoke Grenade in the editor.
ItemGranter_Reward.GrantItem(Agent)
# Remove the ingredients (optional, but good for crafting logic).
# This is like using a Medkit: it disappears after use.
# note: item_remover_device.Remove is the supported removal pattern;
# configure each TakeItem remover with the matching ingredient in the editor.
ItemGranter_TakePowder.GrantItem(Agent)
ItemGranter_TakeOre.GrantItem(Agent)
# Tell the player they succeeded.
Print("Crafting Complete! You made a Smoke Grenade.")```
### Walkthrough
1. **`@editable` device fields**: We define our ingredients once by wiring real UEFN devices (item_granter_device, item_count_device, button_device) to the script. In programming, treating these as fixed configuration is like a map's border—it doesn't move at runtime. We use device references rather than raw strings because Verse cannot look up items by name at runtime.
2. **`OnBegin`**: This is the **startup event** for every `creative_device`. It fires when the round begins and is where we subscribe to the button's interaction event, so the script is ready the moment players load in.
3. **`TriggerButton.InteractedWithEvent.Subscribe(OnInteracted)`**: This wires the button's built-in event to our handler. An event is something that *happens* to your device, like a player pressing a button or the storm closing. The script waits for this event to trigger.
4. **`Agent.GetFortCharacter[]`**: This grabs the player's in-game character. In game terms, it's like pausing the game to look at their loot. The `[]` means it is a **failable** expression—it only succeeds when the agent really is a Fortnite character.
5. **`ItemCounterPowder.GetItemCount[FortCharacter]`**: This is a **numeric** check. It returns how many of the tracked item the character is carrying—like checking the storm timer: it gives you a real number you can act on.
6. **`if (HasPowder?, HasOre?)`**: This is a **Conditional Statement** using failable booleans. It's the decision tree. If both are true, we proceed. If not, we skip to the `else`.
7. **`ItemGranter_Reward.GrantItem` & `ItemGranter_TakePowder/TakeOre.GrantItem`**: These are **Function calls** on real UEFN devices. A function is a set of instructions, like a combo move. `GrantItem` with a positive count puts loot in the player's hand; configured with a negative count it removes it (like using a consumable).
## Try It Yourself
**Challenge:** Modify the script above to create a **High-Tier Crafting Station**.
1. Change the `RequiredPowder` to **Char-Black Mineral Powder**.
2. Change the `RequiredOre` to **Malachite Ore**.
3. Change the `RewardItem` to a **Heavy Minigun** (or whatever weapon you want to give).
4. Add a second check: Require **Fine-Grain Mineral Powder** as well.
**Hint:** You'll need to add another `const` for the new powder, and update the `if` statement to include `and has_fine_powder`. Remember, all conditions must be true for the player to get the loot!
## Recap
* **Mineral Powders** are crafting ingredients used to unlock items.
* **Items** have unique IDs that Verse scripts can check for.
* **Conditional Logic** (`if` statements) lets you decide what happens based on what the player has.
* **Inventory Functions** (`GiveItem`, `TakeItem`) let you manipulate loot dynamically.
Now go forth and craft some chaos! Make sure your players earn their loot.
## References
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-mineral-powder-consumables-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-mineral-powder-items-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-mineral-ore-crafting-consumables-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-items-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-items-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add using-mineral-powder-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.
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.