McJtyMods / RFToolsControl

RFTools Control is an addon for RFTools adding a programmable logic block
MIT License
34 stars 18 forks source link

How to use Storage Scanner for CardInv (or use mutiple cardinvs) #143

Open Routhinator opened 5 years ago

Routhinator commented 5 years ago

I'm struggling to find a clue here, however I have a working program that I got from Reddit for auto crafting, which works great. I have it accessing cards via a node with a MSU beside it. Unfortunately I am limited to 300 cards with this.

I already have my primary storage scanner connected to this for ingredients via a Storage control screen module. What I want to try is adding a second control screen module to a second storage scanner that's connected to a larger card inventory. Problem is, I cannot figure out how to identify that inventory in the program, as cardinv needs to reference a label.

I noticed there is a label property on the control modules, but I cannot figure out how to label the storage control module.

How would I go about achieving this? Am I barking up the wrong tree?

Routhinator commented 5 years ago

Ok, as an alternative I've inferred from your original demo that multiple Event: craft opcodes can be tied to the start with a wire. I did that and now I can see recipes across multiple cardInv. However the next opcode in the sequence in this demo no longer exists it seems.

I presume I somehow need to set a variable based on the source inventory of the recipe that the get ingredients smart opcode can read, just struggling to find this.

FWIW, this is the program I'm messing with at the moment and it was based on this:

Easy Autocraft with RFTools Control

screenshot from 2019-01-30 20-49-51

