Dev Api | Baldi

public void BuildDetentionMaze() { var builder = new LevelBuilder("DetentionMaze", 20, 20); builder.FillWithTile(TileType.Brick); // Spiral maze pattern for (int i = 0; i < 40; i++) { int x = Random.Range(1, 19); int z = Random.Range(1, 19); builder.SetTile(x, z, TileType.Hall); }

ObjectSpawner.Spawn("PrincipalShadow", new Vector3(10, 0, 10)); Use the API’s GameTimer to force escape after 60 seconds:

private bool IsPlayerInDetention() { return BaldiGameManager.CurrentLevelName == "DetentionMaze"; } } baldi dev api

// Shrink mechanism builder.AddEnvironmentEffect(EffectType.ShrinkZone, interval: 5f);

Add this to a prefab and spawn it inside the detention level using: public void BuildDetentionMaze() { var builder = new

DebugAPI.Log("Detention started"); DebugAPI.DrawTileGrid(true); Add a cheat command to teleport directly to detention:

using BaldiAPI; using UnityEngine; [BaldiMod] public class DetentionDimensionMod : ModBase { public override void OnModLoad() { Events.OnWrongAnswer += OnWrongAnswerStreak; } i++) { int x = Random.Range(1

private void StartDetention() { wrongStreak = 0; BaldiGameManager.TeleportToCustomLevel("DetentionMaze"); } } Create a new scene (or procedural map) using the API’s LevelBuilder :