{my} add walker {0} at ({1}, {2}), {3} steps, {4} directions, max turn {5}, tag {6}, carving {7}
Register a walker with the given core settings, including the value it carves. Remaining fields use the Walker Definition defaults. Walkers run in registration order.
{my} add {1} walker {0} at ({2}, {3}), tag {4}, carving {5}
Register a walker from a named shape preset instead of raw numbers: Cave is the classic jittery carver, Corridors digs right-angled passages, River meanders in a wide ribbon, Ore Vein burrows downward, Lightning strikes down in a short jagged line, and Blob hollows out one round chamber. Presets only choose the movement settings - tune the result afterwards with the Set Walker actions, or use Add Walker for full control.
{my} define walker from {0}
Register a walker from a full Walker Definition JSON string, for example {"id":"cave","startX":32,"startY":32,"steps":400,"directions":8,"maxTurn":180,"startAngle":0,"turnChance":1,"carveValue":1,"brushSize":1,"tag":""}. Replaces any existing walker with the same id.
{my} remove walker {0}
Unregister the walker. Cells it already carved are unaffected.
{my} run all walkers
Execute every registered walker to the end of its step budget, in registration order, firing On Cell Carved per newly carved cell and On Walker Finished per walker, then On Generation Complete.
{my} run walker {0}
Execute one walker to completion, firing its carve and finish triggers. Does not fire On Generation Complete.
{my} run walkers tagged {0}
Execute every registered walker carrying the tag, in registration order, then fire On Walkers By Tag Complete. Lets you stage generation in passes. An empty tag runs only untagged walkers.
{my} set walker {0} brush size to {1}
Set the square brush a walker stamps each step: 1 carves a single cell, 3 a 3x3 block. The square brush never rotates; for a corridor that turns with the walker use Set Walker Dig Size instead, which overrides this while set.
{my} set walker {0} carve value to {1}
Change the integer a walker writes into the cells it visits. It applies from the walker's next step, so cells it has already carved keep their old value. Set it before running the walker to pick that walker's terrain, or change it mid-run from On Walker Stepped to lay down two values along one path.
{my} set walker {0} dig size to {1} wide by {2} deep
Make a walker dig out a rectangle that turns with it instead of a fixed square. Width is measured across the direction it faces, so it is the corridor width, and is always centred. Depth is measured along that direction and is signed: a positive digs forward from the walker's own cell, a negative digs behind it, and either way its own cell is included, so 1 and -1 both mean just that cell. A walker facing right digs a corridor width cells tall, and the same walker facing down digs one width cells wide. Pass 0 for a dimension to fall back to the walker's brush size for that axis, and 0 for both to restore the plain square brush.
{my} set walker {0} direction weights to {1}
Bias which way a walker turns. Weights are relative, comma separated, one per direction in direction order: entry 0 is the walker's start angle and the rest follow it clockwise. A weight of 0 rules a direction out, and any entry you leave off counts as 1. Missing directions still apply, so "3,1,1" on an 8 direction walker weights the first three and leaves the other five at 1. Leave the string empty to go back to equal weights.
{my} set walker {0} start angle to {1}
Set the angle a walker's direction set is anchored at, in degrees: 0 is right and 90 is down, matching Construct's angle system. The walker's evenly spaced headings rotate with it, and so do its direction weights, since weight entry 0 always weighs the start angle. A walker that has not started faces the new start angle; one mid-walk snaps to the nearest of its new headings.
{my} set walker {0} steps to {1}
Set a walker's step budget. The value becomes its remaining steps, and a finished walker given steps is un-finished, so you can top a walker up and run it again to extend its path.
{my} set walker {0} turn chance to {1}
Set the probability per step, 0 to 1, that a walker considers turning at all. Low values give long straight runs between turns; 1 lets it reconsider its heading every step.
{my} step walker {0} by {1}
Advance one walker by up to N steps, the animated-generation path. Fires On Walker Stepped per step and On Walker Finished when the budget is exhausted.