Page 1 of 1

Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Fri Aug 14, 2015 3:10 am
by GopherAtl
I hope to polish this up into something actually usable, as in it's current form it's ... unstable. (spoiler: assembling machines don't like recipes that include blueprints.)

But! as long as care is used, I have it basically work.

Care, in this case, means don't insert a blueprint while thre is already one in input - it will stack them, and that is bad, because blueprints aren't allowed to stack. Also, don't give it new input when there's already a blueprint in output, for the same reasons.

tl;dr, do NOT put this in a world you care about without making a backup first.

What it does:

You give it a configured blueprint. It will spend a second or so processing that blueprint, and then it will deploy the work orders from the blueprint, centered around itself. At the moment it's quite dumb - it makes ghosts that are impossible to place if they overlap, which will cause construction drones to deploy and hover, confused, until you break them or the building.

Included is a save file which demonstrates the awesome potential of this simple concept. Just load it up and insert the blueprint from your hotbar into the deployer - it's the sortof gold-colored wooden crate between the two inserters. Then enjoy.

Download links! (these are for 0.12.x, save is actually from my test world in 0.12.2 so dunno if that'll load in 0.12.0 or 0.12.1?)
The mod
The demo save

Re: Automated Blueprint Deployer - Proof of Concept

Posted: Fri Aug 14, 2015 6:27 am
by GopherAtl
Made a video, because words really don't do this justice, and pictures wouldn't help much.

Hmm. Can you not embed youtube vids here? Shame, that. Ah well. Linky. https://www.youtube.com/watch?v=IUiDvar ... e=youtu.be

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Fri Aug 14, 2015 1:10 pm
by Adil
Good job here, really good.
As for design challenges, why did you decide to use assembler instead of simple chest? There's no useful events tied to assemblers and I presume chest wouldn't allow that bug to happen (Has anyone reported it by the way?) while requiring a single additional variable to track whether the blueprint inserted is new.
Also, don't you think it would be more balanced to have deployers consume blueprint and have other machine that would require resources to produce a copy of it? (Purely an idea without much of a thought, feel free to ignore.)

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Fri Aug 14, 2015 1:28 pm
by GopherAtl
Adil wrote:Good job here, really good.
As for design challenges, why did you decide to use assembler instead of simple chest? There's no useful events tied to assemblers and I presume chest wouldn't allow that bug to happen (Has anyone reported it by the way?) while requiring a single additional variable to track whether the blueprint inserted is new.
Also, don't you think it would be more balanced to have deployers consume blueprint and have other machine that would require resources to produce a copy of it? (Purely an idea without much of a thought, feel free to ignore.)
Heh. Good questions! Second first, this actually started out *as* the blueprint copier, as I am considering exactly that, having it destroy the blueprint. Turns out a recipe with 2x blueprints as inputs really doesn't work properly in any kind of crafting machine. At all. Unless you place the inputs in manually, they will both wind up in the same slot, and then you're screwed, anything that tries to split the stack of blueprints throws a game-crashing exception about "attempted to clone a blueprint." So I removed the 2nd slot and just made it capture and restore the blueprint, replacing it in it's own input slot when crafting began and outputing a copy. When that was working as well as it was going to with an assembling machine, I just adapted the same entity to make it act as the deployer, to save time.

That leads in nicely to the first question, I'm not going to be able to use an assembling machine for *either* device in the finished mod, because of the stack-crash problem, so both will, in fact, be using a chest. It may actually end up being a multi-part machine, I really haven't decided what the best way to handle it all is yet; ideally I want it to be able to both input and output signals, ideally on separate circuit networks, but follow that through... it would need a container, to output abstract signals it would need a constant combinator, and to input signals it needs a smart inserter or lamp. Yeah, it's gonna be a whole thing, and I need to take time to really work out what's required, and what the best way to get that done is.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Fri Aug 14, 2015 3:04 pm
by Adil
GopherAtl wrote: Turns out a recipe with 2x blueprints as inputs really doesn't work properly in any kind of crafting machine
You could have made it take a blueprint and ingredients for copy. ;)
GopherAtl wrote: I want it to be able to both input and output signals
Speaking of which, does the mod copy the filters, logistic and circuit conditions from the blueprint? There seem to be according methods in entity object, but not the fields. I'm not sure the loop 72-74 can provide such functionality. Can colored connections be created with scripts?

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Fri Aug 14, 2015 3:15 pm
by GopherAtl
Adil wrote: You could have made it take a blueprint and ingredients for copy. ;)
true, but that wouldn't solve the basic problem, which is:
player/inserter: "can I insert a 2nd blueprint in that slot?"
game: "Sure! You can put up to 3, because recipe takes 1!"
p/i: "great, thanks!" :inserts:
game: "What the hell are you doing? You can't stack blueprints! :CRASH:
p/i: "but you just said... :cries:"
Adil wrote: Speaking of which, does the mod copy the filters, logistic and circuit conditions from the blueprint? There seem to be according methods in entity object, but not the fields. I'm not sure the loop 72-74 can provide such functionality. Can colored connections be created with scripts?
I haven't done exhaustive testing, so there may be things that don't copy properly, but it tries to, and I've confirmed it works with smart inserters and requester chests.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sat Aug 15, 2015 3:04 am
by Adil
Seen the wiki. Wow. Did you learn that by manual testing?

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sat Aug 15, 2015 3:52 am
by GopherAtl
Adil wrote:Seen the wiki. Wow. Did you learn that by manual testing?
yah, at least half of what I know about the API I've figured out in a the in-game console just poking at things and seeing what works XD

