Repository navigation
Autosaves at game start and player turn start - #1067
Conversation
|
I see dead code, file system logic that shouldn't be in the UI, triple nested try-catch structures, both functions that do multiple things and multiple functions for doing the same thing, as well as this curious new logic for treating a relative file path argument as an absolute one. The
I think
A more effective approach to building out functionality like this would start from the smallest useful addition, enabled with a flag in the ini file. When adding things, the focus should be on refactoring and generalising existing functionality as much as possible. User-customisable parameterisation via UI and support for variations is something one adds much later on. |
|
Ngl, this is very hard to read and understand with all the try/catch blocks. And what's up with this?! How my experience was while testing it:
The autosave also does not happen at the beginning of the turn as it suggests, but after a player has possibly done a few things first. like choose tech, government, cancelled deals, etc.. |
This PR changes the default Saves folder to C7/Saves instead of Conquests/Saves as it is now. I can adjust this to prioritize Conquests/Saves if civ3InstallDir is set in the ini, and then default back to C7/Saves if it isnt set.
That is on purpose. If you load a save from a few turns ago and then play a few turns, the autosave files will be from the new branch of play than the old one.
This is how it works in the original. The save happens right before you first get control of your units. |
let me know what you think. |
|
This is looking better now. That said, I'd like to see this one split in two parts: a separate PR for the non-autosave stuff, and this one for the autosave proper. If we get the former in first, this one will be much more manageable. |
62e5e5d to
72ffe85
Compare
#1112 has only the save/load enhancements. This one has both but after 1112 merges and the merge back, this will only show the auto save functionality. |
|
If you go into your Assets folder, I wonder if auto save files should have something in the filename to signal they are not manual saves. I believe the original game does this. What do you think? |
|
Will do. Didn't mean to pick up that change. The original games doesn't change the file name for auto saves. It just puts them in the Auto subfolder which is what i did here. It also always keeps the 4000bc save to enable the "Play Last World" button from civ3 (button not included in this Pr) |
|
The scenarios produce files like: But we can omit the extra name for now. The save name generating machinery you assembled works well with this autosave and auto-cleanup stuff. |
|
I think this may differ between civ3 versions. I'm playing the complete edition from gog on Mac via porting Kit and even with the conquest scenario it gives the name as "leader of the tribe year" |
|
Thanks. what you have is definitely better. I was struggling getting the text to be the correct size with the input text box. |

Summary
Autosave portion of the original save/load PR, split out per review feedback. This branch stacks on #1112, which contains the save-name, save-path, and load-default changes. Until #1112 merges, this PR includes that commit as well.
Saves/Auto/at game start and at the start of each player turn, before tech/government/deal prompts.0disables extras).[LastGame] LastWorldSavestores the full path to the Turn 000 autosave.-Turn NNN-filename. Same-turn overwrite is intentional.Verification
Once #1112 merges, I'll rebase this branch so the diff is autosave-only.