Page 1 of 5

(Hotkey to) Replace existing structures with blueprint / Replace with bp / Forced bp placing/deconstruction

Posted: Thu Apr 12, 2018 10:01 am
by IronCartographer
tl;dr: Make a second hotkey to force blueprint placement (like Shift-Left mouse button), marking buildings for deconstruction in addition to trees and rocks.

Candidate keybinds:
  • Shift-Right mouse button (Probably too easy to mis-click, but neatly combines "Right click to mine/remove" with "Shift to force blueprint placement")
  • Ctrl-Shift-Click (Uses an extra modifier key for safety, while still being convenient)
Why? To use a new blueprint that requires not only in-place upgrades, but replacements with different entities entirely, with efficient auto-deconstruction of only conflicting entities.

The behavior is effectively a spatially-filtered deconstruction planner, marking old structures for replacement if they block the new blueprint while ignoring things that can stay. 8-)

This would enable vanilla Upgrade Planner (though not Builder) behavior if combined with a UI that upgrades the blueprints themselves (like Autotorio's Upgrade Blueprint option).

Aside: Currently in the hotkey menu "Build ghost" is the English label for the "Shift-Left mouse button" hotkey responsible for placing an entity as a ghost, which makes sense, but leaves out the "Force Blueprint Placement" and "Ignore Trees/Rocks" behaviors. Discoverability might benefit from additional description here. :)

Auto deconstruct under blueprints

Posted: Mon Apr 30, 2018 5:03 am
by thip
merged 16. Jul. 2022 — ssilk

When placing blueprint:
- if there's a tree/rock, could it be marked automatically for deconstruction? instead of closing blueprint and dealing with it manually
- water marked for fill

Re: Auto deconstruct under blueprints

Posted: Mon Apr 30, 2018 5:21 am
by Nexarius
You can press shift and tree and rocks will be marked for deconstruction.

+1 for automatic landfill

And I suggest kamikaze construction bots carrying cliff explosives to deal with cliffs too.

Re: Hotkey to replace existing structures with blueprint

Posted: Fri Dec 28, 2018 8:49 pm
by Ardagan
I'll revive and +1 this. (The only relevant thread I managed to find via search)

Re: Hotkey to replace existing structures with blueprint

Posted: Mon Mar 18, 2019 2:43 am
by wvlad
It's often required for placing main bus splitting blueprint.
Also for copy-pasting.

Really. I want the blueprint exactly here.

Posted: Sat Jun 15, 2019 8:25 pm
by Darinth
Can we have some method of telling factorio to remove *everything*, including your own structures, that are in the way of a blueprint? Say maybe Shift+Ctrl?

Often times, especially when dealing with belt lines, I want to replace everything that is in the way of a blueprint in order to get it down. The simplest example is probably something along these lines:
3x5 IO lane balancer.PNG
3x5 IO lane balancer.PNG (27.57 KiB) Viewed 22200 times
I can basically delete 5 belts and place that down to create a lane balancer. But right now, I have to first manually use a deconstruction planner to remove those belts. In this particular case, it's not a huge deal because it's generally pretty obvious what I need to deconstruct first... it gets a lot more difficult when I'm doing things like placing down a draw from the main bus and having to double-check back and forth between the blueprint to make sure I got everything before I can place it. Having something that says 'I really do want this down here, remove anything you have to' would be a godsend.

Re: Hotkey to replace existing structures with blueprint

Posted: Mon Jul 22, 2019 2:48 pm
by Darinth
Stumbled across this thread while searching for another. Same idea as in my thread here. Should probably be merged. Also increases visibility. <3

Re: Hotkey to replace existing structures with blueprint

Posted: Mon Jul 22, 2019 7:27 pm
by Koub
[Koub] Indeed, merged into the older topic

Re: Hotkey to replace existing structures with blueprint

Posted: Sat Feb 01, 2020 5:57 pm
by Ingvar
I would really like to see this feature implemented.

I like the idea of Ctrl-Shift-Left to replace all objects which are in the way, and perhaps place landfill if necessary.

I have a blueprint of a compact base I use in multiple saves. When I make changes in one save it would be nice to transfer these changes to another save easily without marking thousands of objects, thousands of chests and millions of items in them for deletion.

What makes it even worse is that replacing a blueprint over an object which is marked for deletion with an identical object will not cancel the deletion mark (red X). So if the blueprint has 100 items in it, and 1 item is changed, all 100 would be swapped.
In my case, with a massive blueprint, this is not doable.

