evennia/docs/versions/1.0-dev/api/evennia.game_template.world.html
2020-06-13 00:15:39 +02:00

138 lines
No EOL
5.6 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>evennia.game_template.world package &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-evennia.game_template.world">
<span id="evennia-game-template-world-package"></span><h1>evennia.game_template.world package<a class="headerlink" href="#module-evennia.game_template.world" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-evennia.game_template.world.prototypes">
<span id="evennia-game-template-world-prototypes-module"></span><h2>evennia.game_template.world.prototypes module<a class="headerlink" href="#module-evennia.game_template.world.prototypes" title="Permalink to this headline"></a></h2>
<p>Prototypes</p>
<p>A prototype is a simple way to create individualized instances of a
given <cite>Typeclass</cite>. For example, you might have a Sword typeclass that
implements everything a Sword would need to do. The only difference
between different individual Swords would be their key, description
and some Attributes. The Prototype system allows to create a range of
such Swords with only minor variations. Prototypes can also inherit
and combine together to form entire hierarchies (such as giving all
Sabres and all Broadswords some common properties). Note that bigger
variations, such as custom commands or functionality belong in a
hierarchy of typeclasses instead.</p>
<p>Example prototypes are read by the <cite>&#64;spawn</cite> command but is also easily
available to use from code via <cite>evennia.spawn</cite> or <cite>evennia.utils.spawner</cite>.
Each prototype should be a dictionary. Use the same name as the
variable to refer to other prototypes.</p>
<dl>
<dt>Possible keywords are:</dt><dd><p>prototype_parent - string pointing to parent prototype of this structure.
key - string, the main object identifier.
typeclass - string, if not set, will use <cite>settings.BASE_OBJECT_TYPECLASS</cite>.
location - this should be a valid object or #dbref.
home - valid object or #dbref.
destination - only valid for exits (object or dbref).</p>
<p>permissions - string or list of permission strings.
locks - a lock-string.
aliases - string or list of strings.</p>
<p>ndb_&lt;name&gt; - value of a nattribute (the “<a href="#id1"><span class="problematic" id="id2">ndb_</span></a>” part is ignored).
any other keywords are interpreted as Attributes and their values.</p>
</dd>
</dl>
<p>See the <cite>&#64;spawn</cite> command and <cite>evennia.utils.spawner</cite> for more info.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<p><h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">evennia.game_template.world package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-evennia.game_template.world.prototypes">evennia.game_template.world.prototypes module</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/api/evennia.game_template.world.rst.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div>
<h3>Versions</h3>
<ul>
<li><a href="evennia.game_template.world.html">1.0-dev (develop branch)</a></li>
<li><a href="../../../versions/0.9.1/api/evennia.game_template.world.html">0.9.1 (master branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2020, The Evennia developer community.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="../_sources/api/evennia.game_template.world.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>