A downloadable tool

Buy Now$9.99 USD or more

A packing puzzle for your RPG, generated and drawn in inlaid wood. A shaped tray sits on the table and its pieces wait in a box beside it, turned every which way. The player picks them up, turns and flips them, and fits every one back in. When the last piece goes home, the tray is a finished marquetry panel and the result goes back to your events.

Every puzzle is generated, and every one can be solved. The tray (a rectangle, a cross, a diamond, a round, a notched or an arch) is carved into pieces of three to six squares, all different even turned over, so the pieces always go back. A built-in solver grades each puzzle by how many different ways the tray can be filled, and the generator keeps the tightest of several carvings for the difficulty you ask for: 4 or 5 pieces on easy, 6 or 7 on normal, 8 to 10 on hard.

Every piece is marquetry. Each is cut from its own wood (walnut, maple, cherry, oak, ebony, ash, rosewood, yew, olive, holly) with that wood's grain and figure, carries an inlaid motif in brass, mother-of-pearl, holly or ebony, and has a line of stringing run inside its edge. Grain and inlay turn with the piece as they would on a real one. Nothing is loaded from an image file.


⚠️ Compatibility — the question you actually have

Tested against RPG Maker MZ with the stock scripts unmodified, verified by running the plugin in the real engine rather than only in tests.

Plugin Manager order:

  1. TrayCore.js — Tray core - generated packing puzzles: a shaped tray cut into distinct polyomino pieces, so every puzzle is solvable by construction.
  2. TrayDraw.js — Tray drawing - the marquetry: ten woods with their own grain, inlaid motifs, stringing, the shaped tray and the finished panel.
  3. Tray.js — Tray - generated packing puzzles in inlaid wood: fit every piece back into its shaped tray. Place BELOW TrayCore and TrayDraw.

It extends one core method by saved-original prototype extension, not replaced: Game_System.prototype.initialize.

Because nothing is clobbered, Tray co-exists with other plugins that patch the same seams, including large suites.

What the player sees

  • A workbench, a black japanned case with a brass fillet and a baize-lined recess cut to the tray's shape, and an open parts box with the loose pieces.
  • Pieces lifted off the table with a deeper shadow, and a gold outline on the cloth where a held piece would land, red where it will not fit.
  • A brass pointer for keyboard and gamepad players, brass plaques to turn, flip, ask for a hint or leave, and a tally card for pieces, moves and hints.
  • When the tray fills, a polish runs across the panel and it is shown framed, with its result and the woods it is made of.

Measured, not promised

  • Solvable by construction: every puzzle is its own carving, replayed through the play rules in the tests, and an independent solver agrees on every one.
  • Over 120 puzzles per difficulty: every easy puzzle fills at most 4 different ways (52 fill exactly one); on normal 116 of 120 fill at most 12 (median 5); on hard 81 of 120 fill at most 40 (median 17). Two fillings that are the same picture turned or flipped count once.
  • A hint finds a way to finish that keeps every piece already placed and puts one more in, or takes out the piece that cannot stay.
  • The same seed deals the same puzzle, checked between the MZ runtime and a second JavaScript engine.

What is in the box

  • Three plain, readable JavaScript files: TrayCore.js (the generator, the solver, the rules), TrayDraw.js (the drawing) and Tray.js (the scene and the command).
  • The Open Tray command: difficulty, tray shape, hints allowed, variables for moves and hints, a switch for solved, a new puzzle each time it is solved (or the same one every visit), a title and an optional seed.
  • Keyboard, gamepad, mouse and touch (drag to place; right button or wheel turns). Script calls: Tray.record(key), Tray.solvedCount(), Tray.lastResult.
  • Sounds are your project's own sound effects (Cursor2, Knock, Cursor1, Buzzer1, Book1, Item3 by default), chosen by name. The plugin ships no audio.

How it was tested

Run in the real RPG Maker MZ runtime from the exact zip you download, installed into a blank project: 55 in-engine checks, including trays of every difficulty solved through the scene's own paths, one tray filled with real key presses only, real mouse drags onto the tray and off it, a piece dropped on another refused, hints placing and lifting, the command waiting and setting its variables and switch, and a save and reload. While the player works, a frame costs about 2 draw calls.


From the same studio

  • Sampler: generated picross charts, finished as a cross-stitch sampler ($11.99).
  • Scales: counterfeit coin and weighing puzzles on a drawn brass balance ($11.99).
  • Anvil: a hot-metal forging minigame that plugs into your crafting ($12.99).
  • Table Service: a serving rush on your own map, customers and dishes generated ($11.99).
  • Taproom: four tavern board games (Nine Men's Morris, Fox and Geese, Oware, Fanorona) against your NPCs for a stake, on boards the plugin draws ($11.99).
  • Jigsaw: any picture in your game, cut into a generated jigsaw the player solves on a drawn table ($9.99).
  • Tilestack: mahjong solitaire as a minigame, 42 drawn tiles in five sets on generated layouts, every deal solvable ($9.99).
  • Pendant: any picture in your game, hung twice in a drawn gallery with generated differences to find, every change measured ($9.99).

AI disclosure: the code and the graphics of this product were made with AI assistance. It contains no audio and no narrative text.

Purchase

Buy Now$9.99 USD or more

In order to download this tool you must purchase it at or above the minimum price of $9.99 USD. You will get access to the following files:

tray-mz-plugin.zip 32 kB
Version 1

Development log

Leave a comment

Log in with itch.io to leave a comment.