evennia/docs/1.0-dev/api/evennia.game_template.world.html
2020-06-14 21:48:02 +02:00

255 lines
No EOL
6.9 KiB
HTML

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>evennia.game_template.world package &mdash; Evennia 1.0-dev documentation</title>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Evennia 1.0-dev documentation" href="../index.html"/>
<script src="../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../index.html" class="icon icon-home"> Evennia
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<!-- Local TOC -->
<div class="local-toc"><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>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Evennia</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>evennia.game_template.world package</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/evennia.game_template.world.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<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>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2020, The Evennia developer community.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> and ❤️ using a custom <a href="https://github.com/LinxiFan/Sphinx-theme">theme</a> based on <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'1.0-dev',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</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/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>