[0.11.3] Blueprint API problems

This subforum contains all the issues which we already resolved.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

[0.11.1] Blueprint itemstack API failing on no recipie

Post 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.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

[0.11.3] Blueprint API problems

Post 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:
Image
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [0.11.1] Blueprint API not allowing rail signals on turn

Post by jeroon »

I believe it's not just the end of curved sections, it will fail on all signals placed next to diagonal rails.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

[0.11.1] Blueprint API not exporting belt-to-ground rotation

Post 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.
Image
MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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? :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [0.11.1] Blueprint API not exporting belt-to-ground rota

Post 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.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

[0.11.3] Blueprint API not exporting inventory limit

Post 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().
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.11.3] Blueprint API not exporting inventory limit

Post 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).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3] Blueprint API problems

Post by kovarex »

I will merge all the blueprint api problems into one thread, they will be fixed alltogether.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.3] Blueprint API problems

Post 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
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.3] Blueprint API problems

Post 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.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3] Blueprint API problems

Post 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.
Post Reply

Return to “Resolved Problems and Bugs”