At the end of a scenario it will be good to have a option to save the replay under a different name in order to not override the previous replay. Also the default proposed name of the replay can contain the difficulty on which the scenario is completed and in the case that the difficulty is the same to contain some number which to make it unique. For example: AOI-Showdown replay (High Lord) (2) can indicate that this is a replay of the second completion of the Showdown scenario of the An Orcish Incursion campaign on the High Lord difficulty.
At the end of a scenario it will be good to have a option to save the replay under a different name in order to not override the previous replay
If a previous replay exists, you're prompted whether to overwrite it, and if you say not to overwrite, you're prompted to enter an alternate filename to save the replay under. Can you clarify what you're proposing to add?
Simply adding a number could be confusing, for example, TSG-A Choice in the Fog (Soldier) (2) might correspond to TSG-Pebbles in the Flood (Soldier) (1) because the campaign has forking paths.
If a previous replay exists, you're prompted whether to overwrite it, and if you say not to overwrite, you're prompted to enter an alternate filename to save the replay under.
I didn't know this. :) Because the prompt to enter an alternative filename is after the override option I didn't expect its existence. Maybe if the dialog with the filename is the first one, populated with some default filename, it will be more obvious. Then after pressing, Save if the entered filename already exists, the confirmation dialog for override can show. In the case the user chooses No, then it can be returned to the previous dialog. Which also can have an option for not saving a replay at all.
Simply adding a number could be confusing, for example, TSG-A Choice in the Fog (Soldier) (2) might correspond to TSG-Pebbles in the Flood (Soldier) (1) because the campaign has forking paths.
About the forked paths, obviously the filename can also contain some indicator which path was chosen.
I didn't know this. :) Because the prompt to enter an alternative filename is after the override option I didn't expect its existence. Maybe if the dialog with the filename is the first one, populated with some default filename, it will be more obvious. Then after pressing,
Saveif the entered filename already exists, the confirmation dialog for override can show. In the case the user choosesNo, then it can be returned to the previous dialog. Which also can have an option for not saving a replay at all.
Sounds good. We could even check whether the prepopulated default filename exists when we first show the dialog. Maybe even only show the textbox for entering an alternative name if the default filename already exists (not sure about this).
About the forked paths, obviously the filename can also contain some indicator which path was chosen.
I was thinking of some "playthrough id", maybe an integer that's incremented every time you start the campaign (we could save it as a WML persistent variable), but yeah, there are many options here.
I was thinking of some "playthrough id", maybe an integer that's incremented every time you start the campaign
I don't think that this is a good idea, because when I played the campaigns, I didn't start the campaign from the beginning when I wanted to replay it through different path, but I loaded the last save before the fork. Maybe other players also do the same in their playthroughs.
Campaign progression is a tree, any save can spawn any number of independent branches.
A way to deal with this would be to give each save an id, possibly a hash of the (decompressed) savefile, and then keeping track of all previous save ids. (just the last one is insufficient, as saves can be deleted, and might be autosaves)
Then based on that, you could reconstruct the playthrough tree, and add logic or UIs on top of that.
However, I think the original idea of (N) meaning the Nth completion of this scenario (not the campaign or playthrough) is probably sufficient for this issue.
I'd prefer a user-settable string, so for instance during Choice In The Fog the player could set it to "bandits" or "elves", and subsequent saves would automatically be "TSG-bandits-Choice In The Fog-replay.gz", "TSG-bandits-Long_March.gz", "TSG-elves-Choice In The Fog-replay.gz" etc.
Putting the string in to all of the filenames can be done by changing saved_game::update_label(), which will automatically change the filename for autosaves too. I haven't yet looked at the UI for setting the string, but it works when hardcoding in the change at build-time.
Wouldn't a dev-settable setting make more sense here? Basically meaning the maintainer of TSG could add some code to Choice In The Fog that results in "bandits" or "elves" being inserted into the saved game name.
What would you do in HttT S4 _The Bay of Pearls_, where the next scenario depends on which enemy you defeat? If you don't defeat both enemies, there's no dialog forcing a choice, the WML just sets the next scenario according to the state of the gameboard, so the player might not even be aware that there _was_ a fork.
Also, how about prompting the user to enter a name for the playthrough before S1, at the point where SP mod settings are shown? This could be empty by default, but a user could write, say, shamans only there, and then that string would be shown by the Game Load dialog, or added into the filenames, or something.
If I understand the code correctly, the true in the statement below would be replaced by this advanced configuration option check and then if false would provide the renamed file name.