Build Your Own Procedural Fort: The "One Floor" Rule
Tutorial beginner

Build Your Own Procedural Fort: The "One Floor" Rule

Updated beginner

Build Your Own Procedural Fort: The "One Floor" Rule

Imagine you’re building a 1v1 box fight map. You don’t want to place every single wall and floor tile by hand—that’s like manually spawning every enemy in a storm circle. You want a system that says, "Give me a 3x5 footprint, and I’ll slap a roof on it." In UEFN’s procedural building system, that logic lives in Rules. Specifically, the "Rules for one floor."

This isn’t just about geometry; it’s about teaching your island how to think like a builder. If you can define the rules for a single floor, you can generate entire skyscrapers, maze mazes, or chaotic loot labyrinths with one click. We’re going to break down the anatomy of a floor rule, so you can stop placing props and start programming your island’s skeleton.

What You'll Learn

  • The "Floor" Concept: How Verse treats a floor not as a flat surface, but as a complex assembly of corners, walls, and covered spaces.
  • Pattern Matching: How to tell the engine, "If I see an empty space here, put a corner prop there."
  • The Scene Graph Hierarchy: Understanding how individual pieces (props/walls) stack into a single logical "Floor" entity.
  • Real Code: A working Verse snippet that defines a basic floor structure you can drop into a procedural building template.

How It Works

In Fortnite, you know that a "box" isn’t just one thing. It’s four walls, a floor, and a ceiling. In UEFN’s procedural building system, a Floor is treated as a compound object. It’s a collection of smaller parts that must fit together perfectly.

Think of it like a Loot Drop. When the bus flies over a zone, a loot drop doesn’t just appear as a single item. It’s a container (the crate) holding specific items (the loot). If you define the crate, you define what’s inside.

In Verse, we use Rules to define these containers. A rule for one floor tells the engine:

  1. Where the corners go: These are your anchors.
  2. How the walls connect: These fill the gaps between corners.
  3. What covers the top: This is your "ceiling" or roof tile.
  4. What’s inside: The actual playable floor space.

The magic happens in the Scene Graph. Imagine the Scene Graph as your inventory screen. Each prop (corner, wall, floor tile) is an item. When you build a floor, you’re not just placing items; you’re grouping them into a single "Floor" container. This allows the engine to move, rotate, or delete the entire floor as one unit, rather than hunting for 20 separate props.

The Anatomy of a Floor Rule

Let’s look at the components of a single floor rule. We aren’t just placing a square mesh. We are defining a Pattern.

  1. Corners (vo_corner): These are the anchors. Think of them like Spawn Points. They define the boundaries of your floor. If you have a 3x5 floor, you need corners at the edges.
  2. Walls (vo_wall): These connect the corners. Think of these like Building Pieces. They fill the space between the anchors.
  3. Face/Cover (vo_prop): This is the actual floor surface or the roof. Think of this as the Gameplay Zone. This is where players stand or where loot spawns.
  4. Coverage Check (vo_facecoveragecheck): This is a Trigger. It checks if the space is clear. If there’s already a wall there, don’t place another one. It prevents overlapping props, which causes lag (the digital equivalent of a stuttering frame rate).

When you combine these, you get a Floor Rules block. This block is a recipe. When the procedural system runs, it reads this recipe and builds the floor piece by piece, ensuring every corner is connected and every wall is supported.

Let's Build It

Here is a simplified, annotated version of the Verse code used to define the rules for one floor. This is the "brain" of your procedural building system.

# Define the Name of this Building Set
# Think of this as the "Map Name" in your lobby settings.
RuleSetName<override>:string = "MyProceduralFort"

