Table of Contents

Class PGGGraphBuilder

Namespace
GrindFest.Editor
Assembly
GrindFest.dll

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.

public abstract class PGGGraphBuilder
Inheritance
object
PGGGraphBuilder
Derived

Fields

GRAPHS
_subAssets

Methods

AddBuildVariable(BuildPlannerPreset, string, EVarType)
AddPlanner(BuildPlannerPreset, string, FieldSetup, ShapeGeneratorBase, int)
AddSubGraph(FieldPlanner, string, EExecutionOrder)
ConfigurePathfind(PR_FindPathTowards, int, int, bool, bool, bool, bool)
CreateIntPort(int)

Create an IntPort with a preset value.

FindFieldSetup(string)
FindFunctionPort(PlannerFunctionNode, string)

Find a port on a PlannerFunctionNode by its display name.

FindPlannerFunction(string)
FindRoomShape(string)

Find a RoomShape asset by name in the project.

GetPort(FGraph_NodeBase, string)

Get a NodePortBase from a node by its C# field name (uses reflection).

ManualCells(params Vector3Int[])

Create an SG_ManualRectangles with specific cell positions.

ManualCellsFromRoomShape(RoomShape)

Create an SG_ManualRectangles from a RoomShape asset's CellSets. Each CellSet becomes a shape variant; the generator randomly picks one.

N<T>(FieldPlanner, bool, float, float, Action<T>)

Create a node and add it to a FieldPlanner's procedures or post-procedures.

N<T>(SubGraph, float, float, Action<T>)

Create a node and add it to a sub-graph's procedures.

NewPreset(string)
NoShape()

Create an SG_NoShape (shape determined by procedural logic).

RoomShapeOrFallback(string, int, int)

Load a RoomShape asset and create SG_ManualRectangles from it. Falls back to StaticRect if the asset is not found.

Save(BuildPlannerPreset, string)
SetField(PlannerRuleBase, string, object)

Set a field on a node via reflection.

SetFieldSafe(object, string, object)

Set a field value via reflection (safe; logs warning on failure).

StaticRect(int, int)

Create an SG_StaticSizeRectangle with given dimensions.

WireExec(FieldPlanner, bool, PlannerRuleBase)

Wire PE_Start -> first node on a planner.

WireExec(SubGraph, PlannerRuleBase)

Wire PE_Start -> first node on a sub-graph.

WireExec(PlannerRuleBase, PlannerRuleBase)

Wire node -> node (default output -> default input).

WireExecAlt(PlannerRuleBase, int, PlannerRuleBase, int)

Wire node alt-output -> node (for loops, switches, etc.).

WirePort(PlannerRuleBase, string, PlannerFunctionNode, string)

Connect to a PlannerFunctionNode's dynamic port by display name. Function nodes have Port0..Port9 (FunctionPortRef) instead of named fields.

WirePort(PlannerRuleBase, string, PlannerRuleBase, string)

Connect an output port on fromNode to an input port on toNode by field name. Uses reflection to find the NodePortBase fields.