RC Structure Framework

RC Structure Framework (RCSF) is a Build 42 dependency mod for player-built structures. It gives you a sprite/piece catalog, an interactive placement UI, pluggable material consumption, validation, a generic builder, runtime IsoRoom creation, ghost-preview persistence, disassembly, and multiplayer sync - all server-authoritative and MP-safe.

It’s currently used by Military Tents.

New here? Start with the 5-minute build.

Getting started → takes you from an empty mod to a working “build a shed” feature. Then the tutorials go deeper.

Getting started

Install it, then a 5-minute end-to-end build. The fastest path to “it works.”

Getting started
Tutorials

Guided, build-along lessons: a shed and a quest room.

Tutorials
How-to guides

Task recipes: materials, unlock gating, headless builds, rooms, events, MP safety.

How-to guides
Concepts

How the pipeline fits together: the plan, material sources, authority, rooms.

Concepts
Reference

Every module, function, structure-definition field, data contract, and event.

Reference
Use only the parts you need

Depend on everything, disable subsystems, or vendor a single standalone module.

Use only the parts you need

At a glance

  • Build: Project Zomboid Build 42.13+

  • Mod id: RCStructureFramework - declare require=RCStructureFramework in your mod.info

  • Global: RCSF (short alias) / RCStructureFramework (long name + require id)

  • Multiplayer: server-authoritative; dedicated server, listen host, and singleplayer

  • Modular: depend on the whole thing, opt out of subsystems, or vendor a single module

The 60-second example

Register a structure and its pieces (shared), then open the builder from a context menu (client). That’s the complete minimum for a working “build a shed” feature:

media/lua/shared/MyMod/Shed.lua
local RCSF = require("RCStructureFramework")

RCSF.Registry.registerStructure({
    id                = "MyMod_Shed",
    roomName          = "MyModShed",          -- enables runtime IsoRoom creation
    useGenericBuilder = true,                  -- use the built-in per-piece builder
    materialSource    = "raw",                 -- consume items straight from inventory
    variants          = { default = true },
    editor            = { allowCells = true, pieceTypes = { "wall", "floor" } },
    validation        = { useDefaults = { "noEmptyPlan", "noOverlap", "slotKindCompatible" } },
})

RCSF.Registry.registerPieces("MyMod_Shed", {
    { spriteName = "walls_exterior_wooden_01_0", category = "wall", pieceType = "wall",
      categoryGroup = "wall", materialRequirement = { fullType = "Base.Plank", count = 2 } },
    { spriteName = "floors_exterior_natural_01_0", category = "floor",
      categoryGroup = "floor", materialRequirement = { fullType = "Base.Plank", count = 1 } },
})
media/lua/client/MyMod/OpenBuilder.lua
require("RCStructureFramework/PlacementUI")   -- loads the RCStructurePlacementUI panel

local function onFillContext(playerIndex, context, items)
    local player = getSpecificPlayer(playerIndex)
    context:addOption("Build Shed", nil, function()
        RCStructurePlacementUI.open("MyMod_Shed", playerIndex, player, nil)
    end)
end
Events.OnFillInventoryObjectContextMenu.Add(onFillContext)

That gives the player the full drag-footprint → paint → build flow, with material checks, validation, an IsoRoom, and MP sync. The Getting started guide walks through it line by line.