[solved] multiply 2 networks (or other solution)
Posted: Thu Jun 14, 2018 6:13 pm
I have a fairly complex logic network I'm trying to push even further to play with recursive blueprints.
But I'im hitting a wall right now.... Here's my issue :
I have a central command where I define all items I want to craft.
The definition of an item consist of :
-an ID
-a number (corresponding to the number of items I want to craft per train trip)
-needed materials to craft one of this item
.... and some other stuff not relevant for my issue (ideal stock, area of crafting, etc...).
All of this is sent through a multiplex red network where :
- channel 2 contains all the items for which crafting should occurs
- channel 3 contains the number per train trip for all items (let's say 20k gears)
- channel 4 contains the IDs of all items
- channel 10 contains logic signals (0-10A-Z) which value the IDs of the item I want to craft in one area of crafting
- channel 101 and > contain the needed materials needed to craft the corresponding item ID
Now in my crafting area I can dynamically get the desired item, what it takes to craft it, if it has to be craft.... but i'm at a loss to get the number I want to craft (which will serve to send supply needs for this area to my supply center).
For exemple :
gear is defined as follow :
- ID : 101
- number : 20k
- needed materials : 2 iron plates
- crafting area : 1
So, in the crafting area 1, I read signal 0 which value 101.
I get everything from channel 4 which value 101 and I know the crafting area has to craft gear (output gear=>1).
I get everything from channel 2, add it to everything from previous operation and then remove everything that is different from 2 (output gear=>1) so I know I have to craft gear
I get everything from channel 101 (output iron plate=>2)
And now the only thing I need is to multiply the last output signal by the gear signal in channel 3, so it'll output iron plate=>40k. But I cannot figure how to isolate the gear signal value without specifying gear signal...
Any ideas are welcome !
But I'im hitting a wall right now.... Here's my issue :
I have a central command where I define all items I want to craft.
The definition of an item consist of :
-an ID
-a number (corresponding to the number of items I want to craft per train trip)
-needed materials to craft one of this item
.... and some other stuff not relevant for my issue (ideal stock, area of crafting, etc...).
All of this is sent through a multiplex red network where :
- channel 2 contains all the items for which crafting should occurs
- channel 3 contains the number per train trip for all items (let's say 20k gears)
- channel 4 contains the IDs of all items
- channel 10 contains logic signals (0-10A-Z) which value the IDs of the item I want to craft in one area of crafting
- channel 101 and > contain the needed materials needed to craft the corresponding item ID
Now in my crafting area I can dynamically get the desired item, what it takes to craft it, if it has to be craft.... but i'm at a loss to get the number I want to craft (which will serve to send supply needs for this area to my supply center).
For exemple :
gear is defined as follow :
- ID : 101
- number : 20k
- needed materials : 2 iron plates
- crafting area : 1
So, in the crafting area 1, I read signal 0 which value 101.
I get everything from channel 4 which value 101 and I know the crafting area has to craft gear (output gear=>1).
I get everything from channel 2, add it to everything from previous operation and then remove everything that is different from 2 (output gear=>1) so I know I have to craft gear
I get everything from channel 101 (output iron plate=>2)
And now the only thing I need is to multiply the last output signal by the gear signal in channel 3, so it'll output iron plate=>40k. But I cannot figure how to isolate the gear signal value without specifying gear signal...
Any ideas are welcome !