Table of Contents

Class PGGFieldSetupBuilder

Namespace
GrindFest.Editor
Assembly
GrindFest.dll

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.

public abstract class PGGFieldSetupBuilder
Inheritance
object
PGGFieldSetupBuilder
Derived

Fields

FIELDS
MODS
_subAssets

Methods

AddBoundCollisionOffset(FieldSpawner, float, bool, string)

Add SR_BoundCollisionOffset: position with collision avoidance.

AddBoundedOffset(FieldSpawner, Vector3?, Vector3?, string)

Add SR_BoundedOffset: directional position offset.

AddCellDistance(FieldSpawner, string, float, bool, bool)

Add SR_CellDistance: minimum distance between tagged spawns.

AddCellNeighbours(FieldSpawner, Action<SR_CellNeightbours>)

Add SR_CellNeightbours: check neighbor cell patterns.

AddClearWallInstruction(FieldSetup, FieldModification, string, EInstruction, FieldModification)

Add "Clear Wall" instruction. instructionMod: the mod referenced in the CellsInstruction. eraseFieldMod: if non-null, overrides the FieldSetup.EraseWallModificator field.

AddCompareVariable(FieldSpawner, int, float, bool)

Add SR_CompareVariable: check a FieldSetup variable value.

AddDoorHoleInstruction(FieldSetup, FieldModification, string, FieldModification)

Add "Door Hole" instruction (DoorHole type). instructionMod: the mod referenced in the CellsInstruction. doorsFieldMod: if non-null, overrides the FieldSetup.DoorsModificator field (PGG example mods use a different mod for the field vs instruction).

AddExternalMod(ModificatorsPack, FieldModification)

Add an external FieldModification reference to a ModPack.

AddFloorPlacer(FieldSpawner, Vector3?)

Add SR_FloorPlacer: places floor tiles on each cell.

AddGetCoords(FieldSpawner, string, Vector3?, Vector3?, bool, bool, bool, bool)

Add SR_GetCoords: snap to position of another tagged spawn.

AddIfCellContainsTag(FieldSpawner, string, bool, bool)

Add SR_IfCellContainsTag: check if cell has spawns with a tag.

AddModPack(FieldSetup, ModificatorsPack)

Add a ModificatorsPack reference to a FieldSetup.

AddMoveRotateScale(FieldSpawner, Vector3?, Vector3?, Vector3?, bool, Vector3?, int)

Add SR_MoveRotateScale: apply offset/rotation/scale transforms.

AddPrefab(FieldModification, string)

Add a prefab by asset path to a FieldModification's PrefabsList.

AddPrefab(FieldModification, GameObject)

Add a prefab GameObject to a FieldModification's PrefabsList.

AddPreventSpawns(FieldSpawner, string, bool)

Add SR_PreventSpawns: prevent other tagged spawns in affected cells.

AddProbability(FieldSpawner, float, bool)

Add SR_SpawningPropability: random probability gate.

AddRotate(FieldSpawner, Vector3?, Vector3?)

Add SR_Rotate: random or offset rotation.

AddRule<T>(FieldSpawner, Action<T>)

Create and add a SpawnRuleBase to a spawner.

AddScale(FieldSpawner, Vector3, bool)

Add SR_Scale: multiply spawned prefab scale.

AddSpawnLimit(FieldSpawner, int, int)

Add SR_LimitSpawnCount: min/max spawn count constraint.

AddVariable(FieldSetup, string, float, float, float)

Add a FieldVariable to a FieldSetup.

AddWallPlacer(FieldSpawner, EWallModule, Vector3?, bool, float)

Add SR_WallPlacer: places walls along cell edges.

CreateRootPack(FieldSetup)

Create the RootPack sub-asset for a FieldSetup.

FindMod(string)

Find an existing FieldModification asset by name.

FindModPack(string)

Find an existing ModificatorsPack asset by name.

FindPrefab(string)

Find prefabs by name in the project. Returns first match.

LoadPrefab(string)

Load prefab by exact asset path.

NewFieldSetup(string, float, Vector3?)

Create a new FieldSetup with standard defaults.

NewMod(ModificatorsPack, string, string, bool)

Create a FieldModification as a sub-asset of a ModPack.

NewModPack(string)

Create a standalone ModificatorsPack asset.

NewSpawner(FieldModification, int, string, bool)

Create a FieldSpawner for a FieldModification. stampPrefabID: -2=Empty, -1=Random, >=0 = index into PrefabsList.

NewSpawner(FieldModification, string, int, string, bool)

Create a named FieldSpawner. stampPrefabID: -2=Empty, -1=Random, >=0 = index into PrefabsList.

NewStandaloneMod(string, string)

Create a standalone FieldModification (not part of any pack).

SaveFieldSetup(FieldSetup, string)

Save a FieldSetup asset with all its sub-assets.

SaveMod(FieldModification, string)

Save a standalone FieldModification asset with all sub-assets.

SaveModPack(ModificatorsPack, string)

Save a ModificatorsPack asset with all sub-assets.

SetFieldSafe(object, string, object)