I keep meaning to update the wiki with my discoveries, edited in a few things but not nearly all of it

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sat Aug 15, 2015 5:10 am
by vampiricdust
Very awesome! I'll make a series around this mod once it's ready to go.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sun Aug 16, 2015 12:44 am
by Darloth
Miners can only be placed where there's valid ore...

First pass blueprint, puts miners on everything.
Second pass blueprint, puts turrets / floors / walls / assemblers everywhere else.

Logistics bots handle picking up mined output. Self-tiles and repeats until world exploited. May have to try this later, though I suspect the headache of getting it working will be immense :)

Edit: Can you imagine that as a multiplayer game mode? Set the bots to a hostile force, trigger them, and then attempt to stem the tide.

Edit2: Or a vs mode - each set up your own robot army blueprint, set them loose... Oh my, blueprints can include combinators. We could actually code self-expanding AIs using this.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sun Aug 16, 2015 1:09 am
by GopherAtl
Darloth wrote:Miners can only be placed where there's valid ore...

First pass blueprint, puts miners on everything.
Second pass blueprint, puts turrets / floors / walls / assemblers everywhere else.

Logistics bots handle picking up mined output. Self-tiles and repeats until world exploited. May have to try this later, though I suspect the headache of getting it working will be immense :)

Edit: Can you imagine that as a multiplayer game mode? Set the bots to a hostile force, trigger them, and then attempt to stem the tide.

Edit2: Or a vs mode - each set up your own robot army blueprint, set them loose... Oh my, blueprints can include combinators. We could actually code self-expanding AIs using this.
Glad someone's as excited as I am by the potential XD

the current form would be incredibly frustrating to try and scale up with - it'll crash every time you accidentally let an inserter insert a blueprint when there's already one in the machine. Technically you can work around that at the moment, but it'd be a bit involved. Spent my modding time today playing with a couple of smaller ideas that were supposed to be quick and easy, and turned out to be anything but, frustratingly. Tomorrow it's back to this.

Other than not-crashing, the big change for the "real" version is gonna be two things: feedback, and control. You'll be able to specify regular placement or force-placement, and the whole point being automation, you won't do that in a gui... no, you'll do it with circuit signals. It's also going to output circuit signals - I'm thinking while placing, it will output the signals for what needs to be placed, i.e., place a mining blueprint with 10 miners, if 7 have been placed, it'll output 3 mining drills. More control signals may cause it to output other information - a test-build signal might make it check placement and output what will be placed, or what will be blocked - ex, you try the mining blueprint, it reports none will place, you can not bother and place some factory blueprint instead.

