Page 1 of 1
[0.11.1] Blueprint itemstack API failing on no recipie
Posted: Mon Nov 03, 2014 10:04 am
by JamesOFarrell
If you call getblueprintentities() on a blueprint itemstack with an assembler in it that has no recipe you get back a table with an invalid recipe object instead of no recipe value. Also if you try and call setblueprintentities() with the same table you will get an error.
[0.11.3] Blueprint API problems
Posted: Tue Nov 04, 2014 12:02 am
by JamesOFarrell
If you setup a rail signal on a curved+straight section of track you will get a valid blueprint that can't be imported with the new lua itemstack API. The error you get it "Entity i collides with entity j," error. Example:

Re: [0.11.1] Blueprint API not allowing rail signals on turn
Posted: Tue Nov 04, 2014 8:16 am
by jeroon
I believe it's not just the end of curved sections, it will fail on all signals placed next to diagonal rails.
[0.11.1] Blueprint API not exporting belt-to-ground rotation
Posted: Sun Nov 09, 2014 6:58 am
by JamesOFarrell
Using the new itemstack API in 0.11.1 exporting and then importing a connected belt-to-ground will lose the hood faces. The rotation is stored (which way the belts flow) but the way the hood faces is not retrained (not sure of the property name).
This image shows what i mean. Left is what i copied for the blueprint. Right is after i export and import the itemstack grid.

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Sun Nov 09, 2014 12:09 pm
by MF-
Ah yes, you can't tell which of them is IN and which one is OUT.
Did you test, that that property is actually stored and not actually just re-computed while placing the blueprint?
I think it could be tested by a setup like this
===>--->===>---->===>
= overground belt
> entrance/exit
- underground belt
(The last entrance is unpaired)
blueprint-capture the area from 2nd to 4th entrance/exit
place it
if the entraces turn into exits and vice versa, then the property isn't stored properly
Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Wed Nov 12, 2014 9:05 am
by JamesOFarrell
It must be stored as you can see it in the ghosts and blueprints work in game with underground belts. It is not accessible to mods and lua though.
Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Wed Nov 12, 2014 9:55 am
by Boogieman14
MF- wrote:if the entraces turn into exits and vice versa, then the property isn't stored properly
That's actually a different issue, where entrance and exit are properly connected but their direction is reversed. I suspect this is simply because the side that gets placed first becomes the entrance.
Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Wed Nov 12, 2014 1:51 pm
by ssilk
This is not the case. If you place the underground belts as ghosts, it depends totally from random in which direction they are placed. I think id depends on which side is built first, which depends on, which robot serves first.
Which is of course stupid... but I don't know, how this could be solved. You need some indicator of the direction, otherwise you cannot build stuff like this:
https://forums.factorio.com/wiki/inde ... anes_trick
Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Wed Nov 12, 2014 2:01 pm
by Boogieman14
ssilk wrote:This is not the case. If you place the underground belts as ghosts, it depends totally from random in which direction they are placed. I think id depends on which side is built first, which depends on, which robot serves first.
Isn't that exactly what I said?

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota
Posted: Wed Nov 12, 2014 11:47 pm
by Boogieman14
When I manually build an entrance or exit on top of the wrong-facing ones from a blueprint, the ghost remains in place. Not sure if this problem is related to the above issue, related to the similar problem with turret ghosts (fixed for next version) or something entirely new. For now I'll just post it here.
[0.11.3] Blueprint API not exporting inventory limit
Posted: Fri Nov 21, 2014 12:53 am
by DaveMcW
getblueprintentities() does not export the inventory limit for chests.
Normal blueprints do copy the inventory limit, but it is not accessible through getblueprintentities().
Re: [0.11.3] Blueprint API not exporting inventory limit
Posted: Sat Nov 22, 2014 6:50 am
by ssilk
This is the mirror bug that when copying the settings of a chest, the stack limits aren't copied, too.

(not sure, if this is in 0.11 still so, but in 0.10 it was).
Re: [0.11.3] Blueprint API problems
Posted: Mon Nov 24, 2014 10:37 am
by kovarex
I will merge all the blueprint api problems into one thread, they will be fixed alltogether.
Re: [0.11.3] Blueprint API problems
Posted: Mon Dec 01, 2014 6:30 am
by DaveMcW
The inserter gui allows you to enter count=0, but setblueprintentities() does not.
Steps to reproduce:
1. Put a blueprint in the first slot of your toolbar.
2. Run this command:
Code: Select all
/c game.player.getinventory(1).getitemstack(1).setblueprintentities({{entitynumber=1,name="small-electric-pole",position={x=1.5,y=0.5}},{entitynumber=2,name="smart-inserter",position={x=0.5,y=0.5},connections={red={1}},conditions={red={operator="=",name="iron-plate",count=0}}}})
The result is
Cannot execute command. Error: [string "..."]:1:Item stack count has to a be in the range of 1 - 2147483647
Re: [0.11.3] Blueprint API problems
Posted: Mon Dec 15, 2014 4:06 am
by DaveMcW
setblueprintentities() messes up all diagonal straight rails.
If you input direction=1, the blueprint has direction=7.
If you input direction=3, the blueprint has direction=5.
If you input direction=5, the blueprint has direction=7.
If you input direction=7, the blueprint has direction=5.
Re: [0.11.3] Blueprint API problems
Posted: Sun Dec 28, 2014 3:49 pm
by kovarex
Hello, the blueprint api had been heavily refactored, and most of the problems hould be fixed in 0.11.9 (Thanks to RSeding91).
For different problems that you might find in the future 0.11.9, please create a separate thread.