Preference Variables link

Preference variables store the values of Ren'Py preferences. While the value of a preference should be set at runtime using the Preference() action, preference variables should be used in conjuction with the default statement to set the default value of a preference.

For example:

default preferences.text_cps = 142

sets the default text speed to 40 characters per second. The default statement only sets the value of the preference if the default has changed since the preference was set. For example, if the player changes the speed to 50, it will remain at 50 over future runs of the game. If, in an upgrade, the default is set to 42, the player's setting will be changed to 42. (The player can then change it again.)

preferences.afm_after_click = False link

If True, auto-forward move will be continue after a click. If False, a click will end auto-forward mode. The equivalent of the "auto-forward after click" preference.

preferences.afm_time = 15 link

The amount of time to wait for auto-forward mode. Bigger numbers are slower, though the conversion to wall time is complicated, as the speed takes into account line length. The equivalent of the "auto-forward" preference.

preferences.desktop_rollback_side = "disable" link

When on a desktop platform, touches or clicks to this side of the window cause rollback to occur. One of "left", "right", or "disable". This is the equivalend of the "rollback side" preference when on a desktop platform.

preferences.desktop_rollback_side = "mobile" link

When on a desktop platform, touches or clicks to this side of the window cause rollback to occur. One of "left", "right", or "disable". This is the equivalend of the "rollback side" preference when on a desktop platform.

preferences.emphasize_audio = False link

If True, Ren'Py will emphasize the audio channels found in config.emphasize_audio_channels by reducing the volume of other channels. (For example, reducing the music volume when voice is playing.) If False, this doesn't happen.

preferences.fullscreen = False link

This is True when Ren'Py is in fullscreen mode, and False when it is running in a window. The equivalent of the "display" preference.

preferences.mouse_move = False link

If True, the mouse will automatically move to a selected button. If False, it will not. The equivalent of the "automatic mouse move" preference.

preferences.show_empty_window = True link

If True, the window show and window auto statements will function. If False, those statements are disabled. The equivalent of the "show empty window" preference.

preferences.skip_after_choices = False link

If True, skipping will resume after a choice. If False, a choice will prevent Ren'Py from skipping. The equivalent of the "after choices" preference.

preferences.skip_unseen = False link

When True, Ren'Py will only skip unseen text. When False, Ren'Py will skip all text. The equivalent of the "skip" preference.

preferences.text_cps = 0 link

The speed of text display. 0 is infinite, otherwise this is the number of characters per second to show. The equivalent of the "text speed" preference.

preferences.transitions = 2 link

Determines which transitions should be shown. 2 shows all transitions, 0 shows no transitions. (1 is reserved.) The equivalent of the "transitions" preference.

preferences.video_image_fallback = False link

If True, images are displayed instead of videosprites. If False, video sprites are displayed normally. The equivalent (inverted) of the "video sprites" preference.

preferences.voice_sustain = False link

If True, voice keeps playing until finished, or another voice line replaces it. If False, the voice line ends when the line of dialogue advances. The equivalent of the "voice sustain" preference.

preferences.wait_voice = True link

If True, auto-forward mode will wait for voice files and self-voicing to finish before advancing. If False, it will not. The equivalent of the "wait for voice" preference.

Audio Channel Defaults link

These config variables set the default volumes on various audio mixers.

define config.default_music_volume = 1.0 link

The default volume of the music mixer, which is used for the music and movie audio channels. This should be a number between 0.0 and 1.0, with 1.0 being full volume.

define config.default_sfx_volume = 1.0 link

The default volume of the sfx mixer, which is used for the sound audio channel. This should be a number between 0.0 and 1.0, with 1.0 being full volume.

define config.default_voice_volume = 1.0 link

The default volume of the voice mixer, which is used for the voice audio channel (And hence the voice statement, auto-voice, etc.). This should be a number between 0.0 and 1.0, with 1.0 being full volume.