build_show_text
Generate Show Text event commands for RPG Maker MZ dialogue, with face image, window position, background, and speaker name. Auto word-wrap prevents text cutoff at window edges.
Instructions
Build a Show Text event-command sequence (101 setup + one 401 line per text line) for insertion via insert_event_commands. Supports face image (from list_assets("faces")), window background/position, and the MZ name-box speaker. MZ does NOT word-wrap: keep each line under ~55 chars (~38 with a face) or it is cut off at the window edge (warned, never blocked) — or pass wrap: true to word-wrap automatically to that same width (escape codes like \C[n] do not count) and split into as many 4-line message boxes as needed. Read-only: returns { commands, warnings? }, writes nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wrap | No | Auto word-wrap to the message-window width (the same width the line-length warning uses) and split into 4-line boxes. true/"soft" reflows all lines as one paragraph; "hard" keeps each entry (and \n) as a forced line break. Default off (one line per entry, verbatim). | |
| lines | Yes | Message lines (one entry per visual line) | |
| indent | No | Indentation level (default 0) | |
| faceName | No | Face image basename ("" = none, default) | |
| position | No | Window position (default bottom) | |
| faceIndex | No | Face index 0–7 in the sheet (default 0) | |
| background | No | Window background (default window) | |
| speakerName | No | MZ name-box speaker name (default "") |