Another neat but more complicated way to deal with the problem (but more powerful) would be to have another "layer" in the blueprint where an area can be marked for "identical-check". One would check a box to edit this layer, which is just a bit-mask, similar to placing tiles. When the blueprint is placed, wherever this layer is marked the existing objects will be deleted if they are not identical to the ones in the blueprint - and importantly removed if none exists in the blueprint. This feature of removing items would be very nice when old objects can cause problems, such as train signals.
Example: You are running a train configuration of 1 locomotive and 3 wagons. You have train signals long enough for "4-trains". You decide to change to a 2+8 train (or whatever), and you could then have a track bluepring which removes old signals. The tracks would possibly remain in place, but the signals would be removed/adjusted.

Re: Hotkey to replace existing structures with blueprint

Posted: Fri Aug 14, 2020 8:54 pm
by D3viant.S4ge
+1, I can't find any mod that does this either. It's annoying to have to always replace belts with splitters manually. This would also help make multiple blueprints with different overlapping elements more composible.

Better Blueprint Placement

Posted: Fri Aug 28, 2020 10:11 pm
by evandy
I didn't see this mentioned when I searched; if it is already there please feel free to consolidate.
TL;DR
Rules for placing blueprints with & without conflicts should be smarter
What ?
I think that the rules the engine uses to validate blueprint placement should be enhanced as follows:
- If a blueprint is placing an entity on top of an existing entity, and the existing entity is at the same location and within the upgrade group, it should register an upgrade for those entities (i.e. red belts over yellow, assembly machine 2 over assembly machine, etc.). This placement should NOT require the use of the shift-key to force place.

- If a blueprint is placing an entity on top of an existing entity and the existing one is NOT at the same location, or is outside the upgrade group, then force-placing the blueprint with shift should queue the existing entity for deconstruction (just like it does with rocks & trees).
Why ?
It is very common to save blueprints for different stages of technology - should be able to automatically place them down on top of existing factories and have everything "just work" as the user wants. (upgrading machines, setting recipes, etc.)

It is also very common to want to deconstruct & then build via blueprint. Requiring 2 actions from the user (first deconstruct, then place) takes extra time and it would be very helpful to streamline.

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 1:58 am
by Khagan
evandy wrote:
Fri Aug 28, 2020 10:11 pm
- If a blueprint is placing an entity on top of an existing entity and the existing one is NOT at the same location, or is outside the upgrade group, then force-placing the blueprint with shift should queue the existing entity for deconstruction (just like it does with rocks & trees).
I really wouldn't want this. A factory as built is often tweaked from a generic blueprint design to reflect local terrain or resource locations; putting down the next phase of the blueprint shouldn't try to undo those tweaks.

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 7:40 am
by ssilk
There are some similar threads:

viewtopic.php?f=6&t=84697 Better UX for placing, removing, and configuring ghost structures
viewtopic.php?f=6&t=80563 mark-for-upgrading when blueprinting over fast-replaceable entities
viewtopic.php?f=6&t=47993 Allow Fast Replace using blueprints

My current opinion: instead of complex automatism (like here and explained in other threads but mixed with ghost mode) there should be a second “replace mode” besides the current “ghost mode”.

What it does: any entity (Not only trees and rocks) on map which disturbs placing the blueprint is destructed before placing.

Ghost mode uses pressing shift while placing. The replace mode could use control. Maybe using shift-control will destruct all entities inside of the targeted blueprint area, not only those, which are disturbing.

That’s pretty simple but it guarantees also, that it will work afterwards. Think for example to replacing stone furnace with iron furnace: you need to remove all furnaces, because there could be some stone left in one of the furnace. Or it replaces entities, which are the same, but have a different orientation.

