Ren'Py Default Ren'Py buttons

Zoranian

Member
Jun 26, 2017
285
300
Hey, so not a Dev here but I searched several times and all I end up finding is programming tutorials on how to customize buttons, what I do want to know is what are the default buttons for Ren'Py, more specifically autoforward since some devs choose to hide it for some reason, so if anyone knows, do tell please.
 
  • Like
Reactions: redditgold

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
1,519
2,807
Not sure I understand your question. If you want to see a bare-bones default Ren'py game, just download the and open the tutorial or create your own project. It's easy and free.

As for Autoforward, it's not a 'button' per se, but it's an option that appears on the quick menu at the bottom of the screen, if you have that enabled. I honestly never used it myself but it's still on my quick menu for both my VN's.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,788
5,196
Hey, so not a Dev here but I searched several times and all I end up finding is programming tutorials on how to customize buttons, what I do want to know is what are the default buttons for Ren'Py, more specifically autoforward since some devs choose to hide it for some reason, so if anyone knows, do tell please.
Default Renpy keybinds are in the framework file `renpy/common/00keymap.rpy`.

There is a page in the documentation that discusses these defaults and how developers can override them:

Regards your specific question: there is no "key" set to toggle the Autoforward behaviour.

(In a default renpy game) If you look at the `game/screens.rpy` file, you will find the definition of "screen quick_menu():" In here it has the "Auto" text button definition which uses the action "Preference" to toggle the "auto-forward" setting. If the game you are playing has removed the "auto" button from the quick menu, you could restore it by the following:
(note: I am assuming you are playing on PC, or at least the game emulator(?) you are using shows the normal menu variants, not the Mobile ones)

1. Find the existing "screen quick_menu" entry in the `game/screens.rpy`file, it's possible the developer did not DELETE the Auto line from their screen definition, maybe you can just un-comment it. OTHERWISE:
2. create a file `zzz_myscreens.rpy`in any location under the `game` folder, and copy the contents of the whole "screen quick_menu" block to your new file.
3. edit the screen definition in your new file to re-add the Auto button alongside the other buttons
Code:
textbutton _("Auto") action Preference("auto-forward", "toggle")
Be careful to maintain the correct indentation of your added line, python/renpy has "whitespace is meaningful" code semantics.


If you *really* want a specific key you can use to turn autoforward on and off, you could also edit the "screen quick_menu" to add a key-trigger for the auto-forward, like this (last line):
Code:
screen quick_menu():
    ## Ensure this appears on top of other screens.
    zorder 100
    if quick_menu:
        hbox:
            style_prefix "quick"
            xalign 0.5
            yalign 1.0
            textbutton _("Back") action Rollback()
            textbutton _("History") action ShowMenu('history')
            textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Prefs") action ShowMenu('preferences')

            key "f" action Preference("auto-forward", "toggle")
EDIT: reading the docs some more, I found that you can also add a key trigger to any existing button (text or image) in a screen definition with the "keysym" parameter, like this (you do need to use a pygame-compatible "keysym string" rather than the simple letter as works for the "key" directive):
Code:
            textbutton _("Auto") action Preference("auto-forward", "toggle") keysym "K_f"
 
Last edited:

Zoranian

Member
Jun 26, 2017
285
300
Default Renpy keybinds are in the framework file `renpy/common/00keymap.rpy`.

There is a page in the documentation that discusses these defaults and how developers can override them:

Regards your specific question: there is no "key" set to toggle the Autoforward behaviour.

(In a default renpy game) If you look at the `game/screens.rpy` file, you will find the definition of "screen quick_menu():" In here it has the "Auto" text button definition which uses the action "Preference" to toggle the "auto-forward" setting. If the game you are playing has removed the "auto" button from the quick menu, you could restore it by the following:
(note: I am assuming you are playing on PC, or at least the game emulator(?) you are using shows the normal menu variants, not the Mobile ones)

1. Find the existing "screen quick_menu" entry in the `game/screens.rpy`file, it's possible the developer did not DELETE the Auto line from their screen definition, maybe you can just un-comment it. OTHERWISE:
2. create a file `zzz_myscreens.rpy`in any location under the `game` folder, and copy the contents of the whole "screen quick_menu" block to your new file.
3. edit the screen definition in your new file to re-add the Auto button alongside the other buttons
Code:
textbutton _("Auto") action Preference("auto-forward", "toggle")
Be careful to maintain the correct indentation of your added line, python/renpy has "whitespace is meaningful" code semantics.


If you *really* want a specific key you can use to turn autoforward on and off, you could also edit the "screen quick_menu" to add a key-trigger for the auto-forward, like this (last line):
Code:
screen quick_menu():
    ## Ensure this appears on top of other screens.
    zorder 100
    if quick_menu:
        hbox:
            style_prefix "quick"
            xalign 0.5
            yalign 1.0
            textbutton _("Back") action Rollback()
            textbutton _("History") action ShowMenu('history')
            textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Prefs") action ShowMenu('preferences')

            key "f" action Preference("auto-forward", "toggle")
EDIT: reading the docs some more, I found that you can also add a key trigger to any existing button (text or image) in a screen definition with the "keysym" parameter, like this (you do need to use a pygame-compatible "keysym string" rather than the simple letter as works for the "key" directive):
Code:
            textbutton _("Auto") action Preference("auto-forward", "toggle") keysym "K_f"
First of all, huge thanks for the detailed response, I did go to the " screen quick_menu " area in the file and found a line that says:
## This code ensures that the quick_menu screen is displayed in-game, whenever
## the player has not explicitly hidden the interface.


Turns out, I'm a moron and somehow missed a very obvious line in the settings of the game that enables the quick menu, somehow I managed to miss that.

Hopefully someone will find this post in the future and it'll help them, again big thanks for the detailed response.
 
  • Heart
Reactions: osanaiko

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,627
2,286
[...] what are the default buttons for Ren'Py,

The full list of default keys are included listed here:


The shift, alt, alt/shift should be easy to recognize.
Where the key name includes something like K_c - that means the lower case "c" key. K_r would be "r", etc.

more specifically autoforward since some devs choose to hide it for some reason, so if anyone knows, do tell please.

Sadly, there isn't a default keybinding for auto-forward. RenPy calls it "afm" and you'll see bindings like toggle_afm in the default keybind list. Its default binding is empty.

However, if you check out my ancient post - it includes a file you can copy into 99% of games and it will add "alt + pgup" as the keybind for afm:
https://f95zone.to/threads/solved-how-to-auto-forward-text-in-renpy.19533/#post-2898440