Redo functionality

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Nikee
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Mar 04, 2018 11:41 am
Contact:

Re: Redo functionality

Post by Nikee »

NotRexButCaesar wrote:
Mon Dec 21, 2020 3:52 am
+1

I’ve found myself pressing control z once too many times and not having any idea what I just did, only to find a missing belt a few hours later.
Some hint to cancel undo actions: switch to map view, press shift and select with deconstruction planner all of your base. That will cancel planned deconstruction.

evg-zhabotinsky
Inserter
Inserter
Posts: 22
Joined: Wed Dec 09, 2020 3:53 pm
Contact:

Re: Redo functionality

Post by evg-zhabotinsky »

My reasons to want a "Redo" option:
1. I often habitually try to undo text edits, which results in in-world undo.
2. More rarely I try to undo other things in UIs, to the same effect.
3. Some edits are not recorded for undo, e.g. entity config changes, manually edited wires, and usually rotations. But I automatically try and undo the wrong thing.
4. To undo the "Undo" if it does something I didn't expect. And to just try instead of having to guess in advance what it would undo.
5. Just plain convenience, I change my mind sometimes.

Problem 1 is better fixed at the text field level.
Problem 2 is harder to properly fix, because many UI components (All except text fields?) lack the ability to get input focus. Even just blocking in-world undo would require implementing window focus and treating world as one of the windows.
Problem 3 is better fixed by recording everything for undo, but I suspect that is highly problematic.
Problem 4 of having to remember or guess can have other solutions than implementing "Redo", but just trying is by far the most intuitive and convenient.
And the 5th point is just a nice bonus to rendering all above be "non-problems" by implementing "Redo".

As to "how", can't the "Undo" be treated as any other edit but with its own separate "Undo history"? I can't be sure what the code looks like, but I suspect it is possible to basically instantiate most of the "undo" functionality once more without much new code.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5201
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Redo functionality

Post by eradicator »

evg-zhabotinsky wrote:
Sun Aug 01, 2021 8:28 am
2. More rarely I try to undo other things in UIs, to the same effect.
3. Some edits are not recorded for undo, e.g. entity config changes, manually edited wires, and usually rotations. But I automatically try and undo the wrong thing.
4. To undo the "Undo" if it does something I didn't expect. And to just try instead of having to guess in advance what it would undo.
Yea. Things that aren't even recorded for undo are the worst. Fiddle with combinators / recipes / modules -> make an error, press undo -> undid something at the other end of the map that I changed half an hour ago and have long forgotten >_>.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Sachertorte
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Sep 06, 2017 2:53 pm
Contact:

Make Ctrl+Shift+Z do nothing

Post by Sachertorte »

Ctrl+Z undoes. Sometimes I'll instinctively press Ctrl+Shift+Z to redo, which obviously doesn't exist in the game. However, Factorio interprets Ctrl+Shift+Z as a superset of Ctrl+Z and undoes again, which was the opposite of my intent and may lead to me accidentally undoing lots of things. I'd love for Ctrl+Shift+Z to do nothing instead.

Koub
Global Moderator
Global Moderator
Posts: 6570
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Redo functionality

Post by Koub »

[Koub] Merged into older thread with similar suggestion.
Koub - Please consider English is not my native language.

mrvn
Smart Inserter
Smart Inserter
Posts: 4647
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Redo functionality

Post by mrvn »

ssilk wrote:
Wed Mar 10, 2021 6:58 am
Well, I didn’t explain it deep enough. I thought you will find it yourself after that hint.
It’s complicated, because other players can also undo/redo.

So let’s say two players. Both are building a big power plant. Player A undoes (is that a verb?) something. Player B puts something at the same location A has undone. Now A redoes it. What should happen? Just deny to “overwrite” it seems a bit too simple for me...

Now think that for more players and with blueprints and with many levels of undo/redo. It gets really confusing. :)
I think only admin should be allowed to undo/redo anything from another player and that should be an admin tool and not the standard keybinding.

If two players build in the same area then expect problems with undo/redo. There simply isn't a good way to decide when it's ok to undo/redo another players work.

That said undo/redo should still handle the case of player A placing a ghost, player B builds the ghost (personally or via bot), player A undos. So don't block an undo just because the last user of something is another player. I would say just try to undo and if something is blocking that then beep so the player has feedback that undo failed.


Also +1 of giving some visual feedback of where an undo happened. An icon on the (mini) map would be nice. An arrow pointing to it at the edge of the screen if it's off screen would be good too. An alert icon next to the toolbar would be great too. If you think you hit undo too often you can just click the alert icon and the view jumps to where the undo happened.

And then you would need a redo to undo the bad undo.

I think the two suggestions would go hand in hand really well.

Post Reply

Return to “Ideas and Suggestions”