mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 13:56:30 +01:00
207 lines
No EOL
14 KiB
HTML
207 lines
No EOL
14 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Directory Overview — 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>
|
||
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="API Summary" href="Evennia-API.html" />
|
||
<link rel="prev" title="Setting up PyCharm" href="Setting-up-PyCharm.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="right" >
|
||
<a href="Evennia-API.html" title="API Summary"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Setting-up-PyCharm.html" title="Setting up PyCharm"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.5</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="Developer-Central.html" accesskey="U">Developer Central</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Directory Overview</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="directory-overview">
|
||
<h1>Directory Overview<a class="headerlink" href="#directory-overview" title="Permalink to this headline">¶</a></h1>
|
||
<p>This is an overview of the directories relevant to Evennia coding.</p>
|
||
<div class="section" id="the-game-directory">
|
||
<h2>The Game directory<a class="headerlink" href="#the-game-directory" title="Permalink to this headline">¶</a></h2>
|
||
<p>The game directory is created with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--init</span> <span class="pre"><name></span></code>. In the Evennia documentation we always
|
||
assume it’s called <code class="docutils literal notranslate"><span class="pre">mygame</span></code>. Apart from the <code class="docutils literal notranslate"><span class="pre">server/</span></code> subfolder within, you could reorganize this
|
||
folder if you preferred a different code structure for your game.</p>
|
||
<ul class="simple">
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">mygame/</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">commands/</span></code> - Overload default <a class="reference internal" href="Commands.html"><span class="doc">Commands</span></a> or add your own Commands/<a class="reference internal" href="Command-Sets.html"><span class="doc">Command
|
||
sets</span></a> here.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">server</span></code>/ - The structure of this folder should not change since Evennia expects it.</p>
|
||
<ul>
|
||
<li><p><a class="reference external" href="https://github.com/evennia/evennia/tree/master/evennia/game_template/server"><code class="docutils literal notranslate"><span class="pre">conf/</span></code></a> - All
|
||
server configuration files sits here. The most important file is <code class="docutils literal notranslate"><span class="pre">settings.py</span></code>.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">logs/</span></code> - Portal log files are stored here (Server is logging to the terminal by default)</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">typeclasses/</span></code> - this folder contains empty templates for overloading default game entities of
|
||
Evennia. Evennia will automatically use the changes in those templates for the game entities it
|
||
creates.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">web/</span></code> - This holds the <a class="reference internal" href="Web-Features.html"><span class="doc">Web features</span></a> of your game.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">world/</span></code> - this is a “miscellaneous” folder holding everything related to the world you are
|
||
building, such as build scripts and rules modules that don’t fit with one of the other folders.</p></li>
|
||
</ul>
|
||
</div>
|
||
<div class="section" id="evennia-library-layout">
|
||
<h2>Evennia library layout:<a class="headerlink" href="#evennia-library-layout" title="Permalink to this headline">¶</a></h2>
|
||
<p>If you cloned the GIT repo following the instructions, you will have a folder named <code class="docutils literal notranslate"><span class="pre">evennia</span></code>. The
|
||
top level of it contains Python package specific stuff such as a readme file, <code class="docutils literal notranslate"><span class="pre">setup.py</span></code> etc. It
|
||
also has two subfolders<code class="docutils literal notranslate"><span class="pre">bin/</span></code> and <code class="docutils literal notranslate"><span class="pre">evennia/</span></code> (again).</p>
|
||
<p>The <code class="docutils literal notranslate"><span class="pre">bin/</span></code> directory holds OS-specific binaries that will be used when installing Evennia with <code class="docutils literal notranslate"><span class="pre">pip</span></code>
|
||
as per the <a class="reference internal" href="Getting-Started.html"><span class="doc">Getting started</span></a> instructions. The library itself is in the <code class="docutils literal notranslate"><span class="pre">evennia</span></code>
|
||
subfolder. From your code you will access this subfolder simply by <code class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">evennia</span></code>.</p>
|
||
<ul class="simple">
|
||
<li><p>evennia</p>
|
||
<ul>
|
||
<li><p><a class="reference internal" href="Evennia-API.html"><span class="doc">__init__.py</span></a> - The “flat API” of Evennia resides here.</p></li>
|
||
<li><p><a class="reference internal" href="Commands.html"><span class="doc">commands/</span></a> - The command parser and handler.</p>
|
||
<ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">default/</span></code> - The <a class="reference internal" href="Default-Command-Help.html"><span class="doc">default commands</span></a> and cmdsets.</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><a class="reference internal" href="Communications.html"><span class="doc">comms/</span></a> - Systems for communicating in-game.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">contrib/</span></code> - Optional plugins too game-specific for core Evennia.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">game_template/</span></code> - Copied to become the “game directory” when using <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--init</span></code>.</p></li>
|
||
<li><p><a class="reference internal" href="Help-System.html"><span class="doc">help/</span></a> - Handles the storage and creation of help entries.</p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">locale/</span></code> - Language files (<a class="reference internal" href="Internationalization.html"><span class="doc">i18n</span></a>).</p></li>
|
||
<li><p><a class="reference internal" href="Locks.html"><span class="doc">locks/</span></a> - Lock system for restricting access to in-game entities.</p></li>
|
||
<li><p><a class="reference internal" href="Objects.html"><span class="doc">objects/</span></a> - In-game entities (all types of items and Characters).</p></li>
|
||
<li><p><a class="reference internal" href="Spawner-and-Prototypes.html"><span class="doc">prototypes/</span></a> - Object Prototype/spawning system and OLC menu</p></li>
|
||
<li><p><a class="reference internal" href="Accounts.html"><span class="doc">accounts/</span></a> - Out-of-game Session-controlled entities (accounts, bots etc)</p></li>
|
||
<li><p><a class="reference internal" href="Scripts.html"><span class="doc">scripts/</span></a> - Out-of-game entities equivalence to Objects, also with timer support.</p></li>
|
||
<li><p><a class="reference internal" href="Portal-And-Server.html"><span class="doc">server/</span></a> - Core server code and Session handling.</p>
|
||
<ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">portal/</span></code> - Portal proxy and connection protocols.</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><a class="reference external" href="./Server-Conf#Settings-file"><code class="docutils literal notranslate"><span class="pre">settings_default.py</span></code></a> - Root settings of Evennia. Copy settings
|
||
from here to <code class="docutils literal notranslate"><span class="pre">mygame/server/settings.py</span></code> file.</p></li>
|
||
<li><p><a class="reference internal" href="Typeclasses.html"><span class="doc">typeclasses/</span></a> - Abstract classes for the typeclass storage and database system.</p></li>
|
||
<li><p><a class="reference internal" href="Coding-Utils.html"><span class="doc">utils/</span></a> - Various miscellaneous useful coding resources.</p></li>
|
||
<li><p><a class="reference internal" href="Web-Features.html"><span class="doc">web/</span></a> - Web resources and webserver. Partly copied into game directory on
|
||
initialization.</p></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>All directories contain files ending in <code class="docutils literal notranslate"><span class="pre">.py</span></code>. These are Python <em>modules</em> and are the basic units of
|
||
Python code. The roots of directories also have (usually empty) files named <code class="docutils literal notranslate"><span class="pre">__init__.py</span></code>. These are
|
||
required by Python so as to be able to find and import modules in other directories. When you have
|
||
run Evennia at least once you will find that there will also be <code class="docutils literal notranslate"><span class="pre">.pyc</span></code> files appearing, these are
|
||
pre-compiled binary versions of the <code class="docutils literal notranslate"><span class="pre">.py</span></code> files to speed up execution.</p>
|
||
<p>The root of the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> folder has an <code class="docutils literal notranslate"><span class="pre">__init__.py</span></code> file containing the “<a class="reference internal" href="Evennia-API.html"><span class="doc">flat API</span></a>”.
|
||
This holds shortcuts to various subfolders in the evennia library. It is provided to make it easier
|
||
to find things; it allows you to just import <code class="docutils literal notranslate"><span class="pre">evennia</span></code> and access things from that rather than
|
||
having to import from their actual locations inside the source tree.</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<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="#">Directory Overview</a><ul>
|
||
<li><a class="reference internal" href="#the-game-directory">The Game directory</a></li>
|
||
<li><a class="reference internal" href="#evennia-library-layout">Evennia library layout:</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="Setting-up-PyCharm.html"
|
||
title="previous chapter">Setting up PyCharm</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="Evennia-API.html"
|
||
title="next chapter">API Summary</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/Directory-Overview.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="../1.0-dev/index.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="Directory-Overview.html">0.9.5 (master 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="right" >
|
||
<a href="Evennia-API.html" title="API Summary"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Setting-up-PyCharm.html" title="Setting up PyCharm"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.5</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="Developer-Central.html" >Developer Central</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Directory Overview</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2020, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |