Table of Contents

Class PlacementBuilder

Namespace
GrindFest.Editor.DungeonBuilding.Fluent
Assembly
GrindFest.dll

Fluent configuration of a single dressing placement: where it goes, how many, with what variation. Compiles to one FieldModification + FieldSpawner + appropriate SpawnRules.

Selector chain (one of):

  • .At(selector) — one prop per matched cell.
  • .Along(selector) — props snapped to a feature (typically walls).
  • .AtCell(x, z) — single exact cell shortcut.
  • .AtCells(...) — multiple exact cells shortcut.
  • .AlongRow(z, ...) — row shortcut.

Quantity (modifies the chain):

  • .Single() — exactly one across all matched cells.
  • .MaxCount(n) — at most n.
  • .Probability(p) — per-cell chance.

Variation:

  • .RotateY(deg) — fixed yaw.
  • .RandomYaw(maxDeg) — random yaw in [-maxDeg, +maxDeg].
  • .Jitter(amount) — random position offset within cell.
  • .MinDistanceFrom(tag, dist) — spacing from other tagged props.
  • .Tag(t) — assign a tag for other rules to reference.
public sealed class PlacementBuilder
Inheritance
object
PlacementBuilder

Methods

Along(ICellSelector)

Place props along a feature (typically walls). Implies wall-snap unless overridden.

AlongColumn(int, int?, int?)

Shortcut for an entire column (x), optionally bounded.

AlongRow(int, int?, int?)

Shortcut for an entire row (z), optionally bounded.

At(ICellSelector)

Place one prop per matched cell.

AtCell(int, int)

Shortcut for a single cell at (x, z).

AtCells(params (int x, int z)[])

Shortcut for multiple exact cells.

Count(int, int)

Place between min and max total.

Done()

Return to the parent room for further chaining (optional — implicit).

Jitter(float)

Random position offset within a radius (in cells).

MaxCount(int)

Cap to at most n total placements.

MinDistanceFrom(string, float)

Require minimum distance (in cells) from any other prop with the given tag.

Probability(float)

Per-cell probability gate (0..1).

RandomYaw(float)

Random yaw in [-maxDegrees, +maxDegrees].

RotateY(float)

Fixed yaw offset in degrees.

Single()

Place exactly one across all matched cells.

SnapToWall(bool)

Force wall-snap on or off. Defaults to true for .Along(), false for .At().

Tag(string)

Assign a tag so other placements can reference this one (for spacing).