Closed ArdiGame closed 4 years ago
Oddly sometimes I see details in the second section but mostly I see only load or Delete
Are you talking about the user being able to do that or the developer?
Either way, you can do that by creating a Config.saves.onSave
function and set the "title" property on the "save" object, which will set the title of the save. For a simple example, you could put this in your JavaScript section:
Config.saves.onSave = function (save) {
save.title = prompt("Enter Save Slot Title:", save.title);
};
and that would prompt the user to give the save slot a custom title.
Hope that helps! :smiley:
@HiEv Sorry, should have clarified that. I'd want it to be an end-user function, though being able to set that as a developer is nice too, but it feels like that would be too complicated to be worth it.
Much appreciated for the function idea. I'll definitely utilize that in my current project. 😃
While it's possible to create a function to do this in individual projects, I personally think it would do well as a default feature, or at least something toggleable like a dedicated config api option.
@rambdev - Perhaps you didn't notice my edit, but the code there now will let the end-user set the title of the save slot.
Try it out. :smiley:
@HiEv Ah, I didn't see that. The original code was allowing end-user usage as well as far as I can tell, but I'll give that a try too. Thanks!
Closed in favor of the v3 issue: https://github.com/tmedwards/sugarcube-3-prealpha/issues/1
NOTE: The v3 repository is not yet public, so the above link probably will not work for you until it is.
I would love to see a way to add a custom name or small note to the slot upon save, similar to Sierra's "Quest" games.