Forum rules - please read before posting.

Lucasarts/ScummVM/Sierra-style save slots per game?

I think I've mentioned attempting this before in an old deleted post, but I'd like to have another attempt at getting a save menu working ala Lucasarts, ScummVM and Sierra's GUI, whereby you have:
  • a separate slot for a relatively retro-style amount of  (Lucasarts had about 100, Sierra had about 20) for each save game
  • clicking a slot would change the slot name into an input box to change the slots name
  • pressing enter or clicking a save button would save the slot name as the input text you'd written
  • (optionally) Sierra games would move the most recently saved slot to the top, however lucasarts didn't
I've tried getting this working with separate save items for each slot, and with scripting, neither of which I was technically proficient enough to be successful with. Currently, the AC save menu has:
  • capacity for a smaller, more modern amount of save slots (five to ten)
  • clicking on any slot will provide you with a separate input box to type the name into
  • Upon pressing save or enter will close that input box and pass the name onto the save slot name and save the game
The current setup is great for modern games, but I'm looking to recreate classic/retro games with the lavish amount of save game slots and their era-appropriate method of inputting and storing the name/game save.

Would it be possible to consider a tutorial or template download to use for this type of save/load menu? I believe AGS used a 90's-style menu system as well, so it would be cool to have the option to easily use this type of save/load menu, if possible!
«1

