mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 05:46:31 +01:00
196 lines
No EOL
11 KiB
HTML
196 lines
No EOL
11 KiB
HTML
|
||
<!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>Using MUX as a Standard — 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> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Using MUX as a Standard</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="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 std std-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>
|
||
<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"><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>
|
||
</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"><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>
|
||
</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"><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>
|
||
</div>
|
||
</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="#">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>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/index.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="Using-MUX-as-a-Standard.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> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Using MUX as a Standard</a></li>
|
||
</ul>
|
||
</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> |