Integrated Dynamics · Explained · Intermediate

How to Use the Logic Programmer: Operators, Lists & Predicates Explained

Mastering the Logic Programmer in Integrated Dynamics transforms basic redstone setups into intelligent, automated systems capable of processing complex data. In this guide, you will learn how to combine Variable Cards using operators, manipulate data lists, and apply functional programming concepts like predicates, map, and filter to build dynamic sorting and control networks.

What you need

  • Logic Programmer or Portable Logic Programmer
  • At least one Variable Store connected to your Logic Cable network
  • 10 to 15 blank Variable Cards
  • Inventory Reader and Display Panel (for testing and reading data)
  • A Chest with various items (for testing list operations)
  • Labeller (highly recommended for organizing variables)
  • In-game guide book 'On the Dynamics of Integration' for quick operator reference

Step by step

  1. 1Read a Raw Data Value and Define a Constant

    Attach an Inventory Reader to a chest containing a few items and connect it to a Display Panel and a Variable Store using Logic Cables. Open the Inventory Reader and insert a blank Variable Card into the 'Slot Count' or 'Filled Slots' aspect to create your first dynamic variable (Card A). Next, open your Logic Programmer, select the 'Integer' type from the left sidebar, type a threshold number like 5, and place a blank Variable Card in the bottom-right slot to create a constant integer variable (Card B).

    Tip: Immediately use a Labeller to name Card A 'Filled Slots' and Card B 'Const 5' so you do not mix them up later.

  2. 2Combine Variables Using a Relational Operator

    Open the Logic Programmer and search for the 'Greater Than' (>) relational operator in the sidebar. You will see two input slots representing the left and right sides of the comparison. Place Card A (Filled Slots) into the first slot and Card B (Const 5) into the second slot, then insert a fresh Variable Card into the output slot to create Card C. This new card represents a dynamic Boolean that evaluates to true only when the chest has more than 5 filled slots.

    Tip: You can skip creating constant cards for simple numbers by typing the expression directly into the 'Expression' tab of the Logic Programmer if your version supports it.

  3. 3Load Referenced Cards into the Variable Store

    Place Card C into your Display Panel to view the result; you will notice it displays an error or remains blank. This happens because Card C only holds a reference to the IDs of Card A and Card B, not their actual data. Open your network's Variable Store and place both Card A and Card B inside it. The Display Panel will immediately update to show 'true' or 'false' depending on how many slots are filled in your chest.

    Tip: Only the final output card goes into the Display Panel or Writer; every parent card used to make it must live inside a Variable Store on the same network.

  4. 4Chain Logic with Boolean Operators

    To trigger an action only when multiple conditions are met, you need boolean operators like AND, OR, or NOT. Create another relational variable—for example, whether the chest is not full (Card D). In the Logic Programmer, select the logical 'AND' operator, insert Card C and Card D into the input slots, and bind the output to a new card (Card E). Put Card C and Card D into the Variable Store, and place Card E in the Display Panel to verify that both conditions must be met for a 'true' output.

  5. 5Extract a List from the World

    Lists allow you to evaluate multiple items, fluids, or entities at once rather than checking individual slots. Open the Inventory Reader attached to your chest and insert a blank Variable Card into the 'Inventory Items' aspect. This creates a List Variable Card containing every ItemStack currently inside the chest. Place it in a Display Panel to see the live list of items rendered on the screen.

    Tip: You can also build custom static lists manually inside the Logic Programmer by selecting the 'List' value type and adding elements one by one.

  6. 6Create an Operator Variable (Predicate)

    To filter a list, you first need a 'Predicate'—a function that takes one item and returns true or false. Open the Logic Programmer and select the 'Operator' value type (not an operator itself, but the category that lets you save an operator as a value). Choose an item property operator that returns a Boolean, such as 'Item Stack Is Stackable' or 'Item Stack Has Enchantment', and write it to a blank Variable Card. This card now holds a reusable rule rather than a static value.

    Tip: If you need a predicate that compares an item against a specific condition (like stack size > 16), use the 'Apply' or 'Flip' operators to pre-fill one side of a two-input operator, turning it into a single-input predicate.

  7. 7Filter the List Using Your Predicate

    In the Logic Programmer, search for the 'Filter' list operator, which requires two inputs: a List and an Operator (Predicate). Place your 'Inventory Items' List Card into the first slot and your Predicate Operator Card from the previous step into the second slot, then bind the output to a new card. Move the List Card and the Predicate Card into your Variable Store, and put the new Filtered List Card into the Display Panel. The screen will now dynamically show only the items in the chest that match your predicate rule.

    Tip: Filtered lists are extremely powerful when paired with the Integrated Tunnels addon, allowing you to export only items that match complex dynamic rules.

  8. 8Transform List Data with the Map Operator

    While 'Filter' removes items from a list, 'Map' transforms every item in a list into a different data type. Create a new Operator Variable Card in the Logic Programmer and select 'Item Stack Size' (which takes an ItemStack and returns an Integer). Next, select the 'Map' operator, insert your 'Inventory Items' List Card and your new 'Item Stack Size' Operator Card, and output to a new card. After storing the parent cards in the Variable Store, placing the Mapped card in a Display Panel will show a list of integers representing the exact stack counts of every slot in the chest.

How it works

Integrated Dynamics operates on a principle called lazy evaluation, meaning Variable Cards do not store static results. Instead, a card stores a formula and the unique IDs of the parent cards required to calculate that formula. When a Display Panel, Redstone Writer, or tunnel requests a value from a card, the network traces those IDs inside all connected Variable Stores and calculates the result in real time on every tick.

Strict data typing is the backbone of the Logic Programmer. Every aspect and operator has explicit input and output types, such as Integer, Boolean, ItemStack, List, or Operator. The Logic Programmer will physically prevent you from placing an Integer card into an input slot that expects a Boolean, ensuring your logic syntax is always valid before you even close the interface.

