File: store_variables.html

package info (click to toggle)
renpy 6.17.6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 60,588 kB
  • ctags: 39,731
  • sloc: python: 29,967; ansic: 5,162; makefile: 167; sh: 2
file content (250 lines) | stat: -rw-r--r-- 11,974 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250

<!DOCTYPE html>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Store Variables &mdash; Ren&#39;Py Documentation</title>
    <link rel="stylesheet" href="_static/screen.css" type="text/css" media="screen, projection"/>
    <link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="print" />

    <!--[if lt IE 8]>
    <link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="screen, projection"/>
    <![endif]-->

    <link rel="stylesheet" href="_static/renpydoc.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '6.18.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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>
    <link rel="top" title="Ren&#39;Py Documentation" href="index.html" />
    <link rel="next" title="NVL-Mode Tutorial" href="nvl_mode.html" />
    <link rel="prev" title="Configuration Variables" href="config.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="nvl_mode.html" title="NVL-Mode Tutorial"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="config.html" title="Configuration Variables"
             accesskey="P">previous</a> |</li>

        <li> <img src="_static/logo.png" width=19 height=21 align=center> 
        <li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
        <li><a href="index.html">Ren&#39;Py Documentation</a></li> 
      </ul>
    </div>
  <div class="container">
  <div class="span4">
    
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="config.html"
                        title="previous chapter">Configuration Variables</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="nvl_mode.html"
                        title="next chapter">NVL-Mode Tutorial</a></p>
            <h4>Search</h4>
            
            <div id="cse-search-form" style="width: 100%;"></div>

      <div class="copydata">
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
    <br>
      </div>
        </div>
      </div>
  
  </div>
  
    
    <div class="document span20 last">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="store-variables">
<h1>Store Variables<a class="headerlink" href="#store-variables" title="Permalink to this headline">¶</a></h1>
<p>Ren'Py has a number of store variables that control its function. Store
variables may be changed at any time. If a store variable is changed after
the game has started, it will be be saved and loaded by the save system,
and rolled-back when rollback occurs.</p>
<dl class="var">
<dt id="var-adv">
<tt class="descname">adv</tt> = Character(...)<a class="headerlink" href="#var-adv" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a template ADV-mode character, and the default character kind
that is used when <a class="reference internal" href="dialogue.html#Character" title="Character"><tt class="xref py py-func docutils literal"><span class="pre">Character()</span></tt></a> is called.</p>
</dd></dl>

<dl class="var">
<dt id="var-_game_menu_screen">
<tt class="descname">_game_menu_screen</tt> = &quot;save&quot;<a class="headerlink" href="#var-_game_menu_screen" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the screen that is displayed when entering the game menu with no
more specific screen selected. (For example, when right-clicking, pressing
escape, or when <a class="reference internal" href="screen_actions.html#ShowMenu" title="ShowMenu"><tt class="xref py py-func docutils literal"><span class="pre">ShowMenu()</span></tt></a> is not given an argument.) If None, entry
to the game menu is disallowed.</p>
<p>This is set to None at the start of the splashscreen, and restored to its
original value when the splashscreen ends.</p>
</dd></dl>

<dl class="var">
<dt id="var-main_menu">
<tt class="descname">main_menu</tt> = False<a class="headerlink" href="#var-main_menu" title="Permalink to this definition">¶</a></dt>
<dd><p>Ren'Py sets this variable to True while in the main menu. This can be used
to have screens display differently while in the main menu.</p>
</dd></dl>

<dl class="var">
<dt id="var-menu">
<tt class="descname">menu</tt> = renpy.display_menu<a class="headerlink" href="#var-menu" title="Permalink to this definition">¶</a></dt>
<dd><p>The function that's called to display the in-gamemenu. It should take the same
arguments as :func`renpy.display_menu`. Assigning <tt class="xref py py-func docutils literal"><span class="pre">nvl_menu()</span></tt> to this
will display an nvl-mode menu.</p>
</dd></dl>

<dl class="var">
<dt id="var-mouse_visible">
<tt class="descname">mouse_visible</tt> = True<a class="headerlink" href="#var-mouse_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Controls if the mouse is visible. This is automatically set to true when
entering the standard game menus.</p>
</dd></dl>

<dl class="var">
<dt id="var-name_only">
<tt class="descname">name_only</tt> = Character(...)<a class="headerlink" href="#var-name_only" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a template character that is used when a string is given as the
character name in a say statement. The code:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="s">&quot;Eileen&quot;</span> <span class="s">&quot;Hello, world.&quot;</span>
</pre></div>
</div>
<p>is equivalent to:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">$</span> <span class="n">temp_char</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s">&quot;Eileen&quot;</span><span class="p">,</span> <span class="n">kind</span><span class="o">=</span><span class="n">name_only</span><span class="p">)</span>
<span class="n">temp_char</span> <span class="s">&quot;Hello, world.&quot;</span>
</pre></div>
</div>
<p>except that the temp_char variable is not used.</p>
</dd></dl>

