[edit: sorry, it was for the Technical category]
In my game I changed some behavior of the Save / Load AC menus.
Instead of making the Save / Load menu appear on the main screen I created a black background where the player can switch from one menu to another.
But this way I can not have a screenshot when I save because it would only be a black background.
I therefore thought to do this in the following way:
In the Save Menu I unchecked Save when click on and I created an ActionList that returns to the game screen before saving the game.
In the EventManager.OnMenuElementClick script I intercept the Save click in this way:
if (_menu.title == "Save") {
// todo: (next line) will change according to the language set?
if (_element.GetLabel (_slot, 0) != "Salva nuovo livello") {
GlobalVariables.SetIntegerValue (3, _slot, true);
string scene = LocalVariables.GetStringValue (12, 0);
int useLang = Options.GetLanguage();
string useCulture;
switch (useLang) {
case 0:
useCulture = "it-IT";
break;
case 1:
useCulture = "en-US";
break;
case 2:
useCulture = "fr-FR";
break;
default:
useCulture = "en-US";
break;
}
string timeSave = DateTime.Now.ToString (CultureInfo.CreateSpecificCulture(useCulture));
string labelSave = scene + ": " + timeSave;
GlobalVariables.SetStringValue (4, labelSave, true);
}
return;
}
With this code I create a custom save string as:
(Italian) Appartamento di Jack: 20/11/2017 13.22.51
or
(english) Jack's Apartment: 11/20/2017 1:22:51 PM
which I save in a global variable and that I read at the time of saving the game.
But this code works only when I overwrite an already stored file because in the ActionList Save -> Save or Load -> Overwrite Existing Save I can use a custom label as String Variable.
However, I can not define the same custom label in Save New Game.
How could I do? Maybe by modifying the AC code?
Comments
I'll fix it in the upcoming release, but you can show it by:
1) Change the Method to Overwrite Existing Save
2) Set the Save to override to Set Slot Index
3) Change the Method back to Save New Game