Skip to main content

Logical ID Rule Stack

The Logic Engine. Applies a sequence of conditional rewrite rules to transform Logical IDs based on mask state.

Ports

PortTypeDirectionDescription
Base IntInputThe starting logical ID map.
Masks Bool MaskInput (Multi)Multiple mask inputs addressed by index (1, 2, 3, etc.).
Logical IDs IntOutputThe finalised logical ID map after all rules are processed.

Details

The Rule Stack evaluates rules in order from top to bottom. Each rule can specify:

  1. Source ID: Only tiles with this ID will be affected (set to -1 to match ANY ID).
  2. Mask Slot: The 1-based index of the mask connected to the "Masks" port. If 0, the rule applies regardless of mask state.
  3. Target ID: The new ID to write if the condition is met.

This node is powerful for handling complex tile logic, such as "Change Grass (ID 1) to Sand (ID 5) only inside the Shoreline mask (Slot 1)."