<dl class="var">
<dt id="var-narrator">
<tt class="descname">narrator</tt> = Character(...)<a class="headerlink" href="#var-narrator" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the character that speaks narration (say statements that do not
give a character or character name). The code:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="s">&quot;Hello, world.&quot;</span>
</pre></div>
</div>
<p>is equivalent to:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="n">narrator</span> <span class="s">&quot;Hello, world.&quot;</span>
</pre></div>
</div>
</dd></dl>

<dl class="var">
<dt id="var-_rollback">
<tt class="descname">_rollback</tt> = True<a class="headerlink" href="#var-_rollback" title="Permalink to this definition">¶</a></dt>
<dd><p>Controls if rollback is allowed.</p>
</dd></dl>

<dl class="var">
<dt id="var-say">
<tt class="descname">say</tt> = ...<a class="headerlink" href="#var-say" title="Permalink to this definition">¶</a></dt>
<dd><p>A function that is called by Ren'Py to display dialogue. This is called
with three arguments. The first argument (<cite>who</cite>) is the character saying the
dialogue (or None for the narrator). The second argument(<cite>what</cite>) is what dialogue
is being said.</p>
<p>The third argument must be a keyword argument named <cite>interact</cite> and defaulting
to True. If true, the say function will wait for a click. If false, it will
immediately return with the dialogue displayed on the screen.</p>
<p>It's rare to call this function directly, as one can simply call a character
with dialogue. This variable mostly exists to be redefined, as a way of
hooking the say statement.</p>
</dd></dl>

<dl class="var">
<dt id="var-save_name">
<tt class="descname">save_name</tt> = &quot;&quot;<a class="headerlink" href="#var-save_name" title="Permalink to this definition">¶</a></dt>
<dd><p>A save name that is included with saves.</p>
</dd></dl>

<dl class="var">
<dt id="var-_window">
<tt class="descname">_window</tt> = False<a class="headerlink" href="#var-_window" title="Permalink to this definition">¶</a></dt>
<dd><p>This set by the <tt class="docutils literal"><span class="pre">window</span> <span class="pre">show</span></tt> and <tt class="docutils literal"><span class="pre">window</span> <span class="pre">hide</span></tt> statements, and indirectly
by <tt class="docutils literal"><span class="pre">window</span> <span class="pre">auto</span></tt>. If true, the dialogue window is shown during non-dialogue
statements.</p>
</dd></dl>

<dl class="var">
<dt id="var-_window_auto">
<tt class="descname">_window_auto</tt> = False<a class="headerlink" href="#var-_window_auto" title="Permalink to this definition">¶</a></dt>
<dd><p>This is set to true by <tt class="docutils literal"><span class="pre">window</span> <span class="pre">auto</span></tt> and to false by <tt class="docutils literal"><span class="pre">window</span> <span class="pre">show</span></tt> and
<tt class="docutils literal"><span class="pre">window</span> <span class="pre">hide</span></tt>. If true, the window auto behavior occurs.</p>
</dd></dl>

<dl class="var">
<dt id="var-_window_subtitle">
<tt class="descname">_window_subtitle</tt> = ''<a class="headerlink" href="#var-_window_subtitle" title="Permalink to this definition">¶</a></dt>
<dd><p>This is appended to <a class="reference internal" href="config.html#var-config.window_title"><tt class="xref std std-var docutils literal"><span class="pre">config.window_title</span></tt></a> to produce the caption for the game
window. This is automatically set to <a class="reference internal" href="config.html#var-config.menu_window_subtitle"><tt class="xref std std-var docutils literal"><span class="pre">config.menu_window_subtitle</span></tt></a> while in
the game menu.</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
    </div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="nvl_mode.html" title="NVL-Mode Tutorial"
             >next</a> |</li>
        <li class="right" >
          <a href="config.html" title="Configuration Variables"
             >previous</a> |</li>

        <li> <img src="_static/logo.png" width=19 height=21 align=center> 
        <li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
        <li><a href="index.html">Ren&#39;Py Documentation</a></li> 
      </ul>
    </div>


	<script src="http://www.google.com/jsapi" type="text/javascript"></script>
	<script type="text/javascript"> 
	  google.load('search', '1', {language : 'en' });
	  google.setOnLoadCallback(function() {
	    var customSearchControl = new google.search.CustomSearchControl('012476843541036121001:gx3sqkoaxkm');
	    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
	    var options = new google.search.DrawOptions();
	    options.enableSearchboxOnly("http://www.google.com/cse?cx=012476843541036121001:gx3sqkoaxkm");
	    customSearchControl.draw('cse-search-form', options);
	  }, true);
	</script>

  </body>
</html>