File: language_basics.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 (486 lines) | stat: -rw-r--r-- 26,463 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486

<!DOCTYPE html>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Language Basics &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="Labels & Control Flow" href="label.html" />
    <link rel="prev" title="Quickstart" href="quickstart.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="label.html" title="Labels & Control Flow"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="quickstart.html" title="Quickstart"
             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">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Language Basics</a><ul>
<li><a class="reference internal" href="#files">Files</a><ul>
<li><a class="reference internal" href="#base-directory">Base Directory</a></li>
<li><a class="reference internal" href="#game-directory">Game Directory</a></li>
</ul>
</li>
<li><a class="reference internal" href="#comments">Comments</a></li>
<li><a class="reference internal" href="#logical-lines">Logical Lines</a></li>
<li><a class="reference internal" href="#indentation-and-blocks">Indentation and Blocks</a></li>
<li><a class="reference internal" href="#elements-of-statements">Elements of Statements</a></li>
<li><a class="reference internal" href="#common-statement-syntax">Common Statement Syntax</a></li>
<li><a class="reference internal" href="#python-expression-syntax">Python Expression Syntax</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="quickstart.html"
                        title="previous chapter">Quickstart</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="label.html"
                        title="next chapter">Labels &amp; Control Flow</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="language-basics">
<h1>Language Basics<a class="headerlink" href="#language-basics" title="Permalink to this headline">¶</a></h1>
<p>Before we can describe the Ren'Py language, we must first describe the
structure of a Ren'Py script. This includes how a files are broken into
blocks made up of lines, and how those lines are broken into the
elements that make up statements.</p>
<div class="section" id="files">
<h2>Files<a class="headerlink" href="#files" title="Permalink to this headline">¶</a></h2>
<p>The script of a Ren'Py game is made up of all the files found under
the game directory ending with the .rpy extension. Ren'Py will
consider each of these files (in unicode order), and will use the
contents of the files as the script.</p>
<p>Generally, there's no difference between a script broken into multiple
files, and a script that consists of one big file. Control can be
transferred between files by jumping to or calling a label in another
file.  This makes the division of a script up into files a matter of
personal style - some game-makers prefer to have small files (like one
per event, or one per day), while others prefer to have one big
script.</p>
<p>To speed up loading time, Ren'Py will compile the <tt class="docutils literal"><span class="pre">.rpy</span></tt> files into
.rpyc files when it starts up. When a <tt class="docutils literal"><span class="pre">.rpy</span></tt> file is changed, the <tt class="docutils literal"><span class="pre">.rpyc</span></tt>
file will be updated when Ren'Py starts up. However, if a .rpyc file
exists without a corresponding <tt class="docutils literal"><span class="pre">.rpy</span></tt> file, the <tt class="docutils literal"><span class="pre">.rpyc</span></tt> file will be
used. This can lead to problems if a <tt class="docutils literal"><span class="pre">.rpy</span></tt> file is deleted without
deleting the .rpyc file.</p>
<div class="section" id="base-directory">
<h3>Base Directory<a class="headerlink" href="#base-directory" title="Permalink to this headline">¶</a></h3>
<p>The base directory is the directory that contains all files that are
distributed with the game. (It may also contain some files that are not
distributed with the game.) Things like README files should be placed in the
base directory, from where they will be distributed.</p>
<p>The base directory is created underneath the Ren'Py directory, and has the name
of your game. For example, if your Ren'Py directory is named renpy-6.11.2, and
your game is named &quot;HelloWorld&quot;, your base directory will be
renpy-6.11.2/HelloWorld.</p>
</div>
<div class="section" id="game-directory">
<h3>Game Directory<a class="headerlink" href="#game-directory" title="Permalink to this headline">¶</a></h3>
<p>The game directory is almost always a directory named &quot;game&quot; underneath the
base directory. For example, if your base directory is renpy-6.11.2/HelloWorld,
your game directory will be renpy-6.11.2/HelloWorld/game.</p>
<p>However, Ren'Py searches directories in the following order:</p>
<ul class="simple">
<li>The name of the executable, without the suffix. For example,
if the executable is named moonlight.exe, it will look for
a directory named moonlight under the base directory.</li>
<li>The name of the executable, without the suffix, and with
a prefix ending with _ removed. For example, if the executable
is moonlight_en.exe, Ren'Py will look for a directory named en.</li>
<li>The directories &quot;game&quot;, &quot;data&quot;, and &quot;launcher&quot;, in that order.</li>
</ul>
<p>The launcher will only properly recognize the &quot;game&quot; and &quot;data&quot; directories,
however.</p>
<p>The game directory contains all the files used by the game. It, including all
subdirectories, is scanned for .rpy and .rpyc files, and those are combined to
form the game script. It is scanned for .rpa archive files, and those are
automatically used by the game. Finally, when the game gives a path to a file
to load, it is loaded relative to the game directory. (But note that
config.searchpath can change this.)</p>
</div>
</div>
<div class="section" id="comments">
<h2>Comments<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
<p>A Ren'Py script file may contain comments. A comment begins with a
hash mark ('#'), and ends at the end of the line containing the
comment. As an exception, a comment may not be part of a string.</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="c"># This is a comment.</span>
<span class="k">show</span> <span class="n">black</span> <span class="c"># this is also a comment.</span>

