- Version 1.0
- 15,195 Downloads
This is a mod which visually alters the UI button labels for Save and Exit (and Save and Quit), to highlight the risk of using this one-step method. Two options are included.
The first option disables that choice completely. The second simply renames the buttons, but continues to perform the same function as before.
Background Information
Regardless of how the save is initiated, the game writes out the city tile's game data which is in memory to the save file, along with updating neighbouring tiles. The potential problem can occur when using either of the and options (Save and Exit or Save and Quit).
Apparently Maxis never envisioned the sheer quantity of custom content many of us use today. When using either and option, the game code only allows a certain amount of time for the save to occur, before it proceeds to initiate the Exit or Quit. Should the save process not be completed when this happens, the save file will likely be corrupted.
Subsequent loading of a corrupted tile will either immediately crash to the desktop (CTD), or the whole city tile will be missing and show as a flat area in the region view.
Exceptions
Many times the one-step process is perfectly fine to use. Examples include when terraforming a region by hand, going through Mapper generated tiles to update the snapshot previews, or planting trees such as using the Flora Blast function. It's just the dangers of corruption become heightened when doing this for established cities with lots of development, and crucially featuring an abundance of custom content.
Purpose of this Mod
The idea is to discourage the one-step process for saving. My mod provides options to modify both the UI dialogs for saving, and changes the text shown on the buttons.
It does not save the game automatically, nor display any reminders to save.
By changing the appearance of the dialogs, this only intends to be a visual cue making this less desirable in normal circumstances.
Variations Included
There are 2 variations available. Pictured below are previews of each of the "Save and Exit to Region" dialogs. The same style is also done for the "Save and Quit" dialogs.
As follows:
Option A
This is designed for those who wish to ensure they never accidentally Save and Exit. It completely prevents the button from being clicked out of habit. Regular direct saves (Ctrl+S) or clicking the Save Icon still work as they always have.
Option B
This simply renames and styles the button as pictured. When clicking the top-most button highlighted in red, it still operates the standard function for saving and exiting just the same as always. It intends to be a visual clue so you're reminded of the potential risk.
Option A is the safest choice, since it's then not possible to trigger the one-step process for saving a tile. Option B is provided for those who are aware of the risks, but want a visual reminder each time when prompted at the save dialog.
Is the saving process changed?
No, not at all. Of course, there's still that potential risk for a city to become corrupted when saving with the direct one-step method. However, my mod alters nothing in the code with what the game's save routine does. In terms of functionality, it's still available when using Option B exactly how it is by default.
Option A prevents this from being triggered at all.
The recommended simple strategy is to make a habit of saving using the standard Save function. My mod merely encourages the use of such.
This can be done using the first button on the options panel at the bottom, or using the Ctrl+S keyboard combination. A confirmation dialog will appear after saving.
Upon clicking the button:
A dialog is shown like so:
Once this appears, it's safe to click OK and proceed to exit or quit as the next step. If so for the 2nd step after saving, you then select either Exit Without Saving or Quit Without Saving. (Remember you just saved it the regular way in the 1st step.)
Important Note
It's worth mentioning how in any situation, switching focus from the game while saving is a very bad idea.
This is also known to result in city tile corruptions even if using the regular save and not exiting the tile.
So just remember to keep SC4 in view and not changing to another program (even if using Windowed mode). In other words, simply clicking another window removes focus from the game and has the potential to corrupt the save. Always wait for the save to complete before doing anything else.
Additionally, making regular full backups of your Regions folder is always a very wise idea. That way should you wish to restore a city in the event of issues occurring, or simply wanting to rollback to a previous instance for other reasons, it's a simple case of copying back individual named region subfolder (or the tiles inside).
See this topic for an overview of the basic process.
Installation
This mod uses the standard process of installing SC4 content.
There are no dependencies.
Only ONE Option can be used at once. First choose either of the 2 available zip files when clicking the Download button.
Contained within each zip archive are the following:
Option A
SaveWarning_Disable_Exit_Quit.dat
Option B
SaveWarning_Message_Button.dat
Copy either of the above .dat files into your Plugins folder.
Hopefully this might prove useful.
Special Mention
A big thank you to @CorinaMarie for helping and supporting me with ideas for this project.
Cori has given valuable input on ways it should best be implemented, and also for encouraging me to finally get the mod dusted down, polished up, and released.