Table of Contents

Namespace GrindFest.Editor

Classes

CitadelDungeonBuilder

Citadel Fortress — Reproducing Room_Main_Area from PolygonDungeonMap demo.

Strategy: Asymmetric offsets + irregular footprints per level. Each level is offset from center to create overhangs, cantilevers, and visual interest instead of perfectly stacked centered rectangles. Some levels use L-shaped or extended footprints.

8 per-level FieldSetup variants (ceiling/lighting shifted -1 for Y-bleed): Base(L0,L4) Sparse(L1) Hall(L2) Inner(L3) Platform(L5) Gallery(L6) Terrace(L7) Tower(L8)

CitadelFieldSetupBuilder

Builds the Citadel dungeon FieldSetup assets from code. Based on the Polygon Dungeon Map demo scene's Room_Main_Area structure.

The citadel aesthetic emphasizes:

  • Railings on edges instead of walls (open-air platforms)
  • Large decorative pillars (Wall_Pillar_Large_Round_01)
  • Fire braziers on pillar bases
  • Knight stands and banners
  • Stone tile floors (Tiles_01 primary)
  • No ceilings (open to sky)

Creates 8 per-level FieldSetup variants (ceiling/lighting shifted -1 for Y-bleed):

  • Base (L0,L4): Ceiling+, no lighting/decorations
  • Sparse (L1): Ceiling+lighting+, no doors/decorations
  • Hall (L2): No ceiling/lighting/decorations
  • Inner (L3): Ceiling+lighting+, all except decorations
  • Platform (L5): Open-air, ceiling+, no lighting/decorations
  • Gallery (L6): Ceiling+, no lighting/doors, has decorations
  • Terrace (L7): Open-air, lighting+, no ceiling/decorations
  • Tower (L8): Lighting+, no stairs/rocks/props, has decorations
CopyModTypingsBuildStep

Pre-build step: copies type declaration files from OneJS WorkingDir to StreamingAssets/ModTypings so that ModManager can distribute them to Mods/typings/ at runtime. Players use these for TypeScript IntelliSense in UI mods.

Files copied:

  • app.d.ts: C# type declarations (auto-generated by Puerts)
  • global.d.ts: GrindFest custom mod globals (useObservableList, etc.)
CryptArmoryRoom

Crypt Armory -- crypt room + undead monsters + weapon racks/barrels. Every spawner rule is defined right here.

CryptContent
CryptCorridorRoom

Corridor -- crypt room content + traps. Every trap rule defined inline.

CryptDarknessRoom

Darkness -- border fill around dungeon. Minimal: just a darkness plane.

CryptDungeonBuilder

Builds the Crypt 1-Level dungeon graph programmatically. 4 planners: Entrance, Rooms, Corridors, Darkness.

CryptEntranceRoom

Crypt Entrance -- standard crypt room content + stairs root mod.

CryptFieldSetupBuilder

Builds the Crypt dungeon FieldSetup and ModPack assets from code.

Creates:

  • Standalone Mods: Stone Walls, Stone Floors, Door Hole Stone Doors, Clear Wall
  • ModPacks: MP_Crypt Room, MP_Armory, Undead Monsters
  • FieldSetups: Crypt Entrance, Crypt Armory, Corridor, Darkness

All assets are saved with "_Code" suffix to avoid overwriting hand-made originals.

CryptLibraryRoom

Crypt Library -- demonstrates mixing shared content with custom content. Same crypt walls/floors, but adds bookshelves and reading desks instead of weapon racks. Shows you can override any detail.

CryptPrefabs
CryptRitualRoom

Crypt Ritual Room -- completely custom. No shared content. Every wall, floor, light, and prop is defined right here.

CryptRoomBuilderMenu
DungeonBuilder

High-level dungeon builder that provides reusable patterns for creating BuildPlannerPreset graphs. Subclass this and override Configure() to create specific dungeon layouts using Room(), Corridors(), Darkness(), etc.

The builder encapsulates complex PGG node wiring into simple method calls. For custom/advanced wiring, all PGGGraphBuilder low-level methods (N, WirePort, WireExec, etc.) are still available.

DwarvenMoriaBase

Base class for Moria-themed dwarven dungeon rooms.

Uses PolygonDungeonRealms dwarven assets to create rooms that evoke the Mines of Moria — massive stone halls, towering pillars, ancient dwarven architecture in ruin.

Compared to the existing "Dwarf Corridor" (which uses small round crypt pillars), Moria rooms use the LARGE dwarven pillar set (SM_Env_Dwarf_Pillar_01-08), dwarven-specific torches, and broken/ruined elements for an ancient feel.

Architecture: DwarvenMoriaBase (shared: dwarven walls, floors, torches, massive pillars, rubble) ├── MoriaGrandHall (Dwarrowdelf — dense pillars, chandeliers, braziers, statues) ├── MoriaCorridor (Deep passages — traps, archways) ├── MoriaChamber (Records/tomb room — props, monsters) └── MoriaBridge (Bridge of Khazad-dûm — bridges, lava pillars, boss)