Functional programming concepts like 'Filter' and 'Map' treat operators themselves as data (first-class citizens). Normally, an operator takes data and outputs data immediately. By saving an operator onto a Variable Card as an 'Operator' type, you hand that rule over to a higher-order function like Filter, which then automatically applies your rule to every single element inside a List without you having to program a loop for each chest slot.

Common mistakes

  • Forgetting to put parent Variable Cards into the Variable Store: If your Display Panel shows a red error symbol or nothing at all, you likely left a required input card in your player inventory instead of placing it in a network-connected Variable Store.
  • Overwriting an active Variable Card: Re-inserting an already programmed card into the output slot of the Logic Programmer changes its formula while keeping its ID, which can silently break existing logic chains that depend on it. Always craft fresh blank cards or clear them properly in a crafting grid first.
  • Failing to label cards: Because all programmed Variable Cards look nearly identical in your inventory, building a 5-card logic chain without a Labeller almost guarantees you will put the wrong card into the Variable Store versus the Writer.
  • Confusing 'Operator' value types with direct operators: When using Map or Filter, you cannot put a standard Boolean card into the predicate slot; you must select the 'Operator' value tab in the Logic Programmer and wrap the comparison rule itself onto a card.
  • Creating circular references: Using Card A to calculate Card B, and then editing Card A to depend on Card B, will cause a recursion error and halt evaluation for that branch of the network.

FAQ

Why does my Display Panel show an error icon when I insert my combined Variable Card?

The network cannot find the parent cards used to calculate your formula. Check the tooltip of your output card to see which Variable IDs it depends on, and make sure every single one of those parent cards is placed inside a Variable Store connected to the same cable network.

How do I create a predicate that checks for a specific number, like 'Stack Size > 32', if Filter only accepts a single-input operator?

You use currying via the 'Apply' operator. Create an Operator card for 'Greater Than', a constant Integer card for 32, and combine them using the 'Apply' operator. This locks '32' into one side of the Greater Than operator and outputs a new single-input Operator card that you can feed directly into Filter or combined with 'Pipe' to check stack sizes.

Can I recover blank Variable Cards if I made a mistake in my logic?

Yes. Simply place any programmed Variable Card into a standard crafting grid by itself to wipe its data and return it to a blank state.

Do I need a Variable Store if I only use a single card straight from a Reader?

No. A card taken directly from a Reader (like an Inventory Reader or Redstone Reader) only references the Reader part itself. You only need a Variable Store when you use the Logic Programmer to combine or modify existing cards.

By combining Variable Stores with the Logic Programmer's relational operators, predicates, and list functions like map and filter, you can automate complex conditional tasks across your entire Integrated Dynamics network.

More Integrated Dynamics guides

Integrated Dynamics · Getting startedIntegrated Dynamics Getting Started Guide: Menril, Squeezers & Your First NetworkIntegrated Dynamics is one of the most powerful logic, automation, and logistics mods available, and it all starts with a single blue tree. In this guide, you will learn how to harvest Menril, operate the manual Squeezer and Drying Basin to craft your first components, build a basic reading network, and finally upgrade to powered mechanical machines. Mastering this early resource loop is essential because every cable, terminal, and variable card in the mod family relies on crystallized Menril.Beginner6 steps
Integrated Dynamics · ExplainedVariables, Readers & Writers Explained: How Integrated Dynamics Logic WorksIntegrated Dynamics can seem intimidating at first, as it replaces simple redstone wires with a full programming system based on data types and logic evaluations. In this beginner guide, you will learn how to read information from the world using Readers, bind that data to Variable Cards, display it on Display Panels, and trigger physical actions using Writers. Mastering this fundamental workflow is the key to unlocking the most powerful, lag-free automation networks in modded Minecraft.Beginner7 steps
Integrated Dynamics · Addon guideIntegrated Tunnels Guide: How to Transfer Items, Fluids & Energy at Max SpeedIntegrated Tunnels expands your Integrated Dynamics networks by letting you move items, fluids, and energy across your base with zero travel delay. By mastering Interfaces, Importers, and Exporters alongside Variable Cards, you can build instant, infinitely scalable transfer systems that easily outperform standard pipes. This guide will walk you through setting up basic transfers, separating network traffic with channels, and configuring max-speed throughput.Beginner7 steps
Integrated Dynamics · Setup guideHow to Build a Storage Network with Integrated Terminals & TunnelsBuild a centralized, searchable storage and crafting system early in your survival world without needing expensive digital drives or massive power grids. By combining Integrated Dynamics with the Integrated Tunnels and Integrated Terminals addons, you can link all your existing chests, barrels, and storage drawers into one seamless interface.Beginner7 steps
Integrated Dynamics · Addon guideIntegrated Crafting Guide: How to Set Up Auto-Crafting & Machine ProcessingMastering auto-crafting with the Integrated Dynamics mod family allows you to automate both standard 3x3 crafting recipes and complex multi-step machine processing on demand. By leveraging the Integrated Crafting, Integrated Tunnels, and Integrated Terminals addons, you can build a surprisingly cheap and scalable request-based automation network early in your progression. This guide walks you through encoding Recipe Variable Cards, configuring Crafting Interfaces on tables and furnaces, and managing jobs through terminals.Intermediate7 steps
Integrated Dynamics · PowerHow to Build an Automated Menril Power Plant (Generator & Battery Guide)In this guide, you will learn how to build a self-regulating Menril power plant using Integrated Dynamics and Integrated Tunnels. By reading the fill level of your Energy Batteries, your network will automatically feed wood from a tree farm into your Generators only when power is needed, preventing fuel waste.Intermediate8 steps