Studio Yotsuba
Back to Node List

Rule Set Preset

rule_set_preset

Builds a RuleTileSet and RuleSet from a preset.

Reviewed
Guide available

Input Ports

NameTypeDescription
Tiles
tiles
List<Image>
Optional source tile images for the preset.

Output Ports

NameTypeDescription
Rule Tile Asset
asset
RuleTileAsset
Tile set and rule set bundled on one wire.
Rule Grid
grid
RuleGridSpec
Grid used by the generated rule tile set.
Rule TileSet
tile_set
RuleTileSet
Generated rule tile set.
RuleSet
rule_set
RuleSet
Generated rule set.
Preview
preview
Image
Preset preview image.
Tile Count
tile_count
Int
Number of generated tiles.
Rule Count
rule_count
Int
Number of generated rule cases.
Warnings
warnings
Text
Generation warnings.
Summary
summary
Text
Short result summary.

Parameters

NameTypeDefaultRangeDescription / Options
Mode
mode
Enum
Wang16—

Preset mode.

  • wang16Wang16
    16 tiles keyed by up/right/down/left connections.
  • blob47Blob47
    47 tiles including diagonal-aware inner corners.
  • pipe4Pipe4
    Wang16 connections drawn as pipes.
  • road4Road4
    Wang16 connections drawn as roads.
  • wall_rectWallRect
    Region-based tiles for rect operations (corner/edges/inside).
  • floor_fillFloorFill
    Weighted random floor tiles.
Material ID
material_id
Text
terrain—

Material id painted into RuleCanvas cells.

TileSet Name
tileset_name
Text
Wang16 Rule Tiles—

Name of the generated rule tile set.

RuleSet Name
rule_set_name
Text
Wang16 RuleSet—

Name of the generated rule set.

Cell Width
cell_width
Int
161–2048

Rule tile cell width.

Cell Height
cell_height
Int
161–2048

Rule tile cell height.

Missing Policy
missing_policy
Enum
Fallback—

How missing source tiles are handled.

  • fallbackFallback
  • errorError

Overview

Generates a standard autotile arrangement (Wang16 / Blob47) as a tile set and matching rules in one step. Start here when learning rule tiles. Placeholder images work too, so you can test the mechanism before replacing the artwork.

Usage tips

  • The shortest beginner route is rule_set_preset → rule_canvas. Even without an image input, placeholder tiles demonstrate the behavior.
  • Wang16 considers only up/down/left/right and is simple. Blob47 also distinguishes inner corners for cleaner results. In practice, create its 47 tile images with autotile_from_parts / autotile_from_template.
  • When you need custom rules, import the preset into rule_set_editor and extend it.

Related nodes

  • rule_canvas / rule_render — consume the outputs
  • autotile_from_parts / autotile_from_template — batch-produce tile images
  • rule_set_editor — customizes rules
  • rule_tile_pack — creates a tile set from existing images

What this node does

Generates standard autotile arrangements as presets. When a tile-image list is connected, it builds from those images; otherwise it uses placeholders for testing. It outputs both the tile set and the corresponding neighborhood rules (RuleSet).

Key settings

ID Name Description
mode Mode Wang16 (16 up/down/left/right combinations) or Blob47 (47 combinations that also inspect diagonals and distinguish inner corners). The Autotile creation nodes are the easiest way to make Blob47 images.
material_id Terrain name Material ID painted on the rule canvas.
cell_width / cell_height Cell width/height Dimensions of one tile.

Example wiring

RuleSetPreset.tile_set -> RuleCanvas.tile_set
RuleSetPreset.rule_set -> RuleCanvas.rule_set
Back to Node List