GraphComparer
GraphPropertyCloner

Clones all serializable property values from original MapMagic graphs to _Code graphs. Matches generators by type + link topology signature, then copies field values. This preserves the graph topology (created by MapMagicGraphBuilder) while ensuring all parameter values match the originals exactly.

GraphPropertyComparer

Deep property-level comparison of MapMagic graphs. Compares every serializable field on each generator between original and code graphs.

GraphToCodeGenerator

Reads an original MapMagic Graph asset and generates the C# code that would recreate it identically. This is used to produce the body of each CreateXxxGraph() method in MapMagicGraphBuilder.cs.

Output: C:\Users\Filip\AppData\Local\Temp\graph_codegen_{biome}.cs Menu: GrindFest → MapMagic → Generate Code From Originals

LocalizeComponentExtensions
MapMagicGraphBuilder

Programmatic MapMagic 2 graph builder for all GrindFest biome graphs. AI-editable: each biome is defined purely in C# — no visual graph editing needed.

Menu: GrindFest → MapMagic → Rebuild ALL Graphs Saves to: Assets/_GrindFest/Maps/*_Code.asset

Reference doc: GrindFest.Workspace/MAPMAGIC_GRAPHS_REFERENCE.md Type reference: Verified against MapMagic 2.1.4.12 source

PGGFieldSetupBuilder

Base class for programmatic FIMSpace PGG FieldSetup/ModPack builders. Provides helpers for creating FieldSetup assets, ModificatorsPacks, FieldModifications (mods), FieldSpawners, and SpawnRuleBase instances.

Subclass and implement Build() for each dungeon theme.

PGGGraphBuilder

Base class for programmatic FIMSpace PGG BuildPlannerPreset builders. Provides all core helpers: preset/planner creation, node creation, trigger/port wiring, shape generators, asset resolution, and save. Subclass this and override Build() for each dungeon type.

PGGStructureProfiler

Profiles and compares PGG-generated structures against reference demo scenes. Designed to validate that procedural generation produces results statistically similar to hand-built Synty demo structures.

HIGH-LEVEL API (for Roslyn scripts via reflection): ProfileAndSave(demoGO, "Room_Main_Area.json") → Save golden reference CompareToGolden(genGO, "Room_Main_Area.json") → Compare against saved reference ProfileAndCompare(demoGO, genGO) → Direct comparison of two GOs ListGoldenProfiles() → List saved profiles

EDITOR MENU: GrindFest > PGG > Profile Selected Object GrindFest > PGG > Save Profile of Selected

PGGStructureProfiler.CategoryComparison
PGGStructureProfiler.ComparisonResult
PGGStructureProfiler.LevelComparison
PGGStructureProfiler.LevelProfile
PGGStructureProfiler.StructureProfile
RoomBuilder

High-level builder for FieldSetup assets (room content). Provides composable content layers: Structure, Props, Lighting, Population, Hazards.

Like DungeonBuilder wraps PGGGraphBuilder for presets, RoomBuilder wraps PGGFieldSetupBuilder for FieldSetups. The end goal: a room definition that reads like a recipe, not a 300-line procedural script.

Usage: class MyCryptRoom : RoomBuilder { protected override string SetupName => "Crypt Room_Code"; protected override void Configure() { Walls(WallStyle.Stone, "SM_Env_Wall_01", "SM_Env_Wall_03"); Floors(FloorStyle.Tiled, "SM_Env_Tiles_02", "SM_Env_Tiles_03"); Pillars(PillarStyle.GridIntersection, "SM_Env_Pillar_Square_01"); Lighting(LightStyle.WallMounted, "Wall Torch", spacing: 3); Props("FM_Vases", probability: 0.01f); Debris("SM_Env_Rubble_Pebbles_01", probability: 0.16f); Monsters("Undead Spawner", probability: 0.25f); } }

Architecture: RoomBuilder (high-level recipe API) -> PGGFieldSetupBuilder (low-level PGG primitives) -> FieldSetup + ModificatorsPack + FieldModification + FieldSpawner + SpawnRuleBase

Each content method (Walls, Floors, etc.) creates a FieldModification with spawners and rules, adds it to the current ModPack, and returns a handle for further customization.

RoomBuilder.PillarConfig

Fluent config for pillars.

RoomBuilder.WallsConfig

Fluent configuration for wall mods.

RoyalTombBuilder

Royal Tomb — Linear sequence of increasingly grand rooms. Layout: Gate → Antechamber → Trapped Hall → Treasury → Sarcophagus Chamber Uses standard crypt FieldSetups for now (will get custom FieldSetups later).

SimpleRoomLayout

Simplest possible BuildPlannerPreset: a single room planner. No corridors, no darkness, no scatter placement — just one zone with a specific shape and FieldSetup.

This demonstrates the minimal PGG layout needed to generate a structure. Use this as a starting point for simple structure reproduction.

StoneCorridorRoom

Builds a Stone Corridor FieldSetup that is an exact code replica of the original Corridor.asset from Assets/_GrindFest/Dungeons/Fields/.

Source analysis (Corridor.asset dump): Pack[0]: MP_Crypt Room (6 mods) Mod[0]: Stone Walls-Variant — Wall_01, Wall_01_Alt, Wall_03 + corners Mod[1]: Stone Floors-Variant — 9 floor tile variants (Tiles_02..010) Mod[2]: Lightning-Variant — Wall Torch with GetCoords + CellDistance Mod[3]: Pillars-Variant — Square + Broken pillar with variable gate Mod[4]: Rubble — 12 debris prefabs, probabilistic Mod[5]: FM_Vases — Vases Emitter, probabilistic Pack[1]: MP_Traps (1 mod) Mod[0]: Traps — Spears, Swing, Exploding Charm, Saw Rail Pack[2]: Root (0 mods) Instructions: door hole + clear wall

SyntyArmory

Synty Armory — weapon racks, barrels, and chests.

Original: Crypt Armory.asset = MP_Crypt Room + Undead Monsters

  • MP_Armory(Barrel with Weapons, One Sided Weapon Rack, Weapon Rack)
  • FM_BarrelsAndCrates(Chest, Barrels)
SyntyClassroom

Synty Classroom — bookcases, wooden tables, chairs, inscription tables, cauldron.

Original: Classroom.asset = MP_Crypt Room + Undead Monsters

  • MP_Classroom(Bookcase, Wooden Chair, Wooden Table, Inscription Table, Stuff on Classroom Table, Cauldron) Similar to Library but with wooden furniture and classroom-specific stuff.
SyntyCorridor

Synty Corridor — the simplest dungeon room type. Base crypt content + traps. No monsters, no furniture.

Original: Corridor.asset = MP_Crypt Room + MP_Traps + Root(empty)

SyntyCrypt

Synty Crypt — standard dungeon room with undead and burial props.

Original: Crypt.asset = MP_Crypt Room + Undead Monsters

  • Root(Tomb, Coffin, Royal Tomb, Bones, Candles)
SyntyCryptBase

Base class for all Synty PolygonDungeon-style rooms.

Every Synty dungeon room shares the same base content pack "MP_Crypt Room" containing 6 mods: Walls, Floors, Lightning, Pillars, Rubble, Vases. Room types differ only in their additional overlay packs (traps, monsters, furniture, themed props).

Architecture: SyntyCryptBase (shared base: walls, floors, lights, pillars, rubble, vases) ├── SyntyCorridor (+ traps) ├── SyntyCrypt (+ undead + tombs/coffins) ├── SyntyArmory (+ undead + weapon racks/barrels) ├── SyntyLibrary (+ undead + bookcases/tables) ├── SyntyPrison (+ undead + cells/shackles) ├── SyntyTreasure (+ undead + chests) ├── SyntyClassroom (+ undead + desks/chairs) └── SyntyLaboratory (+ undead + cauldrons/alchemy)

Prefab paths match the original Synty asset exactly.

SyntyLaboratory

Synty Laboratory — stone table, cauldron, barrels, barrel shelf, large barrel, alchemy stuff.

Original: Laboratory.asset = MP_Crypt Room + Undead Monsters

  • MP_Laboratory(Stone Table, Cauldron, Barrels, Barrel Shelf, Large Barrel, Stuff on Alchemy Table)
SyntyLibrary

Synty Library — bookcases, tables, chairs, papers, inscription tables.

Original: Library.asset = MP_Crypt Room + Undead Monsters

  • Library_Pack(Papers, Bookcase, Inscription Table, Cauldron, Table, Chair, Stuff on Table)
  • FM_BarrelsAndCrates(Chest, Barrels)
SyntyPrison

Synty Prison — portcullis, locked doors, shackles, grates, torture table.

Original: Prison.asset = MP_Crypt Room + Undead Monsters

  • MP_Prison(Portcullis, Wall_01, Doorframe w/Locked Door, Grate_Ground, Shackles x2, Stone Table, Stuff on Prison Table, Torture StretchTable)
SyntyTreasureRoom

Synty Treasure Room — treasure chests and regular chests.

Original: Treasure Room.asset = MP_Crypt Room + Undead Monsters

  • Root(Treasure Chest, Chest) Simplest room after Corridor — just chests scattered around.
SyntyWalledRoom

Synty Walled Room — simplest room with monsters, no extra furniture.

Original: Walled Room.asset = MP_Crypt Room + Undead Monsters + Root(empty) This is the minimal combat encounter room.