Studio Yotsuba
Back to Node List

Rule Rect

rule_rect

Creates a rect placement operation from numeric parameters (animatable walls and floors).

Reviewed
Guide available

Input Ports

NameTypeDescription
Rule Canvas
canvas
RuleCanvas
Optional canvas to append the operation to.

Output Ports

NameTypeDescription
Rule Canvas
canvas
RuleCanvas
Canvas with the rect operation appended.
Warnings
warnings
Text
Layer fallback warnings.
Summary
summary
Text
Short result summary.

Parameters

NameTypeDefaultRangeDescription / Options
Material ID
material_id
Text
terrain—

Material id painted by the rect.

Operation Kind
operation_kind
Text
rect—

Operation kind exposed to RuleSet matchers.

Operation Name
operation_name
Text
——

Optional operation name exposed to RuleSet matchers.

X
x
Int
0-512–512

Left cell of the rect.

Y
y
Int
0-512–512

Top cell of the rect.

Width
width
Int
41–512

Rect width in cells.

Height
height
Int
31–512

Rect height in cells.

Map Width
map_width
Int
81–4096

Used when no canvas input is connected.

Map Height
map_height
Int
81–4096

Used when no canvas input is connected.

Cell Width
cell_width
Int
161–2048

Used when no canvas input is connected.

Cell Height
cell_height
Int
161–2048

Used when no canvas input is connected.

Grid Kind
grid_kind
Enum
Orthogonal—

Used for a new canvas when no canvas input is connected.

  • OrthogonalOrthogonal
  • IsometricDiamondIsometricDiamond
Render Order
render_order
Enum
RightDown—

Used for a new canvas when no canvas input is connected.

  • RightDownRightDown
  • RightUpRightUp
  • LeftDownLeftDown
  • LeftUpLeftUp

Overview

Paints terrain onto a rule canvas as a numerically specified rectangle. It is a building block for parametric map generation, such as changing room dimensions with sliders or managing wall positions through variables.

Usage tips

  • Chain nodes to build a structure: rule_rect (floor) → rule_rect (wall) → rule_polyline (corridor) → rule_render. Each node parameter becomes a map-design variable.
  • Promote position and size to input pins 📌 and connect waveforms to animate an expanding room.
  • Combine with hand painting through rule_operation_merge.

Related nodes

  • rule_polyline / rule_path — line-based placement nodes
  • rule_operation_merge — combines with hand painting
  • rule_render — renders the result
  • rule_canvas — the hand-painting workbench

What this node does

Creates a rectangle operation from numeric X/Y/width/height values instead of drawing a rectangle in the Rule Canvas editor. Every value is promotable, so variables, waveforms, and timelines can move walls or rooms. Connect canvas to append the operation, chaining multiple nodes to build up a map.

Inputs, outputs, and settings

Kind ID Type Description
Input canvas RuleCanvas (optional) Canvas to append to. Creates a new canvas when unconnected.
Output canvas RuleCanvas Canvas with the rectangle operation added.
Setting material_id Text Terrain name to paint.
Setting x / y / width / height Int (promotable) Rectangle position and dimensions in cells.
Setting map_width and others Int Map and cell settings for a new canvas.

Example wiring

RuleRect.canvas -> RulePolyline.canvas -> RuleRender.canvas
Autotile creation.asset -> RuleRender.asset
Back to Node List