<span class="s">&quot;# This isn&#39;t a comment, since it&#39;s part of a string.&quot;</span>
</pre></div>
</div>
<p>Ren'Py ignores comments, so the script is treated like the comment
wasn't there.</p>
</div>
<div class="section" id="logical-lines">
<h2>Logical Lines<a class="headerlink" href="#logical-lines" title="Permalink to this headline">¶</a></h2>
<p>A script file is broken up into <em class="dfn">logical lines</em>. A logical line
always begins at the start of a line in the file. A logical line ends
at the end of a line, unless:</p>
<ul class="simple">
<li>The last character on the line is a backslash ('\').</li>
<li>The line contains an open parenthesis character ('(', '{', or '['),
that hasn't been matched by the cooresponding close parenthesis
character (')', '}', or ']', respectively).</li>
<li>The end of the line occurs during a string.</li>
</ul>
<p>Once a logical line ends, the next logical line begins at the start of
the next line.</p>
<p>Most statements in the Ren'Py language consist of a single logical
line, while some statements consist of multiple lines.</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="s">&quot;This is one logical line&quot;</span>

<span class="s">&quot;Since this line contains a string, it continues</span>
 <span class="n">even</span> <span class="n">when</span> <span class="n">the</span> <span class="n">line</span> <span class="n">ends</span><span class="o">.</span><span class="s">&quot;</span>

<span class="k">$</span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span> <span class="s">&quot;Because of parenthesis, this line also&quot;</span><span class="p">,</span>
        <span class="s">&quot;spans more than one line.&quot;</span> <span class="p">]</span>
</pre></div>
</div>
<p>Empty logical lines are ignored.</p>
</div>
<div class="section" id="indentation-and-blocks">
<h2>Indentation and Blocks<a class="headerlink" href="#indentation-and-blocks" title="Permalink to this headline">¶</a></h2>
<p><em class="dfn">Indentation</em> is the name we give to the space at the start of
each logical line that's used to line up Ren'Py statements. In
Ren'Py, indentation must consist only of spaces.</p>
<p>Indentation is used to group statements into <em class="dfn">blocks</em>. A block is
a group of lines, and often a group of statements. The rules for
dividing a file into blocks are:</p>
<ul class="simple">
<li>A block is open at the start of a file.</li>
<li>A new block is started whenever a logical line is indented past the
previous logical line.</li>
<li>All logical lines inside a block must have the same indentation.</li>
<li>A block ends when a logical line is encountered with less
indentation than the lines in the block.</li>
</ul>
<p>Indentation is very important to Ren'Py, and cause syntax or logical
errors when it's incorrect. At the same time, the use of indentation
to convey block structure provides us a way of indicating that
structure without overwhelming the script text.</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="s">&quot;This statement, and the if statement that follows, is part of a block.&quot;</span>

