"Global Variables" (was: Inserter Stack Size Circuit Signal)
Posted: Wed Apr 20, 2016 12:05 am
Sometimes (for example when implementing the Madzuri Smart Train Loader everyone's been buzzing about lately) we encounter good reasons to supply the inserter stack-size as an input, i.e., to a combinator, or to one of the various "smart" factorio things.
We can certainly do this, now, with a constant combinator, or simply with a bunch of duplicated, hard-coded settings, as they do in the -root tutorial linked above.
The problem is, let's say we export this blueprint and share it with somebody -- which constant should we stick in our blueprint? Obviously there is no good answer except to tell our friend that he'll need to reconfigure the settings before using it.
Truth be told, I can pretty much live with that status quo... but what I can't live with, is the idea that I'm going to deliberately create a bunch of train-stops (or other things) that will each depend on me to twiddle a bunch of frobs every time I science my way up to a higher inserter stack-size bonus... I'll never remember to do that!
Worse, due to the ways it's likely going to be used, my builds will probably not completely break, but just misbehave in subtle ways, due to spooky modulo arithmetic side-effects, so, hard to debug, easy to forget, etc. F that noise, in short.
Sure, we can run green wires on power poles to all of our stations or whatever, to centralize the thing down to just a single combinator, but, I dunno, I'd never do that, personally, since I'd just end up blowing it up in some kind of military exploit.
So for me, although Madzuri's loader looks like a terribly appealing idea, in practice, it seems like a bad tradeoff vs. the old-fashioned "splitter" train-balancer (which, with some stupid braiding tricks I am able to make reasonably compact without hopelessly unbalancing the buffer storage distribution, anyhow), until I've exhausted all the stack-size-bonuses in the tech tree.
Admittedly, for now, presumably most players don't spend a lot of time going through the tech tree, but that's kind of a bug, as recently noted in fff-129, and therefore liable to change in the future.
So, how could this be fixed? Simple. Just supply the current inserter stack-size bonus as a circuit signal along with all the other fancy abstract ones. Now our blueprints keep working, our stations keep working, we don't have to build a bunch of constant combinators or run around to all our stations every time we nerd it up in the lab, etc...
Thanks for your consideration!
We can certainly do this, now, with a constant combinator, or simply with a bunch of duplicated, hard-coded settings, as they do in the -root tutorial linked above.
The problem is, let's say we export this blueprint and share it with somebody -- which constant should we stick in our blueprint? Obviously there is no good answer except to tell our friend that he'll need to reconfigure the settings before using it.
Truth be told, I can pretty much live with that status quo... but what I can't live with, is the idea that I'm going to deliberately create a bunch of train-stops (or other things) that will each depend on me to twiddle a bunch of frobs every time I science my way up to a higher inserter stack-size bonus... I'll never remember to do that!
Worse, due to the ways it's likely going to be used, my builds will probably not completely break, but just misbehave in subtle ways, due to spooky modulo arithmetic side-effects, so, hard to debug, easy to forget, etc. F that noise, in short.
Sure, we can run green wires on power poles to all of our stations or whatever, to centralize the thing down to just a single combinator, but, I dunno, I'd never do that, personally, since I'd just end up blowing it up in some kind of military exploit.
So for me, although Madzuri's loader looks like a terribly appealing idea, in practice, it seems like a bad tradeoff vs. the old-fashioned "splitter" train-balancer (which, with some stupid braiding tricks I am able to make reasonably compact without hopelessly unbalancing the buffer storage distribution, anyhow), until I've exhausted all the stack-size-bonuses in the tech tree.
Admittedly, for now, presumably most players don't spend a lot of time going through the tech tree, but that's kind of a bug, as recently noted in fff-129, and therefore liable to change in the future.
So, how could this be fixed? Simple. Just supply the current inserter stack-size bonus as a circuit signal along with all the other fancy abstract ones. Now our blueprints keep working, our stations keep working, we don't have to build a bunch of constant combinators or run around to all our stations every time we nerd it up in the lab, etc...
Thanks for your consideration!