Comments

Log in with itch.io to leave a comment.

Hi, I've tried to implement this code with no luck. I've copy and paste direct from the code file included and touched it up to get past the runback screen. It does not show up in my game, no matter which way I do it.

did you put it in the correct places in your screens.rpy file (look thought the screens.rpy from the downloaded project file to see where it should be placed)

Deleted 5 days ago

I got it to work finally! Instead of copying, pasting, and deleting what you did, I just copied your entire screens section.  Not sure what was going wrong, but thank you!

Thanks for sharing this, I have been looking for this solution for a long time. I would like to ask, how can I move the setting to the saves page? Like this https://drive.google.com/file/d/1ADp_GUiND8v0CHke0XNEpFpqIL_fiI4O/view?usp=shari...

in your screens.rpy search for -->  screen file_slots  <--

make the changes as shown in the image below for something similar (close, but not really) to the image you provided (what game is that from ?)

its from "Eternum"

I'll take a look at their code...

Thanks! let me know if you find something :)

only minor changes (and they changed the image for their check box gui/button/check_foreground.png and check box gui/button/check_selected_foreground.png)

formatting may not be correct for the code below (follow formatting from image above)

            ## BadMustard's code Start (third section)
            vbox:
                style_prefix "check"
                if persistent.saveName:
                    textbutton _("Save naming enabled") action [ToggleVariable("persistent.saveName"), SetVariable("store.save_name", "")]

                else:
                    textbutton _("Save naming disabled") action [ToggleVariable("persistent.saveName"), SetVariable("store.save_name", "Un-Named")] #sets a default name, change as required
                align (0.9, -0.15) #adjust this as required for positioning
                xsize 435
            ## BadMustard's code Stop

You're a life saver <3

๐Ÿ‘๐Ÿป

Works like a charm!
Though if implementing it in your game I would add a quick pixel_width() to to the input. Just to avoid saves called "WWWWWWWWWWWW" breaking the UI.

in the   screen savegameName(accept=NullAction()):

this line 

        input size 40 color gui.hover_color default store.save_name changed Namer length 22 allow allowedChars:

limits the input length to 22 characters (adjust as required for your use)

(2 edits)

Thanks for the great code!

I have put this code in Japanese for other developers. ( https://renpymemo.hateblo.jp/entry/2024/01/20/005654 ) I have put the code together with the changes I made for myself, is that OK? If there are any problems, I will remove it. Also, please let me know if there is a licence for this code.

And I report that I could not press Save the Game in the demo. However, the code I incorporated into my own game worked fine, so this may be due to my environment.

(+1)

you're welcome

please leave it up that is acceptable, thank you.  ๅ…‰ๆ „ใงใ™

good luck with your project

Thanks for the replies! I hope your project goes well too. ใ‚ใ‚ŠใŒใจใ†๐Ÿ’

hey! i'm having a few troubles trying to implement this in my game, would you mind trouble-shooting? ren'py seems to really hate the headers (aka underscores that you use--they keep giving me "expected statement errors"--and when i remove them, more errors crop up).

then, it makes me de-indent your first section of code:

action If(renpy.get_screen("save"), true=Show("savegameName", accept=FileSave(slot)), false=FileLoad(slot))

then, when i do this, it says  "'action' is not a keyword argument or valid child of the screen statement."

i'm very confused. i would be grateful for any help!

do you have discord or use reddit? 
contact me on my discord
https://discord.gg/UE9aPVrdNy

or at the renpy reddit

https://www.reddit.com/r/RenPy/

thanks! just joined your server and sent you a friend request on discord under the name flip city :)

Thank you so much for this code! You really helped me out trying to implement this exact feature!

you're welcome

good luck with your project

(+1)

Cool... Another great piece of code for free! This looks awesome!

Thanks BM!

(+1)

welcome

Please make it an optional feature on the settings, I play it on Android, and it is annoying to have the keyboard put up on the screen every time I save 

that option would be up to the developer to implement in their game

By chance, would you know how to make it optional?

you could make an option in the preferences and boolean to name or not to mame.

or the user can just press enter

I have been trying to get this to work for a while! thank you!

(+1)

it is something I have been working on for a while too, I finally got it to work and hoped others could use it too.

Yeah I've been kind of stuck on it so thank you for posting this! I'm probably going to change it a bit to suit how I want it to work but dang this is so incredibly helpful!

Change what ever you need to!

are you able to give more detail on how the saving works? I'm trying to create a separate button that allows users to name a save and while I can call the save name screen, the value isn't saved when I hit "save the game"

it relies on the stock save function when you select a slot (the selected slot being very important)

can  you show your code for what you are doing?