529 lines
36 KiB
HTML
529 lines
36 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>NVL-Mode Tutorial — Ren'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="Text Input" href="input.html" />
|
|
<link rel="prev" title="Interactive Director" href="director.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'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 & 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>
|
|
<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"><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 class="current">
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">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="#">NVL-Mode Tutorial</a><ul>
|
|
<li><a class="reference internal" href="#getting-started">Getting Started</a></li>
|
|
<li><a class="reference internal" href="#nvl-mode-menus">NVL-mode Menus</a></li>
|
|
<li><a class="reference internal" href="#showing-and-hiding-the-nvl-mode-window">Showing and Hiding the NVL-mode Window</a></li>
|
|
<li><a class="reference internal" href="#customizing-characters">Customizing Characters</a></li>
|
|
<li><a class="reference internal" href="#config-variables">Config Variables</a></li>
|
|
<li><a class="reference internal" href="#python-functions">Python Functions</a></li>
|
|
<li><a class="reference internal" href="#paged-rollback">Paged Rollback</a></li>
|
|
<li><a class="reference internal" href="#script-of-the-question-nvl-mode-edition">Script of The Question (NVL-mode Edition)</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9 content">
|
|
|
|
<div class="section" id="nvl-mode-tutorial">
|
|
<h1>NVL-Mode Tutorial<a class="headerlink" href="#nvl-mode-tutorial" title="Permalink to this headline"> link</a></h1>
|
|
<p>There are two main styles of presentation used for visual
|
|
novels. ADV-style games present dialogue and narration one line at a
|
|
time, generally in a window at the bottom of the screen. NVL-style
|
|
games present multiple lines on the screen at a time, in a window that
|
|
takes up the entire screen.</p>
|
|
<p>In this tutorial, we will explain how to make an NVL-mode game using
|
|
Ren'Py. This tutorial assumes that you are already familiar with the
|
|
basics of Ren'Py, as explained in the <a class="reference internal" href="quickstart.html"><span class="doc">Quickstart manual</span></a>.</p>
|
|
<div class="section" id="getting-started">
|
|
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"> link</a></h2>
|
|
<p>NVL-mode can be added to a Ren'Py script in two steps. The first is to
|
|
declare the characters to use NVL-mode, and the second is to add <code class="docutils literal notranslate"><span class="pre">nvl</span>
|
|
<span class="pre">clear</span></code> statements at the end of each page.</p>
|
|
<p>Characters can be declared to use NVL-mode by adding a <code class="docutils literal notranslate"><span class="pre">kind=nvl</span></code>
|
|
parameter to each of the Character declarations. For example, if we
|
|
use the character declarations from the Quickstart manual:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s1">'Sylvie'</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">"#c8ffc8"</span><span class="p">)</span>
|
|
<span class="k">define</span> <span class="n">m</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s1">'Me'</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">"#c8c8ff"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Changed to use NVL-mode, those declarations become:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s1">'Sylvie'</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">"#c8ffc8"</span><span class="p">)</span>
|
|
<span class="k">define</span> <span class="n">m</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s1">'Me'</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">"#c8c8ff"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>An NVL-mode narrator can also be used by including the following
|
|
definition:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">narrator</span> <span class="o">=</span> <span class="n">nvl_narrator</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Note that we have also added an NVL-mode declaration of
|
|
<code class="docutils literal notranslate"><span class="pre">narrator</span></code>. The <code class="docutils literal notranslate"><span class="pre">narrator</span></code> character is used to speak
|
|
lines that do not have another character name associated with it.</p>
|
|
<p>If we ran the game like this, the first few lines would display
|
|
normally, but after a while, lines would begin displaying below the
|
|
bottom of the screen. To break the script into pages, include an <code class="docutils literal notranslate"><span class="pre">nvl</span>
|
|
<span class="pre">clear</span></code> statement after each page.</p>
|
|
<p>The following is an example script with pagination:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">label</span> <span class="n">start</span><span class="p">:</span>
|
|
<span class="s2">"I'll ask her..."</span>
|
|
|
|
<span class="n">m</span> <span class="s2">"Um... will you..."</span>
|
|
<span class="n">m</span> <span class="s2">"Will you be my artist for a visual novel?"</span>
|
|
|
|
<span class="k">nvl</span> <span class="k">clear</span>
|
|
|
|
<span class="s2">"Silence."</span>
|
|
<span class="s2">"She is shocked, and then..."</span>
|
|
|
|
<span class="n">s</span> <span class="s2">"Sure, but what is a </span><span class="se">\"</span><span class="s2">visual novel?</span><span class="se">\"</span><span class="s2">"</span>
|
|
|
|
<span class="k">nvl</span> <span class="k">clear</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>While nvl-mode games generally have more text per paragraph, this
|
|
example demonstrates a basic NVL-mode script. (Suitable for use in a
|
|
kinetic novel that does not have transitions.)</p>
|
|
<p id="nvl-monologue-mode"><a class="reference internal" href="dialogue.html#monologue-mode"><span class="std std-ref">Monologue mode</span></a> works with NVL-mode as well.
|
|
Including the <code class="docutils literal notranslate"><span class="pre">{clear}</span></code> text tag on a line by itself is the equivalent
|
|
of an <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">clear</span></code> statement without leaving monologue mode. For example:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">label</span> <span class="n">start</span><span class="p">:</span>
|
|
<span class="n">s</span> <span class="s2">"""</span>
|
|
<span class="s2"> This is one block of text in monologue mode.</span>
|
|
|
|
<span class="s2"> This is a second block, on the same page as the first.</span>
|
|
|
|
<span class="s2"> </span><span class="si">{clear}</span><span class="s2"></span>
|
|
|
|
<span class="s2"> The page just cleared!</span>
|
|
<span class="s2"> """</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nvl-mode-menus">
|
|
<span id="nvl-mode-menu"></span><h2>NVL-mode Menus<a class="headerlink" href="#nvl-mode-menus" title="Permalink to this headline"> link</a></h2>
|
|
<p>By default, menus are displayed in ADV-mode, taking up the full
|
|
screen. There is also an alternate NVL-mode menu presentation, which
|
|
displays the menus immediately after the current page of NVL-mode
|
|
text.</p>
|
|
<p>To access this alternate menu presentation, write:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="k">menu</span> <span class="o">=</span> <span class="n">nvl_menu</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>The menu will disappear after the choice has been made, so it usually
|
|
makes sense to follow menus with an "nvl clear" or some sort of
|
|
indication as to the choice.</p>
|
|
<p><a class="reference internal" href="menus.html#menu-arguments"><span class="std std-ref">Menu arguments</span></a> can also be used to access
|
|
a NVL-mode menu. This is done by providing a true <cite>nvl</cite> argument
|
|
that is set to True. This is useful when mixing NVL-mode and ADV-mode
|
|
menus in a single game.</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">menu</span> <span class="p">(</span><span class="k">nvl</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
|
|
<span class="s2">"I prefer NVL-mode."</span><span class="p">:</span>
|
|
<span class="k">pass</span>
|
|
|
|
<span class="s2">"ADV-mode is more for me."</span><span class="p">:</span>
|
|
<span class="k">pass</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="showing-and-hiding-the-nvl-mode-window">
|
|
<h2>Showing and Hiding the NVL-mode Window<a class="headerlink" href="#showing-and-hiding-the-nvl-mode-window" title="Permalink to this headline"> link</a></h2>
|
|
<p>The NVL-mode window can be controlled with the standard <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">show</span></code>
|
|
and <code class="docutils literal notranslate"><span class="pre">window</span> <span class="pre">hide</span></code> statements. To select the default transitions to be
|
|
used for showing and hiding the window, add the following to your game:</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">window_hide_transition</span> <span class="o">=</span> <span class="n">dissolve</span>
|
|
<span class="n">config</span><span class="o">.</span><span class="n">window_show_transition</span> <span class="o">=</span> <span class="n">dissolve</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>The default <a class="reference internal" href="config.html#var-config.empty_window"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.empty_window</span></code></a> should select appropriate window
|
|
automatically, but setting <a class="reference internal" href="config.html#var-config.empty_window"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.empty_window</span></code></a> to <code class="docutils literal notranslate"><span class="pre">nvl_show_core</span></code>
|
|
will force the NVL-mode window to be displayed during a transition.:</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">empty_window</span> <span class="o">=</span> <span class="n">nvl_show_core</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>An example of using the window commands to show and hide the window is:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">label</span> <span class="n">meadow</span><span class="p">:</span>
|
|
|
|
<span class="k">nvl</span> <span class="k">clear</span>
|
|
|
|
<span class="k">window</span> <span class="k">hide</span>
|
|
<span class="k">scene</span> <span class="n">bg</span> <span class="n">meadow</span>
|
|
<span class="k">with</span> <span class="n">fade</span>
|
|
<span class="k">window</span> <span class="k">show</span>
|
|
|
|
<span class="s2">"We reached the meadows just outside our hometown. Autumn was so</span>
|
|
<span class="n">beautiful</span> <span class="n">here</span><span class="o">.</span><span class="s2">"</span>
|
|
<span class="s2">"When we were children, we often played here."</span>
|
|
|
|
<span class="n">m</span> <span class="s2">"Hey... ummm..."</span>
|
|
|
|
<span class="k">window</span> <span class="k">hide</span>
|
|
<span class="k">show</span> <span class="n">sylvie</span> <span class="n">smile</span>
|
|
<span class="k">with</span> <span class="n">dissolve</span>
|
|
<span class="k">window</span> <span class="k">show</span>
|
|
|
|
<span class="s2">"She turned to me and smiled."</span>
|
|
<span class="s2">"I'll ask her..."</span>
|
|
<span class="n">m</span> <span class="s2">"Ummm... will you..."</span>
|
|
<span class="n">m</span> <span class="s2">"Will you be my artist for a visual novel?"</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>There are also explicit <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">show</span></code> and <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">hide</span></code> commands that show
|
|
hide the NVL-mode window. These take an optional transition, and can be
|
|
used in games that use a mix of NVL-mode and ADV-mode windows.</p>
|
|
</div>
|
|
<div class="section" id="customizing-characters">
|
|
<h2>Customizing Characters<a class="headerlink" href="#customizing-characters" title="Permalink to this headline"> link</a></h2>
|
|
<p>NVL-mode characters can be customized to have several looks, hopefully allowing
|
|
you to pick the one that is most appropriate to the game you are creating.</p>
|
|
<ol class="arabic">
|
|
<li><p class="first">The default look has a character's name to the left, and
|
|
dialogue indented to the right of the name. The color of the name is
|
|
controlled by the ''color'' parameter.</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s1">'Sylvie'</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s2">"#c8ffc8"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p class="first">A second look has the character's name embedded in with the
|
|
text. Dialogue spoken by the character is enclosed in quotes. Note
|
|
that here, the character's name is placed in the ''what_prefix''
|
|
parameter, along with the open quote. (The close quote is placed in
|
|
the ''what_suffix'' parameter.)</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="n">what_prefix</span><span class="o">=</span><span class="s2">"Sylvie: </span><span class="se">\"</span><span class="s2">"</span><span class="p">,</span>
|
|
<span class="n">what_suffix</span><span class="o">=</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p class="first">A third look dispenses with the character name entirely, while
|
|
putting the dialogue in quotes.</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="n">what_prefix</span><span class="o">=</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">,</span> <span class="n">what_suffix</span><span class="o">=</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p class="first">Since the third look might make it hard to distinguish who's
|
|
speaking, we can tint the dialogue using the ''what_color''
|
|
parameter.</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">,</span> <span class="n">what_prefix</span><span class="o">=</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">,</span> <span class="n">what_suffix</span><span class="o">=</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">,</span>
|
|
<span class="n">what_color</span><span class="o">=</span><span class="s2">"#c8ffc8"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p class="first">Of course, a completely uncustomized NVL-mode character can be
|
|
used, if you want to take total control of what is shown. (This is
|
|
often used for the narrator.)</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">s</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="k">nvl</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="section" id="config-variables">
|
|
<h2>Config Variables<a class="headerlink" href="#config-variables" title="Permalink to this headline"> link</a></h2>
|
|
<p>The following config variables control nvl-related functionality.</p>
|
|
<dl class="var">
|
|
<dt id="var-config.nvl_layer">
|
|
define <code class="descname">config.nvl_layer</code> = "screens"<a class="headerlink" href="#var-config.nvl_layer" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>The layer the nvl screens are shown on.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="var">
|
|
<dt id="var-config.nvl_list_length">
|
|
define <code class="descname">config.nvl_list_length</code> = None<a class="headerlink" href="#var-config.nvl_list_length" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>If not None, the maximum length of the the list of NVL dialogue.
|
|
This can be set (often in conjuction with forcing the dialogue to
|
|
have a fixed height) in order to emulate an infinite scrolling
|
|
NVL window.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="var">
|
|
<dt id="var-config.nvl_page_ctc">
|
|
define <code class="descname">config.nvl_page_ctc</code> = None<a class="headerlink" href="#var-config.nvl_page_ctc" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>If not None, this is the click-to-continue indicator that is used for NVL mode
|
|
characters that are at the end of a page. (That is, immediately
|
|
followed by an nvl clear statement.) This replaces the ctc parameter
|
|
of <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>.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="var">
|
|
<dt id="var-config.nvl_page_ctc_position">
|
|
define <code class="descname">config.nvl_page_ctc_position</code> = "nestled"<a class="headerlink" href="#var-config.nvl_page_ctc_position" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>If not None, this is the click-to-continue indicator position that is used for NVL mode
|
|
characters that are at the end of a page. (That is, immediately
|
|
followed by an nvl clear statement.) This replaces the ctc_position parameter
|
|
of <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>.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="var">
|
|
<dt id="var-config.nvl_paged_rollback">
|
|
define <code class="descname">config.nvl_paged_rollback</code> = False<a class="headerlink" href="#var-config.nvl_paged_rollback" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>If true, NVL-mode rollback will occur a full page at a time.</p>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="python-functions">
|
|
<h2>Python Functions<a class="headerlink" href="#python-functions" title="Permalink to this headline"> link</a></h2>
|
|
<dl class="function">
|
|
<dt id="nvl_clear">
|
|
<code class="descname">nvl_clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#nvl_clear" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>The Python equivalent of the <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">clear</span></code> statement.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="function">
|
|
<dt id="nvl_hide">
|
|
<code class="descname">nvl_hide</code><span class="sig-paren">(</span><em>with_</em><span class="sig-paren">)</span><a class="headerlink" href="#nvl_hide" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>The Python equivalent of the <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">hide</span></code> statement.</p>
|
|
<dl class="docutils">
|
|
<dt><cite>with_</cite></dt>
|
|
<dd>The transition to use to hide the NVL-mode window.</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="function">
|
|
<dt id="nvl_menu">
|
|
<code class="descname">nvl_menu</code><span class="sig-paren">(</span><em>items</em><span class="sig-paren">)</span><a class="headerlink" href="#nvl_menu" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>A Python function that displays a menu in NVL style. This is rarely
|
|
used directly. Instead, it's assigned to the <a class="reference internal" href="store_variables.html#var-menu"><code class="xref std std-var docutils literal notranslate"><span class="pre">menu</span></code></a> variable,
|
|
using something like:</p>
|
|
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="k">menu</span> <span class="o">=</span> <span class="n">nvl_menu</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="function">
|
|
<dt id="nvl_show">
|
|
<code class="descname">nvl_show</code><span class="sig-paren">(</span><em>with_</em><span class="sig-paren">)</span><a class="headerlink" href="#nvl_show" title="Permalink to this definition"> link</a></dt>
|
|
<dd><p>The Python equivalent of the <code class="docutils literal notranslate"><span class="pre">nvl</span> <span class="pre">show</span></code> statement.</p>
|
|
<dl class="docutils">
|
|
<dt><cite>with_</cite></dt>
|
|
<dd>The transition to use to show the NVL-mode window.</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="paged-rollback">
|
|
<h2>Paged Rollback<a class="headerlink" href="#paged-rollback" title="Permalink to this headline"> link</a></h2>
|
|
<p>Paged rollback causes Ren'Py to rollback one NVL-mode page at a time,
|
|
rather than one block of text at a time. It can be enabled by
|
|
including the following in your script.</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">nvl_paged_rollback</span> <span class="o">=</span> <span class="kc">True</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="script-of-the-question-nvl-mode-edition">
|
|
<h2>Script of The Question (NVL-mode Edition)<a class="headerlink" href="#script-of-the-question-nvl-mode-edition" title="Permalink to this headline"> link</a></h2>
|
|
<p>You can view the full script of the NVL-mode edition of ''The Question''
|
|
<a class="reference internal" href="thequestion_nvl.html"><span class="doc">here</span></a>.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<footer class="footer">
|
|
<div class="container">
|
|
<p class="pull-right">
|
|
<a href="#">Back to top</a>
|
|
|
|
</p>
|
|
<p>
|
|
© 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> |