evennia/docs/0.9.5/Glossary.html
Griatch e34f258a92 Revert "Updated HTML docs."
This reverts commit 51d5840b8b.
2022-11-14 22:43:45 +01:00

513 lines
No EOL
45 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Glossary &#8212; Evennia 0.9.5 documentation</title>
<link rel="stylesheet" href="_static/nature.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>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "tex2jax_process|mathjax_process|math|output_area"}})</script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.5</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Glossary</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="glossary">
<h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline"></a></h1>
<p>This explains common recurring terms used in the Evennia docs. It will be expanded as needed.</p>
<ul class="simple">
<li><p><em><a class="reference internal" href="#account"><span class="std std-doc">account</span></a></em> - the players account on the game</p></li>
<li><p><em><a class="reference internal" href="#admin-site"><span class="std std-doc">admin-site</span></a></em> - the Django web page for manipulating the database</p></li>
<li><p><em><a class="reference internal" href="#attribute"><span class="std std-doc">attribute</span></a></em> - persistent, custom data stored on typeclasses</p></li>
<li><p><em><a class="reference internal" href="#channel"><span class="std std-doc">channel</span></a></em> - game communication channels</p></li>
<li><p><em><a class="reference internal" href="#character"><span class="std std-doc">character</span></a></em> - the players avatar in the game, controlled from
<em><a class="reference internal" href="#account"><span class="std std-doc">account</span></a></em></p></li>
<li><p><em><a class="reference internal" href="#core"><span class="std std-doc">core</span></a></em> - a term used for the code distributed with Evennia proper</p></li>
<li><p><em><a class="reference internal" href="#django"><span class="std std-doc">django</span></a></em> - web framework Evennia uses for database access and web integration</p></li>
<li><p><em><a class="reference internal" href="#field"><span class="std std-doc">field</span></a></em> - a <em><a class="reference internal" href="#typeclass"><span class="std std-doc">typeclass</span></a></em> property representing a database
column</p></li>
<li><p><em><a class="reference internal" href="#git"><span class="std std-doc">git</span></a></em> - the version-control system we use</p></li>
<li><p><em><a class="reference internal" href="#github"><span class="std std-doc">github</span></a></em> - the online hosting of our source code</p></li>
<li><p><em><a class="reference internal" href="#migrate"><span class="std std-doc">migrate</span></a></em> - updating the database schema</p></li>
<li><p><em><a class="reference internal" href="#multisession-mode"><span class="std std-doc">multisession mode`</span></a></em> - a setting defining how users connect to Evennia</p></li>
<li><p><em><a class="reference internal" href="#object"><span class="std std-doc">object</span></a></em> - Python instance, general term or in-game
<em><a class="reference internal" href="#typeclass"><span class="std std-doc">typeclass</span></a></em></p></li>
<li><p><em><a class="reference internal" href="#pip"><span class="std std-doc">pip</span></a></em> - the Python installer</p></li>
<li><p><em>player</em> - the human connecting to the game with their client</p></li>
<li><p><em><a class="reference internal" href="#puppet"><span class="std std-doc">puppet</span></a></em> - when an <a class="reference internal" href="#account"><span class="std std-doc">account</span></a> controls an in-game
<a class="reference internal" href="#object"><span class="std std-doc">object</span></a></p></li>
<li><p><em><a class="reference internal" href="#property"><span class="std std-doc">property</span></a></em> - a python property</p></li>
<li><p><em>evenv</em> - see <em><a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a></em></p></li>
<li><p><em><a class="reference internal" href="#repository"><span class="std std-doc">repository</span></a></em> - a store of source code + source history</p></li>
<li><p><em><a class="reference internal" href="#script"><span class="std std-doc">script</span></a></em> - a building block for custom storage, systems and time-keepint</p></li>
<li><p><em><a class="reference internal" href="#session"><span class="std std-doc">session</span></a></em> - represents one client connection</p></li>
<li><p><em><a class="reference internal" href="#ticker"><span class="std std-doc">ticker</span></a></em> - Allows to run events on a steady tick</p></li>
<li><p><em><a class="reference internal" href="#twisted"><span class="std std-doc">twisted</span></a></em> - networking engine responsible for Evennias event loop and
communications</p></li>
<li><p><em><a class="reference internal" href="#typeclass"><span class="std std-doc">typeclass</span></a></em> - Evennias database-connected Python class</p></li>
<li><p><em>upstream</em> - see <em><a class="reference internal" href="#github"><span class="std std-doc">github</span></a></em></p></li>
<li><p><em><a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a></em> - a Python program and way to make an isolated Python install</p></li>
</ul>
<hr class="docutils" />
<section id="account">
<h2><em>account</em><a class="headerlink" href="#account" title="Permalink to this headline"></a></h2>
<p>The term account refers to the players unique account on the game. It is
represented by the <code class="docutils literal notranslate"><span class="pre">Account</span></code> <a class="reference internal" href="#typeclass"><span class="std std-doc">typeclass</span></a> and holds things like email, password,
configuration etc.</p>
<p>When a player connects to the game, they connect to their account. The account has <em>no</em>
representation in the game world. Through their Account they can instead choose to
<a class="reference internal" href="#puppet"><span class="std std-doc">puppet</span></a> one (or more, depending on game mode) <a class="reference internal" href="#character"><span class="std std-doc">Characters</span></a> in
the game.</p>
<p>In the default <a class="reference internal" href="Sessions.html#multisession-mode"><span class="std std-doc">multisession mode</span></a> of Evennia, you immediately start
puppeting a Character with the same name as your Account when you log in - mimicking how older
servers used to work.</p>
</section>
<section id="admin-site">
<h2><em>admin-site</em><a class="headerlink" href="#admin-site" title="Permalink to this headline"></a></h2>
<p>This usually refers to <a class="reference internal" href="#django"><span class="std std-doc">Djangos</span></a> <em>Admin site</em> or database-administration web page
(<a class="reference external" href="https://docs.djangoproject.com/en/2.1/ref/contrib/admin/">link to Django docs</a>). The admin site is
an automatically generated web interface to the database (it can be customized extensively). Its
reachable from the <code class="docutils literal notranslate"><span class="pre">admin</span></code> link on the default Evennia website you get with your server.</p>
</section>
<section id="attribute">
<h2><em>attribute</em><a class="headerlink" href="#attribute" title="Permalink to this headline"></a></h2>
<p>The term <em>Attribute</em> should not be confused with (<a class="reference internal" href="#property"><span class="std std-doc">properties</span></a> or
<a class="reference internal" href="#field"><span class="std std-doc">fields</span></a>. The <code class="docutils literal notranslate"><span class="pre">Attribute</span></code> represents arbitrary pieces of data that can be attached
to any <a class="reference internal" href="#typeclass"><span class="std std-doc">typeclassed</span></a> entity in Evennia. Attributes allows storing new persistent
data on typeclasses without changing their underlying database schemas. <a class="reference internal" href="Attributes.html"><span class="doc std std-doc">Read more about Attributes
here</span></a>.</p>
</section>
<section id="channel">
<h2><em>channel</em><a class="headerlink" href="#channel" title="Permalink to this headline"></a></h2>
<p>A <em>Channel</em> refers to an in-game communication channel. Its an entity that people subscribe to and
which re-distributes messages between all subscribers. Such subscribers default to being
<a class="reference internal" href="#account"><span class="std std-doc">Accounts</span></a>, for out-of-game communication but could also be <a class="reference internal" href="#character"><span class="std std-doc">Objects (usually
Characters)</span></a> if one wanted to adopt Channels for things like in-game walkie-
talkies or phone systems. It is represented by the <code class="docutils literal notranslate"><span class="pre">Channel</span></code> typeclass. <a class="reference internal" href="Communications.html#channels"><span class="std std-doc">You can read more about the
comm system here</span></a>.</p>
</section>
<section id="character">
<h2><em>character</em><a class="headerlink" href="#character" title="Permalink to this headline"></a></h2>
<p>The <em>Character</em> is the term we use for the default avatar being <a class="reference internal" href="#puppet"><span class="std std-doc">puppeted</span></a> by the
<a class="reference internal" href="#account"><span class="std std-doc">account</span></a> in the game world. It is represented by the <code class="docutils literal notranslate"><span class="pre">Character</span></code> typeclass (which
is a child of <a class="reference internal" href="#object"><span class="std std-doc">Object</span></a>). Many developers use children of this class to represent
monsters and other NPCs. You can <a class="reference internal" href="Objects.html#subclasses-of-object"><span class="std std-doc">read more about it here</span></a>.</p>
</section>
<section id="django">
<h2><em>django</em><a class="headerlink" href="#django" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://www.djangoproject.com/">Django</a> is a professional and very popular Python web framework,
similar to Rails for the Ruby language. It is one of Evennias central library dependencies (the
other one is <a class="reference internal" href="#twisted"><span class="std std-doc">Twisted</span></a>). Evennia uses Django for two main things - to map all
database operations to Python and for structuring our web site.</p>
<p>Through Django, we can work with any supported database (SQlite3, Postgres, MySQL …) using generic
Python instead of database-specific SQL: A database table is represented in Django as a Python class
(called a <em>model</em>). An Python instance of such a class represents a row in that table.</p>
<p>There is usually no need to know the details of Djangos database handling in order to use Evennia -
it will handle most of the complexity for you under the hood using what we call
<a class="reference internal" href="#typeclass"><span class="std std-doc">typeclasses</span></a>. But should you need the power of Django you can always get it.
Most commonly people want to use “raw” Django when doing more advanced/custom database queries than
offered by Evennias <a class="reference internal" href="Tutorial-Searching-For-Objects.html"><span class="doc std std-doc">default search functions</span></a>. One will then need
to read about Djangos <em>querysets</em>. Querysets are Python method calls on a special form that lets
you build complex queries. They get converted into optimized SQL queries under the hood, suitable
for your current database. [Here is our tutorial/explanation of Django queries](Tutorial-Searching-
For-Objects#queries-in-django).</p>
<blockquote>
<div><p>By the way, Django (and Evennia) does allow you to fall through and send raw SQL if you really
want to. Its highly unlikely to be needed though; the Django database abstraction is very, very
powerful.</p>
</div></blockquote>
<p>The other aspect where Evennia uses Django is for web integration. On one end Django gives an
infrastructure for wiring Python functions (called <em>views</em>) to URLs: the view/function is called
when a user goes that URL in their browser, enters data into a form etc. The return is the web page
to show. Django also offers templating with features such as being able to add special markers in
HTML where it will insert the values of Python variables on the fly (like showing the current player
count on the web page). [Here is one of our tutorials on wiring up such a web page](Add-a-simple-
new-web-page). Django also comes with the <a class="reference internal" href="#admin-site"><span class="std std-doc">admin site</span></a>, which automatically
maps the database into a form accessible from a web browser.</p>
</section>
<section id="contrib">
<h2><em>contrib</em><a class="headerlink" href="#contrib" title="Permalink to this headline"></a></h2>
<p>Contribs are optional and often more game-specific code-snippets contributed by the Evennia community.
They are distributed with Evennia in the <code class="docutils literal notranslate"><span class="pre">contrib/</span></code> folder.</p>
</section>
<section id="core">
<h2><em>core</em><a class="headerlink" href="#core" title="Permalink to this headline"></a></h2>
<p>This term is sometimes used to represent the main Evennia library code suite, <em>excluding</em> its
<a class="reference internal" href="#contrib"><span class="std std-doc">contrib</span></a> directory. It can sometimes come up in code reviews, such as</p>
<blockquote>
<div><p>Evennia is game-agnostic but this feature is for a particular game genre. So it does not belong in
core. Better make it a contrib.</p>
</div></blockquote>
</section>
<section id="field">
<h2><em>field</em><a class="headerlink" href="#field" title="Permalink to this headline"></a></h2>
<p>A <em>field</em> or <em>database field</em> in Evennia refers to a <a class="reference internal" href="#property"><span class="std std-doc">property</span></a> on a
<a class="reference internal" href="#typeclass"><span class="std std-doc">typeclass</span></a> directly linked to an underlying database column. Only a few fixed
properties per typeclass are database fields but they are often tied to the core functionality of
that base typeclass (for example <a class="reference internal" href="#object"><span class="std std-doc">Objects</span></a> store its location as a field). In all
other cases, <a class="reference internal" href="#attribute"><span class="std std-doc">attributes</span></a> are used to add new persistent data to the typeclass.
<a class="reference internal" href="Typeclasses.html#about-typeclass-properties"><span class="std std-doc">Read more about typeclass properties here</span></a>.</p>
</section>
<section id="git">
<h2><em>git</em><a class="headerlink" href="#git" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://git-scm.com/">Git</a> is a <a class="reference external" href="https://en.wikipedia.org/wiki/Version_control">version control</a>
tool. It allows us to track the development of the Evennia code by dividing it into units called
<em>commits</em>. A commit is sort of a save-spot - you save the current state of your code and can then
come back to it later if later changes caused problems. By tracking commits we know what version
of the code we are currently using.</p>
<p>Evennias source code + its source history is jointly called a <a class="reference internal" href="#repository"><span class="std std-doc">repository</span></a>.
This is centrally stored at our online home on <a class="reference internal" href="#github"><span class="std std-doc">GitHub</span></a>. Everyone using or
developing Evennia makes a clone of this repository to their own computer - everyone
automatically gets everything that is online, including all the code history.</p>
<blockquote>
<div><p>Dont confuse Git and <a class="reference internal" href="#github"><span class="std std-doc">GitHub</span></a>. The former is the version control system. The
latter is a website (run by a company) that allows you to upload source code controlled by Git for
others to see (among other things).</p>
</div></blockquote>
<p>Git allows multiple users from around the world to efficiently collaborate on Evennias code: People
can make local commits on their cloned code. The commits they do can then be uploaded to GitHub and
reviewed by the Evennia lead devs - and if the changes look ok they can be safely <em>merged</em> into the
central Evennia code - and everyone can <em>pull</em> those changes to update their local copies.</p>
<p>Developers using Evennia often uses Git on their own games in the same way - to track their changes
and to help collaboration with team mates. This is done completely independently of Evennias Git
usage.</p>
<p>Common usage (for non-Evennia developers):</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">&lt;github-url&gt;</span></code> - clone an online repository to your computer. This is what you do when
you download Evennia. You only need to do this once.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">pull</span></code> (inside local copy of repository) - sync your local repository with what is online.</p></li>
</ul>
<blockquote>
<div><p>Full usage of Git is way beyond the scope of this glossary. See <a class="reference internal" href="Version-Control.html"><span class="doc std std-doc">Tutorial - version
control</span></a> for more info and links to the Git documentation.</p>
</div></blockquote>
</section>
<section id="migrate">
<h2><em>migrate</em><a class="headerlink" href="#migrate" title="Permalink to this headline"></a></h2>
<p>This term is used for upgrading the database structure (its <em>schema</em> )to a new version. Most often
this is due to Evennias <a class="reference internal" href="#github"><span class="std std-doc">upstream</span></a> schema changing. When that happens you need to
migrate that schema to the new version as well. Once you have used <a class="reference internal" href="#git"><span class="std std-doc">git</span></a> to pull the
latest changes, just <code class="docutils literal notranslate"><span class="pre">cd</span></code> into your game dir and run</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia migrate
</pre></div>
</div>
<p>That should be it (see <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a> if you get a warning that the <code class="docutils literal notranslate"><span class="pre">evennia</span></code>
command is not available). See also <a class="reference internal" href="Updating-Your-Game.html"><span class="doc std std-doc">Updating your game</span></a> for more details.</p>
<blockquote>
<div><p>Technically, migrations are shipped as little Python snippets of code that explains which database
actions must be taken to upgrade from one version of the schema to the next. When you run the
command above, those snippets are run in sequence.</p>
</div></blockquote>
</section>
<section id="multisession-mode">
<h2><em>multisession mode</em><a class="headerlink" href="#multisession-mode" title="Permalink to this headline"></a></h2>
<p>This term refers to the <code class="docutils literal notranslate"><span class="pre">MULTISESSION_MODE</span></code> setting, which has a value of 0 to 3. The mode alters
how players can connect to the game, such as how many Sessions a player can start with one account
and how many Characters they can control at the same time. It is <a class="reference internal" href="Sessions.html#multisession-mode"><span class="std std-doc">described in detail
here</span></a>.</p>
</section>
<section id="github">
<h2><em>github</em><a class="headerlink" href="#github" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://github.com/evennia">Github</a> is where Evennias source code and documentation is hosted.
This online <a class="reference internal" href="#repository"><span class="std std-doc">repository</span></a> of code we also sometimes refer to as <em>upstream</em>.</p>
<p>GitHub is a business, offering free hosting to Open-source projects like Evennia. Despite the
similarity in name, dont confuse GitHub the website with <a class="reference internal" href="#git"><span class="std std-doc">Git</span></a>, the versioning
system. Github hosts Git <a class="reference internal" href="#repository"><span class="std std-doc">repositories</span></a> online and helps with collaboration and
infrastructure. Git itself is a separate project.</p>
</section>
<section id="object">
<h2><em>object</em><a class="headerlink" href="#object" title="Permalink to this headline"></a></h2>
<p>In general Python (and other <a class="reference external" href="https://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented languages</a>), an <code class="docutils literal notranslate"><span class="pre">object</span></code> is what we call the instance of a <em>class</em>. But one of Evennias
core <a class="reference internal" href="#typeclass"><span class="std std-doc">typeclasses</span></a> is also called “Object”. To separate these in the docs we
try to use <code class="docutils literal notranslate"><span class="pre">object</span></code> to refer to the general term and capitalized <code class="docutils literal notranslate"><span class="pre">Object</span></code> when we refer to the
typeclass.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">Object</span></code> is a typeclass that represents all <em>in-game</em> entities, including
<a class="reference internal" href="#character"><span class="std std-doc">Characters</span></a>, rooms, trees, weapons etc. <a class="reference internal" href="Objects.html"><span class="doc std std-doc">Read more about Objects
here</span></a>.</p>
</section>
<section id="pip">
<h2><em>pip</em><a class="headerlink" href="#pip" title="Permalink to this headline"></a></h2>
<p><em><a class="reference external" href="https://pypi.org/project/pip/">pip</a></em> comes with Python and is the main tool for installing third-
party Python packages from the web. Once a python package is installed you can do <code class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">&lt;packagename&gt;</span></code> in your Python code.</p>
<p>Common usage:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">&lt;package-name&gt;</span></code> - install the given package along with all its dependencies.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">search</span> <span class="pre">&lt;name&gt;</span></code> - search Pythons central package repository <a class="reference external" href="https://pypi.org/">PyPi</a> for a
package of that name.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">--upgrade</span> <span class="pre">&lt;package_name&gt;</span></code> - upgrade a package you already have to the latest version.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">&lt;packagename&gt;==1.5</span></code> - install exactly a specific package version.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">&lt;folder&gt;</span></code> - install a Python package you have downloaded earlier (or cloned using
git).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">&lt;folder&gt;</span></code> - install a local package by just making a soft link to the folder. This
means that if the code in <code class="docutils literal notranslate"><span class="pre">&lt;folder&gt;</span></code> changes, the installed Python package is immediately updated.
If not using <code class="docutils literal notranslate"><span class="pre">-e</span></code>, one would need to run <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">--upgrade</span> <span class="pre">&lt;folder&gt;</span></code> every time to make the
changes available when you import this package into your code. Evennia is installed this way.</p></li>
</ul>
<p>For development, <code class="docutils literal notranslate"><span class="pre">pip</span></code> is usually used together with a <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a> to install
all packages and dependencies needed for a project in one, isolated location on the hard drive.</p>
</section>
<section id="puppet">
<h2><em>puppet</em><a class="headerlink" href="#puppet" title="Permalink to this headline"></a></h2>
<p>An <a class="reference internal" href="#account"><span class="std std-doc">account</span></a> can take control and “play as” any <a class="reference internal" href="#object"><span class="std std-doc">Object</span></a>. When
doing so, we call this <em>puppeting</em>, (like <a class="reference external" href="https://en.wikipedia.org/wiki/Puppeteer">puppeteering</a>).
Normally the entity being puppeted is of the <a class="reference internal" href="#character"><span class="std std-doc">Character</span></a> subclass but it does
not have to be.</p>
</section>
<section id="property">
<h2><em>property</em><a class="headerlink" href="#property" title="Permalink to this headline"></a></h2>
<p>A <em>property</em> is a general term used for properties on any Python object. The term also sometimes
refers to the <code class="docutils literal notranslate"><span class="pre">property</span></code> built-in function of Python (<a class="reference external" href="https://www.python-course.eu/python3_properties.php">read more here</a>). Note the distinction between properties,
<a class="reference internal" href="#field"><span class="std std-doc">fields</span></a> and <a class="reference internal" href="#attribute"><span class="std std-doc">Attributes</span></a>.</p>
</section>
<section id="repository">
<h2><em>repository</em><a class="headerlink" href="#repository" title="Permalink to this headline"></a></h2>
<p>A <em>repository</em> is a version control/<a class="reference internal" href="#git"><span class="std std-doc">git</span></a> term. It represents a folder containing
source code plus its versioning history.</p>
<blockquote>
<div><p>In Gits case, that history is stored in a hidden folder <code class="docutils literal notranslate"><span class="pre">.git</span></code>. If you ever feel the need to look
into this folder you probably already know enough Git to know why.</p>
</div></blockquote>
<p>The <code class="docutils literal notranslate"><span class="pre">evennia</span></code> folder you download from us with <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span></code> is a repository. The code on
<a class="reference internal" href="#github"><span class="std std-doc">GitHub</span></a> is often referred to as the online repository (or the <em>upstream</em>
repository). If you put your game dir under version control, that of course becomes a repository as
well.</p>
</section>
<section id="script">
<h2><em>script</em><a class="headerlink" href="#script" title="Permalink to this headline"></a></h2>
<p>When we refer to <em>Scripts</em>, we generally refer to the <code class="docutils literal notranslate"><span class="pre">Script</span></code> <a class="reference internal" href="Typeclasses.html"><span class="doc std std-doc">typeclass</span></a>. Scripts are
the mavericks of Evennia - they are like <a class="reference internal" href="#object"><span class="std std-doc">Objects</span></a> but without any in-game
existence. They are useful as custom places to store data but also as building blocks in persistent
game systems. Since the can be initialized with timing capabilities they can also be used for long-
time persistent time keeping (for fast updates other types of timers may be better though). <a class="reference internal" href="Scripts.html"><span class="doc std std-doc">Read
more about Scripts here</span></a></p>
</section>
<section id="session">
<h2><em>session</em><a class="headerlink" href="#session" title="Permalink to this headline"></a></h2>
<p>A <a class="reference internal" href="Sessions.html"><span class="doc std std-doc">Session</span></a> is a Python object representing a single client connection to the server. A
given human player could connect to the game from different clients and each would get a Session
(even if you did not allow them to actually log in and get access to an
<a class="reference internal" href="#account"><span class="std std-doc">account</span></a>).</p>
<p>Sessions are <em>not</em> <a class="reference internal" href="#typeclass"><span class="std std-doc">typeclassed</span></a> and has no database persistence. But since they
always exist (also when not logged in), they share some common functionality with typeclasses that
can be useful for certain game states.</p>
</section>
<section id="tag">
<h2><em>tag</em><a class="headerlink" href="#tag" title="Permalink to this headline"></a></h2>
<p>A <a class="reference internal" href="Tags.html"><span class="doc std std-doc">Tag</span></a> is a simple label one can attach to one or more objects in the game. Tagging is a
powerful way to group entities and can also be used to indicate they have particular shared abilities.
Tags are shared between objects (unlike <a class="reference internal" href="#attribute"><span class="std std-doc">Attributes</span></a>).</p>
</section>
<section id="ticker">
<h2><em>ticker</em><a class="headerlink" href="#ticker" title="Permalink to this headline"></a></h2>
<p>The <a class="reference internal" href="TickerHandler.html"><span class="doc std std-doc">Ticker handler</span></a> runs Evennias optional ticker system. In other engines, such
as <a class="reference external" href="https://en.wikipedia.org/wiki/DikuMUD">DIKU</a>, all game events are processed only at specific
intervals called ticks. Evennia has no such technical limitation (events are processed whenever
needed) but using a fixed tick can still be useful for certain types of game systems, like combat.
Ticker Handler allows you to emulate any number of tick rates (not just one) and subscribe actions
to be called when those ticks come around.</p>
</section>
<section id="typeclass">
<h2><em>typeclass</em><a class="headerlink" href="#typeclass" title="Permalink to this headline"></a></h2>
<p>The <a class="reference internal" href="Typeclasses.html"><span class="doc std std-doc">typeclass</span></a> is an Evennia-specific term. A typeclass allows developers to work with
database-persistent objects as if they were normal Python objects. It makes use of specific
<a class="reference internal" href="#django"><span class="std std-doc">Django</span></a> features to link a Python class to a database table. Sometimes we refer to
such code entities as <em>being typeclassed</em>.</p>
<p>Evennias main typeclasses are <a class="reference internal" href="#account"><span class="std std-doc">Account</span></a>, <a class="reference internal" href="#object"><span class="std std-doc">Object</span></a>,
<a class="reference internal" href="#script"><span class="std std-doc">Script</span></a> and <a class="reference internal" href="#channel"><span class="std std-doc">Channel</span></a>. Children of the base class (such as
<a class="reference internal" href="#character"><span class="std std-doc">Character</span></a>) will use the same database table as the parent, but can have vastly
different Python capabilities (and persistent features through <a class="reference internal" href="#attribute"><span class="std std-doc">Attributes</span></a> and
<a class="reference internal" href="#tag"><span class="std std-doc">Tags</span></a>. A typeclass can be coded and treated pretty much like any other Python class
except it must inherit (at any distance) from one of the base typeclasses. Also, creating a new
instance of a typeclass will add a new row to the database table to which it is linked.</p>
<p>The <a class="reference internal" href="#core"><span class="std std-doc">core</span></a> typeclasses in the Evennia library are all named <code class="docutils literal notranslate"><span class="pre">DefaultAccount</span></code>,
<code class="docutils literal notranslate"><span class="pre">DefaultObject</span></code> etc. When you initialize your [game dir] you automatically get empty children of
these, called <code class="docutils literal notranslate"><span class="pre">Account</span></code>, <code class="docutils literal notranslate"><span class="pre">Object</span></code> etc that you can start working with.</p>
</section>
<section id="twisted">
<h2><em>twisted</em><a class="headerlink" href="#twisted" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://twistedmatrix.com/trac/">Twisted</a> is a heavy-duty asynchronous networking engine. It is one
of Evennias two major library dependencies (the other one is <a class="reference internal" href="#django"><span class="std std-doc">Django</span></a>). Twisted is
what “runs” Evennia - it handles Evennias event loop. Twisted also has the building blocks we need
to construct network protocols and communicate with the outside world; such as our MUD-custom
version of Telnet, Telnet+SSL, SSH, webclient-websockets etc. Twisted also runs our integrated web
server, serving the Django-based website for your game.</p>
</section>
<section id="virtualenv">
<h2><em>virtualenv</em><a class="headerlink" href="#virtualenv" title="Permalink to this headline"></a></h2>
<p>The standard <a class="reference external" href="https://virtualenv.pypa.io/en/stable/">virtualenv</a> program comes with Python. It is
used to isolate all Python packages needed by a given Python project into one folder (we call that
folder <code class="docutils literal notranslate"><span class="pre">evenv</span></code> but it could be called anything). A package environment created this way is usually
referred to as “a virtualenv”. If you ever try to run the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> program and get an error saying
something like “the command evennia is not available” - its probably because your virtualenv is
not active yet (see below).</p>
<p>Usage:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">virtualenv</span> <span class="pre">&lt;name&gt;</span></code> - initialize a new virtualenv <code class="docutils literal notranslate"><span class="pre">&lt;name&gt;</span></code> in a new folder <code class="docutils literal notranslate"><span class="pre">&lt;name&gt;</span></code> in the current
location. Called <code class="docutils literal notranslate"><span class="pre">evenv</span></code> in these docs.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">virtualenv</span> <span class="pre">-p</span> <span class="pre">path/to/alternate/python_executable</span> <span class="pre">&lt;name&gt;</span></code> - create a virtualenv using another
Python version than default.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">&lt;folder_name&gt;/bin/activate</span></code>(linux/mac) - activate the virtualenv in <code class="docutils literal notranslate"><span class="pre">&lt;folder_name&gt;</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;folder_name&gt;\Scripts\activate</span></code> (windows)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">deactivate</span></code> - turn off the currently activated virtualenv.</p></li>
</ul>
<p>A virtualenv is activated only for the console/terminal it was started in, but its safe to
activate the same virtualenv many times in different windows if you want. Once activated, all Python
packages now installed with <a class="reference internal" href="#pip"><span class="std std-doc">pip</span></a> will install to <code class="docutils literal notranslate"><span class="pre">evenv</span></code> rather than to a global
location like <code class="docutils literal notranslate"><span class="pre">/usr/local/bin</span></code> or <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files</span></code>.</p>
<blockquote>
<div><p>Note that if you have root/admin access you <em>could</em> install Evennia globally just fine, without
using a virtualenv. Its strongly discouraged and considered bad practice though. Experienced Python
developers tend to rather create one new virtualenv per project they are working on, to keep the
varying installs cleanly separated from one another.</p>
</div></blockquote>
<p>When you execute Python code within this activated virtualenv, <em>only</em> those packages installed
within will be possible to <code class="docutils literal notranslate"><span class="pre">import</span></code> into your code. So if you installed a Python package globally on
your computer, youll need to install it again in your virtualenv.</p>
<blockquote>
<div><p>Virtualenvs <em>only</em> deal with Python programs/packages. Other programs on your computer couldnt
care less if your virtualenv is active or not. So you could use <code class="docutils literal notranslate"><span class="pre">git</span></code> without the virtualenv being
active, for example.</p>
</div></blockquote>
<p>When your virtualenv is active you should see your console/terminal prompt change to</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>(evenv) ...
</pre></div>
</div>
<p>… or whatever name you gave the virtualenv when you initialized it.</p>
<blockquote>
<div><p>We sometimes say that we are “in” the virtualenv when its active. But just to be clear - you
never have to actually <code class="docutils literal notranslate"><span class="pre">cd</span></code> into the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> folder. You can activate it from anywhere and will
still be considered “in” the virtualenv wherever you go until you <code class="docutils literal notranslate"><span class="pre">deactivate</span></code> or close the
console/terminal.</p>
</div></blockquote>
<p>So, when do I <em>need</em> to activate my virtualenv? If the virtualenv is not active, none of the Python
packages/programs you installed in it will be available to you. So at a minimum, <em>it needs to be
activated whenever you want to use the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command</em> for any reason.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/evennia_logo.png" alt="Logo"/>
</a></p>
<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="#">Glossary</a><ul>
<li><a class="reference internal" href="#account"><em>account</em></a></li>
<li><a class="reference internal" href="#admin-site"><em>admin-site</em></a></li>
<li><a class="reference internal" href="#attribute"><em>attribute</em></a></li>
<li><a class="reference internal" href="#channel"><em>channel</em></a></li>
<li><a class="reference internal" href="#character"><em>character</em></a></li>
<li><a class="reference internal" href="#django"><em>django</em></a></li>
<li><a class="reference internal" href="#contrib"><em>contrib</em></a></li>
<li><a class="reference internal" href="#core"><em>core</em></a></li>
<li><a class="reference internal" href="#field"><em>field</em></a></li>
<li><a class="reference internal" href="#git"><em>git</em></a></li>
<li><a class="reference internal" href="#migrate"><em>migrate</em></a></li>
<li><a class="reference internal" href="#multisession-mode"><em>multisession mode</em></a></li>
<li><a class="reference internal" href="#github"><em>github</em></a></li>
<li><a class="reference internal" href="#object"><em>object</em></a></li>
<li><a class="reference internal" href="#pip"><em>pip</em></a></li>
<li><a class="reference internal" href="#puppet"><em>puppet</em></a></li>
<li><a class="reference internal" href="#property"><em>property</em></a></li>
<li><a class="reference internal" href="#repository"><em>repository</em></a></li>
<li><a class="reference internal" href="#script"><em>script</em></a></li>
<li><a class="reference internal" href="#session"><em>session</em></a></li>
<li><a class="reference internal" href="#tag"><em>tag</em></a></li>
<li><a class="reference internal" href="#ticker"><em>ticker</em></a></li>
<li><a class="reference internal" href="#typeclass"><em>typeclass</em></a></li>
<li><a class="reference internal" href="#twisted"><em>twisted</em></a></li>
<li><a class="reference internal" href="#virtualenv"><em>virtualenv</em></a></li>
</ul>
</li>
</ul>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="_sources/Glossary.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com">Home page</a> </li>
<li><a href="https://github.com/evennia/evennia">Evennia Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li><a href="http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb">IRC</a> -
<a href="https://discord.gg/NecFePw">Discord</a> -
<a href="https://groups.google.com/forum/#%21forum/evennia">Forums</a>
</li>
<li><a href="http://evennia.blogspot.com/">Evennia Dev blog</a> </li>
</ul>
<h3>Versions</h3>
<ul>
<li><a href="../1.0-dev/Glossary.html">1.0-dev (develop branch)</a></li>
<li><a href="Glossary.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<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="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.5</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Glossary</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>