Verse Library verse

01 Fragment

Detects player device tier to adjust graphics settings and maintain smooth performance.

verse-library/scalability-in-use/01-fragment.verse

# Import the necessary Fortnite modules
using { /Fortnite.com/Devices }
using { /Fortnite.com/Players }

# Define our main script component
# This is like a "Brain" attached to a device in your island
script PerformanceManager: component() {
    # A variable to store the player's current device tier
    # Think of this as the "Graphics Settings" dropdown menu
    var PlayerDeviceTier: int = 0

    # A function that runs when the component starts
    # This is like pressing "Play" on your island
    OnBegin<override>()<scalespawner, clientauthoritative>: <async> () = async
    (
        # Get the local player (you!)
        LocalPlayer := GetLocalPlayer()
        
        # Check the player's device tier
        # This is like asking: "Are you on a phone, a console, or a super PC?"
        # The result is stored in PlayerDeviceTier
        # 0 = Low, 1 = Medium, 2 = High, 3 = Epic, 4 = Cinematic
        PlayerDeviceTier := LocalPlayer.GetDeviceTier()

        # Now, let's react to what we found
        if (PlayerDeviceTier < 2) {
            # If tier is Low or Medium
            Print("Low-End Mode Activated: Simplifying graphics for smooth gameplay!")
            # In a real island, you'd use Verse to hide complex meshes here
        } else {

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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