PCG graphs
PCGIRA PCG graph is a binary procedural generation network: sampler and filter nodes with their settings, connected pin to pin, plus input and output terminals. You normally read it by tracing edges in the PCG editor. PCGIR writes the same graph out as line-based text: every node with its settings and edited properties, every connection, and the terminals. You can compare it, review it, and give it to your assistant as context. PCGIR is read-only. Writing text back is planned.
What it gives you
- Diffable in version control
- The same reader writes a
pcgir.txtasset-dump file, so a tuned scatter density or a rewired filter shows up as a few changed lines thatgit log -pandgrepcan read. - Reviewable like code
- You read which node uses which settings, what each edited property is set to, and how pins connect from input to output. No clicking from node to node to work out what the graph builds.
- Readable for your assistant
- One consistent format for the whole graph. Each node is named by its settings class, and subgraphs show inline as a
subgraph = "…"property. Your assistant reads the graph and reasons about it. - Faithful and consistent
- The live read and the
pcgir.txtfile share one reader, so they always match. The input and output terminals are included, and each connection appears exactly once.
What the text looks like
The first line names the graph. Each node gets a short name and a settings class, an
optional @(x, y) sets its position, edited properties sit in braces, and
connect lines join output pins to input pins, including the N_Input and
N_Output terminals:
entry pcg `/Game/PCG/G_FoliageScatter` {
node N_Input = `/Script/PCG.PCGGraphInputOutputSettings` @(-400, 0)
node N_Output = `/Script/PCG.PCGGraphInputOutputSettings` @(800, 0)
node N1 = `/Script/PCG.PCGSurfaceSamplerSettings` @(0, 0) {
PointsPerSquaredMeter = 2.5
}
node N2 = `/Script/PCG.PCGSubgraphSettings` @(400, 0) {
subgraph = "/Game/PCG/SG_BoulderScatter"
}
connect N_Input.In -> N1.In
connect N1.Out -> N2.In
connect N2.Out -> N_Output.Out
}
A subgraph appears as a subgraph = "…" property on its parent node. Ask for the subgraph
separately to read it. Node names (N1, N2, …) are stable within one read, but
they can be renumbered after an edit.
How to ask for it
Ask about the graph, or ask for a change. Your assistant reads it as text to answer or to plan, then makes edits in the editor. PCGIR itself doesn't write the asset. More examples are on the Procedural generation (PCG) page.
You: What's scattering points in G_FoliageScatter, and does it call a subgraph?
G_FoliageScatter scatters with a Surface Sampler at 2.5 points/m², then feeds a
Subgraph node that calls /Game/PCG/SG_BoulderScatter.Read-only
PCGIR reads PCG graphs as text for review and for your assistant's context. Writing it back is planned, so your assistant makes PCG changes with its regular editing tools. Subgraphs always show as references. Like most of these formats, PCGIR keeps graph structure (nodes, connections, settings values, positions) and leaves out comment boxes, node colors and editor list order. Behavior tree and Control Rig text are the exceptions that keep comments, as the per-format table shows.