Studio Yotsuba
Back to Node List

Rule Set Editor

rule_set_editor

Edits a RuleSet visually: neighbor conditions, priorities, weighted/noise variations, and shape/sequence matchers.

Reviewed
Guide available

Input Ports

NameTypeDescription
Rule Tile Asset
asset
RuleTileAsset
Base asset. Its rule set seeds the editor and its tiles feed the preview.
RuleSet
rule_set
RuleSet
Base rule set used when the editor has no data yet.
Rule TileSet
tile_set
RuleTileSet
Tiles used for the sample preview and the tile picker.

Output Ports

NameTypeDescription
RuleSet
rule_set
RuleSet
Edited rule set.
Rule Tile Asset
asset
RuleTileAsset
Connected tiles bundled with the edited rule set.
Preview
preview
Image
Sample placement resolved with the edited rules.
Rule Count
rule_count
Int
Number of rule cases.
Warnings
warnings
Text
Validation warnings.
Summary
summary
Text
Short result summary.

Parameters

NameTypeDefaultRangeDescription / Options
Rule Data
rule_data
CustomData
——

Rule set JSON saved by the editor.

Overview

A dedicated editor node for building autotile rules visually: which tile to place in each situation. Use it when presets from rule_set_preset are not enough and you need custom placement logic such as grime scatter or a special tile for one exact arrangement.

Usage tips

  • Start from a preset. The fastest route is to import rules from rule_set_preset as the initial value, then extend them. Writing every 3×3 condition from scratch is laborious.
  • The key to varied results is choosing between noise replacement, which clusters moss or grime, and weighted randomness.
  • Connect the asset and tile set so you can edit while viewing the sample preview.

Related nodes

  • rule_set_preset — starting presets
  • rule_canvas / rule_render — consume the rules
  • rule_operation_merge — combines rule sets
  • autotile_from_parts / autotile_from_template — generate tile images

What this node does

Edits a group of rules (RuleSet) describing "place this tile when neighboring cells look like this" without writing JSON. Connecting an asset or tile set enables:

  • a sample preview in the editor's upper left, showing a small placement resolved with the rule being edited;
  • tile ID suggestions in the output-tile field; and
  • importing a connected rule set as the initial value.

How to use the editor

  • Filter with material chips, then create a case with "+ Add Rule."
  • 3×3 grid: click to cycle conditions (Any → Same material → Empty → Occupied → Other material → Specific material → Tag). Right-click cycles in reverse. Specific material and Tag show an input field below.
  • Output tiles: adding several displays their weight ratio (%). With Replacement Method = Noise, the first is normal and later outputs are replacements. The specified share of cells is replaced in spatial clusters, which works well for moss and grime.
  • Shape and sequence conditions: conditions such as "at least N rows from the bottom," "a straight segment of at least N cells," and "every N cells from the start." They match only cells placed by rectangle or line operations.
  • Use the JSON button to inspect or edit the raw JSON at any time.

Example: Grimy bricks

Open the wall-material rules and add two outputs (normal brick / cracked brick) to the inside case. Set Replacement Method to Noise and the amount to 0.15. About 15% of the wall interior becomes spatially clustered cracked bricks.

Back to Node List