Comments

  • I'll consider it.  Your links don't seem to be working, however.
  • edited October 2018
    I'd really appreciate that, Chris! Can you try them again, if you don't mind? Just tested and they still show okay for me?
  • Yes, I see them now - not sure why I couldn't before.

    See the updated Downloads page for a new template.
  • Awesome! In the readme, should save name be save label?

    1. Either assign your Menu Manager’s Asset file to SaveGameRetro_VariablesManager, or create two new Global Variables in your own: an Integer named Save ID and a String named Save label
    2. If creating your own Variables, find the included ActionList RetroSaves_Save_OnClick, and have the Variable: Set Action refer to the Save label variable, and the Save: Save or load Action refer to the Save ID variable. Then find RetroSaves_SavesList_OnClick, and have the two Variable: Set Actions refer to Save ID and Save name respectively, and have the Menu: Set Input box text Action refer to Save name
  • Quite right.
  • It's looking incredible, thanks so much for making this template, Chris! If I wish to split this up so I'm using a separate save and load menu, is this as simple as duplicating the prefab and canvases (should this be done by dragging from hierarchy back into project rather than duplicating the .prefab file?) then removing the save button from load UI and removing the load button from the save UI? Is it also possible to make the text non editable on the load UI?

    Finally, is it possible to pre-populate each empty slot with a _ or some such on the save UI, to show the possible available save slots?
  • The load UI doesn't need to be as complex, since you've no need for an Input box when clicking a slot.

    Duplicate the prefab, remove the Input box, and change the SavesList's List type to Load.  You'll have to also make a new ActionList that runs when clicking a slot (similar to SavesList_OnClick but without reference to the Input box) - or just check Load when click on?.

    In the original RetroSaves_SavesList_OnClick actionList, also remove the Menu: Change state Action that shows the Load element.

    An "empty" slot will be made invisible, but if you remove all transparency from your Menu's graphics you could try having a list of "_" labels underneath each slot that only become visible once a slot is disabled.
  • It's looking awesome thanks to this amazing template! I made a quick adjustment in Save_On_Click of hiding the inputbox once save has been clicked:

    There's a couple things I can't quite work out:
    1. Can menu button text be changed via actionlists? I don't think so, but I wanted the three buttons to be Load, Save and Close, and whilst the inputbox to type the save name in I want the text to change to cancel, and if cancel is clicked, it can return to Close.
    2. It's currently configured so first click selects the slot and show the inputbox and a second click edits the input box, which is a sensible way of doing it when sharing save and load, but is it possible to select the inputbox for editing on first click (with the blinking line to show it's editable)? I'm assuming this might be with a script.
    3. Can pressing the 'enter' key function the same as clicking the save button? So when you finish typing and press 'return/enter' key, it saves the slot the same as clicking save. I also think this might be require scripting.

    Again, this template is a lifesaver, thanks again so much for making it!

  • Can menu button text be changed via actionlists? I don't think so, but I wanted the three buttons to be Load, Save and Close, and whilst the inputbox to type the save name in I want the text to change to cancel, and if cancel is clicked, it can return to Close.

    You can use Variable tokens to set the names of your Buttons. Create a new Globl String variable named e.g. "LoadButton" and set its value to "Load". Note the Replacement token value, and set that as the Button menu element's Label text. You can then control its display using the Variable: Set Action. Alternatively, you could use a PopUp variable.

    It's currently configured so first click selects the slot and show the inputbox and a second click edits the input box, which is a sensible way of doing it when sharing save and load, but is it possible to select the inputbox for editing on first click (with the blinking line to show it's editable)?

    You can call the PlayerMenus script's SelectUIElement method, which accepts a Unity UI GameObject, i.e.:

    AC.KickStarter.playerMenus.SelectUIElement (myInputBoxGameObject);

    Can pressing the 'enter' key function the same as clicking the save button? So when you finish typing and press 'return/enter' key, it saves the slot the same as clicking save.

    If the Menu's Source is Adventure Creator, and Input element allows you to define which Button element to run when the user presses Enter/Return. Otherwise, if using Unity UI, you can configure your Input Field component's On End Edit to run the same ActionList asset that the Save button runs.

  • Thanks! Again, this is perfect, I really love the latest save going to the top ala Sierra, so convenient! This is probably pushing it (as I tend to!) but can I fairly easily add save game screenshots to this as a little image that displays and changed depending on the selected slot? It would be probably be worth waiting until a Unity UI version of screenshot saves is made (if you plan on doing) for this, but I'd be interested in how difficult it would be to add such a feature to a menu like this?

  • The "Save game screenshots" template has been updated with Unity UI.

  • Thanks, that's awesome! So the image is just a button that's hooked up to a screenshot element, would this require scripting to communicate that the selected save slot in the menu should change the screenshot button to display the currently selected slot's screenshot (and display blank if selecting a new slot to make a fresh save)?

  • You can call the PlayerMenus script's SelectUIElement method, which accepts a Unity UI GameObject, i.e.:

    AC.KickStarter.playerMenus.SelectUIElement (myInputBoxGameObject);

    How should this be used? I'm not sure if I should add this to RepositionSaveInputBox or add a new script somewhere, I'm also not entirely certain what I'm calling in (myInputBoxGameObject), would this be a public gameobject? I tried using an element as a string instead but it failed.

    if using Unity UI, you can configure your Input Field component's On End Edit to run the same ActionList asset that the Save button runs.

    This worked really well until I clicked away from the box on a blank area of the screen to de-focus the input box, and it saves because it's still running an "on end edit". Should I use an active input to run the save script in some way, or should this be scripted as a key press if the input element is active?

  • would this require scripting to communicate that the selected save slot in the menu should change the screenshot button to display the currently selected slot's screenshot

    It's automatic - at least so far as the needs of the template go.

    How should this be used? I'm not sure if I should add this to RepositionSaveInputBox or add a new script somewhere, I'm also not entirely certain what I'm calling in (myInputBoxGameObject), would this be a public gameobject? I tried using an element as a string instead but it failed.

    It's the GameObject that contains the InputField component - nothing to do with AC or elements, it's all Unity UI.

    This worked really well until I clicked away from the box on a blank area of the screen to de-focus the input box, and it saves because it's still running an "on end edit". Should I use an active input to run the save script in some way, or should this be scripted as a key press if the input element is active?

    Good point about the de-focusing, I didn't realise it triggered then as well. An Active Input could do it, because you can use a Menu: Check state Action to determine the visibility of the Input element, or state of a variable you change when editing occurs.

  • edited January 2019

    Active inputs are really cool! I did it this way (it seemed easiest!), I'll post it in case it's of any use to anyone else. Unfortunately, loading a slot seems to reenable the active input even if turned off before the load action, so I just force it off when the save menu is loaded. Would you recommend using an alternative (and potentially less confusing!) method with menu: check state? I'm not quite sure how to hook that into the active input.

    It's the GameObject that contains the InputField component - nothing to do with AC or elements, it's all Unity UI.

    Thanks! I did it by making a public for myInputBoxGameObject, dragging it in, and it nicely selects it now! I'm not sure if there's the option of putting the blinking cursor at the end of the input edit box instead of selecting the entire input box so that typing replaces all the words? Pressing End obviously works, but for user readability, it would be cool if there's a way of making it select the last character when the slot is clicked?

    It's automatic - at least so far as the needs of the template go.

    So I'll try adding a single screenshot button object set up the same as the screenshot template. I'm not sure how it'll change the screenshot button to the selected save on click by itself (since the template have six predefined screenshot image buttons for each save slot), but I'll give it a go!

    The Submit input is causing issues with the save as you mentioned earlier, so I've removed that and for space I'll delegate it entirely to an ActiveInput.

    Phew, sorry about that!

  • loading a slot seems to reenable the active input even if turned off before the load action

    The state of all active inputs are recorded in save games, so I'd expect that to be the case. Since the input is only necessary while the inputbox is visible, however, you can try keeping it active and just use Menu: Check state to check the InputBox element's visibility.

    it would be cool if there's a way of making it select the last character when the slot is clicked?

    Since you're relying on Unity UI, the feasibility of such behaviour is on Unity and not AC-related. You should try searching the Unity forums for more on this.

  • So to use check menu state seems like a more sensible option, how would this action be triggered? Is this assuming active input is always on, and upon being trigger actionlist, check if menu is on and if it isn't, block the input?

    For the blinking input, It appears to be 'InputField.MoveTextEnd()' is what I need, so I'll try and hook that into AC.KickStarter.playerMenus.SelectUIElement
  • edited January 2019

    Just wanted to mention, I tried using a menu check for the active input instead of all the turning on/off methods (if input element visible, run the save_click action) and it gets stuck for some reason? It doesn't complete the action, it's like it's paused and it just does the first part of it. I can use the other method that works, but I'm curious what's actually causing this:


    Here's a video of it getting stuck and not finishing: https://gfycat.com/WhoppingAstonishingIndianspinyloach

  • edited January 2019

    Okay, this seems to work! _Credit to Unity discord:
    *Add this script: http://pasteall.org/1445951
    *Replace the inputbox with this: http://pasteall.org/1445950
    *Reconnect the text and placeholder components:

    That seems to add the cavat to the end of the text rather than selecting it, and hopefully no issues should arise from it!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.