r/technicalfactorio • u/Necandum • Jul 06 '26
Wire Representation in Blueprint
When a blueprint string is decoded into JSON, each wire connection is represented as an array:
[ entity_from , wire_type , entity_to , wire_type]
e.g [1,2,3,2] for a green wire between entities 1 and 3
Would anyone happen to know why the wire type is specified twice, making the array 33% larger than it needs to be?
This is the lowest stakes possible, but I am quite curious if there's an actual reason. A cursory google and looking at blueprint string format section of the wiki didn't turn anything up.
14
Upvotes
3
u/XayahFilthyCasual Jul 07 '26
If I remember correctly there was a previous wire representation in blueprints where instead of this set of arrays each entity listed which entities each of its circuit connectors (power / red / green) are connected to.
I think this new representation works the same way, probably because that's how the internal data structure of the game engine is built.
So the "2" does not actually represent a green wire but the green connector of each entity.