Keeping track of, and distributing, blueprints is gonna be one of the hardest parts, of course. I will almost certainly make a supplementary object that copies blueprints somehow or other. Still undecided on exactly how that's all gonna work, though.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Mon Aug 17, 2015 12:39 am
by vampiricdust
The possibilities are quite a many. Should add in a way to make a deconstruction planner, even just to clear the old or trees. I was thinking of using belts to pass multiple blueprints around & control their input into the autofab. Each one will build their part when all the materials are present. If it was possible to make a selective deconstruction plan, maybe same as autofab, but instead it orders any entity matching a blueprint to be removed.

I need to look into making GUIs, but for now I think I'm going to try and make it offset to a side, which would be easier to design around.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Mon Aug 17, 2015 12:52 am
by GopherAtl
funny you mention selective deconstruction, I am thinking of a 4rd blueprint placement mode - normal placement, force-placement, which are like the two player modes; test placement, which I think I mentioned, which just gives you the signals of what would be placed, or possibly what would be blocked (easier to test for complete success, if any output is >0 then placement will fail, for things like assembler setups that require 100% placement to work at all), and the fourth being un-placeing, which specifically orders a deconstruct only for the items on the blueprint, if they exist. And them accepting regular deconstruction planners has always been intended, obviously with the deconstruction making exception for the autofab itself.

For offsetting positions, one approach I came up with this morning that might work is having an autofab "beacon," or some such name, that acts as a placeholder for the autofab when making blueprints; if a blueprint contains exactly one, then it will be placed such that the beacon is where the autofab doing the placing is, instead of centering it on the autofab.

Being able to rotate blueprints would be useful in theory, but I'm not sure how to go about supporting it in practice, in a way that would be automatable...

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Tue Aug 18, 2015 7:49 pm
by ajranney
This mod could be amazing at taking automation to the next level of automatic expansion. I was trying to look at your code and it is beyond me. I was wondering if you would be able to process a blueprint for rotation? I was imagining a blueprint that expanded the edge of your base. It would need to rotate (or have 4 versions (8 if you need corners to be different) that would run). It would be nice to be able to deconstruct also as previously discussed.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Wed Aug 19, 2015 8:06 pm
by jorgenRe
I like this mod so much that i'm now on the side(whilst not playing Factorio or working on The Underground(or any other mod... :lol: )) creating a you are the slave of the bots mod :twisted: !
Basically the bots have enslaved you and you are therefore forced to do the manual labour that the bots can't do(if i find some. I think the only ones are trains). The rest the bots do(automatically). I have checked how your mod does the blueprint thing and i found it to be quite helpful :D!

Thank you for helping me get Factorio to play the game itself and maybe at some point the creator of the biggest megabase Factorio has ever seen :twisted: !
It wont delay my other mods because i will be using code from other mods i have created and umm that part of your mod that creates the ghost entities(i have no idea to make it more unique :lol: Because its already perfect enough :D!)
Edit:
PSST it auto builds mines now if it finds out it is lacking ore ^_^!

Edit2:
Love the concept BTW :D!

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Tue Sep 22, 2015 12:23 pm
by SHiRKiT
So how was work with this great mod? It's a really impressive idea.

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sun Oct 04, 2015 7:39 pm
by RepairMan
So I love this mod and the idea behind it.
I found some very annoying bugs so i went and fixed them,
heres a changelog and the new mod file

This not the official mod -> look at the license

Now with support for Tiles, 0.12.11 and less crashes!

The Latest version of the mod:
autofab_0.1.3.zip
Place This in your mods folder
(92.8 KiB) Downloaded 246 times
How To Install
Changelog
older versions
License

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Mon Oct 05, 2015 7:03 pm
by TuckJohn
My dear sir, you deserve a cookie. A very large and delicious cookie.
Image

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Tue Oct 06, 2015 11:24 am
by RepairMan
TuckJohn wrote:My dear sir, you deserve a cookie. A very large and delicious cookie.
Image
That looks like a nice delicious cookie :D

Btw with Network cables fixed, lets try to build a self replicating factory controlled by combinators ;)

Re: Automated Blueprint Deployer - Proof of Concept w/ video

Posted: Sat Oct 31, 2015 1:14 am
by ZachAttackary
I'm not sure if anyone is still interested in this mod, but here is my spin on it. Will upload download link when I've ironed out all of the bugs.

https://forums.factorio.com/forum/vie ... 97&t=17428

-ZachAttackary