Skip to main content

Adding New Chunks

Chunk Structure

Each chunk is a Model in ReplicatedStorage.Prefabs.Cyclable with this hierarchy:

ChunkTemplate (Model)
├── Core (Model)
│ └── Baseplate (Part)
│ ├── Start (Attachment)
│ └── End (Attachment)
├── PathNodes (Folder)
│ ├── 1 (Part)
│ ├── 2 (Part)
│ └── ... (sorted by name ascending)
├── Decore (Folder)
│ └── ... (decorative meshes)
├── DangerZones (Folder) [optional]
│ └── ... (ring zone parts)
└── Interactables (Folder) [optional]
└── ... (bushes, logs, glowcaps)

Required Elements

  1. Core.Baseplate — The ground plane with Start/End attachments
  2. PathNodes — BaseParts that define the trail path (named numerically)
  3. Gameplay_Chunk tag — Added automatically by the system

Attributes

AttributeTypePurpose
ChunkTypestringSet to "SafeZone" for safe zone chunks
TurnDirectionstring"Left", "Right", or "Straight"

Creating a New Chunk

  1. Build the chunk in Studio with the structure above
  2. Ensure Start and End attachments are on the baseplate
  3. Add path node parts in the PathNodes folder (named 1, 2, 3...)
  4. Place in ReplicatedStorage.Prefabs.Cyclable
  5. Set ChunkType attribute if it's a safe zone

Safe Zone Chunks

Safe zone chunks need:

  • ChunkType attribute set to "SafeZone"
  • A part tagged SafeZone for zone detection
  • Visual distinction (lit clearing, warm lighting)

Chunk Sizing

  • Typical chunk: 100–200 studs length
  • 1–2 trail markers per chunk
  • Path nodes should be spaced evenly along the trail

Turn Alternation

The generator enforces turn alternation to prevent zigzag paths. If the last chunk turned left, the next must turn right or go straight.

Chunks can be inversed (Start/End swapped) during preparation to fit the required direction.

Testing

Use the debug UI to:

  • View current chunk pacing (phase, difficulty, trail marker)
  • Dump path diagnostics
  • Toggle chunk unloading