That is also the reason why I’m skeptical when not all existing former entities and items are not destructed. I think it’s more important, that the result works correctly in any case, instead of doing it faster without replacing the items on belts, in assemblies, furnaces etc. or in inserter hands.

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 9:10 am
by jodokus31
ssilk wrote:
Sat Aug 29, 2020 7:40 am
My current opinion: instead of complex automatism (like here and explained in other threads but mixed with ghost mode) there should be a second “replace mode” besides the current “ghost mode”.
Replace mode would be the same as deconstruct and place blueprint instantly over it. Although, you don't exactly know, what is the dimension of the blueprint to place, while you hold the deconstruction planner.
ssilk wrote:
Sat Aug 29, 2020 7:40 am
Maybe using shift-control will destruct all entities inside of the targeted blueprint area, not only those, which are disturbing.
What is the blueprint area? The rectangle form of the outer entities? I guess, this could be pretty confusing unless it is visualized

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 9:26 am
by ssilk
jodokus31 wrote:
Sat Aug 29, 2020 9:10 am
Replace mode would be the same as deconstruct and place blueprint instantly over it.
No, it will only deconstruct those entities, which are “in the way”. This mode is useful exactly for such upgrades of entities, or adding balancer in to a belt or rebuild parts of a station. You can form the blueprint exactly so, that only the really needed entities are replaced. Nice sub-game in my eyes.
What is the blueprint area? The rectangle form of the outer entities? I guess, this could be pretty confusing unless it is visualized
This mode is exactly that from your quote above: first deconstruct all, then build over it, both with the same dimensions, aka: When the blueprint is 23x14 it will deconstruct an area of 23x14 first. Sometimes that is a good idea to clean everything below.
It could be simply visualized by a red rectangle, instead of a blue.

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 11:50 am
by jodokus31
ssilk wrote:
Sat Aug 29, 2020 9:26 am
jodokus31 wrote:
Sat Aug 29, 2020 9:10 am
Replace mode would be the same as deconstruct and place blueprint instantly over it.
No, it will only deconstruct those entities, which are “in the way”. This mode is useful exactly for such upgrades of entities, or adding balancer in to a belt or rebuild parts of a station. You can form the blueprint exactly so, that only the really needed entities are replaced. Nice sub-game in my eyes.
I meant, that you deconstruct everything, which is "in the way" manually and then place the blueprint. You don't need to wait until its deconstructed
Of course, it could add QoL, if its done in one go.
For upgrades, i think upgrade planner is better most of the time, because it doesn't remove items on belts or in machines. And the belt/machine doesn't stop working. This also greatly reduces bot usage.
This is what OP proposes, i think?

(Regarding the example to replace a stone making furnace with an iron making furnace, you would have to deconstruct it manually)

I could imagine to invent this behaviour as "replace mode", but leave the old behaviour as it is.
ssilk wrote:
Sat Aug 29, 2020 9:26 am
What is the blueprint area? The rectangle form of the outer entities? I guess, this could be pretty confusing unless it is visualized
This mode is exactly that from your quote above: first deconstruct all, then build over it, both with the same dimensions, aka: When the blueprint is 23x14 it will deconstruct an area of 23x14 first. Sometimes that is a good idea to clean everything below.
It could be simply visualized by a red rectangle, instead of a blue.
The fact, that a blueprint has a rectangular dimension, is not so obvious. So if visualized, it should be ok. Although, i'm not convinced, that you need a special mode for this.

Re: Better Blueprint Placement

Posted: Sat Aug 29, 2020 5:02 pm
by Qon
If the blueprint placement thing was more moddable this would have been a mod already...

+1

I need this. I'd like to not have a new behaviour forced on me. Would be nice if shift is force (place regardless of conflicts) while maybe control is deconstruct conflicts and alt is landfill under (and immediately place ghosts on landfill ghosts). Or some configuration screen in the blueprint or somewhere.

Re: Better Blueprint Placement

Posted: Sun Aug 30, 2020 9:29 am
by ssilk
When I read that, I thought: everyone has its own needs, it’s own playstyle.

So I thought back to that suggestion
viewtopic.php?f=6&t=76499 Blueprint Book is not enough for me

In short it describes, that the player can formulate exactly how a blueprint or parts of it is placed by using filters to create layers.

I added two examples (based on this thread) in that thread how that can work. :)

Re: Better Blueprint Placement

Posted: Sun Aug 30, 2020 4:48 pm
by blahfasel2000
ssilk wrote:
Sat Aug 29, 2020 9:26 am
No, it will only deconstruct those entities, which are “in the way”.
That's not enough though to ensure the blueprint works afterwards, as there are ways that things not conflicting with the blueprint placement could still interfere with its functioning, for example a piece of belt that turns a belt curve into a sideload instead, or an inserter taking items from one belt and putting it on another because it happened to be in an empty gap between belts in the new blueprint.

Re: Better Blueprint Placement

Posted: Mon Aug 31, 2020 6:04 am
by ssilk
Yes, but that’s the players fault if she/he makes a blueprint, that doesn’t cover all critical pieces. He/she should replace everything then. I suggested a shortcut for that.