Mask Expression
The Logic Controller. Combines multiple boolean masks using a sequence of logical operations. This node uses a table-based interface where each row represents a step in the expression.
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
| Masks | Bool Mask | Input (Multi) | Multiple input masks. Addressed in the rules table by their 1-based index (Slot 1, Slot 2, etc.). |
| Output | Bool Mask | Output | The final result after all expression rows are evaluated. |
Operations
| Operation | Logic | Description |
|---|---|---|
| Replace | Result = Input | Clears the previous result and starts fresh with this mask. Often used for the first row. |
| AND | Result && Input | Intersection. Output is 1 only if BOTH the previous result AND the input are 1. |
| OR | Result || Input | Union. Output is 1 if EITHER the previous result OR the input are 1. |
| XOR | Result ^ Input | Difference. Output is 1 only if the previous result and input are DIFFERENT. |
| Subtract | Result && !Input | Exclusion. Removes the input mask from the current result. |
Details
Each row in the Rules table allows you to:
- Select a Slot: Which input mask from the Masks port to use.
- Choose an Operation: How to combine this mask with the "running total" from rows above.
- Invert: Flip the input mask (1 becomes 0, 0 becomes 1) before applying the operation.
Example: "Caves but not in Water"
- Row 1: Slot 1 (Caves), Operation: Replace
- Row 2: Slot 2 (Water), Operation: Subtract
Bool Mask