[
  {
    "pos": {
      "x": 2,
      "y": 2
    },
    "opcode": {
      "id": "do_getingredients_smart",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 1
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "R",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card2"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 2
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "R",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 9,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "north"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 2
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "R",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 2
    },
    "opcode": {
      "id": "do_pushmulti",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "up",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 1
    },
    "opcode": {
      "id": "do_delay",
      "primary": "L",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 20
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": -1
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 1
    },
    "opcode": {
      "id": "do_wire",
      "primary": "D",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 3
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 5
    },
    "opcode": {
      "id": "do_pushitems",
      "primary": "U",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 2
    },
    "opcode": {
      "id": "do_lock",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 4
    },
    "opcode": {
      "id": "do_craftfail",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 10,
      "y": 2
    },
    "opcode": {
      "id": "do_pushitems",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 8,
      "y": 2
    },
    "opcode": {
      "id": "do_craftok",
      "primary": "R",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 1
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 3
    },
    "opcode": {
      "id": "eval_countinv",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "R",
      "secondary": "u",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 4
    },
    "opcode": {
      "id": "test_gt",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 1
    },
    "opcode": {
      "id": "do_lock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 5
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "L",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  }
]

Things have probably changed since this was produced, both your example and this are 2 years old.. and I can't find the actual export for your example.

Routhinator commented 5 years ago

So I got a little further, and I can get it to do a single step craft with multiple cardinv by defining the cardinv in a String eval in the circuit after the source craft event, and then using the last_inv on the get crafting card step.

However recursive crafts fail with missing parameter at 2,2 with this method. I think using a var with the same index as the CPU handling the craft task would do it, but I can't seem to get vars to set no matter what I try. They are always undefined.

[
  {
    "pos": {
      "x": 2,
      "y": 2
    },
    "opcode": {
      "id": "do_getingredients_smart",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "fun": "last_inv"
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 2
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 5
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "L",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card1"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 6
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "L",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card2"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 5
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 6
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 9,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "north"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 2
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "R",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 2
    },
    "opcode": {
      "id": "do_pushmulti",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "up",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 1
    },
    "opcode": {
      "id": "do_delay",
      "primary": "L",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 20
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": -1
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 3
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 5
    },
    "opcode": {
      "id": "do_pushitems",
      "primary": "U",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 2
    },
    "opcode": {
      "id": "do_lock",
      "primary": "R",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 4
    },
    "opcode": {
      "id": "do_craftfail",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 5
    },
    "opcode": {
      "id": "eval_string",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "card1 U/*"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 6
    },
    "opcode": {
      "id": "eval_string",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "card2 U/*"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 10,
      "y": 2
    },
    "opcode": {
      "id": "do_pushitems",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 8,
      "y": 2
    },
    "opcode": {
      "id": "do_craftok",
      "primary": "R",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 1
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 3
    },
    "opcode": {
      "id": "eval_countinv",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "R",
      "secondary": "u",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 4
    },
    "opcode": {
      "id": "test_gt",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 1
    },
    "opcode": {
      "id": "do_lock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 5
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "L",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  }
]
McJty commented 5 years ago

Sorry for not replying sooner but I've been a bit busy. I try to check this out soon

Routhinator commented 5 years ago

Hey no worries @McJty - I'll be happy for any help you can provide when you have time. FWIW here is a picture of the latest verson (which I posted above) which can do multiple cardinvs, but can't recurse

screenshot from 2019-02-01 14-52-43

Routhinator commented 5 years ago

screenshot from 2019-02-01 15-31-22

Ok.. a little farther. This one can do multiple cardInv sources, and recurse... with one Caveat. All the dependencies for the requested recipe need to be in the same cardInv, because the variable doesn't seem to be updated based on the source inventory. The first thing crafted sets it and then it never changes..

I was expecting that pending craft jobs would resume from the lock after the source inventory, so the var would be overridden to the appropriate inventory at that point.. but it didn't seem to go how I expected.

Code:

[
  {
    "pos": {
      "x": 2,
      "y": 2
    },
    "opcode": {
      "id": "do_getingredients_smart",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "var": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 5
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "L",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card1"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 2
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 6
    },
    "opcode": {
      "id": "ev_craft",
      "primary": "L",
      "parameters": [
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "card2"
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 5
    },
    "opcode": {
      "id": "eval_string",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "card1 U/*"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 6
    },
    "opcode": {
      "id": "eval_string",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "card2 U/*"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 5
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 0,
      "y": 6
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 9,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "north"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 2
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "R",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 2
    },
    "opcode": {
      "id": "do_pushmulti",
      "primary": "R",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "up",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 8
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 7,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 1
    },
    "opcode": {
      "id": "do_delay",
      "primary": "L",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 20
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 3
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": -1
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 4
    },
    "opcode": {
      "id": "do_wire",
      "primary": "U",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 3
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 5,
      "y": 5
    },
    "opcode": {
      "id": "do_pushitems",
      "primary": "U",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 2
    },
    "opcode": {
      "id": "do_wire",
      "primary": "R",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 4
    },
    "opcode": {
      "id": "do_craftfail",
      "parameters": []
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 5
    },
    "opcode": {
      "id": "do_lock",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 3,
      "y": 6
    },
    "opcode": {
      "id": "do_lock",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 5
    },
    "opcode": {
      "id": "do_setvar",
      "primary": "L",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 1,
      "y": 6
    },
    "opcode": {
      "id": "do_setvar",
      "primary": "L",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 10,
      "y": 2
    },
    "opcode": {
      "id": "do_pushitems",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "node": "dump"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 12
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 8,
      "y": 2
    },
    "opcode": {
      "id": "do_craftok",
      "primary": "R",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 2
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 64
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 9
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 1
    },
    "opcode": {
      "id": "do_releaselock",
      "primary": "L",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 3
    },
    "opcode": {
      "id": "eval_countinv",
      "primary": "D",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 4,
      "y": 2
    },
    "opcode": {
      "id": "test_eq",
      "primary": "R",
      "secondary": "u",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 4
    },
    "opcode": {
      "id": "test_gt",
      "primary": "D",
      "secondary": "r",
      "parameters": [
        {
          "type": "integer",
          "value": {
            "fun": "last_int"
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 0
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 2,
      "y": 1
    },
    "opcode": {
      "id": "do_lock",
      "primary": "D",
      "parameters": [
        {
          "type": "string",
          "value": {
            "v": "2"
          }
        }
      ]
    }
  },
  {
    "pos": {
      "x": 6,
      "y": 5
    },
    "opcode": {
      "id": "do_fetchitems",
      "primary": "L",
      "parameters": [
        {
          "type": "inventory",
          "value": {
            "side": "up",
            "intside": "down",
            "node": "workbench"
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "item",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "null": true
          }
        },
        {
          "type": "integer",
          "value": {
            "v": 11
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        },
        {
          "type": "boolean",
          "value": {
            "null": true
          }
        }
      ]
    }
  }
]
Routhinator commented 5 years ago

Still haven't found a good way around this, not sure if you have any clues on what I can look at next @McJty , I know you're pretty busy. Even just a suggestion on what to try next rather than a full solution would be awesome.

The--Captain commented 3 years ago

If anyone is still listening...

This isn't really an issue, IMO. Just use another processor that has an identical autocrafting program, but references a different card inventory. Your recipe results will all show up in the same crafting station from all the processors in the network. The only downside is having to build another processor (and associated cpus, ram, etc), but if you're already autocrafting, it's pretty easy.

You have to do this anyway if you get enough factory machines from other mods added in to your autocraft network. There's only so much internal inventory available to one processor...