<span class="k">if</span> <span class="bp">True</span><span class="p">:</span>

    <span class="s">&quot;But this statement is part of a new block.&quot;</span>

    <span class="s">&quot;This is also part of that new block.&quot;</span>

<span class="s">&quot;This is part of the first block, again.&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="elements-of-statements">
<h2>Elements of Statements<a class="headerlink" href="#elements-of-statements" title="Permalink to this headline">¶</a></h2>
<p>Ren'Py statements are made of a few basic parts.</p>
<dl class="docutils">
<dt><em class="dfn">Keyword</em></dt>
<dd><p class="first">A keyword is a word that must literally appear in the source
code. They're used to introduce statements and properties.</p>
<p class="last">Names begining with a single underscore (_) are reserved for
Ren'Py internal use, unless otherwise documented. When a name
begins with __ but doesn't end with __, it is changed to a
file-specfic version of that name.</p>
</dd>
<dt><em class="dfn">Name</em></dt>
<dd>A name begins with a letter or underscore, which is followed by
zero or more letters, numbers, and underscores. For our purpose,
unicode characters between U+00a0 and U+fffd are considered to be
letters.</dd>
<dt><em class="dfn">Image Name</em></dt>
<dd><p class="first">An <em class="dfn">image name</em> consists of one or more names, separated by
spaces. The first component of the image name is called the
<em class="dfn">image tag</em>. The second and later components of the name are
the <em class="dfn">image attributes</em>.</p>
<p class="last">For example, take the image name <tt class="docutils literal"><span class="pre">mary</span> <span class="pre">beach</span> <span class="pre">night</span> <span class="pre">happy</span></tt>. The
image tag is <tt class="docutils literal"><span class="pre">mary</span></tt>, while the image attributes are <tt class="docutils literal"><span class="pre">mary</span></tt>,
<tt class="docutils literal"><span class="pre">beach</span></tt>, and <tt class="docutils literal"><span class="pre">night</span></tt>.</p>
</dd>
<dt><em class="dfn">String</em></dt>
<dd><p class="first">A string begins with a quote character (one of &quot;, ', or `),
contains some sequence of characters, and ends with the same quote
character.</p>
<p>The backslash character () is used to escape quotes, special
characters such as % (written as %) and { (written as {). It's
also used to include newlines, using the n sequence.</p>
<p>Inside a Ren'Py string, consecutive whitespace is compressed into
a single whitespace character, unless a space is preceded by a
backslash.</p>
<div class="last highlight-renpy"><div class="highlight"><pre><span class="s">&#39;Strings can</span><span class="se">\&#39;</span><span class="s">t contain their delimiter, unless you escape it.&#39;</span>
</pre></div>
</div>
</dd>
<dt><em class="dfn">Simple Expression</em></dt>
<dd><p class="first">A simple expression is a Python expression, used to include Python
in some parts of the Ren'Py script. A simple expression begins
with:</p>
<ul class="simple">
<li>A name.</li>
<li>A string.</li>
<li>A number.</li>
<li>Any python expression, in parenthesis.</li>
</ul>
<p>This can be followed by any number of:</p>
<ul class="simple">
<li>A dot followed by a name.</li>
<li>A parenthesised python expression.</li>
</ul>
<p class="last">As an example, <tt class="docutils literal"><span class="pre">3</span></tt>, <tt class="docutils literal"><span class="pre">(3</span> <span class="pre">+</span> <span class="pre">4)</span></tt>, <tt class="docutils literal"><span class="pre">foo.bar</span></tt>, and <tt class="docutils literal"><span class="pre">foo(42)</span></tt>
are all simple expressions. But <tt class="docutils literal"><span class="pre">3</span> <span class="pre">+</span> <span class="pre">4</span></tt> is not, as the
expression ends at the end of a string.</p>
</dd>
<dt><em class="dfn">At List</em></dt>
<dd>An at list is a list of simple expressions, separated by commas.</dd>
<dt><em class="dfn">Python Expression</em></dt>
<dd>A python expression is an arbitrary python expression, that may
not include a colon. These are used to express the conditions in
the if and while statements.</dd>
</dl>
</div>
<div class="section" id="common-statement-syntax">
<h2>Common Statement Syntax<a class="headerlink" href="#common-statement-syntax" title="Permalink to this headline">¶</a></h2>
<p>Most Ren'Py statements share a common syntax. With the exception of
the say statement, they begin with a keyword that introduces the
statement. This keyword is followed by a parameter, if the statement
takes one.</p>
<p>The parameter is then followed by one or more properties. Properties
may be supplied in any order, provided each property is only supplied
once. A property starts off with a keyword. For most properties, the
property name is followed by one of the syntax elements given above.</p>
<p>If the statement takes a block, the line ends with a colon
(:). Otherwise, the line just ends.</p>
</div>
<div class="section" id="python-expression-syntax">
<span id="python-basics"></span><h2>Python Expression Syntax<a class="headerlink" href="#python-expression-syntax" title="Permalink to this headline">¶</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">It may not be necessary to read this section thoroughly right
now. Instead, skip ahead, and if you find yourself unable to figure
out an example, or want to figure out how things actually work, you
can go back and review this.</p>
</div>
<p>Many portions of Ren'Py take python expressions. For example, defining
a new Character involves a call to the Character function. While
Python expressions are very powerful, only a fraction of that power is
necessary to write a basic Ren'Py game.</p>
<p>Here's a synopsis of python expressions.</p>
<dl class="docutils">
<dt><em class="dfn">Integer</em></dt>
<dd>An integer is a number without a decimal point. <tt class="docutils literal"><span class="pre">3</span></tt> and <tt class="docutils literal"><span class="pre">42</span></tt>
are integers.</dd>
<dt><em class="dfn">Float</em></dt>
<dd>A float (short for floating-point number) is a number with a
decimal point. <tt class="docutils literal"><span class="pre">.5</span></tt>, <tt class="docutils literal"><span class="pre">7.</span></tt>, and <tt class="docutils literal"><span class="pre">9.0</span></tt> are all floats.</dd>
<dt><em class="dfn">String</em></dt>
<dd>Python strings begin with &quot; or ', and end with the same
character. \ is used to escape the end character, and to
introduce special characters like newlines (\n). Unlike Ren'Py
strings, python strings can't span lines.</dd>
<dt><em class="dfn">True, False, None</em></dt>
<dd>There are three special values. <tt class="docutils literal"><span class="pre">True</span></tt> is a true value, <tt class="docutils literal"><span class="pre">False</span></tt> is
a false value. <tt class="docutils literal"><span class="pre">None</span></tt> represents the absence of a value. For
example,</dd>
<dt><em class="dfn">Tuple</em></dt>
<dd><p class="first">Tuples are used to represent containers where the number of items
is important. For example, one might use a 2-tuple (also called a
pair) to represent width and height, or a 4-tuple (x, y, width,
height) to represent a rectangle.</p>
<p>Tuples begin with a left-parenthesis <tt class="docutils literal"><span class="pre">(</span></tt>, consist of zero or
more comma-separated python expressions, and end with a
right-parenthesis <tt class="docutils literal"><span class="pre">)</span></tt>. As a special case, the one-item tuple
must have a parenthesis following the item. For example:</p>
<div class="last highlight-renpy"><div class="highlight"><pre><span class="p">()</span>
<span class="p">(</span><span class="mi">1</span><span class="p">,)</span>
<span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">&quot;#555&quot;</span><span class="p">)</span>
<span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">24</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt><em class="dfn">List</em></dt>
<dd><p class="first">Lists are used to represent containers where the number of items
may vary. A list begins with a <tt class="docutils literal"><span class="pre">[</span></tt>, contains a comma-separated
list of expressions, and ends with <tt class="docutils literal"><span class="pre">]</span></tt>. For example:</p>
<div class="last highlight-renpy"><div class="highlight"><pre><span class="p">[</span> <span class="p">]</span>
<span class="p">[</span> <span class="mi">1</span> <span class="p">]</span>
<span class="p">[</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span> <span class="p">]</span>
<span class="p">[</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span> <span class="p">]</span>
</pre></div>
</div>
</dd>
<dt><em class="dfn">Variable</em></dt>
<dd><p class="first">Python expressions can use variables, that store values defined
using the define statement or python statements. A variable begins
with a letter or underscore, and then has zero or more letters,
numbers, or underscores. For example:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="n">name</span>
<span class="n">love_love_points</span>
<span class="n">trebuchet2_range</span>
</pre></div>
</div>
<p class="last">Variables beginning with _ are reserved for Ren'Py's use, and
shouldn't be used by user code.</p>
</dd>
<dt><em class="dfn">Field Access</em></dt>
<dd><p class="first">Python modules and objects have fields, which can be accessed
with by following an expression (usually a variable) with a
dot and the field name. For example:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="n">config</span><span class="o">.</span><span class="n">screen_width</span>
</pre></div>
</div>
<p class="last">Consists of a variable (config) followed by a field access
(screen_width).</p>
</dd>
<dt><em class="dfn">Call</em></dt>
<dd><p class="first">Python expressions can call a function which returns a value. They
begin with an expression (usually a variable), followed by a
left-parenthesis, a comma-separated list of arguments, and a
right-parenthesis. The argument list begins with the position
arguments, which are python expressions. These are followed by
keyword arguments, which consist of the argument name, and equals
sign, and an expression. In the example example:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="n">Character</span><span class="p">(</span><span class="s">&quot;Eileen&quot;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="n">adv</span><span class="p">,</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#0f0&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>we call the Character function. It's given one positional
argument, the string &quot;Eileen&quot;. It's given two keyword argument:
<tt class="docutils literal"><span class="pre">type</span></tt> with the value of the <tt class="docutils literal"><span class="pre">adv</span></tt> variable, and <tt class="docutils literal"><span class="pre">color</span></tt>
with a string value of &quot;#0f0&quot;.</p>
<p class="last">Constructors are a type of function which returns a new object,
and are called the same way.</p>
</dd>
</dl>
<p>When reading this documentation, you might see a function signature
like:</p>
<dl class="function">
<dt id="Sample">
<tt class="descname">Sample</tt><big>(</big><em>name</em>, <em>delay</em>, <em>position=(0</em>, <em>0)</em>, <em>**properties</em><big>)</big><a class="headerlink" href="#Sample" title="Permalink to this definition">¶</a></dt>
<dd><p>A sample function that doesn't actually exist in Ren'Py, but
is used only in documentation.</p>
</dd></dl>

<p>This function:</p>
<ul class="simple">
<li>Has the name &quot;Sample&quot;</li>
<li>Has two positional parameters, a name and a delay. In a real
function, the types of these parameters would be made clear
from the documentation.</li>
<li>Has one keyword argument, position, which has a default value
of (0, 0).</li>
</ul>
<p>Since the functions ends with **properties, it means that it can
take <a class="reference internal" href="style_properties.html#style-properties"><em>style properties</em></a> as additional keyword
arguments. Other special entries are *args, which means that it takes
an arbitrary number of postional parameters, and **kwargs, which means
that the keyword arguments are described in the documentation.</p>
<p>Python is a lot more powerful than we have space for in this manual.
To learn Python in more detail, we recommend starting with the Python
tutorial, which is available from
<a class="reference external" href="http://docs.python.org/release/2.7/tutorial/index.html">python.org</a>.
While we don't think a deep knowledge of Python is necessary to work
with Ren'Py, the basics of python statements and expressions is
often helpful.</p>
</div>
</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="label.html" title="Labels & Control Flow"
             >next</a> |</li>
        <li class="right" >
          <a href="quickstart.html" title="Quickstart"
             >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>