Undo last move

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
User avatar
Ceres
Posts: 8
Joined: Tue Apr 23, 2013 1:40 am

Undo last move

Postby Ceres » Tue Apr 23, 2013 5:42 pm

As I am rather prone to misclicking, I think an option to undo the last move would be nice. Of course, undoing would only be possible if the player has gained no knowledge through his move, and undoing would probably not be possible in multiplayer. I think this would especially be useful for managing engineers/workers on their way to pollution/fallout - one misclick often makes them careen off the road/rail into rough territory, losing one or two turns in the process.

Also, there used to be an option to set the amount of cities a player can have before the population would get unhappy about it, what happened to it? It kinda looks like it was removed somewhere between 2.2 and 2.3 and the amount of cities appears to be hard-coded to 13-17 depending on the government style. I'd really like to see that option again.

Thanks in advance :)

User avatar
Caedo
Elite
Posts: 476
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Undo last move

Postby Caedo » Wed Apr 24, 2013 3:58 pm

1) That option would be great, but fact is, Singleplayer actually hosts a server too, and up until Freeciv 2.3.4(the current stable release), other can actually connect to it.

2) The "unhappysize" option still exists, not as a server option, but as a ruleset option.
~S.C. L.

User avatar
Ceres
Posts: 8
Joined: Tue Apr 23, 2013 1:40 am

Re: Undo last move

Postby Ceres » Thu Apr 25, 2013 4:08 pm

1) Oh, I actually didn't know that. I guess it would be possible to allow undoing if there are no other human players? It only works well with AI opponents anyway, becasue they move seprarately from human players.
2) Nice to know it still exists. Would that option go in effects.rulesets or cities.ruleset or something? I don't see it mentioned in any ruleset file or the wiki page.

User avatar
Caedo
Elite
Posts: 476
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Undo last move

Postby Caedo » Thu Apr 25, 2013 4:13 pm

effects.ruleset

Code: Select all

[effect_unhappysize]
name    = "City_Unhappy_Size"
value   = 4
In Freeciv 2.3.4 it's the very first effect. Can't miss it.
~S.C. L.

User avatar
Ceres
Posts: 8
Joined: Tue Apr 23, 2013 1:40 am

Re: Undo last move

Postby Ceres » Thu Apr 25, 2013 5:26 pm

Thanks, I found it ( didn't realize it's listed in the wiki as "City_Unhappy_Size" instead of "unhappysize").
However, seeing the option's description, I realized it's not the one I was looking for (I wrote "amount of cities", not "size of the city" in the OP, maybe you misread that). However, after rereading the list of possible effects, I found that Empire_Size_Base was what I meant. Still, thanks for the help :)

Jim-11
Posts: 46
Joined: Sun Feb 24, 2013 1:28 pm

Re: Undo last move

Postby Jim-11 » Sun May 05, 2013 7:09 am

I too would welcome an Undo button. I often use the keyboard to move units, and sometimes I get less than precise about which number key I click. FreeCiv is very unforgiving about mechanical errors with keys or the mouse, so an Undo button would be a big help. I recently had another situation that would have benefited from an Undo button. A diplomatic dialog appeared at the start of a round, and I pressed F3 to see who wanted to deal, but nothing happened??? I learned later that I pressed number 3 instead of F3, and a unit I was not yet watching moved in a direction I did not want. An Undo button would be a big help in making FreeCiv more friendly to players. :D

User avatar
JTN
Elite
Posts: 462
Joined: Wed Jan 30, 2013 12:15 am

Re: Undo last move

Postby JTN » Mon May 20, 2013 8:57 pm

Unfortunately a single-move Undo button would be really hard to implement in Freeciv as it's currently implemented. When you do an action, its consequences on the world are enacted on the game data in such a way that they can't be rolled back. Trying to change that would be a massive and error-prone task (and not really of any use in multiplayer games).

Probably the best that could be done would be to make going back to the last savegame more intuitive and seamless than it is currently -- if you're saving every turn, you can reload and only have to redo a few moves.

User avatar
Ceres
Posts: 8
Joined: Tue Apr 23, 2013 1:40 am

Re: Undo last move

Postby Ceres » Wed May 22, 2013 2:32 am

The problem with using autosaves is that, if you set saveturns to 1 (so you don't have to replay multiple turns), the savegames folder will get clogged up with hundreds of files really fast. I actually really like the way Battle for Wesnoth did this, by only allowing a certain amount of savegames of the same scenario before the older ones get deleted. Then again, the scenarios there usually have a lot less turns.
Would it be possible to implement auto-saving at the beginning of your turn (independently from the actual auto-saving process), overwriting the save of the previous turn, so you can reload the turn if you messed up? Actually, one file would be enough for all games, something like "freeciv-lastturn-auto".

Jim-11
Posts: 46
Joined: Sun Feb 24, 2013 1:28 pm

Re: Undo last move

Postby Jim-11 » Thu May 23, 2013 7:05 am

Auto save would be much more useful for me if I had he option to auto save at the end of my turn, and that would be a high priority wishlist item for me. With auto save at the end of my turn, I could easily go back to undo some unexpected thing (like an enemy troop that landed adjacent to one of my unprotected cities, but I did not notice :-() that would otherwise cause a problem. With the current auto save at the beginning of my turn, I keep auto save set to every 4 turns. In addition, I do a save as every time there is a situation that could cause concern (like entering a hut, or a risky battle). I save as my first time with the number 1 (actually my first save as is #0 at the start of the game before I move any units), and then increment the number with each subsequent save as. That could result in many files saved on a save as approach, but I do not like to scroll in the little saved file window (that I should be allowed to resize - another wishlist item!), so I recycle the numbers. After I save as 9, the next save as reverts to 1 (and overwrites the older 1). That gives me 9 recent saved files at significant playing points, plus autosave files for every 4th turn back to the beginning.

Before the purists chide me for saving at important points (because restoring the game to replay those points makes the game too easy), let me add that I have a different approach to scoring the game. I prefer to never "lose" an individual player game, and I accomplish that by restoring key points to replay situations that could cause me to lose. So if I just replay every time I get into trouble, you may well ask what is the point of playing. My answer is that I score the game, not by winning or losing, but by the number of times I had to go to saved files for a replay. If I must redo a dozen times, then I have not played well. In contrast, if I can win after only needing to restore a few times, I consider that to be a job well done. :D Never losing a game (by replaying important points) is more than simply satisfying, it is also an excellent way to learn more skills and tactics, so the next game can be won with needing to restore fewer times. 8-)