renpy/doc/preferences.html
2023-01-18 23:13:55 +01:00

495 lines
29 KiB
HTML

<!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>Preference 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="Store Variables" href="store_variables.html" />
<link rel="prev" title="Configuration Variables" href="config.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"><a class="reference internal" href="config.html">Configuration Variables</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">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="#">Preference Variables</a><ul>
<li><a class="reference internal" href="#mixer-functions">Mixer Functions</a></li>
<li><a class="reference internal" href="#audio-channel-defaults">Audio Channel Defaults</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="preference-variables">
<h1>Preference Variables<a class="headerlink" href="#preference-variables" title="Permalink to this headline"> link</a></h1>
<p>Preference variables store the values of Ren'Py preferences. While the value
of a preference should be set at runtime using the <a class="reference internal" href="screen_actions.html#Preference" title="Preference"><code class="xref py py-func docutils literal notranslate"><span class="pre">Preference()</span></code></a> action,
preference variables should be used in conjunction with the default statement
to set the default value of a preference.</p>
<p>For example:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">default</span> <span class="n">preferences</span><span class="o">.</span><span class="n">text_cps</span> <span class="o">=</span> <span class="mi">40</span>
</pre></div>
</div>
<p>sets the default text speed to 40 characters per second. The default statement
only sets the value of the preference if the default has changed since the
preference was set. For example, if the player changes the speed to 50,
it will remain at 50 over future runs of the game. If, in an upgrade, the
default is set to 42, the player's setting will be changed to 42. (The player
can then change it again.)</p>
<dl class="var">
<dt id="var-preferences.afm_after_click">
<code class="descname">preferences.afm_after_click</code> = False<a class="headerlink" href="#var-preferences.afm_after_click" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the auto-forward mode will be continued after a click. If False,
a click will end auto-forward mode. The equivalent of the &quot;auto-forward
after click&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.afm_enable">
<code class="descname">preferences.afm_enable</code> = False<a class="headerlink" href="#var-preferences.afm_enable" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, auto-forward move is enabled, otherwise False. The equivalent
of the &quot;auto-forward time&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.afm_time">
<code class="descname">preferences.afm_time</code> = 15<a class="headerlink" href="#var-preferences.afm_time" title="Permalink to this definition"> link</a></dt>
<dd><p>The amount of time to wait for auto-forward mode. Bigger numbers are
slower, though the conversion to wall time is complicated, as the
speed takes into account line length. The equivalent of the
&quot;auto-forward&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.desktop_rollback_side">
<code class="descname">preferences.desktop_rollback_side</code> = &quot;disable&quot;<a class="headerlink" href="#var-preferences.desktop_rollback_side" title="Permalink to this definition"> link</a></dt>
<dd><p>When on a desktop platform, touches or clicks to this side of the window
cause rollback to occur. One of &quot;left&quot;, &quot;right&quot;, or &quot;disable&quot;. This is
the equivalend of the &quot;rollback side&quot; preference when on a desktop
platform.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.mobile_rollback_side">
<code class="descname">preferences.mobile_rollback_side</code> = &quot;disable&quot;<a class="headerlink" href="#var-preferences.mobile_rollback_side" title="Permalink to this definition"> link</a></dt>
<dd><p>When on a mobile platform, touches or clicks to this side of the window
cause rollback to occur. One of &quot;left&quot;, &quot;right&quot;, or &quot;disable&quot;. This is
the equivalend of the &quot;rollback side&quot; preference when on a mobile
platform.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.language">
<code class="descname">preferences.language</code> = None<a class="headerlink" href="#var-preferences.language" title="Permalink to this definition"> link</a></dt>
<dd><p>The language that the player has selected to use when running the game.
This is None for the default language or a string containing a language
the game is translated to.</p>
<p>This can be used to set the default language, and can be read to determine
the current language. The <a class="reference internal" href="translation.html#Language" title="Language"><code class="xref py py-func docutils literal notranslate"><span class="pre">Language()</span></code></a> action can be used to change
the language.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.emphasize_audio">
<code class="descname">preferences.emphasize_audio</code> = False<a class="headerlink" href="#var-preferences.emphasize_audio" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, Ren'Py will emphasize the audio channels found in <a class="reference internal" href="config.html#var-config.emphasize_audio_channels"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.emphasize_audio_channels</span></code></a>
by reducing the volume of other channels. (For example, reducing the music volume when voice
is playing.) If False, this doesn't happen.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.fullscreen">
<code class="descname">preferences.fullscreen</code> = False<a class="headerlink" href="#var-preferences.fullscreen" title="Permalink to this definition"> link</a></dt>
<dd><p>This is True when Ren'Py is in fullscreen mode, and False when it
is running in a window. The equivalent of the &quot;display&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.gl_framerate">
<code class="descname">preferences.gl_framerate</code> = None<a class="headerlink" href="#var-preferences.gl_framerate" title="Permalink to this definition"> link</a></dt>
<dd><p>This is either an integer, or None. If not None, it's a target framerate
that Ren'Py will attempt to achieve. If this is set low (for example, to
30), on a monitor with a high framerate (say, 60 frames per second),
Ren'Py will only draw on every other frame.</p>
<p>If None, Ren'Py will attempt to draw at the monitor's full framerate.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.gl_powersave">
<code class="descname">preferences.gl_powersave</code> = &quot;auto&quot;<a class="headerlink" href="#var-preferences.gl_powersave" title="Permalink to this definition"> link</a></dt>
<dd><p>This determines how often Ren'Py will redraw an unchanging screen. If True,
Ren'Py will only draw the screen 5 times a second. If False, it will always
draw at the full framerate possible. If &quot;auto&quot;, it will draw at full speed
when the device is powered, and 5hz when it is running on battery.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.gl_tearing">
<code class="descname">preferences.gl_tearing</code> = False<a class="headerlink" href="#var-preferences.gl_tearing" title="Permalink to this definition"> link</a></dt>
<dd><p>This determines if tearing (True) or frameskip (False) is the preferred
behavior when the game can't keep up with its intended framerate.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.mouse_move">
<code class="descname">preferences.mouse_move</code> = True<a class="headerlink" href="#var-preferences.mouse_move" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the mouse will automatically move to a selected button. If False,
it will not. The equivalent of the &quot;automatic mouse move&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.show_empty_window">
<code class="descname">preferences.show_empty_window</code> = True<a class="headerlink" href="#var-preferences.show_empty_window" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the window show and window auto statements will function. If
False, those statements are disabled. The equivalent of the &quot;show empty window&quot;
preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.skip_after_choices">
<code class="descname">preferences.skip_after_choices</code> = False<a class="headerlink" href="#var-preferences.skip_after_choices" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, skipping will resume after a choice. If False, a choice will
prevent Ren'Py from skipping. The equivalent of the &quot;after choices&quot;
preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.skip_unseen">
<code class="descname">preferences.skip_unseen</code> = False<a class="headerlink" href="#var-preferences.skip_unseen" title="Permalink to this definition"> link</a></dt>
<dd><p>When True, Ren'Py will skip all text. When False, Ren'Py will
only skip text that has been read by the player in any session.
The equivalent of the &quot;skip&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.text_cps">
<code class="descname">preferences.text_cps</code> = 0<a class="headerlink" href="#var-preferences.text_cps" title="Permalink to this definition"> link</a></dt>
<dd><p>The speed of text display. 0 is infinite, otherwise this is the number
of characters per second to show. The equivalent of the &quot;text speed&quot;
preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.transitions">
<code class="descname">preferences.transitions</code> = 2<a class="headerlink" href="#var-preferences.transitions" title="Permalink to this definition"> link</a></dt>
<dd><p>Determines which transitions should be shown. 2 shows all transitions,
0 shows no transitions. (1 is reserved.) The equivalent of the
&quot;transitions&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.video_image_fallback">
<code class="descname">preferences.video_image_fallback</code> = False<a class="headerlink" href="#var-preferences.video_image_fallback" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, images are displayed instead of videosprites. If False,
video sprites are displayed normally. The equivalent (inverted) of the
&quot;video sprites&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.voice_sustain">
<code class="descname">preferences.voice_sustain</code> = False<a class="headerlink" href="#var-preferences.voice_sustain" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, voice keeps playing until finished, or another voice line
replaces it. If False, the voice line ends when the line of dialogue
advances. The equivalent of the &quot;voice sustain&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.wait_voice">
<code class="descname">preferences.wait_voice</code> = True<a class="headerlink" href="#var-preferences.wait_voice" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, auto-forward mode will wait for voice files and self-voicing to
finish before advancing. If False, it will not. The equivalent of the
&quot;wait for voice&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.system_cursor">
<code class="descname">preferences.system_cursor</code> = False<a class="headerlink" href="#var-preferences.system_cursor" title="Permalink to this definition"> link</a></dt>
<dd><p>If True, the system cursor is forced to be used, ignoring the
<a class="reference internal" href="config.html#var-config.mouse"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.mouse</span></code></a> value. If False, it will not. The equivalent of the
&quot;system cursor&quot; preference.</p>
</dd></dl>
<dl class="var">
<dt id="var-preferences.audio_when_minimized">
<code class="descname">preferences.audio_when_minimized</code> = True<a class="headerlink" href="#var-preferences.audio_when_minimized" title="Permalink to this definition"> link</a></dt>
<dd><p>If False, audio channels are stopped when the window is minimized,
and resumed when the window is restored. If True, window state will
have no effect on audio.
The equivalent of the &quot;audio when minimized&quot; preference.</p>
</dd></dl>
<div class="section" id="mixer-functions">
<h2>Mixer Functions<a class="headerlink" href="#mixer-functions" title="Permalink to this headline"> link</a></h2>
<p>See <a class="reference internal" href="audio.html#volume"><span class="std std-ref">Volume</span></a> for more details about mixers.</p>
<dl class="function">
<dt id="preferences.set_volume">
<code class="descclassname">preferences.</code><code class="descname">set_volume</code><span class="sig-paren">(</span><em>mixer</em>, <em>volume</em><span class="sig-paren">)</span><a class="headerlink" href="#preferences.set_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>Sets <cite>mixer</cite> to <cite>volume</cite>.</p>
<dl class="docutils">
<dt><cite>mixer</cite></dt>
<dd>A string giving the name of the mixer. By default, the mixers
are &quot;main&quot;, &quot;music&quot;, &quot;sfx&quot;, and &quot;voice&quot; (&quot;main&quot; being a special mixer).</dd>
<dt><cite>volume</cite></dt>
<dd>A number between 0.0 and 1.0.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="preferences.get_volume">
<code class="descclassname">preferences.</code><code class="descname">get_volume</code><span class="sig-paren">(</span><em>mixer</em><span class="sig-paren">)</span><a class="headerlink" href="#preferences.get_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>Gets the volume for <cite>mixer</cite>. If the mixer is muted, this returns
0.0.</p>
</dd></dl>
<dl class="function">
<dt id="preferences.set_mute">
<code class="descclassname">preferences.</code><code class="descname">set_mute</code><span class="sig-paren">(</span><em>mixer</em>, <em>mute</em><span class="sig-paren">)</span><a class="headerlink" href="#preferences.set_mute" title="Permalink to this definition"> link</a></dt>
<dd><p>Sets the mute setting for <cite>mixer</cite>. If <cite>mute</cite> is true, the mixer is muted.
If <cite>mute</cite> is false, the mixer's volume is reverted to its value before
it was muted.</p>
</dd></dl>
<dl class="function">
<dt id="preferences.get_mute">
<code class="descclassname">preferences.</code><code class="descname">get_mute</code><span class="sig-paren">(</span><em>mixer</em><span class="sig-paren">)</span><a class="headerlink" href="#preferences.get_mute" title="Permalink to this definition"> link</a></dt>
<dd><p>Gets the mute setting for <cite>mixer</cite>.</p>
</dd></dl>
</div>
<div class="section" id="audio-channel-defaults">
<h2>Audio Channel Defaults<a class="headerlink" href="#audio-channel-defaults" title="Permalink to this headline"> link</a></h2>
<p>These config variables set the default volumes on various audio mixers.</p>
<dl class="var">
<dt id="var-config.default_music_volume">
define <code class="descname">config.default_music_volume</code> = 1.0<a class="headerlink" href="#var-config.default_music_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>The default volume of the music mixer, which is used for the music and
movie channels. This should be a number between 0.0 and 1.0,
with 1.0 being full volume.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.default_sfx_volume">
define <code class="descname">config.default_sfx_volume</code> = 1.0<a class="headerlink" href="#var-config.default_sfx_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>The default volume of the sfx mixer, which is used for the sound and
audio channels. This should be a number between 0.0 and 1.0,
with 1.0 being full volume.</p>
</dd></dl>
<dl class="var">
<dt id="var-config.default_voice_volume">
define <code class="descname">config.default_voice_volume</code> = 1.0<a class="headerlink" href="#var-config.default_voice_volume" title="Permalink to this definition"> link</a></dt>
<dd><p>The default volume of the voice mixer, which is used for the voice
channel (and hence the voice statement, auto-voice, etc.).
This should be a number between 0.0 and 1.0, with 1.0 being full volume.</p>
</dd></dl>
</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>