Elements
scenes.<X>.elements — an array. Types: window text button picture gauge shape command list particles (MF.SimpleVisual.ELEMENT_TYPES).
{ "id": "logo", "type": "picture", "image": "pictures/Logo", "anchor": "top", "y": 8, "z": -1 }
{ "id": "steps", "type": "text", "text": "Steps: \\V[1]", "x": 20, "y": 560 }
{ "id": "quit", "type": "button", "text": "To map", "action": { "type": "back" } }
Common properties
| Property | Description |
|---|---|
id | Required, unique in the scene |
type | Element type |
x y width height anchor | As windows; without a size — natural size |
z | < 0 — behind windows, >= 0 — above |
rotation | Degrees around the centre, expressions |
visible, condition | Visibility; condition checked every 10 frames |
opacity | window-like — frame; others — whole element |
parent | Nested elements |
hud hideOnMessage hideOnEvent fadeFrames fadeUnderPlayer | HUD |
enabled hover pressed disabled blink blinkMin blinkTarget | States |
hoverSound clickSound disabledSound | Sounds |
window / text / button
| Property | Description |
|---|---|
text | Escape codes \V \N \C \I, MF.Text codes, tokens, \n. Refreshed when values change |
align | left center right (button — center) |
rows | Rows for "height": "auto" |
windowskin padding backOpacity fontFace fontSize + text style | Style; the scene theme applies |
fill fill2 gradient borderColor borderWidth radius | Own background instead of the windowskin |
frame | Frame on / off |
action | button: action or array |
text has no frame or background by default.
picture
| Property | Description |
|---|---|
image | "folder/name" in img/ (default pictures); tokens allowed: "pictures/{hero.faceName}" |
fit | stretch contain cover none |
radius | Rounded corners |
offsetX offsetY zoom imageRotation | Image inside the frame (clipped) |
tile | none repeat repeatX repeatY |
cropX cropY cropWidth cropHeight | Part of the source, px |
flipX flipY smooth | Mirror; smooth: false — pixel art |
scrollX scrollY | px per second (elements only) |
brightness contrast saturation | %, 100 = unchanged |
grayscale sepia invert | 0–100 % |
hue blur | Degrees; px |
tint tintAmount | Colour over the image, 0–100 % (default 50) |
A missing file with tokens gives an empty element, not the "Failed to load" screen.
shape
fill (default white), fill2 + gradient (vertical / horizontal), borderColor borderWidth radius.
gauge
| Property | Description |
|---|---|
variable + max | max — number or { "variable": n } |
actor / member + stat | Actor id or party index (0 — first); hp mp tp |
label format fontSize color1 color2 | format: "{value}/{max}" |
particles
{ "id": "snow", "type": "particles", "preset": "snow", "width": "100%", "height": "100%", "z": -1, "count": 150, "wind": 0.5, "mouseRepel": 80 }
Presets: rain snow embers fireflies stars. Overridable: count shape (dot streak) image color sizeMin sizeMax speedMin speedMax angle spread opacityMin opacityMax spawn (top bottom area) lifeMin lifeMax sway wind gravity spin flicker pulse fade alignToMotion blend (normal add) mouseRepel. Numbers accept expressions. Frozen in the editor.
command
| Property | Description |
|---|---|
items | [{ "text", "action", "enabled": cond, "visible": cond }] |
cols align rows | Layout |
template rowHeight rowBackground | Row drawing |
rowHover rowDisabled | Row states |
frame arrows, style, background | As window |
onCancel | Action on cancel |
list
| Property | Description |
|---|---|
source | items weapons armors keyItems allItems party skills (+ actor/member) database (+ table: enemies…) static (+ data) |
ids | Keep only these ids |
cols rows rowHeight rowBackground | Layout |
template | Row template; default depends on source |
emptyText | Text of an empty list |
rowEnabled | Condition or expression with row fields: "{count} > 0" |
action onCancel | {field} placeholders from the row: { "type": "variable", "id": 5, "value": "{id}" } |
Other elements show the selected row: "{list.name}\n{list.description}" (list — the list id).
Row templates
Child types: text icon face picture shape gauge actorGauge actorState. x y width height anchor are relative to the row content area (default anchor left), accept row fields: "{hpRate}%". {selected} and {enabled} are available.
| Type | Properties |
|---|---|
text | text align fontSize |
icon | icon (default "{iconIndex}") |
face | faceName faceIndex |
gauge | stat or value + max, label color1 color2 |
actorGauge | Animated MZ gauge, stat |
actorState | Animated state icon (battle) |
States and sounds
{ "id": "buy", "type": "button", "text": "Buy", "enabled": { "gold": 100, "op": ">=" },
"fill": "#2a3040", "hover": { "fill": "#3a5a8a" }, "pressed": { "fill": "#203048" },
"disabled": { "textColor": "#808080", "opacity": 150 },
"hoverSound": "Cursor2", "disabledSound": "Buzzer2" }
hover,pressed(over hover),disabled— overrides of own properties.enabled— condition; disabled elements playdisabledSound.blink(seconds per cycle),blinkMin(0–255, default 96),blinkTarget:background content all.- Sounds:
"Cursor1"or{ name, volume, pitch, pan };"none"— silent; unset — MZ sound.
Nested elements
{ "id": "badge", "type": "picture", "image": "pictures/Badge", "parent": "w:_statusWindow", "anchor": "top-right" }
parent: "w:<window field>" or an element id. Geometry is relative to the parent's inner area; the child follows it and hides with it.