doc wrote:
Thanks for doing this. Out of interest, in what way wasn't the anchor blueprinting right?
It wouldn't pick up at all in the blueprint, for no obvious reason. I hacked around it with a wooden box and realized I liked that better anyway. The current strategy is to try the following anchors, using whatever is found first:
1. The first wooden chest
2. The first deployer
3. {0,0} in the blueprint
doc wrote:
I really hadn't thought about what to do about Blueprint Books. This does raise some interesting possibilities. Copying a single book around and then using numbered signals to deploy different phases of your machine does seem a lot neater than having to copy loads of blueprints and get the right one to the right place all the time. Just need to solve that cloning problem, I had a really good go at it before but there were so many issues
Much of my testing was with a book that built chests around my deployer one at a time as signaled by a circuit network! (Operated by hand-fiddling combinators and circuit-connected belts, but still...)
doc wrote:
Also did you get anywhere with the circuit network conditions? It seems like this kind of setup will definitely be needed for any advanced builds. If you've already done some work on it, I'd rather incorporate your work rather than reinventing the wheel so to speak.
I actually posted a release to
the mod portal and
github last night, I guess I should have posted here too. See the info there for supported circuit signals, and for sources!
control.lua is basically entirely rewritten, because I also got rid of tick balancer - circuits have to be every tick anyway to catch single pulses!
doc wrote:
Regarding hard-coded signals ... why not just add some brand new signals specifically for this? That way there's no possible conflict with any existing signal systems.
I'm already running short on signal slots in
my CPU (that thread needs an update...), I don't want to take up more if I don't have to! I'm a little annoyed I couldn't use the Blueprint or Blueprint Book signal for deploying though, as those would always have an extra 1 from the chest content - At least as long as I'm stuck with the ContainerControlBehavior.
What I would *like* to happen would be to have a ModControlBehavior where we can give them a structure describing what signals we need
Code: Select all
ModControlBehavior.set_config{
toggles={blueprint="Enable Blueprints",blueprintbook="Enable Blueprint Books",decon="Enable Deconstruction"},
conditions={deploy="Deploy Print",deconArea="Deconstruct Area",deconSelf="DeconstructSelf"},
signals={page="Blueprint Book Page",x="Offset X",y="Offset Y",w="Area Width",h="Area Height"}
} -- Obviously these are all LocalisedStrings and I'm being bad and filling in raw strings
and get a structure with their current configuration
Code: Select all
local state = ModControlBehavior.get_config_state
returns state == {
toggles={blueprint=true,blueprintbook=true,decon=true},
conditions={deploy=CircuitCondition,deconArea=CircuitCondition,deconSelf=CircuitCondition},
signals={page=SignalID,x=SignalID,y=SignalID,w=SignalID,h=SignalID}
}
and a function put_signal(ArrayOfSignal,circuit_connector), and they generate the UI like they seem to already do. Maybe thrown in a mode table for a set of radio buttons.
But I kinda doubt we'll see anything like that any time soon
And dealing with conflicts is just a matter of sticking some arithmetic combinators inline to reassign things (for a slight delay penalty)!
doc wrote:
Regarding deconstruction, I feel setting coordinates is fiddly; but with the above custom GUI you could have an interface that actually highlighted the area to be deconstructed. Anchors might yet be a better way to do this tho.
Building GUIs is fiddly, and I've already got a CPU for working with circuits
Making a pulse is also a lot simpler in 0.13 than it used to be.
Also, for the previous behavior of "order centered on the deployer" you can skip the X,Y signals entirely. Area deconstruction won't deconstruct itself (though, it will quite happily deconstruct the circuit controlling it!). Also, deconstruction orders are negative numbers for safety (it's a lot harder to accidentally generate a pulse of a negative signal) - and in fact in my current working tree, a 1 signal cancels an order given by a -1 signal, which allows (with fast circuits) deconstructing the border of a rectangle while leaving the inner area intact.
The Deconstruct-Area order needs *some* way to specify the area covered though, and I'm not sure how else to do it. Maybe a print with two wooden chests (to mark area) and a deployer (to mark alignment)?
doc wrote:
Yes, this is absolutely essential. I was going to call this a Prospector. In my head it was somewhere between a pump jack and a drill, sampling nearby tiles and outputting a resource count on the circuit network. Maybe some specialised kind of radar is a better fit though, although that would have to be pretty advanced technology.
I've already got a combinator that outputs it's own X,Y coordinates (for making circuits that react differently when built in different places - useful for enumerating stations!). I've got lots of crazy ideas (but very little code so far) for serializing things into/out of circuit networks, including but not limited to: logistic network requests, logistic network ghosts (this one seems to be too performance-costly for now, unfortunately - or maybe just on large networks), on_sector_scanned (with some data about the chunk, ores, entities, etc, as much as I can pack into one tick!), blueprint data for reading/writing. Basically, I'm building IO ports for my combinator CPU to connect to the lua API to control the world.
I've also got most of the blueprint worked out for a radar-area sized power field that deploys the next-in-line neighbor in stages to clear any biters that might be in the way
Edit: and as an afterthought...
doc wrote:
I really hadn't thought about what to do about Blueprint Books. This does raise some interesting possibilities. Copying a single book around and then using numbered signals to deploy different phases of your machine does seem a lot neater than having to copy loads of blueprints and get the right one to the right place all the time. Just need to solve that cloning problem, I had a really good go at it before but there were so many issues

I just realized that it should be fairly straight forward to copy a book's active print to all other pages in that book. Then we just need a way to get prints in/out of books and we can mass-produce prints. If loading them into books is predictable, then we can mass produce books too. And if one of the pages of that book is the book factory... wait no that's not right
