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

Moderator: ickputzdirwech

IronCartographer
Filter Inserter
Filter Inserter
Posts: 464
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

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

Post 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. :)
Last edited by ssilk on Sat Jul 16, 2022 7:54 am, edited 2 times in total.
Reason: Changed topic so that it is not so focused on extra switch/button
thip
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Mar 19, 2018 4:05 am
Contact:

Auto deconstruct under blueprints

Post 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
User avatar
Nexarius
Filter Inserter
Filter Inserter
Posts: 275
Joined: Sat May 09, 2015 7:34 pm
Contact:

Re: Auto deconstruct under blueprints

Post 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.
Ardagan
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Dec 21, 2013 11:24 pm
Contact:

Re: Hotkey to replace existing structures with blueprint

Post by Ardagan »

I'll revive and +1 this. (The only relevant thread I managed to find via search)
wvlad
Fast Inserter
Fast Inserter
Posts: 217
Joined: Thu Jul 13, 2017 9:55 pm
Contact:

Re: Hotkey to replace existing structures with blueprint

Post by wvlad »

It's often required for placing main bus splitting blueprint.
Also for copy-pasting.
Darinth
Filter Inserter
Filter Inserter
Posts: 323
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Really. I want the blueprint exactly here.

Post 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 27818 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.
Darinth
Filter Inserter
Filter Inserter
Posts: 323
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: Hotkey to replace existing structures with blueprint

Post 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
Koub
Global Moderator
Global Moderator
Posts: 7790
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Hotkey to replace existing structures with blueprint

Post by Koub »

[Koub] Indeed, merged into the older topic
Koub - Please consider English is not my native language.
Ingvar
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Nov 24, 2017 8:54 pm
Contact:

Re: Hotkey to replace existing structures with blueprint

Post 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.
D3viant.S4ge
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Dec 03, 2016 11:49 pm
Contact:

Re: Hotkey to replace existing structures with blueprint

Post 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.
evandy
Fast Inserter
Fast Inserter
Posts: 228
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Better Blueprint Placement

Post 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.
User avatar
Khagan
Filter Inserter
Filter Inserter
Posts: 262
Joined: Mon Mar 25, 2019 9:40 pm
Contact:

Re: Better Blueprint Placement

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

Re: Better Blueprint Placement

Post 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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Better Blueprint Placement

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

Re: Better Blueprint Placement

Post 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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Better Blueprint Placement

Post 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.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Better Blueprint Placement

Post 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.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Better Blueprint Placement

Post 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. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
blahfasel2000
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Sat Mar 28, 2020 2:10 pm
Contact:

Re: Better Blueprint Placement

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

Re: Better Blueprint Placement

Post 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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Implemented in 2.0”