Puzzle Pits Editor

Level pack

Click a level to edit it. Unpacked into the game's PACKS folder, a pack shows on its title screen.

Level

Rocks'n'Diamonds

Converting, and correcting by hand

The level plays with Pits' own rules, made of R'n'D's custom elements: coloured targets, arrows, glass, water, lava and holes work as in Pits. The rows below are the level as plain Sokoban instead; correcting them by hand makes the level play as that Sokoban level.

As Sokoban: # wall, $ box, . goal (a target), * box on a goal, @ player, + player on a goal, space for floor, _ the void; m, p and g show marked tiles, plates and grass, walked over like floor. Water, lava and holes become walls; arrows, gems, keys and the scripts' doings are left out. Edit the rows to correct it: the corrections stay with the level, and with the pack in its zip.

Unpack the download into ~/.rocksndiamonds/levels. docs/RND-PORT.md in the game's source has what each of Abe's levels needs.

Objects

Ground

Left click paints, right click picks up what is there. Ctrl+Z undoes.

Scripts

The script language

A script on a square runs when it has a plate (stepped on, then left), a wall with text (walked into) or a switch (flipped). A script named Intro runs as the level starts, Master after every move, and RedGem, GreenGem, BlueGem when that gem is used.

SWITCHON … what happens when it is switched on (stepped on, flipped on); SWITCHOFF … when off (left, flipped off). IF EQ a b (also NE LT GT LE GE, and IF INPUT "word") … ELSE … ENDIF; FOR R0 1 10 … NEXT. LET ADD SUB MUL DIV a register and a value; PRINT "text", INPUT "question"; CHANGEMAP x y tile, x y tile; SWAPOVER/SWAPUNDER x1 y1 x2 y2; GOTO x y x2 y2; REDRAW APPEAR WIN STOP POPUP TARGET.

Values: numbers −100 to 100, R0–R9, XGUY YGUY XPOS YPOS MOVES REDGEMS…, UNDER(x, y), OVER(x, y), DELTA(a, b) (a + b), WALKABLE(tile). All of it is in docs/PIT-FORMAT.md in the game's source.

As blocks: drag them from the left; a block's menu (right-click) turns it into text, and typed text into blocks, so the two mix. Select a "square … becomes" block and click the pit to fill in its square. The blocks are loaded from the internet the first time.