Verse and loot chests

Hi All
So I’ve been playing around with UEFN and running into the issue of having customisable items for loot chests which I seen quite a few posts about. Now I’m not sure why Epic make this so difficult when they seem to do so many other things really well. I’ve gone through countless tutorials/you tube’s until my eye’s bleed and so far I haven’t found anything that seems to solve the problem.

The one that seems closest is to place a tracker that triggers on chests opening and use item spawners. This is good except obviously it doesn’t differentiate between different chests.

I then went down the Verse path (no time like the present to start learning that) and put in some basic stuff to subscribe to the Tracker CompleteEvent which works.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.

# A Verse-authored creative device that can be placed in a level
loot_tracker := class(creative_device):
    @editable
    MyTracker:tracker_device=tracker_device{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        TrackerSubscribe := MyTracker.CompleteEvent.Subscribe(OnComplete)

    OnComplete(TheAgent:agent):void=
        Print("complete")

The question I have is there any way to determine the device in question from the agent that is passed to OnComplete? That way at least I could spawn different items based on the chest that triggered the Tracker.

Cheers

The Verse Path !!!

I do not know the true power of the Verse side. Hats off to you for getting right into it.

Because I am a habitual user of De Vices, this is what I’m thinking from my side of the Fort.

I think the tracker agent that is passed would be the specific player that triggers the tracker, and chest opening is only a tally. ???

To do this by device, I would use a tracker per itemspawner,
the item spawner can be used from a distance with its drop items at player location setting, so you only need 1 per different item set.
The trackers should start game unassigned, getting assigned only when needed and unassigned straight after.

Putting a volume around each chest, it will give an on player enter event, which can be used to assign the desired tracker to the player, if the chest is opened, that tracker does its thing.

The on Player Exiting zone event of the volume should then be used by both the unassign and reset functions of the tracker to turn it off for that player and reset it for when the player encounters another chest that uses that tracker.

Hey Hardcaw

I liked your idea and tried it out but it sort of worked but was difficult to manage especially when you have a pile of chests on the island. It also sometimes failed to trigger, and at other times it multiple triggered on entering the volume. The last one I think I fixed but it still wasn’t really suitable.

I went even deeper down the Verse rabbit hole and finally came up with something that works. See pic below where my chest is one on the right. There is an issue with visual cues for the sound which I’m pretty sure can’t be done in UEFN but happy with the rest as it can spawn anything you want. I also have a lot of other textures and sounds from Fortnite, so will look to make other different style chest to spawn other things.

Hats off to a Reddit post from Honeydewmelo who showed how to use Verse for multiple chests.
Here’s how to make them! (Custom Chests 2.0 Tutorial) : r/FortniteCreative (reddit.com)

It’s a shame that people have to go to such lengths for what should be a basic Fortnite gameplay asset but presumably the devs have their hands full with other stuff and hopefully modifiable chest will make it’s way into UEFN in the future.

Cheers

1 Like

Thanks for the feedback, bit of a worry about the reliability of either the volume or the tracker.

Good job with verse.

I got a map with a bunch of chests, just put in all vanilla except for an occasional restock.
Yeah the loot is a bit… but couldn’t bother with it at the end, Don’t think they really add any benefits to the gameplay except the occasional “Ooh I found a chest !!” feeling…

Thanks for that link, I should address this and start down the rabbithole soon

Have tried tags?

Hi.
I use tags to identify the various components so they can be stored in an array within the Verse script. Are you saying there is a tag to enable these visual cues? I haven’t seen anything in the default list but will look a bit deeper as it makes sense they’d have a Verse tag for something like that.
Cheers