renpy/doc/config.html

2459 lines
157 KiB
HTML
Raw Normal View History

2023-01-18 22:13:55 +00:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Configuration Variables &#8212; Ren&#39;Py Documentation</title>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Preference Variables" href="preferences.html" />
<link rel="prev" title="Screen Language Optimization" href="screen_optimization.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
Ren&#39;Py Documentation</a>
<span class="navbar-text navbar-version pull-left"><b>7.5.3</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li><a href="https://www.renpy.org">Home Page</a></li>
<li><a href="https://www.renpy.org/doc/html/">Online Documentation</a></li>
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="gui.html">GUI Customization Guide</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="language_basics.html">Language Basics</a></li>
<li class="toctree-l1"><a class="reference internal" href="label.html">Labels &amp; Control Flow</a></li>
<li class="toctree-l1"><a class="reference internal" href="dialogue.html">Dialogue and Narration</a></li>
<li class="toctree-l1"><a class="reference internal" href="displaying_images.html">Displaying Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="menus.html">In-Game Menus</a></li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="conditional.html">Conditional Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="audio.html">Audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="movie.html">Movie</a></li>
<li class="toctree-l1"><a class="reference internal" href="voice.html">Voice</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="text.html">Text</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l1"><a class="reference internal" href="displayables.html">Displayables</a></li>
<li class="toctree-l1"><a class="reference internal" href="transforms.html">Transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="transitions.html">Transitions</a></li>
<li class="toctree-l1"><a class="reference internal" href="atl.html">Animation and Transformation Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrixcolor.html">Matrixcolor</a></li>
<li class="toctree-l1"><a class="reference internal" href="layeredimage.html">Layered Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="3dstage.html">3D Stage</a></li>
<li class="toctree-l1"><a class="reference internal" href="live2d.html">Live2D Cubism</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="style.html">Styles</a></li>
<li class="toctree-l1"><a class="reference internal" href="style_properties.html">Style Properties</a></li>
<li class="toctree-l1"><a class="reference internal" href="screens.html">Screens and Screen Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_actions.html">Screen Actions, Values, and Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_special.html">Special Screen Names</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_optimization.html">Screen Language Optimization</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="preferences.html">Preference Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="store_variables.html">Store Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="mouse.html">Custom Mouse Cursors</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="launcher.html">Launcher</a></li>
<li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="director.html">Interactive Director</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="nvl_mode.html">NVL-Mode Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="input.html">Text Input</a></li>
<li class="toctree-l1"><a class="reference internal" href="side_image.html">Side Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="rooms.html">Image Gallery, Music Room, and Replay Actions</a></li>
<li class="toctree-l1"><a class="reference internal" href="drag_drop.html">Drag and Drop</a></li>
<li class="toctree-l1"><a class="reference internal" href="sprites.html">Sprites</a></li>
<li class="toctree-l1"><a class="reference internal" href="keymap.html">Customizing the Keymap</a></li>
<li class="toctree-l1"><a class="reference internal" href="achievement.html">Achievements</a></li>
<li class="toctree-l1"><a class="reference internal" href="history.html">Dialogue History</a></li>
<li class="toctree-l1"><a class="reference internal" href="multiple.html">Multiple Character Dialogue</a></li>
<li class="toctree-l1"><a class="reference internal" href="splashscreen_presplash.html">Splashscreen and Presplash</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="statement_equivalents.html">Statement Equivalents</a></li>
<li class="toctree-l1"><a class="reference internal" href="save_load_rollback.html">Saving, Loading, and Rollback</a></li>
<li class="toctree-l1"><a class="reference internal" href="persistent.html">Persistent Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="trans_trans_python.html">Transforms and Transitions in Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="gui_advanced.html">Advanced GUI</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_python.html">Screens and Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="modes.html">Modes</a></li>
<li class="toctree-l1"><a class="reference internal" href="cdd.html">Creator-Defined Displayables</a></li>
<li class="toctree-l1"><a class="reference internal" href="cds.html">Creator-Defined Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="custom_text_tags.html">Custom Text Tags</a></li>
<li class="toctree-l1"><a class="reference internal" href="character_callbacks.html">Character Callbacks</a></li>
<li class="toctree-l1"><a class="reference internal" href="file_python.html">File Access</a></li>
<li class="toctree-l1"><a class="reference internal" href="color_class.html">Color Class</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrix.html">Matrix</a></li>
<li class="toctree-l1"><a class="reference internal" href="model.html">Model-Based Rendering</a></li>
<li class="toctree-l1"><a class="reference internal" href="other.html">Other Functions and Variables</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building Distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="updater.html">Web Updater</a></li>
<li class="toctree-l1"><a class="reference internal" href="android.html">Android</a></li>
<li class="toctree-l1"><a class="reference internal" href="chromeos.html">Chrome OS/Chromebook</a></li>
<li class="toctree-l1"><a class="reference internal" href="ios.html">iOS</a></li>
<li class="toctree-l1"><a class="reference internal" href="iap.html">In-App Purchasing</a></li>
<li class="toctree-l1"><a class="reference internal" href="gesture.html">Gestures</a></li>
<li class="toctree-l1"><a class="reference internal" href="raspi.html">Raspberry Pi</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="security.html">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="problems.html">Dealing with Problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="environment_variables.html">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="self_voicing.html">Self-Voicing</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="editor.html">Text Editor Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="skins.html">Skins</a></li>
<li class="toctree-l1"><a class="reference internal" href="translating_renpy.html">Translating Ren'Py</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog (Ren'Py 7.x-)</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog6.html">Changelog (Ren'Py 6.11 - 6.99)</a></li>
<li class="toctree-l1"><a class="reference internal" href="incompatible.html">Incompatible Changes</a></li>
<li class="toctree-l1"><a class="reference internal" href="distributor.html">Distributor Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="sponsors.html">Ren'Py Development Sponsors</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="thequestion.html">Script of The Question</a></li>
<li class="toctree-l1"><a class="reference internal" href="thequestion_nvl.html">NVL-mode script for The Question</a></li>
</ul>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">Configuration Variables</a><ul>
<li><a class="reference internal" href="#commonly-used">Commonly Used</a></li>
<li><a class="reference internal" href="#transitions">Transitions</a></li>
<li><a class="reference internal" href="#preference-defaults">Preference Defaults</a></li>
<li><a class="reference internal" href="#occasionally-used">Occasionally Used</a></li>
<li><a class="reference internal" href="#rarely-or-internally-used">Rarely or Internally Used</a></li>
<li><a class="reference internal" href="#garbage-collection">Garbage Collection</a></li>
<li><a class="reference internal" href="#other-configuration-variables">Other Configuration Variables</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="configuration-variables">
<h1>Configuration Variables<a class="headerlink" href="#configuration-variables" title="Permalink to this headline"> link</a></h1>
<p>Configuration variables control the behavior of Ren'Py's implementation,
allowing Ren'Py itself to be customized in a myriad of ways. These range from
the common (such as changing the screen size) to the obscure (adding new
kinds of archive files).</p>
<p>Ren'Py's implementation makes the assumption that, once the GUI system has
initialized, configuration variables will not change. Changing configuration
variables outside of <code class="docutils literal notranslate"><span class="pre">init</span></code> blocks can lead to undefined behavior.
Configuration variables are not part of the save data.</p>
<p>Configuration variables are often changed in <code class="docutils literal notranslate"><span class="pre">init</span> <span class="pre">python</span></code> blocks:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="c1"># Use a widescreen resolution.</span>
<span class="n">config</span><span class="o">.</span><span class="n">screen_width</span> <span class="o">=</span> <span class="mi">1024</span>
<span class="n">config</span><span class="o">.</span><span class="n">screen_height</span> <span class="o">=</span> <span class="mi">600</span>
</pre></div>
</div>
<div class="section" id="commonly-used">
<h2>Commonly Used<a class="headerlink" href="#commonly-used" title="Permalink to this headline"> link</a></h2>
<dl class="var">
<dt id="var-config.name">
define <code class="descname">config.name</code> = &quot;&quot;<a class="headerlink" href="#var-config.name" title="Permalink to this definition"> link</a></dt>
<dd><p>This should be a string giving the name of the game. This is included
as part of tracebacks and other log files, helping to identify the
version of the game being used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.save_directory">
define <code class="descname">config.save_directory</code> = &quot;...&quot;<a class="headerlink" href="#var-config.save_directory" title="Permalink to this definition"> link</a></dt>
<dd><p>This is used to generate the directory in which games and
persistent information are saved. The name generated depends on
the platform:</p>
<dl class="docutils">
<dt>Windows</dt>
<dd>%APPDATA%/RenPy/<cite>save_directory</cite></dd>
<dt>Mac OS X</dt>
<dd>~/Library/RenPy/<cite>save_directory</cite></dd>
<dt>Linux/Other</dt>
<dd>~/.renpy/<cite>save_directory</cite></dd>
</dl>
<p>Setting this to None creates a &quot;saves&quot; directory underneath the
game directory. This is not recommended, as it prevents the game
from being shared between multiple users on a system. It can also
lead to problems when a game is installed as Administrator, but run
as a user.</p>
<p>This must be set with either the define statement, or in a <code class="docutils literal notranslate"><span class="pre">python</span>
<span class="pre">early</span></code> block. In either case, this will be run before any other
statement, and so it should be set to a string, not an expression.</p>
<p>To locate the save directory, read <a class="reference internal" href="#var-config.savedir"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.savedir</span></code></a> instead of
this variable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.version">
define <code class="descname">config.version</code> = &quot;&quot;<a class="headerlink" href="#var-config.version" title="Permalink to this definition"> link</a></dt>
<dd><p>This should be a string giving the version of the game. This is included
as part of tracebacks and other log files, helping to identify the
version of the game being used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window">
define <code class="descname">config.window</code> = None<a class="headerlink" href="#var-config.window" title="Permalink to this definition"> link</a></dt>
<dd><p>This controls the default method of dialogue window management. If
not None, this should be one of &quot;show&quot;, &quot;hide&quot;, or &quot;auto&quot;.</p>
<p>When set to &quot;show&quot;, the dialogue window is shown at all times.
When set to &quot;hide&quot;, the dialogue window is hidden when not in a
say statement or other statement that displays dialogue. When set
to &quot;auto&quot;, the dialogue window is hidden before scene statements,
and shown again when dialogue is shown.</p>
<p>This sets the default. Once set, the default can be changed using the
<code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">show</span></code>, <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">hide</span></code> and <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">auto</span></code> statements. See
<a class="reference internal" href="dialogue.html#dialogue-window-management"><span class="std std-ref">Dialogue Window Management</span></a> for more information.</p>
</dd></dl>
</div>
<div class="section" id="transitions">
<h2>Transitions<a class="headerlink" href="#transitions" title="Permalink to this headline"> link</a></h2>
<p>These control transitions between various screens.</p>
<dl class="var">
<dt id="var-config.adv_nvl_transition">
define <code class="descname">config.adv_nvl_transition</code> = None<a class="headerlink" href="#var-config.adv_nvl_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>A transition that is used when showing NVL-mode text directly
after ADV-mode text.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.after_load_transition">
define <code class="descname">config.after_load_transition</code> = None<a class="headerlink" href="#var-config.after_load_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>A transition that is used after loading, when entering the loaded
game.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.end_game_transition">
define <code class="descname">config.end_game_transition</code> = None<a class="headerlink" href="#var-config.end_game_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>The transition that is used to display the main menu after the
game ends normally, either by invoking return with no place to
return to, or by calling <a class="reference internal" href="other.html#renpy.full_restart" title="renpy.full_restart"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.full_restart()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.end_splash_transition">
define <code class="descname">config.end_splash_transition</code> = None<a class="headerlink" href="#var-config.end_splash_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>The transition that is used to display the main menu after the end
of the splashscreen.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.enter_replay_transition">
define <code class="descname">config.enter_replay_transition</code> = None<a class="headerlink" href="#var-config.enter_replay_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition that is used when entering a replay.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.enter_transition">
define <code class="descname">config.enter_transition</code> = None<a class="headerlink" href="#var-config.enter_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this variable should give a transition that will be
used when entering the game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.enter_yesno_transition">
define <code class="descname">config.enter_yesno_transition</code> = None<a class="headerlink" href="#var-config.enter_yesno_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition that is used when entering the yes/no
prompt screen.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.exit_replay_transition">
define <code class="descname">config.exit_replay_transition</code> = None<a class="headerlink" href="#var-config.exit_replay_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition that is used when exiting a replay.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.exit_transition">
define <code class="descname">config.exit_transition</code> = None<a class="headerlink" href="#var-config.exit_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this variable should give a transition that will be
performed when exiting the game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.exit_yesno_transition">
define <code class="descname">config.exit_yesno_transition</code> = None<a class="headerlink" href="#var-config.exit_yesno_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition that is used when exiting the yes/no
prompt screen.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.game_main_transition">
define <code class="descname">config.game_main_transition</code> = None<a class="headerlink" href="#var-config.game_main_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition that is used when returning to the main
menu from the game menu, using the <a class="reference internal" href="screen_actions.html#MainMenu" title="MainMenu"><code class="xref py py-func docutils literal notranslate"><span class="pre">MainMenu()</span></code></a> action.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.intra_transition">
define <code class="descname">config.intra_transition</code> = None<a class="headerlink" href="#var-config.intra_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>The transition that is used between screens of the game and main
menu. (That is, when the screen is changed with <a class="reference internal" href="screen_actions.html#ShowMenu" title="ShowMenu"><code class="xref py py-func docutils literal notranslate"><span class="pre">ShowMenu()</span></code></a>.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.nvl_adv_transition">
define <code class="descname">config.nvl_adv_transition</code> = None<a class="headerlink" href="#var-config.nvl_adv_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>A transition that is used when showing ADV-mode text directly
after NVL-mode text.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_attribute_transition">
define <code class="descname">config.say_attribute_transition</code> = None<a class="headerlink" href="#var-config.say_attribute_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a transition to use when the image is changed by a
say statement with image attributes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_attribute_transition_callback">
define <code class="descname">config.say_attribute_transition_callback</code> = ...<a class="headerlink" href="#var-config.say_attribute_transition_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a function that return a transition to apply and a layer to
apply it on</p>
<p>This should be a function that takes four arguments, the image tag
being shown, a <cite>mode</cite> parameter, a <cite>set</cite> containing pre-transition tags
and a <cite>set</cite> containing post-transition tags. Where the value of the
<cite>mode</cite> parameter is one of:</p>
<ul class="simple">
<li>&quot;permanent&quot;, for permanent attribute change (one that lasts longer
than the current say statement).</li>
<li>&quot;temporary&quot;, for a temporary attribute change (one that is restored
at the end of the current say statement).</li>
<li>&quot;both&quot;, for a simultaneous permanent and temporary attribute change
(one that in part lasts longer than the current say statement, and in
part is restored at the end of the current say statement).</li>
<li>&quot;restore&quot;, for when a temporary (or both) change is being restored.</li>
</ul>
<p>This should return a 2-component tuple, consisting of:</p>
<ul class="simple">
<li>The transition to use, or None if no transition should occur.</li>
<li>The layer the transition should be on, either a string or None. This is
almost always None.</li>
</ul>
<p>The default implementation of this returns (config.say_attribute_transition,
config.say_attribute_transition_layer).</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_attribute_transition_layer">
define <code class="descname">config.say_attribute_transition_layer</code> = None<a class="headerlink" href="#var-config.say_attribute_transition_layer" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this must be a string giving the name of a layer. (Almost always
&quot;master&quot;.) The say attribute is applied to the named layer, and Ren'Py
will not pause to wait for the transition to occur. This will have the
effect of transitioning in the attribute as dialogue is shown.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_hide_transition">
define <code class="descname">config.window_hide_transition</code> = None<a class="headerlink" href="#var-config.window_hide_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>The transition used by the window hide statement when no
transition has been explicitly specified.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_show_transition">
define <code class="descname">config.window_show_transition</code> = None<a class="headerlink" href="#var-config.window_show_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>The transition used by the window show statement when no
transition has been explicitly specified.</p>
</dd></dl>
</div>
<div class="section" id="preference-defaults">
<h2>Preference Defaults<a class="headerlink" href="#preference-defaults" title="Permalink to this headline"> link</a></h2>
<p>Ren'Py has a number of variables that set the default values of
preferences. Please see the section on <a class="reference internal" href="preferences.html"><span class="doc">preference variables</span></a>
for more information on how to set defaults for various preferences.</p>
</div>
<div class="section" id="occasionally-used">
<h2>Occasionally Used<a class="headerlink" href="#occasionally-used" title="Permalink to this headline"> link</a></h2>
<dl class="var">
<dt id="var-config.adjust_attributes">
define <code class="descname">config.adjust_attributes</code> = { }<a class="headerlink" href="#var-config.adjust_attributes" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a dictionary. When a statement or function that
contains image attributes executes or is predicted, the tag is
looked up in this dictionary. If it is not found, the None key
is looked up in this dictionary.</p>
<p>If either is found, they're expected to be a function. The function
is given an image name, a tuple consisting of the tag and any
attributes. It should return an adjusted tuple, which contains
and a potential new set of attributes.</p>
<p>As this function may be called during prediction, it must not rely
on any state.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.after_load_callbacks">
define <code class="descname">config.after_load_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.after_load_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions that are called (with no arguments) when a load
occurs.</p>
<p>If these callbacks change data (for example, migrating data from an
old version of the game), <a class="reference internal" href="save_load_rollback.html#renpy.block_rollback" title="renpy.block_rollback"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.block_rollback()</span></code></a> should be
called to prevent the player from rolling back and reverting
the changes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.after_replay_callback">
define <code class="descname">config.after_replay_callback</code> = None<a class="headerlink" href="#var-config.after_replay_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a function that is called with no arguments after a
replay completes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.allow_underfull_grids">
define <code class="descname">config.allow_underfull_grids</code> = False<a class="headerlink" href="#var-config.allow_underfull_grids" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will not require grids to be full in order to display.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.always_shown_screens">
define <code class="descname">config.always_shown_screens</code> = [ ]<a class="headerlink" href="#var-config.always_shown_screens" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of names of screens that Ren'Py will always show, even in menus,
and when the interface is hidden. This is mostly used by Ren'Py, which
assumes this will be a list. The <a class="reference internal" href="#var-config.overlay_screens"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.overlay_screens</span></code></a> list is
usually more appropriate.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.audio_filename_callback">
define <code class="descname">config.audio_filename_callback</code> = None<a class="headerlink" href="#var-config.audio_filename_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a function that is called with an audio filename,
and is expected to return a second audio filename, the latter of which
will be played.</p>
<p>This is intended for use when an a games has audio file formats changed,
but it's not destired to update the game script.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.auto_channels">
define <code class="descname">config.auto_channels</code> = { &quot;audio&quot; : ( &quot;sfx&quot;, &quot;&quot;, &quot;&quot; ) }<a class="headerlink" href="#var-config.auto_channels" title="Permalink to this definition"> link</a></dt>
<dd><p>This is used to define automatic audio channels. It's a map the
channel name to a tuple containing 3 components:</p>
<ul class="simple">
<li>The mixer the channel uses.</li>
<li>A prefix that is given to files played on the channel.</li>
<li>A suffix that is given to files played on the channel.</li>
</ul>
</dd></dl>
<dl class="var">
<dt id="var-config.auto_movie_channel">
define <code class="descname">config.auto_movie_channel</code> = True<a class="headerlink" href="#var-config.auto_movie_channel" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, and the <cite>play</cite> argument is give to <a class="reference internal" href="movie.html#Movie" title="Movie"><code class="xref py py-func docutils literal notranslate"><span class="pre">Movie()</span></code></a>, an
audio channel name is automatically generated for each movie.</p>
<p><a class="reference internal" href="#var-config.single_movie_channel"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.single_movie_channel</span></code></a> takes precendece over this
variable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.auto_load">
define <code class="descname">config.auto_load</code> = None<a class="headerlink" href="#var-config.auto_load" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, the name of a save file to automatically load when
Ren'Py starts up. This is intended for developer use, rather than
for end users. Setting this to &quot;1&quot; will automatically load the
game in save slot 1.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.auto_voice">
define <code class="descname">config.auto_voice</code> = None<a class="headerlink" href="#var-config.auto_voice" title="Permalink to this definition"> link</a></dt>
<dd><p>This may be a string, a function, or None. If None, auto-voice is
disabled.</p>
<p>If a string, this is formatted with the <code class="docutils literal notranslate"><span class="pre">id</span></code> variable bound to the
identifier of the current line of dialogue. If this gives an existing
file, that file is played as voice audio.</p>
<p>If a function, the function is called with a single argument, the
identifier of the current line of dialogue. The function is expected to
return a string. If this gives an existing file, that file is played as
voice audio.</p>
<p>See <a class="reference internal" href="voice.html#automatic-voice"><span class="std std-ref">Automatic Voice</span></a> for more details.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autosave_slots">
define <code class="descname">config.autosave_slots</code> = 10<a class="headerlink" href="#var-config.autosave_slots" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of slots used by autosaves.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.cache_surfaces">
define <code class="descname">config.cache_surfaces</code> = False<a class="headerlink" href="#var-config.cache_surfaces" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the underlying data of an image is stored in RAM, allowing
image manipulators to be applied to that image without reloading it
from disk. If False, the data is dropped from the cache, but kept as
a texture in video memory, reducing RAM usage.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.character_id_prefixes">
define <code class="descname">config.character_id_prefixes</code> = [ ]<a class="headerlink" href="#var-config.character_id_prefixes" title="Permalink to this definition"> link</a></dt>
<dd><p>This specifies a list of style property prefixes that can be given
to a <a class="reference internal" href="dialogue.html#Character" title="Character"><code class="xref py py-func docutils literal notranslate"><span class="pre">Character()</span></code></a>. When a style prefixed with one of the given
prefix is given, it is applied to the displayable with that prefix
as its ID.</p>
<p>For example, the default GUI adds &quot;namebox&quot; to this. When a Character
is given the <cite>namebox_background</cite> property, it sets <a class="reference internal" href="style_properties.html#style-property-background"><code class="xref std std-propref docutils literal notranslate"><span class="pre">background</span></code></a>
on the displayable in the say screen with the id &quot;namebox&quot;.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.conditionswitch_predict_all">
define <code class="descname">config.conditionswitch_predict_all</code> = False<a class="headerlink" href="#var-config.conditionswitch_predict_all" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the predict_all argument for <a class="reference internal" href="displayables.html#ConditionSwitch" title="ConditionSwitch"><code class="xref py py-func docutils literal notranslate"><span class="pre">ConditionSwitch()</span></code></a>
and <a class="reference internal" href="displayables.html#ShowingSwitch" title="ShowingSwitch"><code class="xref py py-func docutils literal notranslate"><span class="pre">ShowingSwitch()</span></code></a>, which determines if all possible displayables
are shown.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.context_callback">
define <code class="descname">config.context_callback</code> = None<a class="headerlink" href="#var-config.context_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a callback that is called when Ren'Py enters a new context,
such as a menu context.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.context_copy_remove_screens">
define <code class="descname">config.context_copy_remove_screens</code> = [ 'notify' ]<a class="headerlink" href="#var-config.context_copy_remove_screens" title="Permalink to this definition"> link</a></dt>
<dd><p>Contains a list of screens that are removed when a context is copied
for rollback or saving.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.context_fadein_music">
define <code class="descname">config.context_fadein_music</code> = 0<a class="headerlink" href="#var-config.context_fadein_music" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time in seconds Ren'Py spends fading in music when the music is
played due to a context change. (Usually, when the game is loaded.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.context_fadeout_music">
define <code class="descname">config.context_fadeout_music</code> = 0<a class="headerlink" href="#var-config.context_fadeout_music" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time in seconds Ren'Py spends fading out music when the music is
played due to a context change. (Usually, when the game is loaded.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.debug_image_cache">
define <code class="descname">config.debug_image_cache</code> = False<a class="headerlink" href="#var-config.debug_image_cache" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will write information about the <a class="reference internal" href="displayables.html#images"><span class="std std-ref">image cache</span></a>
to image_cache.txt.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.debug_prediction">
define <code class="descname">config.debug_prediction</code> = False<a class="headerlink" href="#var-config.debug_prediction" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will will write information about and errors that
occur during prediction (of execution flow, images, and screens) to
log.txt and the console.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.debug_sound">
define <code class="descname">config.debug_sound</code> = False<a class="headerlink" href="#var-config.debug_sound" title="Permalink to this definition"> link</a></dt>
<dd><p>Enables debugging of sound functionality. This disables the
suppression of errors when generating sound. However, if a sound
card is missing or flawed, then such errors are normal, and
enabling this may prevent Ren'Py from functioning normally. This
should always be False in a released game.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.debug_text_overflow">
define <code class="descname">config.debug_text_overflow</code> = False<a class="headerlink" href="#var-config.debug_text_overflow" title="Permalink to this definition"> link</a></dt>
<dd><p>When true, Ren'Py will log text overflows to text_overflow.txt. A text
overflow occurs when a <a class="reference internal" href="text.html#Text" title="Text"><code class="xref py py-class docutils literal notranslate"><span class="pre">Text</span></code></a> displayable renders to a size
larger than that allocated to it. By setting this to True and setting
the <a class="reference internal" href="style_properties.html#style-property-xmaximum"><code class="xref std std-propref docutils literal notranslate"><span class="pre">xmaximum</span></code></a> and <a class="reference internal" href="style_properties.html#style-property-ymaximum"><code class="xref std std-propref docutils literal notranslate"><span class="pre">ymaximum</span></code></a> style properties of the dialogue
window to the window size, this can be used to report cases where the
dialogue is too large for its window.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.default_attribute_callbacks">
define <code class="descname">config.default_attribute_callbacks</code> = { }<a class="headerlink" href="#var-config.default_attribute_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>When a statement or function that contains image attributes executes or is
predicted, and the tag is not currently being shown, it's looked up in this
dictionary. If it is not found, the None key is looked up instead.</p>
<p>If either is found, they're expected to be a function. The function is
given an image name, a tuple consisting of the tag and any attributes. It
should return an iterable which contains any additional attributes to be
applied when an image is first shown.</p>
<p>The results of the function are treated as additive-only, and any explicit
conflicting or negative attributes will still take precedence.</p>
<p>As this function may be called during prediction, it must not rely on any
state.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.default_tag_layer">
define <code class="descname">config.default_tag_layer</code> = &quot;master&quot;<a class="headerlink" href="#var-config.default_tag_layer" title="Permalink to this definition"> link</a></dt>
<dd><p>The layer an image is shown on if its tag is not found in <a class="reference internal" href="#var-config.tag_layer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.tag_layer</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.default_transform">
define <code class="descname">config.default_transform</code> = ...<a class="headerlink" href="#var-config.default_transform" title="Permalink to this definition"> link</a></dt>
<dd><p>When a displayable is shown using the show or scene statements,
the transform properties are taken from this transform and used to
initialize the values of the displayable's transform.</p>
<p>The default transform is <a class="reference internal" href="transforms.html#var-center"><code class="xref std std-var docutils literal notranslate"><span class="pre">center</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.defer_styles">
define <code class="descname">config.defer_styles</code> = False<a class="headerlink" href="#var-config.defer_styles" title="Permalink to this definition"> link</a></dt>
<dd><p>When true, the execution of style statements is deferred until after
all <code class="docutils literal notranslate"><span class="pre">translate</span> <span class="pre">python</span></code> blocks have executed. This lets a <code class="docutils literal notranslate"><span class="pre">translate</span>
<span class="pre">python</span></code> block update variables that are then used in style (not
translate style) statements.</p>
<p>While this defaults to False, it's set to True when <a class="reference internal" href="gui_advanced.html#gui.init" title="gui.init"><code class="xref py py-func docutils literal notranslate"><span class="pre">gui.init()</span></code></a>
is called.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.developer">
define <code class="descname">config.developer</code> = &quot;auto&quot;<a class="headerlink" href="#var-config.developer" title="Permalink to this definition"> link</a></dt>
<dd><p>If set to True, developer mode is enabled. Developer mode gives
access to the shift+D developer menu, shift+R reloading, and
various other features that are not intended for end users.</p>
<p>This can be True, False, or &quot;auto&quot;. If &quot;auto&quot;, Ren'Py will
detect if the game has been packaged into a distribution, and
set config.developer as appropriate.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.disable_input">
define <code class="descname">config.disable_input</code> = False<a class="headerlink" href="#var-config.disable_input" title="Permalink to this definition"> link</a></dt>
<dd><p>When true, <a class="reference internal" href="input.html#renpy.input" title="renpy.input"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.input()</span></code></a> terminates immediately and returns its
<cite>default</cite> argument.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.displayable_prefix">
define <code class="descname">config.displayable_prefix</code> = { }<a class="headerlink" href="#var-config.displayable_prefix" title="Permalink to this definition"> link</a></dt>
<dd><p>See <a class="reference internal" href="displayables.html#displayable-prefix"><span class="std std-ref">Displayable prefixes</span></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.emphasize_audio_channels">
define <code class="descname">config.emphasize_audio_channels</code> = [ 'voice' ]<a class="headerlink" href="#var-config.emphasize_audio_channels" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of strings giving audio channel names.</p>
<p>If the &quot;emphasize audio&quot; preference is enabled, when one of the audio
channels listed starts playing a sound, all channels that are not
listed in this variable have their secondary audio volume reduced
to <a class="reference internal" href="#var-config.emphasize_audio_volume"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.emphasize_audio_volume</span></code></a> over <a class="reference internal" href="#var-config.emphasize_audio_time"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.emphasize_audio_time</span></code></a>
seconds.</p>
<p>When no channels listed in this variable are playing audio, all channels
that are not listed have their secondary audio volume raised to 1.0 over
<a class="reference internal" href="#var-config.emphasize_audio_time"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.emphasize_audio_time</span></code></a> seconds.</p>
<p>For example, setting this to <code class="docutils literal notranslate"><span class="pre">[</span> <span class="pre">'voice'</span> <span class="pre">]]</span></code> will lower the volume of all
non-voice channels when a voice is played.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.emphasize_audio_time">
define <code class="descname">config.emphasize_audio_time</code> = 0.5<a class="headerlink" href="#var-config.emphasize_audio_time" title="Permalink to this definition"> link</a></dt>
<dd><p>See above.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.emphasize_audio_volume">
define <code class="descname">config.emphasize_audio_volume</code> = 0.5<a class="headerlink" href="#var-config.emphasize_audio_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>See above.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.empty_window">
define <code class="descname">config.empty_window</code> = ...<a class="headerlink" href="#var-config.empty_window" title="Permalink to this definition"> link</a></dt>
<dd><p>This is called when _window is True, and no window has been shown
on the screen. (That is, no call to <a class="reference internal" href="other.html#renpy.shown_window" title="renpy.shown_window"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.shown_window()</span></code></a> has
occurred.) It's expected to show an empty window on the screen, and
return without causing an interaction.</p>
<p>The default implementation of this uses the narrator character to
display a blank line without interacting.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.enable_language_autodetect">
define <code class="descname">config.enable_language_autodetect</code> = False<a class="headerlink" href="#var-config.enable_language_autodetect" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, Ren'Py will attempt to determine the name of the language
to use based on the locale of the player's system. If successful,
this language will be used as the default language.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.enter_sound">
define <code class="descname">config.enter_sound</code> = None<a class="headerlink" href="#var-config.enter_sound" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a sound file that is played when entering the
game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.exit_sound">
define <code class="descname">config.exit_sound</code> = None<a class="headerlink" href="#var-config.exit_sound" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a sound file that is played when exiting the
game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.fix_rollback_without_choice">
define <code class="descname">config.fix_rollback_without_choice</code> = False<a class="headerlink" href="#var-config.fix_rollback_without_choice" title="Permalink to this definition"> link</a></dt>
<dd><p>This option determines how the built in menus or imagemaps behave
during fixed rollback. The default value is False, which means that
menu only the previously selected option remains clickable. If set
to True, the selected option is marked but no options are clickable.
The user can progress forward through the rollback buffer by
clicking.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.font_replacement_map">
define <code class="descname">config.font_replacement_map</code> = { }<a class="headerlink" href="#var-config.font_replacement_map" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a map from (font, bold, italics) to (font, bold, italics),
used to replace a font with one that's specialized as having bold
and/or italics. For example, if you wanted to have everything
using an italic version of &quot;Vera.ttf&quot; use &quot;VeraIt.ttf&quot; instead,
you could write:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="n">config</span><span class="o">.</span><span class="n">font_replacement_map</span><span class="p">[</span><span class="s2">&quot;Vera.ttf&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;VeraIt.ttf&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
<p>Please note that these mappings only apply to specific variants of
a font. In this case, requests for a bold italic version of vera
will get a bold italic version of vera, rather than a bold version
of the italic vera.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.game_menu_music">
define <code class="descname">config.game_menu_music</code> = None<a class="headerlink" href="#var-config.game_menu_music" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a music file to play when at the game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gl_clear_color">
define <code class="descname">config.gl_clear_color</code> = &quot;#000&quot;<a class="headerlink" href="#var-config.gl_clear_color" title="Permalink to this definition"> link</a></dt>
<dd><p>The color that the window is cleared to before images are drawn.
This is mainly seen as the color of the letterbox or pillarbox
edges drawn when aspect ratio of the window or monitor in fullscreen
mode) does not match the aspect ratio of the game.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gl_lod_bias">
define <code class="descname">config.gl_lod_bias</code> = -0.5<a class="headerlink" href="#var-config.gl_lod_bias" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the <a class="reference internal" href="model.html#u-lod-bias"><span class="std std-ref">u_lod_bias</span></a> uniform,
which controls the mipmap level Ren'Py uses.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gl_test_image">
define <code class="descname">config.gl_test_image</code> = &quot;black&quot;<a class="headerlink" href="#var-config.gl_test_image" title="Permalink to this definition"> link</a></dt>
<dd><p>The name of the image that is used when running the OpenGL
performance test. This image will be shown for 5 frames or .25
seconds, on startup. It will then be automatically hidden.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.has_autosave">
define <code class="descname">config.has_autosave</code> = True<a class="headerlink" href="#var-config.has_autosave" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, the game will autosave. If false, no autosaving will
occur.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.history_callbacks">
define <code class="descname">config.history_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.history_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>This contains a list of callbacks that are called before Ren'Py adds
a new object to _history_list. The callbacks are called with the
new HistoryEntry object as the first argument, and can add new fields
to that object.</p>
<p>Ren'Py uses history callbacks internally, so creators should append
their own callbacks to this list, rather than replacing it entirely.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.history_length">
define <code class="descname">config.history_length</code> = None<a class="headerlink" href="#var-config.history_length" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of entries of dialogue history Ren'Py keeps. This is
set to 250 by the default gui.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.hw_video">
define <code class="descname">config.hw_video</code> = False<a class="headerlink" href="#var-config.hw_video" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, hardware video playback will be used on mobile platforms. This
may be faster, but only some formats are supported and only fullscreen video
is available. If false, software playback will be used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.hyperlink_handlers">
define <code class="descname">config.hyperlink_handlers</code> = { ... }<a class="headerlink" href="#var-config.hyperlink_handlers" title="Permalink to this definition"> link</a></dt>
<dd><p>A dictionary mapping a hyperlink protocol to the handler for that
protocol. A handler is a function that takes the value (everything after
the :) and performs some action. If a value is returned, the interaction
ends. Otherwise, the click is ignored and the interaction continues.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.hyperlink_protocol">
define <code class="descname">config.hyperlink_protocol</code> = &quot;call_in_new_context&quot;<a class="headerlink" href="#var-config.hyperlink_protocol" title="Permalink to this definition"> link</a></dt>
<dd><p>The protocol that is used for hyperlinks that do not have a protocol
assigned to them. See <a class="reference internal" href="text.html#a-tag"><span class="std std-ref">the a text tag</span></a> for a description
as to what the possible protocols mean.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.image_cache_size">
define <code class="descname">config.image_cache_size</code> = None<a class="headerlink" href="#var-config.image_cache_size" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is used to set the size of the <a class="reference internal" href="displayables.html#images"><span class="std std-ref">image cache</span></a>, as a
multiple of the screen size. This number is multiplied by the size of
the screen, in pixels, to get the size of the image cache in pixels.</p>
<p>If set too large, this can waste memory. If set too small, images
can be repeatedly loaded, hurting performance.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.image_cache_size_mb">
define <code class="descname">config.image_cache_size_mb</code> = 300<a class="headerlink" href="#var-config.image_cache_size_mb" title="Permalink to this definition"> link</a></dt>
<dd><p>This is used to set the size of the <a class="reference internal" href="displayables.html#images"><span class="std std-ref">image cache</span></a>, in
megabytes. If <a class="reference internal" href="#var-config.cache_surfaces"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.cache_surfaces</span></code></a> is False, an image takes
4 bytes per pixel, otherwise it takes 8 bytes per pixel.</p>
<p>If set too large, this can waste memory. If set too small, images
can be repeatedly loaded, hurting performance. If not none,
<a class="reference internal" href="#var-config.image_cache_size"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.image_cache_size</span></code></a> is used instead of this variable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.input_caret_blink">
define <code class="descname">config.input_caret_blink</code> = 1.0<a class="headerlink" href="#var-config.input_caret_blink" title="Permalink to this definition"> link</a></dt>
<dd><p>If not False, sets the blinking period of the default caret, in seconds.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.language">
define <code class="descname">config.language</code> = None<a class="headerlink" href="#var-config.language" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a string giving the default language
that the game is translated into by the translation framework.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.lint_character_statistics">
define <code class="descname">config.lint_character_statistics</code> = True<a class="headerlink" href="#var-config.lint_character_statistics" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, and <a class="reference internal" href="#var-config.developer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.developer</span></code></a> is true, the lint report will include
statistics about the number of dialogue blocks spoken for each character.
The chanracter statistics are disabled when the game is packaged, to
prevent spoilers.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.load_failed_label">
define <code class="descname">config.load_failed_label</code> = None<a class="headerlink" href="#var-config.load_failed_label" title="Permalink to this definition"> link</a></dt>
<dd><p>If a string, this is a label that is jumped to when a load fails because
the script has changed so much that Ren'Py can't recover.
Before performing the load, Ren'Py will revert to the start of the
last statement, then it will clear the call stack.</p>
<p>This may also be a function. If it is, the function is called with
no arguments, and is expected to return a string giving the label.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.locale_to_language_function">
define <code class="descname">config.locale_to_language_function</code> = ...<a class="headerlink" href="#var-config.locale_to_language_function" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that determines the language the game should use,
based on the the user's locale.
It takes 2 string arguments that give the ISO code of the locale
and the ISO code of the region.</p>
<p>It should return a string giving the name of a translation to use, or
None to use the default translation.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.main_menu_music">
define <code class="descname">config.main_menu_music</code> = None<a class="headerlink" href="#var-config.main_menu_music" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a music file to play when at the main menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.main_menu_music_fadein">
define <code class="descname">config.main_menu_music_fadein</code> = 0.0<a class="headerlink" href="#var-config.main_menu_music_fadein" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of seconds to take to fade in <a class="reference internal" href="#var-config.main_menu_music"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.main_menu_music</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.menu_arguments_callback">
define <code class="descname">config.menu_arguments_callback</code> = None<a class="headerlink" href="#var-config.menu_arguments_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function that takes positional and/or
keyword arguments. It's called whenever a menu statement runs,
with the arguments to that menu statement.</p>
<p>This should return a pair, containing a tuple of positional arguments
(almost always empty), and a dictionary of keyword arguments.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.menu_clear_layers">
define <code class="descname">config.menu_clear_layers</code> = []<a class="headerlink" href="#var-config.menu_clear_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of layer names (as strings) that are cleared when entering
the game menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.menu_include_disabled">
define <code class="descname">config.menu_include_disabled</code> = False<a class="headerlink" href="#var-config.menu_include_disabled" title="Permalink to this definition"> link</a></dt>
<dd><p>When this variable is set, choices disables with the if statement are
included as disabled buttons.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.menu_window_subtitle">
define <code class="descname">config.menu_window_subtitle</code> = &quot;&quot;<a class="headerlink" href="#var-config.menu_window_subtitle" title="Permalink to this definition"> link</a></dt>
<dd><p>The <a class="reference internal" href="store_variables.html#var-_window_subtitle"><code class="xref std std-var docutils literal notranslate"><span class="pre">_window_subtitle</span></code></a> variable is set to this value when entering
the main or game menus.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.minimum_presplash_time">
define <code class="descname">config.minimum_presplash_time</code> = 0.0<a class="headerlink" href="#var-config.minimum_presplash_time" title="Permalink to this definition"> link</a></dt>
<dd><p>The minimum amount of time, in seconds, a presplash, Android presplash,
or iOS LaunchImage is displayed for. If Ren'Py initializes before this
amount of time has been reached, it will sleep to ensure the image is
shown for at least this amount of time. The image may be shown longer
if Ren'Py takes longer to start up.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.missing_background">
define <code class="descname">config.missing_background</code> = &quot;black&quot;<a class="headerlink" href="#var-config.missing_background" title="Permalink to this definition"> link</a></dt>
<dd><p>This is the background that is used when <a class="reference internal" href="#var-config.developer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.developer</span></code></a> is True
and an undefined image is used in a <a class="reference internal" href="displaying_images.html#scene-statement"><span class="std std-ref">scene statement</span></a>. This should be an image name (a string), not a
displayable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mode_callbacks">
define <code class="descname">config.mode_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.mode_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of callbacks called when entering a mode. For more documentation,
see the section on <a class="reference internal" href="modes.html"><span class="doc">Modes</span></a>.</p>
<p>The default value includes a callback that implements <a class="reference internal" href="#var-config.adv_nvl_transition"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.adv_nvl_transition</span></code></a>
and <a class="reference internal" href="#var-config.nvl_adv_transition"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_adv_transition</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mouse">
define <code class="descname">config.mouse</code> = None<a class="headerlink" href="#var-config.mouse" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable controls the use of user-defined mouse cursors. If
None, the system mouse is used, which is usually a black-and-white
mouse cursor.</p>
<p>Otherwise, this should be a dictionary giving the
mouse animations for various mouse types. Keys used by the default
library include &quot;default&quot;, &quot;say&quot;, &quot;with&quot;, &quot;menu&quot;, &quot;prompt&quot;,
&quot;imagemap&quot;, &quot;pause&quot;, &quot;mainmenu&quot;, and &quot;gamemenu&quot;. The &quot;default&quot; key
should always be present, as it is used when a more specific key
is absent.</p>
<p>Each value in the dictionary should be a list of (<cite>image</cite>,
<cite>xoffset</cite>, <cite>yoffset</cite>) tuples, representing frames.</p>
<dl class="docutils">
<dt><cite>image</cite></dt>
<dd>The mouse cursor image. The maximum size for this image
varies based on the player's hardware. 32x32 is guaranteed
to work everywhere, while 64x64 works on most hardware. Larger
images may not work.</dd>
<dt><cite>xoffset</cite></dt>
<dd>The offset of the hotspot pixel from the left side of the
cursor.</dd>
<dt><cite>yoffset</cite></dt>
<dd>The offset of the hotspot pixel from the top of the cursor.</dd>
</dl>
<p>The frames are played back at 20Hz, and the animation loops after
all frames have been shown.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mouse_displayable">
define <code class="descname">config.mouse_displayable</code> = None<a class="headerlink" href="#var-config.mouse_displayable" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should either be a displayable, or a callable that
returns a displayable. The callable may return None, in which case
Ren'Py proceeds if the displayable is None.</p>
<p>If a displayable is given, the mouse cursor is hidden, and the
displayable is shown above anything else. This displayable is
responsible for positioning and drawing a sythetic mouse
cursor, and so should probably be a <a class="reference internal" href="mouse.html#MouseDisplayable" title="MouseDisplayable"><code class="xref py py-func docutils literal notranslate"><span class="pre">MouseDisplayable()</span></code></a>
or something very similar.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.narrator_menu">
define <code class="descname">config.narrator_menu</code> = True<a class="headerlink" href="#var-config.narrator_menu" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, narration inside a menu is displayed using the narrator
character. Otherwise, narration is displayed as captions
within the menu itself.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.nearest_neighbor">
define <code class="descname">config.nearest_neighbor</code> = False<a class="headerlink" href="#var-config.nearest_neighbor" title="Permalink to this definition"> link</a></dt>
<dd><p>Uses nearest-neighbor filtering by default, to support pixel art or
melting players' eyes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.notify">
define <code class="descname">config.notify</code> = ...<a class="headerlink" href="#var-config.notify" title="Permalink to this definition"> link</a></dt>
<dd><p>This is called by <a class="reference internal" href="other.html#renpy.notify" title="renpy.notify"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.notify()</span></code></a> or <a class="reference internal" href="screen_actions.html#Notify" title="Notify"><code class="xref py py-func docutils literal notranslate"><span class="pre">Notify()</span></code></a> with a
single <cite>message</cite> argument, to display the notification. The default
implementation is <a class="reference internal" href="other.html#renpy.display_notify" title="renpy.display_notify"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.display_notify()</span></code></a>. This is intended
to allow creators to intercept notifications.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.optimize_texture_bounds">
define <code class="descname">config.optimize_texture_bounds</code> = True<a class="headerlink" href="#var-config.optimize_texture_bounds" title="Permalink to this definition"> link</a></dt>
<dd><p>When True, Ren'Py will scan images to find the bounding box of the
non-transparent pixels, and only load those pixels into a texture.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.overlay_functions">
define <code class="descname">config.overlay_functions</code> = [ ]<a class="headerlink" href="#var-config.overlay_functions" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions. When called, each function is expected to
use ui functions to add displayables to the overlay layer.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.overlay_screens">
define <code class="descname">config.overlay_screens</code> = [ ... ]<a class="headerlink" href="#var-config.overlay_screens" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of screens that are displayed when the overlay is enabled,
and hidden when the overlay is suppressed. (The screens are shown
on the screens layer, not the overlay layer.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.pause_after_rollback">
define <code class="descname">config.pause_after_rollback</code> = False<a class="headerlink" href="#var-config.pause_after_rollback" title="Permalink to this definition"> link</a></dt>
<dd><p>If False, the default, rolling back will skip any pauses (timed or
not) and stop only at other interactions such as dialogues, menus...
If True, renpy will include timeless pauses to the valid places a
rollback can take the user.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.preload_fonts">
define <code class="descname">config.preload_fonts</code> = [ ]<a class="headerlink" href="#var-config.preload_fonts" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of the names of TrueType and OpenType fonts that Ren'Py should
load when starting up. Including the name of a font here can prevent
Ren'Py from pausing when introducing a new typeface.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.preserve_volume_when_muted">
define <code class="descname">config.preserve_volume_when_muted</code> = False<a class="headerlink" href="#var-config.preserve_volume_when_muted" title="Permalink to this definition"> link</a></dt>
<dd><p>If False, the default, the volume of channels are shown as 0 and
changing it disables mute when the channel is mute.
Otherwise, It is shown and adjustable while keeping mute.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.python_callbacks">
define <code class="descname">config.python_callbacks</code> = [ ]<a class="headerlink" href="#var-config.python_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions. The functions in this list are called, without
any arguments, whenever a Python block is run outside of the init
phase.</p>
<p>One possible use of this would be to have a function limit a variable
to within a range each time it is adjusted.</p>
<p>The functions may be called while Ren'Py is starting up, before the start
of the game proper, and potentially before the variables the
function depends on are initialized. The functions are required to deal
with this, perhaps by using <code class="docutils literal notranslate"><span class="pre">hasattr(store,</span> <span class="pre">'varname')</span></code> to check if
a variable is defined.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.quicksave_slots">
define <code class="descname">config.quicksave_slots</code> = 10<a class="headerlink" href="#var-config.quicksave_slots" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of slots used by quicksaves.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.quit_action">
define <code class="descname">config.quit_action</code> = ...<a class="headerlink" href="#var-config.quit_action" title="Permalink to this definition"> link</a></dt>
<dd><p>The action that is called when the user clicks the quit button on
a window. The default action prompts the user to see if he wants
to quit the game.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.reload_modules">
define <code class="descname">config.reload_modules</code> = [ ]<a class="headerlink" href="#var-config.reload_modules" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of strings giving the names of python modules that should be
reloaded along with the game. Any submodules of these modules
will also be reloaded.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.replace_text">
define <code class="descname">config.replace_text</code> = None<a class="headerlink" href="#var-config.replace_text" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a function that is called with a single argument, a text to
be displayed to the user. The function can return the same text it was
passed, or a replacement text that will be displayed instead.</p>
<p>The function is called after substitutions have been performed and after
the text has been split on tags, so its argument contains nothing but
actual text. All displayed text passes through the function: not only
dialogue text, but also user interface text.</p>
<p>This can be used to replace specific ASCII sequences with corresponding
Unicode characters, as demonstrated by the following:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">replace_text</span><span class="p">(</span><span class="n">s</span><span class="p">):</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;&#39;&quot;</span><span class="p">,</span> <span class="sa">u</span><span class="s1">&#39;</span><span class="se">\u2019</span><span class="s1">&#39;</span><span class="p">)</span> <span class="c1"># apostrophe</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;--&#39;</span><span class="p">,</span> <span class="sa">u</span><span class="s1">&#39;</span><span class="se">\u2014</span><span class="s1">&#39;</span><span class="p">)</span> <span class="c1"># em dash</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;...&#39;</span><span class="p">,</span> <span class="sa">u</span><span class="s1">&#39;</span><span class="se">\u2026</span><span class="s1">&#39;</span><span class="p">)</span> <span class="c1"># ellipsis</span>
<span class="k">return</span> <span class="n">s</span>
<span class="n">config</span><span class="o">.</span><span class="n">replace_text</span> <span class="o">=</span> <span class="n">replace_text</span>
</pre></div>
</div>
</dd></dl>
<dl class="var">
<dt id="var-config.replay_scope">
define <code class="descname">config.replay_scope</code> = { &quot;_game_menu_screen&quot; : &quot;preferences&quot; }<a class="headerlink" href="#var-config.replay_scope" title="Permalink to this definition"> link</a></dt>
<dd><p>A dictionary mapping variables in the default store to the values
the variables will be given when entering a replay.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.return_not_found_label">
define <code class="descname">config.return_not_found_label</code> = None<a class="headerlink" href="#var-config.return_not_found_label" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a label that is jumped to when a return site is not found.
The call stack is cleared before this jump occurs.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.save_json_callbacks">
define <code class="descname">config.save_json_callbacks</code> = [ ]<a class="headerlink" href="#var-config.save_json_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of callback functions that are used to create the json object
that is stored with each save and marked accessible through <a class="reference internal" href="screen_actions.html#FileJson" title="FileJson"><code class="xref py py-func docutils literal notranslate"><span class="pre">FileJson()</span></code></a>
and <a class="reference internal" href="save_load_rollback.html#renpy.slot_json" title="renpy.slot_json"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.slot_json()</span></code></a>.</p>
<p>Each callback is called with a Python dictionary that will eventually be
saved. Callbacks should modify that dictionary by adding JSON-compatible
Python types, such as numbers, strings, lists, and dicts. The dictionary
at the end of the last callback is then saved as part of the save slot.</p>
<p>The dictionary passed to the callbacks may have already have keys
beginning with an underscore <code class="docutils literal notranslate"><span class="pre">_</span></code>. These keys are used by Ren'Py,
and should not be changed.</p>
<p>For example:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">jsoncallback</span><span class="p">(</span><span class="n">d</span><span class="p">):</span>
<span class="n">d</span><span class="p">[</span><span class="s2">&quot;playername&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">player_name</span>
<span class="n">config</span><span class="o">.</span><span class="n">save_json_callbacks</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">jsoncallback</span><span class="p">)</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">FileJson(slot)</span></code> and <code class="docutils literal notranslate"><span class="pre">renpy.slot_json(slot)</span></code> will recover the state
of the <code class="docutils literal notranslate"><span class="pre">d</span></code> dict-like object as it was at the moment the game was saved.
The value of the <code class="docutils literal notranslate"><span class="pre">player_name</span></code> variable at the moment the game was saved
is also accessible by <code class="docutils literal notranslate"><span class="pre">FileJson(slot,</span> <span class="pre">&quot;playername&quot;)</span></code>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_arguments_callback">
define <code class="descname">config.say_arguments_callback</code> = None<a class="headerlink" href="#var-config.say_arguments_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function that takes the speaking character,
followed by positional and keyword arguments. It's called whenever a
say statement occurs with the arguments to that say statement. This
always includes an interact argument, and can include others provided
in the say statement.</p>
<p>This should return a pair, containing a tuple of positional arguments
(almost always empty), and a dictionary of keyword arguments (almost
always with at least interact in it).</p>
<p>For example:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">say_arguments_callback</span><span class="p">(</span><span class="n">who</span><span class="p">,</span> <span class="n">interact</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">&quot;#fff&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="p">(),</span> <span class="p">{</span> <span class="s2">&quot;interact&quot;</span> <span class="p">:</span> <span class="n">interact</span><span class="p">,</span> <span class="s2">&quot;what_color&quot;</span> <span class="p">:</span> <span class="na">color</span> <span class="p">}</span>
<span class="n">config</span><span class="o">.</span><span class="n">say_arguments_callback</span> <span class="o">=</span> <span class="n">say_arguments_callback</span>
</pre></div>
</div>
</dd></dl>
<dl class="var">
<dt id="var-config.screen_height">
define <code class="descname">config.screen_height</code> = 600<a class="headerlink" href="#var-config.screen_height" title="Permalink to this definition"> link</a></dt>
<dd><p>The height of the screen. Usually set by <a class="reference internal" href="gui_advanced.html#gui.init" title="gui.init"><code class="xref py py-func docutils literal notranslate"><span class="pre">gui.init()</span></code></a> to
a much larger size.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.screen_width">
define <code class="descname">config.screen_width</code> = 800<a class="headerlink" href="#var-config.screen_width" title="Permalink to this definition"> link</a></dt>
<dd><p>The width of the screen. Usually set by <a class="reference internal" href="gui_advanced.html#gui.init" title="gui.init"><code class="xref py py-func docutils literal notranslate"><span class="pre">gui.init()</span></code></a> to a much
larger size.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.single_movie_channel">
define <code class="descname">config.single_movie_channel</code> = None<a class="headerlink" href="#var-config.single_movie_channel" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, and the <cite>play</cite> argument is give to <a class="reference internal" href="movie.html#Movie" title="Movie"><code class="xref py py-func docutils literal notranslate"><span class="pre">Movie()</span></code></a>,
this is the name used for the channel the movie is played on.
This should not be &quot;movie&quot;, as that name is reserved for
Ren'Py's internal use.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.skip_sounds">
define <code class="descname">config.skip_sounds</code> = False<a class="headerlink" href="#var-config.skip_sounds" title="Permalink to this definition"> link</a></dt>
<dd><p>If False, non-looping audio will not be played when Ren'Py is
skipping.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.speaking_attribute">
define <code class="descname">config.speaking_attribute</code> = None<a class="headerlink" href="#var-config.speaking_attribute" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a string giving the name of an image
attribute. The image attribute is added to the image when the
character's image tag when the character is speaking, and removed
when the character stops.</p>
<p>This is applied to the image on the default layer for the tag,
which can be set using <a class="reference internal" href="#var-config.tag_layer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.tag_layer</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.tag_layer">
define <code class="descname">config.tag_layer</code> = { }<a class="headerlink" href="#var-config.tag_layer" title="Permalink to this definition"> link</a></dt>
<dd><p>A dictionary mapping image tag strings to layer name strings. When
an image is shown without a specific layer name, the image's tag is
looked up in this dictionary to get the layer to show it on. If the
tag is not found here, <a class="reference internal" href="#var-config.default_tag_layer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.default_tag_layer</span></code></a> is used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.tag_transform">
define <code class="descname">config.tag_transform</code> = { }<a class="headerlink" href="#var-config.tag_transform" title="Permalink to this definition"> link</a></dt>
<dd><p>A dictionary mapping image tag strings to transforms or lists of
transforms. When an image is newly-shown without an at clause,
the image's tag is looked up in this dictionary to find a transform
or list of transforms to use.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.tag_zorder">
define <code class="descname">config.tag_zorder</code> = { }<a class="headerlink" href="#var-config.tag_zorder" title="Permalink to this definition"> link</a></dt>
<dd><p>A dictionary mapping image tag strings to zorders. When an image is
newly-shown without a zorder clause, the image's tag is looked up
in this dictionary to find a zorder to use. If no zorder is found,
0 is used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.thumbnail_height">
define <code class="descname">config.thumbnail_height</code> = 75<a class="headerlink" href="#var-config.thumbnail_height" title="Permalink to this definition"> link</a></dt>
<dd><p>The height of the thumbnails that are taken when the game is
saved. These thumbnails are shown when the game is loaded. Please
note that the thumbnail is shown at the size it was taken at,
rather than the value of this setting when the thumbnail is shown
to the user.</p>
<p>This is changed by the default GUI.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.thumbnail_width">
define <code class="descname">config.thumbnail_width</code> = 100<a class="headerlink" href="#var-config.thumbnail_width" title="Permalink to this definition"> link</a></dt>
<dd><p>The width of the thumbnails that are taken when the game is
saved. These thumbnails are shown when the game is loaded. Please
note that the thumbnail is shown at the size it was taken at,
rather than the value of this setting when the thumbnail is shown
to the user.</p>
<p>This is changed by the default GUI.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.tts_voice">
define <code class="descname">config.tts_voice</code> = None<a class="headerlink" href="#var-config.tts_voice" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a string giving a non-default voice that is used to
play back text-to-speech for self voicing. The possible choices are
platform specific, and so this should be set in a platform-specific
manner. (It may make sense to change this in translations, as well.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.webaudio_required_types">
define <code class="descname">config.webaudio_required_types</code> = [ &quot;audio/ogg&quot;, &quot;audio/mp3&quot; ]<a class="headerlink" href="#var-config.webaudio_required_types" title="Permalink to this definition"> link</a></dt>
<dd><p>When running on the web platform, Ren'Py will check the browser to
see if it can play audio files of these mime types. If the browser
can, it is used to play the files. If not, a slower and potentially skip
prone wasm decoder is used.</p>
<p>By default, the browser's web audio system is used on Chrome and Firefox,
and wasm is used on safari. If your game only uses mp3 audio, this can
be changed using</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">config</span><span class="o">.</span><span class="n">webaudio_required_types</span> <span class="o">=</span> <span class="p">[</span> <span class="s2">&quot;audio/mp3&quot;</span> <span class="p">]</span>
</pre></div>
</div>
<p>To used the faster web audio system on Safari as well.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_auto_hide">
define <code class="descname">config.window_auto_hide</code> = [ 'scene', 'call screen', 'menu', &quot;say-centered&quot; ]<a class="headerlink" href="#var-config.window_auto_hide" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of statements that cause <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">auto</span></code> to hide the empty
dialogue window.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_auto_show">
define <code class="descname">config.window_auto_show</code> = [ 'say', 'menu-with-caption' ]<a class="headerlink" href="#var-config.window_auto_show" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of statements that cause <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">auto</span></code> to show the empty
dialogue window.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_icon">
define <code class="descname">config.window_icon</code> = None<a class="headerlink" href="#var-config.window_icon" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is expected to be the filename of an image
giving an icon that is used for the game's main window. This does
not set the icon used by windows executables and mac apps, as
those are controlled by <a class="reference internal" href="build.html#special-files"><span class="std std-ref">Special Files</span></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_overlay_functions">
define <code class="descname">config.window_overlay_functions</code> = []<a class="headerlink" href="#var-config.window_overlay_functions" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of overlay functions that are only called when the window
is shown.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.window_title">
define <code class="descname">config.window_title</code> = None<a class="headerlink" href="#var-config.window_title" title="Permalink to this definition"> link</a></dt>
<dd><p>The static portion of the title of the window containing the
Ren'Py game. <a class="reference internal" href="store_variables.html#var-_window_subtitle"><code class="xref std std-var docutils literal notranslate"><span class="pre">_window_subtitle</span></code></a> is appended to this to get
the full title of the window.</p>
<p>If None, the default, this defaults to the value of <a class="reference internal" href="#var-config.name"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.name</span></code></a>.</p>
</dd></dl>
</div>
<div class="section" id="rarely-or-internally-used">
<h2>Rarely or Internally Used<a class="headerlink" href="#rarely-or-internally-used" title="Permalink to this headline"> link</a></h2>
<dl class="var">
<dt id="var-config.adjust_view_size">
define <code class="descname">config.adjust_view_size</code> = None<a class="headerlink" href="#var-config.adjust_view_size" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function taking two arguments, the width
and height of the physical window. It is expected to return a tuple
giving the width and height of the OpenGL viewport, the portion of the
screen that Ren'Py will draw pictures to.</p>
<p>This can be used to configure Ren'Py to only allow certain sizes of
screen. For example, the following allows only integer multiples
of the original screen size:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">force_integer_multiplier</span><span class="p">(</span><span class="na">width</span><span class="p">,</span> <span class="na">height</span><span class="p">):</span>
<span class="n">multiplier</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="na">width</span> <span class="o">/</span> <span class="n">config</span><span class="o">.</span><span class="n">screen_width</span><span class="p">,</span> <span class="na">height</span> <span class="o">/</span> <span class="n">config</span><span class="o">.</span><span class="n">screen_height</span><span class="p">)</span>
<span class="n">multiplier</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">multiplier</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">multiplier</span> <span class="o">*</span> <span class="n">config</span><span class="o">.</span><span class="n">screen_width</span><span class="p">,</span> <span class="n">multiplier</span> <span class="o">*</span> <span class="n">config</span><span class="o">.</span><span class="n">screen_height</span><span class="p">)</span>
<span class="n">config</span><span class="o">.</span><span class="n">adjust_view_size</span> <span class="o">=</span> <span class="n">force_integer_multiplier</span>
</pre></div>
</div>
</dd></dl>
<dl class="var">
<dt id="var-config.afm_bonus">
define <code class="descname">config.afm_bonus</code> = 25<a class="headerlink" href="#var-config.afm_bonus" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of bonus characters added to every string when
auto-forward mode is in effect.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.afm_callback">
define <code class="descname">config.afm_callback</code> = None<a class="headerlink" href="#var-config.afm_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, a Python function that is called to determine if it
is safe to auto-forward. The intent is that this can be used by a
voice system to disable auto-forwarding when a voice is playing.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.afm_characters">
define <code class="descname">config.afm_characters</code> = 250<a class="headerlink" href="#var-config.afm_characters" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of characters in a string it takes to cause the amount
of time specified in the auto forward mode preference to be
delayed before auto-forward mode takes effect.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.afm_voice_delay">
define <code class="descname">config.afm_voice_delay</code> = .5<a class="headerlink" href="#var-config.afm_voice_delay" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of seconds after a voice file finishes playing
before AFM can advance text.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.all_character_callbacks">
define <code class="descname">config.all_character_callbacks</code> = [ ]<a class="headerlink" href="#var-config.all_character_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of callbacks that are called by all characters. This list
is prepended to the list of character-specific callbacks.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.allow_skipping">
define <code class="descname">config.allow_skipping</code> = True<a class="headerlink" href="#var-config.allow_skipping" title="Permalink to this definition"> link</a></dt>
<dd><p>If set to False, the user is not able to skip over the text of the
game. See <a class="reference internal" href="store_variables.html#var-_skipping"><code class="xref std std-var docutils literal notranslate"><span class="pre">_skipping</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.allow_screensaver">
define <code class="descname">config.allow_screensaver</code> = True<a class="headerlink" href="#var-config.allow_screensaver" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the screensaver may activite while the game is running. If
False, the screensaver is disabled.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.archives">
define <code class="descname">config.archives</code> = [ ]<a class="headerlink" href="#var-config.archives" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of archive files that will be searched for images and other
data. The entries in this should consist of strings giving the
base names of archive files, without the .rpa extension.</p>
<p>The archives are searched in the order they are found in this list.
A file is taken from the first archive it is found in.</p>
<p>At startup, Ren'Py will automatically populate this variable with
the names of all archives found in the game directory, sorted in
reverse ascii order. For example, if Ren'Py finds the files
data.rpa, patch01.rpa, and patch02.rpa, this variable will be
populated with <code class="docutils literal notranslate"><span class="pre">['patch02',</span> <span class="pre">'patch01',</span> <span class="pre">'data']</span></code>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.at_exit_callbacks">
define <code class="descname">config.at_exit_callbacks</code> = [ ]<a class="headerlink" href="#var-config.at_exit_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of callbacks that are called when Ren'Py quits or restarts
the game. These callbacks should not interact with the user.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.auto_choice_delay">
define <code class="descname">config.auto_choice_delay</code> = None<a class="headerlink" href="#var-config.auto_choice_delay" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this variable gives a number of seconds that Ren'Py
will pause at an in-game menu before picking a random choice from
that menu. We'd expect this variable to always be set to None in
released games, but setting it to a number will allow for
automated demonstrations of games without much human interaction.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autoreload">
define <code class="descname">config.autoreload</code> = True<a class="headerlink" href="#var-config.autoreload" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Shift+R will toggle automatic reloading. When automatic
reloading is enabled, Ren'Py will reload the game whenever a used
file is modified.</p>
<p>If False, Ren'Py will reload the game once per press of Shift+R.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autosave_frequency">
define <code class="descname">config.autosave_frequency</code> = 200<a class="headerlink" href="#var-config.autosave_frequency" title="Permalink to this definition"> link</a></dt>
<dd><p>Roughly, the number of interactions that will occur before an
autosave occurs. To disable autosaving, set <a class="reference internal" href="#var-config.has_autosave"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.has_autosave</span></code></a> to
False, don't change this variable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autosave_on_choice">
define <code class="descname">config.autosave_on_choice</code> = True<a class="headerlink" href="#var-config.autosave_on_choice" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will autosave upon encountering an in-game choice.
(When <a class="reference internal" href="other.html#renpy.choice_for_skipping" title="renpy.choice_for_skipping"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.choice_for_skipping()</span></code></a> is called.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autosave_on_quit">
define <code class="descname">config.autosave_on_quit</code> = True<a class="headerlink" href="#var-config.autosave_on_quit" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will attempt to autosave when the user attempts to quit,
return to the main menu, or load a game over the existing game. (To
save time, the autosave occurs while the user is being prompted to confirm
his or her decision.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.autosave_on_input">
define <code class="descname">config.autosave_on_input</code> = True<a class="headerlink" href="#var-config.autosave_on_input" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will autosave when the user inputs text.
(When <a class="reference internal" href="input.html#renpy.input" title="renpy.input"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.input()</span></code></a> is called.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.call_screen_roll_forward">
define <code class="descname">config.call_screen_roll_forward</code> = False<a class="headerlink" href="#var-config.call_screen_roll_forward" title="Permalink to this definition"> link</a></dt>
<dd><p>The value is used when the <cite>roll_forward</cite> property of
a screen is None.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.character_callback">
define <code class="descname">config.character_callback</code> = None<a class="headerlink" href="#var-config.character_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the callback parameter of Character.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.choice_empty_window">
define <code class="descname">config.choice_empty_window</code> = None<a class="headerlink" href="#var-config.choice_empty_window" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, and a choice menu (usually invoked with the <code class="docutils literal notranslate"><span class="pre">menu</span></code>
statement) does not have a caption, this function is called with
the arguments (&quot;&quot;, interact=False).</p>
<p>The expected use of this is:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">config</span><span class="o">.</span><span class="n">choice_empty_window</span> <span class="o">=</span> <span class="n">extend</span>
</pre></div>
</div>
<p>Doing this displays repeats the last line of dialogue as the
caption of the menu, if no other caption is given.</p>
<p>Other implementations are possible, but it's assumed that this will
always display a dialogue window.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.choice_layer">
define <code class="descname">config.choice_layer</code> = &quot;screens&quot;<a class="headerlink" href="#var-config.choice_layer" title="Permalink to this definition"> link</a></dt>
<dd><p>The layer the choice screen (used by the menu statement) is shown on.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.clear_layers">
define <code class="descname">config.clear_layers</code> = []<a class="headerlink" href="#var-config.clear_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of names of layers to clear when entering the main and game
menus.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.context_clear_layers">
define <code class="descname">config.context_clear_layers</code> = [ 'screens' ]<a class="headerlink" href="#var-config.context_clear_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of layers that are cleared when entering a new context.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.controller_blocklist">
define <code class="descname">config.controller_blocklist</code> = [ ... ]<a class="headerlink" href="#var-config.controller_blocklist" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of strings, where each string is matched against the GUID
of a game controller. These strings are mached as a prefix to the
controller GUID (which cand be found in log.txt), and if matched,
prevent the controller from being initialized.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.exception_handler">
define <code class="descname">config.exception_handler</code> = None<a class="headerlink" href="#var-config.exception_handler" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function that takes three arguments:</p>
<ul class="simple">
<li>A string giving the text of a traceback, abbreviated so that it only includes
creator-written files.</li>
<li>The full text of the traceback, including both creator-written and Ren'Py
files.</li>
<li>The path to a file containing a traceback method.</li>
</ul>
<p>This function can present the error to a user in any way fit. If it returns True,
the exception is ignored and control is transferred to the next statement. If it
returns False, the built-in exception handler is use. This function may also call
<a class="reference internal" href="statement_equivalents.html#renpy.jump" title="renpy.jump"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.jump()</span></code></a> to transfer control to some other label.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.fade_music">
define <code class="descname">config.fade_music</code> = 0.0<a class="headerlink" href="#var-config.fade_music" title="Permalink to this definition"> link</a></dt>
<dd><p>This is the amount of time in seconds to spend fading the old
track out before a new music track starts. This should probably be
fairly short, so the wrong music doesn't play for too long.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.fast_skipping">
define <code class="descname">config.fast_skipping</code> = False<a class="headerlink" href="#var-config.fast_skipping" title="Permalink to this definition"> link</a></dt>
<dd><p>Set this to True to allow fast skipping outside of developer mode.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.file_open_callback">
define <code class="descname">config.file_open_callback</code> = None<a class="headerlink" href="#var-config.file_open_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a function that is called with the file name
when a file needs to be opened. It should return a file-like
object, or None to load the file using the usual Ren'Py
mechanisms. Your file-like object must implement at least the
read, seek, tell, and close methods.</p>
<p>One may want to also define a <a class="reference internal" href="#var-config.loadable_callback"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.loadable_callback</span></code></a> that
matches this.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.focus_crossrange_penalty">
define <code class="descname">config.focus_crossrange_penalty</code> = 1024<a class="headerlink" href="#var-config.focus_crossrange_penalty" title="Permalink to this definition"> link</a></dt>
<dd><p>This is the amount of penalty to apply to moves perpendicular to
the selected direction of motion, when moving focus with the
keyboard.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gl_resize">
define <code class="descname">config.gl_resize</code> = True<a class="headerlink" href="#var-config.gl_resize" title="Permalink to this definition"> link</a></dt>
<dd><p>Determines if the user is allowed to resize an OpenGL-drawn window.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.hard_rollback_limit">
define <code class="descname">config.hard_rollback_limit</code> = 100<a class="headerlink" href="#var-config.hard_rollback_limit" title="Permalink to this definition"> link</a></dt>
<dd><p>This is the number of steps that Ren'Py will let the user
interactively rollback. Set this to 0 to disable rollback
entirely, although we don't recommend that, as rollback is useful
to let the user see text he skipped by mistake.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.help_screen">
define <code class="descname">config.help_screen</code> = &quot;help&quot;<a class="headerlink" href="#var-config.help_screen" title="Permalink to this definition"> link</a></dt>
<dd><p>The name of the screen shown by the <a class="reference internal" href="screen_actions.html#Help" title="Help"><code class="xref py py-func docutils literal notranslate"><span class="pre">Help()</span></code></a> action, or by pressing
f1 on the keyboard.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.hide">
define <code class="descname">config.hide</code> = renpy.hide<a class="headerlink" href="#var-config.hide" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that is called when the <a class="reference internal" href="displaying_images.html#hide-statement"><span class="std std-ref">hide statement</span></a>
is executed. This should take the same arguments as renpy.hide.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.imagemap_auto_function">
define <code class="descname">config.imagemap_auto_function</code> = ...<a class="headerlink" href="#var-config.imagemap_auto_function" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that expands the <cite>auto</cite> property of a screen language
<a class="reference internal" href="screens.html#sl-imagebutton"><span class="std std-ref">imagebutton</span></a> or <a class="reference internal" href="screens.html#sl-imagemap"><span class="std std-ref">imagemap</span></a>
statement into a displayable. It takes the value of the auto property,
and the desired image, one of: &quot;insensitive&quot;, &quot;idle&quot;, &quot;hover&quot;,
&quot;selected_idle&quot;, &quot;selected_hover&quot;, or &quot;ground&quot;. It should return a
displayable or None.</p>
<p>The default implementation formats the <cite>auto</cite> property with
the desired image, and then checks if the computed filename exists.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.keep_side_render_order">
define <code class="descname">config.keep_side_render_order</code> = True<a class="headerlink" href="#var-config.keep_side_render_order" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the order of substrings in the Side positions will be
determine the order of children render.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.implicit_with_none">
define <code class="descname">config.implicit_with_none</code> = True<a class="headerlink" href="#var-config.implicit_with_none" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, then by default the equivalent of a <a class="reference internal" href="displaying_images.html#with-none"><span class="std std-ref">with None</span></a>
statement will be performed after interactions caused by dialogue, menus
input, and imagemaps. This ensures that old screens will not show
up in transitions.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.interact_callbacks">
define <code class="descname">config.interact_callbacks</code> = ...<a class="headerlink" href="#var-config.interact_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions that are called (without any arguments) when
an interaction is started or restarted.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.keep_running_transform">
define <code class="descname">config.keep_running_transform</code> = True<a class="headerlink" href="#var-config.keep_running_transform" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, showing an image without supplying a transform or ATL
block will cause the image to continue the previous transform
an image with that tag was using, if any. If False, the transform
is stopped.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.keymap">
define <code class="descname">config.keymap</code> = dict(...)<a class="headerlink" href="#var-config.keymap" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable contains a keymap giving the keys and mouse buttons
assigned to each possible operation. Please see the section on
<a class="reference internal" href="keymap.html"><span class="doc">Keymaps</span></a> for more information.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.label_callback">
define <code class="descname">config.label_callback</code> = None<a class="headerlink" href="#var-config.label_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is a function that is called whenever a label is
reached. It is called with two parameters. The first is the name
of the label. The second is True if the label was reached through
jumping, calling, or creating a new context, and False
otherwise.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.label_overrides">
define <code class="descname">config.label_overrides</code> = { }<a class="headerlink" href="#var-config.label_overrides" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable gives a way of causing jumps and calls of labels in
Ren'Py script to be redirected to other labels. For example, if you
add a mapping from &quot;start&quot; to &quot;mystart&quot;, all jumps and calls to
&quot;start&quot; will go to &quot;mystart&quot; instead.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.layer_clipping">
define <code class="descname">config.layer_clipping</code> = { }<a class="headerlink" href="#var-config.layer_clipping" title="Permalink to this definition"> link</a></dt>
<dd><p>Controls layer clipping. This is a map from layer names to (x, y,
height, width) tuples, where x and y are the coordinates of the
upper-left corner of the layer, with height and width giving the
layer size.</p>
<p>If a layer is not mentioned in config.layer_clipping, then it is
assumed to take up the full screen.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.layeredimage_offer_screen">
define <code class="descname">config.layeredimage_offer_screen</code> = True<a class="headerlink" href="#var-config.layeredimage_offer_screen" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable sets the default value for the <code class="docutils literal notranslate"><span class="pre">offer_screen</span></code> property
of layeredimages. See <a class="reference internal" href="layeredimage.html#layeredimage-statement"><span class="std std-ref">the related section</span></a>
for more information.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.layers">
define <code class="descname">config.layers</code> = [ 'master', 'transient', 'screens', 'overlay' ]<a class="headerlink" href="#var-config.layers" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable gives a list of all of the layers that Ren'Py knows
about, in the order that they will be displayed to the
screen. (The lowest layer is the first entry in the list.) Ren'Py
uses the layers &quot;master&quot;, &quot;transient&quot;, &quot;screens&quot;, and &quot;overlay&quot;
internally, so they should always be in this list.</p>
<p>The <a class="reference internal" href="other.html#renpy.add_layer" title="renpy.add_layer"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.add_layer()</span></code></a> can add layers to this variable without
needing to know the original contents.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.lint_hooks">
define <code class="descname">config.lint_hooks</code> = ...<a class="headerlink" href="#var-config.lint_hooks" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a list of functions that are called, with no arguments,
when lint is run. The functions are expected to check the script
data for errors, and print any they find to standard output (using
the Python <code class="docutils literal notranslate"><span class="pre">print</span></code> statement is fine in this case).</p>
</dd></dl>
<dl class="var">
<dt id="var-config.load_before_transition">
define <code class="descname">config.load_before_transition</code> = True<a class="headerlink" href="#var-config.load_before_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the start of an interaction will be delayed until all
images used by that interaction have loaded. (Yeah, it's a lousy
name.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.loadable_callback">
define <code class="descname">config.loadable_callback</code> = None<a class="headerlink" href="#var-config.loadable_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>When not None, a function that's called with a filename. It should return
True if the file is loadable, and False if not. This can be used with
<a class="reference internal" href="#var-config.file_open_callback"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.file_open_callback</span></code></a> or <a class="reference internal" href="#var-config.missing_image_callback"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.missing_image_callback</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.log_width">
define <code class="descname">config.log_width</code> = 78<a class="headerlink" href="#var-config.log_width" title="Permalink to this definition"> link</a></dt>
<dd><p>The width of lines logged when <a class="reference internal" href="#var-config.log"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.log</span></code></a> is used.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.longpress_duration">
define <code class="descname">config.longpress_duration</code> = 0.5<a class="headerlink" href="#var-config.longpress_duration" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time the player must press the screen for a longpress
to be recognized on a touch device.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.longpress_radius">
define <code class="descname">config.longpress_radius</code> = 15<a class="headerlink" href="#var-config.longpress_radius" title="Permalink to this definition"> link</a></dt>
<dd><p>The number of pixels the touch must remain within for a press to be
recognized as a longpress.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.longpress_vibrate">
define <code class="descname">config.longpress_vibrate</code> = .1<a class="headerlink" href="#var-config.longpress_vibrate" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time the device will vibrate for after a longpress.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.log">
define <code class="descname">config.log</code> = None<a class="headerlink" href="#var-config.log" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is expected to be a filename. Much of the text
shown to the user by <a class="reference internal" href="dialogue.html#say-statement"><span class="std std-ref">say</span></a> or <a class="reference internal" href="menus.html"><span class="doc">menu</span></a> statements will be logged to this file.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.main_menu_stop_channels">
define <code class="descname">config.main_menu_stop_channels</code> = [ &quot;movie&quot;, &quot;sound&quot;, &quot;voice&quot; ]<a class="headerlink" href="#var-config.main_menu_stop_channels" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of channels that are stopped when entering or returning to the
main menu.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mipmap_dissolves">
define <code class="descname">config.mipmap_dissolves</code> = False<a class="headerlink" href="#var-config.mipmap_dissolves" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the mipmap argument to <a class="reference internal" href="transitions.html#Dissolve" title="Dissolve"><code class="xref py py-func docutils literal notranslate"><span class="pre">Dissolve()</span></code></a>,
<a class="reference internal" href="transitions.html#ImageDissolve" title="ImageDissolve"><code class="xref py py-func docutils literal notranslate"><span class="pre">ImageDissolve()</span></code></a>, <a class="reference internal" href="transitions.html#AlphaDissolve" title="AlphaDissolve"><code class="xref py py-func docutils literal notranslate"><span class="pre">AlphaDissolve()</span></code></a>, and <a class="reference internal" href="displayables.html#AlphaMask" title="AlphaMask"><code class="xref py py-func docutils literal notranslate"><span class="pre">AlphaMask()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mipmap_movies">
define <code class="descname">config.mipmap_movies</code> = False<a class="headerlink" href="#var-config.mipmap_movies" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the mipmap argument to <a class="reference internal" href="movie.html#Movie" title="Movie"><code class="xref py py-func docutils literal notranslate"><span class="pre">Movie()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mipmap_text">
define <code class="descname">config.mipmap_text</code> = False<a class="headerlink" href="#var-config.mipmap_text" title="Permalink to this definition"> link</a></dt>
<dd><p>The default value of the mipmap argument to <a class="reference internal" href="text.html#Text" title="Text"><code class="xref py py-func docutils literal notranslate"><span class="pre">Text()</span></code></a>, including
text used in screen statements.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.missing_image_callback">
define <code class="descname">config.missing_image_callback</code> = None<a class="headerlink" href="#var-config.missing_image_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this function is called when an attempt to load an
image fails. It may return None, or it may return an image
manipulator. If an image manipulator is returned, that image
manipulator is loaded in the place of the missing image.</p>
<p>One may want to also define a <a class="reference internal" href="#var-config.loadable_callback"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.loadable_callback</span></code></a>,
especially if this is used with a <a class="reference internal" href="displayables.html#DynamicImage" title="DynamicImage"><code class="xref py py-func docutils literal notranslate"><span class="pre">DynamicImage()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.missing_label_callback">
define <code class="descname">config.missing_label_callback</code> = None<a class="headerlink" href="#var-config.missing_label_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this function is called when Ren'Py attempts to access
a label that does not exist in the game. The callback should take a
single parameter, the name of the missing label. It should return the
name of a label to use as a replacement for the missing label, or None
to cause Ren'Py to raise an exception.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mouse_focus_clickthrough">
define <code class="descname">config.mouse_focus_clickthrough</code> = False<a class="headerlink" href="#var-config.mouse_focus_clickthrough" title="Permalink to this definition"> link</a></dt>
<dd><p>If true, clicks that cause a window to be focused will be processed
normally. If false, such clicks will be ignored.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.mouse_hide_time">
define <code class="descname">config.mouse_hide_time</code> = 30<a class="headerlink" href="#var-config.mouse_hide_time" title="Permalink to this definition"> link</a></dt>
<dd><p>The mouse is hidden after this number of seconds has elapsed
without any mouse input. This should be set to longer than the
expected time it will take to read a single screen, so mouse users
will not experience the mouse appearing then disappearing between
clicks.</p>
<p>If None, the mouse will never be hidden.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.movie_mixer">
define <code class="descname">config.movie_mixer</code> = &quot;music&quot;<a class="headerlink" href="#var-config.movie_mixer" title="Permalink to this definition"> link</a></dt>
<dd><p>The mixer that is used when a <a class="reference internal" href="movie.html#Movie" title="Movie"><code class="xref py py-func docutils literal notranslate"><span class="pre">Movie()</span></code></a> automatically defines
a channel for video playback.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.new_translate_order">
define <code class="descname">config.new_translate_order</code> = True<a class="headerlink" href="#var-config.new_translate_order" title="Permalink to this definition"> link</a></dt>
<dd><p>Enables the new order of style and translate statements introduced in
<a class="reference internal" href="changelog6.html#renpy-6-99-11"><span class="std std-ref">Ren'Py 6.99.11</span></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.new_substitutions">
define <code class="descname">config.new_substitutions</code> = True<a class="headerlink" href="#var-config.new_substitutions" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will apply new-style (square-bracket)
substitutions to all text displayed.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.old_substitutions">
define <code class="descname">config.old_substitutions</code> = True<a class="headerlink" href="#var-config.old_substitutions" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will apply old-style (percent) substitutions to
text displayed by the <a class="reference internal" href="dialogue.html#say-statement"><span class="std std-ref">say</span></a> and <a class="reference internal" href="menus.html"><span class="doc">menu</span></a> statements.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.open_file_encoding">
define <code class="descname">config.open_file_encoding</code> = False<a class="headerlink" href="#var-config.open_file_encoding" title="Permalink to this definition"> link</a></dt>
<dd><p>If not False, this is the encoding that <a class="reference internal" href="file_python.html#renpy.open_file" title="renpy.open_file"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.open_file()</span></code></a> uses
when its <cite>encoding</cite> parameter is none. This is mostly used when porting
Python 2 games that used <a class="reference internal" href="file_python.html#renpy.file" title="renpy.file"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.file()</span></code></a> extensively to Python 3,
to have those files open as text by default.</p>
<p>This gets its default value from the RENPY_OPEN_FILE_ENCODING
environment variable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.overlay_during_with">
define <code class="descname">config.overlay_during_with</code> = True<a class="headerlink" href="#var-config.overlay_during_with" title="Permalink to this definition"> link</a></dt>
<dd><p>True if we want overlays to be shown during <a class="reference internal" href="displaying_images.html#with-statement"><span class="std std-ref">with statements</span></a>, or False if we'd prefer that they be hidden during
the with statements.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.overlay_layers">
define <code class="descname">config.overlay_layers</code> = [ 'overlay' ]<a class="headerlink" href="#var-config.overlay_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a list of all of the overlay layers. Overlay layers are
cleared before the overlay functions are called. &quot;overlay&quot; should
always be in this list.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.pause_with_transition">
define <code class="descname">config.pause_with_transition</code> = False<a class="headerlink" href="#var-config.pause_with_transition" title="Permalink to this definition"> link</a></dt>
<dd><p>If false, <a class="reference internal" href="statement_equivalents.html#renpy.pause" title="renpy.pause"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.pause()</span></code></a> is always, used by the <code class="docutils literal notranslate"><span class="pre">pause</span></code> statement.
If true, when given a delay, <code class="docutils literal notranslate"><span class="pre">pause</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">with</span> <span class="pre">Pause(...)</span></code>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.per_frame_screens">
define <code class="descname">config.per_frame_screens</code> = [ ... ]<a class="headerlink" href="#var-config.per_frame_screens" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a list of strings giving the name of screens that are updated
once per frame, rather than once per interaction. Ren'Py uses this internally,
so if you add a screen, append the name rather than replacing the list in
its entirety.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.periodic_callback">
define <code class="descname">config.periodic_callback</code> = None<a class="headerlink" href="#var-config.periodic_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function. The function is called,
with no arguments, at around 20Hz.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.play_channel">
define <code class="descname">config.play_channel</code> = &quot;audio&quot;<a class="headerlink" href="#var-config.play_channel" title="Permalink to this definition"> link</a></dt>
<dd><p>The name of the audio channel used by <a class="reference internal" href="audio.html#renpy.play" title="renpy.play"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.play()</span></code></a>,
<a class="reference internal" href="style_properties.html#style-property-hover_sound"><code class="xref std std-propref docutils literal notranslate"><span class="pre">hover_sound</span></code></a>, and <a class="reference internal" href="style_properties.html#style-property-activate_sound"><code class="xref std std-propref docutils literal notranslate"><span class="pre">activate_sound</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.predict_statements">
define <code class="descname">config.predict_statements</code> = 32<a class="headerlink" href="#var-config.predict_statements" title="Permalink to this definition"> link</a></dt>
<dd><p>This is the number of statements, including the current one, to
consider when doing predictive image loading. A breadth-first
search from the current statement is performed until this number
of statements is considered, and any image referenced in those
statements is potentially predictively loaded. Setting this to 0
will disable predictive loading of images.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.profile">
define <code class="descname">config.profile</code> = False<a class="headerlink" href="#var-config.profile" title="Permalink to this definition"> link</a></dt>
<dd><p>If set to True, some profiling information will be output to
stdout.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.profile_init">
define <code class="descname">config.profile_init</code> = 0.25<a class="headerlink" href="#var-config.profile_init" title="Permalink to this definition"> link</a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">init</span></code> and <code class="docutils literal notranslate"><span class="pre">init</span> <span class="pre">python</span></code> blocks taking longer than this amount of time
to run are reported to log file.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.quit_on_mobile_background">
define <code class="descname">config.quit_on_mobile_background</code> = False<a class="headerlink" href="#var-config.quit_on_mobile_background" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the mobile app will quit when it loses focus, rather than
saving and restoring its state. (See also <a class="reference internal" href="#var-config.save_on_mobile_background"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.save_on_mobile_background</span></code></a>,
which controls this behavior.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.rollback_enabled">
define <code class="descname">config.rollback_enabled</code> = True<a class="headerlink" href="#var-config.rollback_enabled" title="Permalink to this definition"> link</a></dt>
<dd><p>Should the user be allowed to rollback the game? If set to False,
the user cannot interactively rollback.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.rollback_length">
define <code class="descname">config.rollback_length</code> = 128<a class="headerlink" href="#var-config.rollback_length" title="Permalink to this definition"> link</a></dt>
<dd><p>When there are more than this many statements in the rollback log,
Ren'Py will consider trimming the log. This also covers how many
steps Ren'Py will rollback when trying to load a save when the script
has changed.</p>
<p>Decreasing this below the default value may cause Ren'Py to become
unstable.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.rollback_side_size">
define <code class="descname">config.rollback_side_size</code> = .2<a class="headerlink" href="#var-config.rollback_side_size" title="Permalink to this definition"> link</a></dt>
<dd><p>If the rollback side is enabled, the fraction of the screen on the
rollback side that, when clicked or touched, causes a rollback to
occur.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_allow_dismiss">
define <code class="descname">config.say_allow_dismiss</code> = None<a class="headerlink" href="#var-config.say_allow_dismiss" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function. The function is called
with no arguments when the user attempts to dismiss a <a class="reference internal" href="dialogue.html#say-statement"><span class="std std-ref">say
statement</span></a>. If this function returns True, the
dismissal is allowed, otherwise it is ignored.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_layer">
define <code class="descname">config.say_layer</code> = &quot;screens&quot;<a class="headerlink" href="#var-config.say_layer" title="Permalink to this definition"> link</a></dt>
<dd><p>The layer the say screen is shown on.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_menu_text_filter">
define <code class="descname">config.say_menu_text_filter</code> = None<a class="headerlink" href="#var-config.say_menu_text_filter" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, then this is a function that is given the text found
in strings in the <a class="reference internal" href="dialogue.html#say-statement"><span class="std std-ref">say</span></a> and <a class="reference internal" href="menus.html"><span class="doc">menu</span></a> statements. It is expected to return new
(or the same) strings to replace them.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.say_sustain_callbacks">
define <code class="descname">config.say_sustain_callbacks</code> = ...<a class="headerlink" href="#var-config.say_sustain_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions that are called, without arguments, before the
second and later interactions caused by a line of dialogue with
pauses in it. Used to sustain voice through pauses.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.save_dump">
define <code class="descname">config.save_dump</code> = False<a class="headerlink" href="#var-config.save_dump" title="Permalink to this definition"> link</a></dt>
<dd><p>If set to True, Ren'Py will create the file save_dump.txt whenever it
saves a game. This file contains information about the objects contained
in the save file. Each line consists of a relative size estimate, the path
to the object, information about if the object is an alias, and a
representation of the object.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.save_on_mobile_background">
define <code class="descname">config.save_on_mobile_background</code> = True<a class="headerlink" href="#var-config.save_on_mobile_background" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the mobile app will save its state when it loses focus. The state
is saved in a way that allows it to be automatically loaded (and the game
to resume its place) when the app starts again.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.save_physical_size">
define <code class="descname">config.save_physical_size</code> = True<a class="headerlink" href="#var-config.save_physical_size" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the physical size of the window will be saved in the
preferences, and restored when the game resumes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.savedir">
define <code class="descname">config.savedir</code> = ...<a class="headerlink" href="#var-config.savedir" title="Permalink to this definition"> link</a></dt>
<dd><p>The complete path to the directory in which the game is
saved. This should only be set in a <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">early</span></code> block. See also
config.save_directory, which generates the default value for this
if it is not set during a <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">early</span></code> block.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.scene">
define <code class="descname">config.scene</code> = renpy.scene<a class="headerlink" href="#var-config.scene" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that's used in place of <a class="reference internal" href="statement_equivalents.html#renpy.scene" title="renpy.scene"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.scene()</span></code></a> by the <a class="reference internal" href="displaying_images.html#scene-statement"><span class="std std-ref">scene
statement</span></a>. Note that this is used to clear the screen,
and <a class="reference internal" href="#var-config.show"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.show</span></code></a> is used to show a new image. This should have the same
signature as <a class="reference internal" href="statement_equivalents.html#renpy.scene" title="renpy.scene"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.scene()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.screenshot_callback">
define <code class="descname">config.screenshot_callback</code> = ...<a class="headerlink" href="#var-config.screenshot_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that is called when a screenshot is taken. The function
is called with a single parameter, the full filename the screenshot
was saved as.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.screenshot_crop">
define <code class="descname">config.screenshot_crop</code> = None<a class="headerlink" href="#var-config.screenshot_crop" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a (<cite>x</cite>, <cite>y</cite>, <cite>height</cite>, <cite>width</cite>)
tuple. Screenshots are cropped to this rectangle before being
saved.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.screenshot_pattern">
define <code class="descname">config.screenshot_pattern</code> = &quot;screenshot%04d.png&quot;<a class="headerlink" href="#var-config.screenshot_pattern" title="Permalink to this definition"> link</a></dt>
<dd><p>The pattern used to create screenshot files. This pattern is applied (using
Python's %-formatting rules) to the natural numbers to generate a sequence
of filenames. The filenames may be absolute, or relative to
config.renpy_base. The first filename that does not exist is used as the
name of the screenshot.</p>
<p>Directories are created if they do not exist.</p>
<p>See also <a class="reference internal" href="store_variables.html#var-_screenshot_pattern"><code class="xref std std-var docutils literal notranslate"><span class="pre">_screenshot_pattern</span></code></a>, which is used in preference to this
variable if not None.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.script_version">
define <code class="descname">config.script_version</code> = None<a class="headerlink" href="#var-config.script_version" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this is interpreted as a script version. The library
will use this script version to enable some compatibility
features, if necessary. If None, we assume this is a
latest-version script.</p>
<p>This is normally set in a file added by the Ren'Py launcher when
distributions are built.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.searchpath">
define <code class="descname">config.searchpath</code> = [ 'common', 'game' ]<a class="headerlink" href="#var-config.searchpath" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of directories that are searched for images, music,
archives, and other media, but not scripts. This is initialized to
a list containing &quot;common&quot; and the name of the game directory.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.search_prefixes">
define <code class="descname">config.search_prefixes</code> = [ &quot;&quot;, &quot;images/&quot; ]<a class="headerlink" href="#var-config.search_prefixes" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of prefixes that are prepended to filenames that are searched
for.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.show">
define <code class="descname">config.show</code> = renpy.show<a class="headerlink" href="#var-config.show" title="Permalink to this definition"> link</a></dt>
<dd><p>A function that is used in place of <a class="reference internal" href="statement_equivalents.html#renpy.show" title="renpy.show"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.show()</span></code></a> by the <a class="reference internal" href="displaying_images.html#show-statement"><span class="std std-ref">show</span></a> and <a class="reference internal" href="displaying_images.html#scene-statement"><span class="std std-ref">scene</span></a> statements. This
should have the same signature as <a class="reference internal" href="statement_equivalents.html#renpy.show" title="renpy.show"><code class="xref py py-func docutils literal notranslate"><span class="pre">renpy.show()</span></code></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.skip_delay">
define <code class="descname">config.skip_delay</code> = 75<a class="headerlink" href="#var-config.skip_delay" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time that dialogue will be shown for, when skipping
statements using ctrl, in milliseconds. (Although it's nowhere
near that precise in practice.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.skip_indicator">
define <code class="descname">config.skip_indicator</code> = True<a class="headerlink" href="#var-config.skip_indicator" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the library will display a skip indicator when skipping
through the script.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.sound">
define <code class="descname">config.sound</code> = True<a class="headerlink" href="#var-config.sound" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, sound works. If False, the sound/mixer subsystem is
completely disabled.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.sound_sample_rate">
define <code class="descname">config.sound_sample_rate</code> = 48000<a class="headerlink" href="#var-config.sound_sample_rate" title="Permalink to this definition"> link</a></dt>
<dd><p>The sample rate that the sound card will be run at. If all of your
wav files are of a lower rate, changing this to that rate may make
things more efficient.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.start_callbacks">
define <code class="descname">config.start_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.start_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of callbacks functions that are called with no arguments
after the init phase, but before the game (including the
splashscreen) starts. This is intended to be used by frameworks
to initialize variables that will be saved.</p>
<p>The default value of this variable includes callbacks that Ren'Py
uses internally to implement features such as nvl-mode. New
callbacks can be appended to this list, but the existing callbacks
should not be removed.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.start_interact_callbacks">
define <code class="descname">config.start_interact_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.start_interact_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions that are called (without any arguments) when
an interaction is started. These callbacks are not called when an
interaction is restarted.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.quit_callbacks">
define <code class="descname">config.quit_callbacks</code> = [ ... ]<a class="headerlink" href="#var-config.quit_callbacks" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of functions that are called (without any arguments) when
Ren'Py terminates. This is intended to free resources, such as
opened files or started threads.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.top_layers">
define <code class="descname">config.top_layers</code> = [ ]<a class="headerlink" href="#var-config.top_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>This is a list of names of layers that are displayed above all
other layers, and do not participate in a transition that is
applied to all layers. If a layer name is listed here, it should
not be listed in config.layers.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.transient_layers">
define <code class="descname">config.transient_layers</code> = [ 'transient' ]<a class="headerlink" href="#var-config.transient_layers" title="Permalink to this definition"> link</a></dt>
<dd><p>This variable gives a list of all of the transient
layers. Transient layers are layers that are cleared after each
interaction. &quot;transient&quot; should always be in this list.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.transform_uses_child_position">
define <code class="descname">config.transform_uses_child_position</code> = True<a class="headerlink" href="#var-config.transform_uses_child_position" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, transforms will inherit <a class="reference internal" href="style_properties.html#position-style-properties"><span class="std std-ref">position properties</span></a> from their child. If not, they won't.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.transition_screens">
define <code class="descname">config.transition_screens</code> = True<a class="headerlink" href="#var-config.transition_screens" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, screens will participate in transitions, dissolving from the
old state of the screen to the new state of the screen. If False, only
the latest state of the screen will be shown.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.translate_clean_stores">
define <code class="descname">config.translate_clean_stores</code> = [ &quot;gui&quot; ]<a class="headerlink" href="#var-config.translate_clean_stores" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of named stores that are cleaned to their state at the end of
the init phase when the translation language changes.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.variants">
define <code class="descname">config.variants</code> = [ ... ]<a class="headerlink" href="#var-config.variants" title="Permalink to this definition"> link</a></dt>
<dd><p>A list of screen variants that are searched when choosing a screen to
display to the user. This should always end with None, to ensure
that the default screens are chosen. See <a class="reference internal" href="screens.html#screen-variants"><span class="std std-ref">Screen Variants</span></a>.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.voice_filename_format">
define <code class="descname">config.voice_filename_format</code> = &quot;{filename}&quot;<a class="headerlink" href="#var-config.voice_filename_format" title="Permalink to this definition"> link</a></dt>
<dd><p>A string that is formatted with the string argument to the voice
statement to produce the filename that is played to the user. For
example, if this is &quot;{filename}.ogg&quot;, the <code class="docutils literal notranslate"><span class="pre">voice</span> <span class="pre">&quot;test&quot;</span></code> statement
will play test.ogg.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.with_callback">
define <code class="descname">config.with_callback</code> = None<a class="headerlink" href="#var-config.with_callback" title="Permalink to this definition"> link</a></dt>
<dd><p>If not None, this should be a function that is called when a <a class="reference internal" href="displaying_images.html#with-statement"><span class="std std-ref">with
statement</span></a> occurs. This function can be responsible for
putting up transient things on the screen during the transition. The
function is called with two arguments: the transition that is occurring,
and the transition it is paired with. The latter is None except in the case
of the implicit None transition produced by an inline with statement, in
which case it is the inline transition that produced the with None. It is
expected to return a transition, which may or may not be the transition
supplied as its argument.</p>
</dd></dl>
</div>
<div class="section" id="garbage-collection">
<h2>Garbage Collection<a class="headerlink" href="#garbage-collection" title="Permalink to this headline"> link</a></h2>
<p>These variables allow you to tune the Python garbage collector and the
Ren'Py management of the Python garbage collector.</p>
<dl class="var">
<dt id="var-config.manage_gc">
define <code class="descname">config.manage_gc</code> = True<a class="headerlink" href="#var-config.manage_gc" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will manage the GC itself. This means that it will apply
the settings below.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gc_thresholds">
define <code class="descname">config.gc_thresholds</code> = (25000, 10, 10)<a class="headerlink" href="#var-config.gc_thresholds" title="Permalink to this definition"> link</a></dt>
<dd><p>The GC thresholds that Ren'Py uses when not idle. These are set to try
to ensure that garbage collection doesn't happen. The three numbers are:</p>
<ul class="simple">
<li>The net number of objects that need to be allocated before a level-0
collection.</li>
<li>The number of level-0 collections that trigger a level-1 collection.</li>
<li>The number of level-1 collections that trigger a level-2 collection.</li>
</ul>
<p>(Level-0 collections should be fast enough to not cause a frame drop,
level-1 collections might, level-2 will.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.idle_gc_count">
define <code class="descname">config.idle_gc_count</code> = 2500<a class="headerlink" href="#var-config.idle_gc_count" title="Permalink to this definition"> link</a></dt>
<dd><p>The net number of objects that triggers a collection when Ren'Py has
reached a steady state. (The fourth frame or later after the screen has been
updated.)</p>
</dd></dl>
<dl class="var">
<dt id="var-config.gc_print_unreachable">
define <code class="descname">config.gc_print_unreachable</code> = False<a class="headerlink" href="#var-config.gc_print_unreachable" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will print to its console and logs information about the
objects that are triggering collections.</p>
</dd></dl>
</div>
<div class="section" id="other-configuration-variables">
<h2>Other Configuration Variables<a class="headerlink" href="#other-configuration-variables" title="Permalink to this headline"> link</a></h2>
<p>Some other pages of this documentation contain and define other configuration
variables. You can locate them there, in their context.</p>
<p><a class="reference internal" href="achievement.html"><span class="doc">Achievements</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="achievement.html#var-config.steam_appid"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.steam_appid</span></code></a></li>
</ul>
<p><a class="reference internal" href="custom_text_tags.html"><span class="doc">Custom Text Tags</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="custom_text_tags.html#var-config.custom_text_tags"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.custom_text_tags</span></code></a></li>
<li><a class="reference internal" href="custom_text_tags.html#var-config.self_closing_custom_text_tags"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.self_closing_custom_text_tags</span></code></a></li>
</ul>
<p><a class="reference internal" href="gesture.html"><span class="doc">Gestures</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="gesture.html#var-config.dispatch_gesture"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.dispatch_gesture</span></code></a></li>
<li><a class="reference internal" href="gesture.html#var-config.gestures"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.gestures</span></code></a></li>
</ul>
<p><a class="reference internal" href="gui.html"><span class="doc">GUI Customization Guide</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="gui.html#var-config.thumbnail_height"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.thumbnail_height</span></code></a></li>
<li><a class="reference internal" href="gui.html#var-config.thumbnail_width"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.thumbnail_width</span></code></a></li>
</ul>
<p><a class="reference internal" href="live2d.html"><span class="doc">Live2D Cubism</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="live2d.html#var-config.log_live2d_loading"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.log_live2d_loading</span></code></a></li>
</ul>
<p><a class="reference internal" href="model.html"><span class="doc">Model-Based Rendering</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="model.html#var-config.gl2"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.gl2</span></code></a></li>
<li><a class="reference internal" href="model.html#var-config.gl_blend_func"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.gl_blend_func</span></code></a></li>
<li><a class="reference internal" href="model.html#var-config.log_gl_shaders"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.log_gl_shaders</span></code></a></li>
</ul>
<p><a class="reference internal" href="nvl_mode.html"><span class="doc">NVL-Mode Tutorial</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="nvl_mode.html#var-config.nvl_layer"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_layer</span></code></a></li>
<li><a class="reference internal" href="nvl_mode.html#var-config.nvl_list_length"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_list_length</span></code></a></li>
<li><a class="reference internal" href="nvl_mode.html#var-config.nvl_page_ctc"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_page_ctc</span></code></a></li>
<li><a class="reference internal" href="nvl_mode.html#var-config.nvl_page_ctc_position"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_page_ctc_position</span></code></a></li>
<li><a class="reference internal" href="nvl_mode.html#var-config.nvl_paged_rollback"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.nvl_paged_rollback</span></code></a></li>
</ul>
<p><a class="reference internal" href="preferences.html"><span class="doc">Preference Variables</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="preferences.html#var-config.default_music_volume"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.default_music_volume</span></code></a></li>
<li><a class="reference internal" href="preferences.html#var-config.default_sfx_volume"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.default_sfx_volume</span></code></a></li>
<li><a class="reference internal" href="preferences.html#var-config.default_voice_volume"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.default_voice_volume</span></code></a></li>
</ul>
<p><a class="reference internal" href="self_voicing.html"><span class="doc">Self-Voicing</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="self_voicing.html#var-config.descriptive_text_character"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.descriptive_text_character</span></code></a></li>
</ul>
<p><a class="reference internal" href="side_image.html"><span class="doc">Side Images</span></a>:</p>
<ul class="simple">
<li><a class="reference internal" href="side_image.html#var-config.side_image_change_transform"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_change_transform</span></code></a></li>
<li><a class="reference internal" href="side_image.html#var-config.side_image_null"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_null</span></code></a></li>
<li><a class="reference internal" href="side_image.html#var-config.side_image_only_not_showing"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_only_not_showing</span></code></a></li>
<li><a class="reference internal" href="side_image.html#var-config.side_image_prefix_tag"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_prefix_tag</span></code></a></li>
<li><a class="reference internal" href="side_image.html#var-config.side_image_same_transform"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_same_transform</span></code></a></li>
<li><a class="reference internal" href="side_image.html#var-config.side_image_tag"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.side_image_tag</span></code></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
&copy; Copyright 2012-2022, Tom Rothamel.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.6.<br/>
</p>
</div>
</footer>
</body>
</html>