Description
Found a way to force a blueprint to contain automatic resupply of various items and having a turret or car with ammo preloaded is probably the most useful use for this.
HOW YOU CAN DO IT TOO INGAME
Make turret ghost. Configure ghost with ammo from remote view. Blueprint.
FYI: Use left click in remote view to put in a whole stack and right click for individual items.
HOW YOU CAN DO IT TOO (the hacky way)
- In your factorio copy a blueprint string of something you want to automatically resupply with
- Paste that blueprint in the following blueprint string decoder/encoder: https://factorio.tmin10.ru/. Yes it is for 0.15 but it still works somehow...
- You will see a JSON structure like this:
{
"blueprint": {
"icons": [
{
"signal": {
"name": "gun-turret"
},
"index": 1
}
],
"entities": [
{
"entity_number": 1,
"name": "gun-turret",
"position": {
"x": -48,
"y": -133
}
}
],
"item": "blueprint",
"version": 562949954076673
}
}
- Each entity can contain "items", lets add them and look at the final JSON
{
"blueprint": {
"icons": [
{
"signal": {
"name": "gun-turret"
},
"index": 1
}
],
"entities": [
{
"entity_number": 1,
"name": "gun-turret",
"position": {
"x": -38,
"y": -140
},
"enable_logistics_while_moving": true,
"items": [
{
"id": {
"name": "piercing-rounds-magazine"
},
"items": {
"in_inventory": [
{
"inventory": 1,
"stack": 0,
"count": 10
}
]
}
}
]
}
],
"item": "blueprint",
"version": 562949954076673
}
}
Sidenote: Sometimes you have to play around with the "inventory" number to get it to work. e.g. in the case of a car that wants coal AND ammo you need two separate numbers, like this
{
"blueprint": {
"description": "Loaded with 20 coal and 50 piercing rounds\n\nby markusmo3",
"icons": [
{
"signal": {
"name": "car"
},
"index": 1
}
],
"entities": [
{
"entity_number": 1,
"name": "car",
"position": {
"x": -35.17578125,
"y": -135.9296875
},
"enable_logistics_while_moving": true,
"items": [
{
"id": {
"name": "coal"
},
"items": {
"in_inventory": [
{
"inventory": 1,
"stack": 0,
"count": 20
}
]
}
},
{
"id": {
"name": "piercing-rounds-magazine"
},
"items": {
"in_inventory": [
{
"inventory": 3,
"stack": 0,
"count": 50
}
]
}
}
]
}
],
"item": "blueprint",
"label": "Preloaded Car",
"version": 562949954076673
}
}
- Copy your modified blueprint string back into the website, hit encode
- Copy that blueprint string and import it into your factorio save