# The Main Setup Function
# This is called when the game starts or the building is generated.
# PT (Piece Type) is like the "Gallery" you pick from.
SetupRules<override>(PT:piece_type_dir):void= {
    # ---------------------------------------------------------
    # RULES FOR ONE FLOOR
    # This is the core logic for a single story of your building.
    # ---------------------------------------------------------
    FloorRules := vo_cornerwallsplit: {
        
        # 1. Define the Corners (The Anchors)
        # Like placing Spawn Points at the edges of your zone.
        VO_CornerLength1 := vo_corner: {
            VO_Corner := vo_prop: {
                # Assign the Corner Prop from your Gallery
                # This is like picking a specific wall piece from your Quick Bar.
                Prop := PT.Building1_corner 
            }
        }

        # 2. Define the Walls/Faces (The Fillers)
        # These connect the corners.
        VO_Face := vo_prop: {
            # Assign the Face/Prop piece
            Prop := PT.Building1_face
        }

        # 3. Define the Covered Space (The Roof/Floor Surface)
        # This is the actual playable area.
        VO_Covered := vo_prop: {
            # Assign the Box/Tile piece
            Prop := PT.Building1_box
        }

        # 4. Define the Wall Structure
        # This handles the vertical walls between floors.
        VO_Wall := vo_wall: {
            # Check width and coverage to ensure walls align properly.
            VO_Width1 := vo_facecoveragecheck_1voxel: {
                # Ensure the space is clear before placing
                VO_Clear := vo_prop: {
                    Prop := PT.Building1_face
                }
                # Ensure the covered space is accounted for
                VO_Covered := vo_prop: {
                    Prop := PT.Building1_box
                }
            }
        }

        # 5. Define the Center/Roof Check
        # This handles the middle of the floor or the roof tile.
        VO_Centre := RoofTileCheck: {
            # This could be a specific tile type for the center
        }

        # 6. Define the Floor Split Logic
        # This ties everything together into a single "Floor" entity.
        set VO_Root = vo_floorsplit: {
            # The height of this floor is determined by FloorRules
            VO_FloorHeight1 := FloorRules
        }
    }
}

Walkthrough: What Just Happened?

  1. RuleSetName: We gave our building a name. This is like naming your Creative mode island. It helps the engine identify which set of rules to use.
  2. FloorRules: This is the big block. It’s a Compound Statement. Instead of one line of code, it’s a whole paragraph describing how a floor is built.
  3. vo_corner: We defined the corners first. Why? Because in Fortnite, you build corners before you fill in walls. The engine needs to know where the edges are.
  4. vo_face and vo_prop: We assigned specific props from your gallery (PT.Building1_corner, etc.). This is where you link the code to your actual 3D models.
  5. vo_facecoveragecheck: This is the smart part. It checks if a space is already occupied. If you try to place a wall where a floor already is, it skips it. This prevents "double props," which is the #1 cause of performance drops in UEFN.
  6. vo_floorsplit: This wraps everything up. It tells the engine, "Everything inside this block belongs to this floor."

Try It Yourself

You’ve seen the code. Now, let’s make it stick.

Challenge: Modify the FloorRules block above. Currently, it uses PT.Building1_corner for the corners.

  1. Open your UEFN project.
  2. Create a new Procedural Building template.
  3. In the Verse file, find the SetupRules function.
  4. Change the Prop assignment for VO_Corner to use a different prop from your gallery (e.g., PT.Building1_special_corner).
  5. Hint: You don’t need to write new code. You just need to change the reference to the prop. Think of it like swapping out the skin on your character—the code (the character model) stays the same, but the look changes.

If you get stuck, remember: the code is just a list of instructions. If the instruction says "Use Corner A," and you change it to "Use Corner B," the engine will build the floor with Corner B. Simple as that.

Recap

  • Floor Rules are the blueprint for a single story in your procedural building.
  • They use Pattern Matching to place corners, walls, and surfaces in the right order.
  • Coverage Checks prevent overlapping props, keeping your island running smooth.
  • The Scene Graph groups all these pieces into one logical "Floor" entity, making it easy to manage.

Now go build a fort that builds itself. Your players will thank you for not making them manually place 500 walls.

References

  • https://dev.epicgames.com/documentation/en-us/uefn/procedural-building-template-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/procedural-building-template-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/uefn/architectural-modeling-guidelines-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/architectural-modeling-guidelines-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/design-a-1v1-box-fight-in-fortnite-creative

Verse source files

Turn this into a guided course

Add Rules for one floor of the building 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