QoL: Add shortcut to copy/paste to blueprint strings directly

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
SteelWolf300
Inserter
Inserter
Posts: 30
Joined: Sat Apr 09, 2016 11:21 am
Contact:

QoL: Add shortcut to copy/paste to blueprint strings directly

Post by SteelWolf300 »

TL;DR
Add shortcut to copy/cut/paste from the world to blueprint strings (and vice versa) directly.
I suggest CTRL+SHIFT+C, CTRL+SHIFT+X and CTRL+SHIFT+V respectively as default shortcuts.

What ?
A simplified way to do what can currently be achieved with:
  • Use copy/cut tool (CTRL+C or CTRL+X, then select area)
  • open created blueprint (necessitate placing hand content in an inventory, eg E, then click on empty spot, then right-click on blueprint)
  • click on "Export to string"
  • click on "Copy" (alternatively select blueprint string then CTRL+C)
  • close the Blueprint string dialog.
  • click on "Destroy blueprint" (because the created blueprint was supposed to be temporary)
This could be replaced with CTRL+SHIFT+C or CTRL+SHIFT+X then select area.

Similarly, a simplified way to do what can currently be achieved with:
  • click on "Import string" tool (there is currently no shortcut for that)
  • CTRL+V (there is currently no "Paste" button)
  • click on "Import"
  • Use paste tool (CTRL+V, then click as many times as desired)
  • Delete blueprint if not placed intentionally in an inventory (like the temporary blueprint in cursor when using copy/cut/paste tool)
    • open created blueprint (necessitate placing hand content in an inventory, eg E, then click on empty spot, then right-click on blueprint)
    • click on "Destroy blueprint"
This could be replaced with CTRL+SHIFT+V then click to place blueprint.

This suggestion is similar to viewtopic.php?f=6&t=77225 but not quite. Making it a different shortcut avoid messing up the clipboard unintentionally.

Why ?
I think I have emphasized enough how the current process is tedious and that a "single-click" replacement would be welcomed. But for what usage you might ask?

I recently got into developing some external tools to generate/view/edit blueprint strings (I won't share the code soon as I consider it not clean enough :P). Getting blueprint string into/out of the game have become the bottleneck now. I literally could see myself using that feature daily.
I am happy to see that Factorio is taking a route where blueprint offer more versatility, as per the last update FFF-392, and in that sense using external tools is the most Factorio* way to play the game and push it to its limits (* I mean "automated").

People also could use this feature to quickly import designs from the internet without polluting their inventory with unnecessary blueprints.

Illiander42
Filter Inserter
Filter Inserter
Posts: 414
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by Illiander42 »

Why not just put the blueprint string in the OS clipboard when you make one using CTRL+C or CTRL+X?

What does Factorio put in the OS clipboard on blueprint creation atm?

User avatar
SteelWolf300
Inserter
Inserter
Posts: 30
Joined: Sat Apr 09, 2016 11:21 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by SteelWolf300 »

Illiander42 wrote:
Sat Jan 06, 2024 10:45 am
Why not just put the blueprint string in the OS clipboard when you make one using CTRL+C or CTRL+X?
This would be what that post viewtopic.php?f=6&t=77225 suggested. As someone said there:
ssilk wrote:
Sat Oct 26, 2019 4:55 pm
I would see that as very unawaited behavior: I copied the station name (text),then copied a blueprint and when I paste station name now it pastes me a blueprint.
And what about CTRL+V? How would it choose between pasting the clipboard and pasting from the in-game history?

This is why I suggest giving the player fine control over using the OS clipboard or not (i.e., use SHIFT or not).
Illiander42 wrote:
Sat Jan 06, 2024 10:45 am
What does Factorio put in the OS clipboard on blueprint creation atm?
Nothing.

Illiander42
Filter Inserter
Filter Inserter
Posts: 414
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by Illiander42 »

And why does Factorio have to use the OS clipboard when you paste in-game?

Why does Factorio only get a single clipboard?

User avatar
SteelWolf300
Inserter
Inserter
Posts: 30
Joined: Sat Apr 09, 2016 11:21 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by SteelWolf300 »

I am not sure to understand what you said. Can you elaborate?
Illiander42 wrote:
Sun Jan 07, 2024 3:59 am
And why does Factorio have to use the OS clipboard when you paste in-game?
The "Paste" tool (CTRL+C) currently does not use the OS clipboard. And I did not suggest to change that default behavior, I only suggested to add a new behavior (CTRL+SHIFT+C). I would like Factorio to allow using the OS clipboard directly, not to force it to do so.

EDIT: I meant CTRL+V.
Last edited by SteelWolf300 on Sun Jan 07, 2024 10:39 am, edited 1 time in total.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by Qon »

I also made an external program to generate blueprint strings. My program is an assembly-style language which is assembled into combinators that can execute the program in Factorio. I avoid checking in Factorio if possible because there's too many steps to just paste in a blueprint string when you are trying to iterate on the positioning code. I had to use FBE to get more reasonable way to quickly check output, because it supports CTRL + V.
It can't simulate the behavior of combinators so for that I reluctantly used Factorio, though I'm considering writing my own combinator simulator so I don't have to go through the paste process of Factorio over and over.

So +1 to have CTRL + SHIFT + V just import OS clipboard as a blueprint string directly and put it in my hand with no fuss. And if I dismiss it with Q I don't want it in my inventory. It should just be in Factorio's own copy history, if I want to save it I'll explicitly drop it in my inventory or blueprint storage myself.

User avatar
SteelWolf300
Inserter
Inserter
Posts: 30
Joined: Sat Apr 09, 2016 11:21 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by SteelWolf300 »

Qon I looked at your mod list, guess what, one of my scripts is doing what Signal Signs/Combinator Text is doing. Glad to see that we had the same idea!
Turns out you can push the concept even further, here is me testing rendering images using color signals in combinators using an external script (I know using lenna.png as a test image has become controversial but it was an old test):
Capture du 2017-08-15 20-45-41.png
Capture du 2017-08-15 20-45-41.png (4 MiB) Viewed 547 times
Oh and +1 for using FBE. I sometime use it as a vanilla alternative to the Picker Dollies mod, great for moving combinators around without breaking connections. Even made a pull request for editing wire connections and allowing temporarily ignoring wire length limit.

I disgressed a bit but in both situations there would be a use for CTRL+SHIFT+C / CTRL+SHIFT+V.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: QoL: Add shortcut to copy/paste to blueprint strings directly

Post by Qon »

SteelWolf300 wrote:
Sun Jan 07, 2024 11:19 am
Qon I looked at your mod list, guess what, one of my scripts is doing what Signal Signs/Combinator Text is doing. Glad to see that we had the same idea!
Turns out you can push the concept even further, here is me testing rendering images using color signals in combinators using an external script
Cool!
SteelWolf300 wrote:
Sun Jan 07, 2024 11:19 am
Oh and +1 for using FBE. I sometime use it as a vanilla alternative to the Picker Dollies mod, great for moving combinators around without breaking connections. Even made a pull request for editing wire connections and allowing temporarily ignoring wire length limit.
Thanks ;)
SteelWolf300 wrote:
Sun Jan 07, 2024 11:19 am
I disgressed a bit but in both situations there would be a use for CTRL+SHIFT+C / CTRL+SHIFT+V.
Yeah well now I want this even more :) :(

Post Reply

Return to “Ideas and Suggestions”