Logical ID Rule Stack
The Logic Engine. Applies a sequence of conditional rewrite rules to transform Logical IDs based on mask state.
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
| Base | Int | Input | The starting logical ID map. |
| Masks | Bool Mask | Input (Multi) | Multiple mask inputs addressed by index (1, 2, 3, etc.). |
| Logical IDs | Int | Output | The 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:
- Source ID: Only tiles with this ID will be affected (set to -1 to match ANY ID).
- Mask Slot: The 1-based index of the mask connected to the "Masks" port. If 0, the rule applies regardless of mask state.
- 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)."
Int
Bool Mask