Entity IDs inconsistent when re-exporting same blueprint
Posted: Thu Dec 04, 2025 3:35 am
I'm trying to track my blueprints and update them as I make improvements (with version control such as git), but I've encountered a major problem: placing a blueprint and then exporting a blueprint based on that ghost, the entities inside it will have different ID numbers.
By decoding the blueprint, I see that the order of entities changes. (For example, use this website https://factorio-blueprint.vercel.app/decode-encode ) (No affiliation)
To reproduce this issue: make a blueprint, place it as a ghost somewhere else, then make a blueprint of the ghost, and the string will be different from the original one. Use absolute alignment 0,0 so that the coordinate position of individual items doesn't change depending on where you place it on the map.
Has anyone else had this problem and found a solution to it?
As an example, here are 2 different blueprint strings that I got from the game by pasting 1 blueprint in different locations, then exporting a blueprint from the ghost. The contents are the same: 1 wooden box and 1 fast inserter. But the ids are swapped in the two cases.
I can't guess why this would happen. If the game is to make a blueprint of identical items, why would it not assign them the same ID each time? Does it randomly choose which item to start with when making the blueprint?
Decodes to:
2.
Decodes to:
By decoding the blueprint, I see that the order of entities changes. (For example, use this website https://factorio-blueprint.vercel.app/decode-encode ) (No affiliation)
To reproduce this issue: make a blueprint, place it as a ghost somewhere else, then make a blueprint of the ghost, and the string will be different from the original one. Use absolute alignment 0,0 so that the coordinate position of individual items doesn't change depending on where you place it on the map.
Has anyone else had this problem and found a solution to it?
As an example, here are 2 different blueprint strings that I got from the game by pasting 1 blueprint in different locations, then exporting a blueprint from the ghost. The contents are the same: 1 wooden box and 1 fast inserter. But the ids are swapped in the two cases.
I can't guess why this would happen. If the game is to make a blueprint of identical items, why would it not assign them the same ID each time? Does it randomly choose which item to start with when making the blueprint?
1.
Code: Select all
0eNp1kN1qwzAMRt9F1/Zo0qbMfpUxhpNoqSCRg630h+B3n50VetH2SgjpHH1ohXZccA7EAnaFyG7W4vUQqC/9FWyl4Aa2TgpcG/24COqyNRMPYCUsqIA6zxHsV+ZpYDcWkt2EYOHifY+suxNGgewg7rFI07cCZCEh/Ce35vbDy9Ri2K7eDb8uiiaOGCQPFMw+ZsrzPd7uo9kC5pqSevLU6mWSt5qqaHI2Epwy9HiOgjOGuAHNsTYHY5rPam/M7pDSHxBhayQ=Code: Select all
{ "blueprint": { "snap-to-grid": { "x": 1, "y": 2 }, "absolute-snapping": true, "icons": [ { "signal": { "name": "wooden-chest" }, "index": 1 } ], "entities": [ { "entity_number": 1, "name": "fast-inserter", "position": { "x": 0.5, "y": 0.5 } }, { "entity_number": 2, "name": "wooden-chest", "position": { "x": 0.5, "y": 1.5 } } ], "item": "blueprint", "version": 562949958139904 } }2.
Code: Select all
0eNp1kNFuwjAMRf/FzwlqOzqR/ApCU0q9Yql1qsTdQCj/TtJN8AA8Xtnn+MpX6MYF50AsYK8Q2c1avB4C9SWfwdYKLmCbpMB10Y+LoC5bM/EAVsKCCujoOYLdZ54GdmMh2U0IFn6975H18YRRIDuIeyzSdFCALCSEf+QaLl+8TB2G9eorg4LZxwx5/m9Xbdq1X71pU1JPmuau+XZRNHHEIHnw1lMVT+5GglOmHs9R8IMhrkD72ZitMe2u/jCm2qZ0Awa2ayQ=Code: Select all
{ "blueprint": { "snap-to-grid": { "x": 1, "y": 2 }, "absolute-snapping": true, "icons": [ { "signal": { "name": "wooden-chest" }, "index": 1 } ], "entities": [ { "entity_number": 1, "name": "wooden-chest", "position": { "x": 0.5, "y": 1.5 } }, { "entity_number": 2, "name": "fast-inserter", "position": { "x": 0.5, "y": 0.5 } } ], "item": "blueprint", "version": 562949958139904 } }