class

FLevelGrammar

The whole generator configuration, one .levelgrammar MDF asset: the starting chain, the rules, the module catalogue and the validation budget.

Module
LevelGen
Header
#include "LevelGen/LevelGrammar.h"
Namespace
Mowo

Properties

TypeNameDescription
std::vector<std::string>StartChain
std::stringStartTypeDefault "Start".
std::stringGoalTypeDefault "Goal".
std::vector<FLevelRule>Rules
std::vector<FLevelModuleDef>Modules
std::vector<FLevelTypeLimit>Limits
int32_tMaxRewriteStepsDefault 48.
int32_tMaxNodesDefault 32.
int32_tMaxAttemptsDefault 24.
floatCellSizeDefault 4.0f.
floatMinDoorWidthDefault 1.6f.
int32_tMinCriticalPathDefault 4.
int32_tMaxCriticalPathDefault 16.
int32_tMaxPortalDepthDefault 3.
int32_tMaxScanCostDefault 40000.
int32_tMaxRoomScanCostDefault 4000.
std::stringCapPrefabPlaced on every socket nothing connected to, and on every edge where two modules touch without a doorway (so the level never shows two coplanar walls back to back).
std::stringSharedWallPrefab

Public functions

ReturnsNameDescription
int32_tFindModule
std::stringSerializeToString
boolLoadFromString
boolLoadFromFile
boolSaveToFile
FLevelGrammarCreateDefaultAJAX's facility: fifteen rules over entrance, corridors, hubs, labs, storage, offices, maintenance, stairs, dead ends and the objective.
const char*SideName
ELevelSideSideFromName
const char*RuleKindName
ELevelRuleKindRuleKindFromName

Function details

FindModule

C++
int32_t FindModule(const std::string& name) const

SerializeToString

C++
std::string SerializeToString() const

LoadFromString

C++
bool LoadFromString(const std::string& text)

LoadFromFile

C++
bool LoadFromFile(const std::string& path)

SaveToFile

C++
bool SaveToFile(const std::string& path) const

CreateDefault

C++
static FLevelGrammar CreateDefault()

AJAX's facility: fifteen rules over entrance, corridors, hubs, labs, storage, offices, maintenance, stairs, dead ends and the objective.

SideName

C++
static const char* SideName(ELevelSide side)

SideFromName

C++
static ELevelSide SideFromName(const std::string& name)

RuleKindName

C++
static const char* RuleKindName(ELevelRuleKind kind)

RuleKindFromName

C++
static ELevelRuleKind RuleKindFromName(const std::string& name)
Generated from LevelGen/LevelGrammar.h via levelgen.json · Oct 26, 2026Version 1.0.0