mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 22:06:30 +01:00
199 lines
No EOL
10 KiB
HTML
199 lines
No EOL
10 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>Using MUX as a Standard — Evennia 1.0-dev 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" />
|
||
</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 1.0-dev documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="using-mux-as-a-standard">
|
||
<h1>Using MUX as a Standard<a class="headerlink" href="#using-mux-as-a-standard" title="Permalink to this headline">¶</a></h1>
|
||
<p>Evennia allows for any command syntax. If you like the way DikuMUDs, LPMuds or MOOs handle things, you could emulate that with Evennia. If you are ambitious you could even design a whole new style, perfectly fitting your own dreams of the ideal game.</p>
|
||
<p>We do offer a default however. The default Evennia setup tends to <em>resemble</em> <a class="reference external" href="http://www.tinymux.org/">MUX2</a>, and its cousins <a class="reference external" href="http://www.pennmush.org">PennMUSH</a>, <a class="reference external" href="http://tinymush.sourceforge.net/">TinyMUSH</a>, and <a class="reference external" href="http://www.rhostmush.org/">RhostMUSH</a>. While the reason for this similarity is partly historical, these codebases offer very mature feature sets for administration and building.</p>
|
||
<p>Evennia is <em>not</em> a MUX system though. It works very differently in many ways. For example, Evennia deliberately lacks an online softcode language (a policy explained on our <a class="reference internal" href="Soft-Code.html"><span class="doc">softcode policy page</span></a>). Evennia also does not shy from using its own syntax when deemed appropriate: the MUX syntax has grown organically over a long time and is, frankly, rather arcane in places. All in all the default command syntax should at most be referred to as “MUX-like” or “MUX-inspired”.</p>
|
||
<div class="section" id="documentation-policy">
|
||
<h2>Documentation policy<a class="headerlink" href="#documentation-policy" title="Permalink to this headline">¶</a></h2>
|
||
<p>All the commands in the default command sets should have their doc-strings formatted on a similar form:</p>
|
||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
||
11
|
||
12
|
||
13
|
||
14
|
||
15
|
||
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="sd">"""</span>
|
||
<span class="sd"> Short header</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Usage:</span>
|
||
<span class="sd"> key[/switches, if any] <mandatory args> [optional] choice1||choice2||choice3</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Switches:</span>
|
||
<span class="sd"> switch1 - description</span>
|
||
<span class="sd"> switch2 - description</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Examples:</span>
|
||
<span class="sd"> usage example and output</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Longer documentation detailing the command.</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> """</span>
|
||
</pre></div>
|
||
</td></tr></table></div>
|
||
<ul class="simple">
|
||
<li><p>Two spaces are used for <em>indentation</em> in all default commands.</p></li>
|
||
<li><p>Square brackets <code class="docutils literal notranslate"><span class="pre">[</span> <span class="pre">]</span></code> surround <em>optional, skippable arguments</em>.</p></li>
|
||
<li><p>Angled brackets <code class="docutils literal notranslate"><span class="pre"><</span> <span class="pre">></span></code> surround a <em>description</em> of what to write rather than the exact syntax.</p></li>
|
||
<li><p>*Explicit choices are separated by <code class="docutils literal notranslate"><span class="pre">|</span></code>. To avoid this being parsed as a color code, use <code class="docutils literal notranslate"><span class="pre">||</span></code> (this will come out as a single <code class="docutils literal notranslate"><span class="pre">|</span></code>) or put spaces around the character (“<code class="docutils literal notranslate"><span class="pre">|</span></code>”) if there’s plenty of room.</p></li>
|
||
<li><p>The <code class="docutils literal notranslate"><span class="pre">Switches</span></code> and <code class="docutils literal notranslate"><span class="pre">Examples</span></code> blocks are optional based on the Command.</p></li>
|
||
</ul>
|
||
<p>Here is the <code class="docutils literal notranslate"><span class="pre">nick</span></code> command as an example:</p>
|
||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
||
11
|
||
12
|
||
13
|
||
14
|
||
15
|
||
16
|
||
17
|
||
18
|
||
19
|
||
20</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="sd">"""</span>
|
||
<span class="sd"> Define a personal alias/nick</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Usage:</span>
|
||
<span class="sd"> nick[/switches] <nickname> = [<string>]</span>
|
||
<span class="sd"> alias ''</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Switches:</span>
|
||
<span class="sd"> object - alias an object</span>
|
||
<span class="sd"> account - alias an account</span>
|
||
<span class="sd"> clearall - clear all your aliases</span>
|
||
<span class="sd"> list - show all defined aliases (also "nicks" works)</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> Examples:</span>
|
||
<span class="sd"> nick hi = say Hello, I'm Sarah!</span>
|
||
<span class="sd"> nick/object tom = the tall man</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> A 'nick' is a personal shortcut you create for your own use [...]</span>
|
||
<span class="sd"> </span>
|
||
<span class="sd"> """</span>
|
||
</pre></div>
|
||
</td></tr></table></div>
|
||
<p>For commands that <em>require arguments</em>, the policy is for it to return a <code class="docutils literal notranslate"><span class="pre">Usage:</span></code> string if the command is entered without any arguments. So for such commands, the Command body should contain something to the effect of</p>
|
||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||
2
|
||
3</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">args</span><span class="p">:</span>
|
||
<span class="bp">self</span><span class="o">.</span><span class="n">caller</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="s2">"Usage: nick[/switches] <nickname> = [<string>]"</span><span class="p">)</span>
|
||
<span class="k">return</span>
|
||
</pre></div>
|
||
</td></tr></table></div>
|
||
</div>
|
||
</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="#">Using MUX as a Standard</a><ul>
|
||
<li><a class="reference internal" href="#documentation-policy">Documentation policy</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/Using-MUX-as-a-Standard.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="Using-MUX-as-a-Standard.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../0.9.1/Using-MUX-as-a-Standard.html">0.9.1 (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="nav-item nav-item-0"><a href="index.html">Evennia 1.0-dev documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2020, The Evennia developer community.
|
||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
|
||
</div>
|
||
</body>
|
||
</html> |