mirror of
https://github.com/evennia/evennia.git
synced 2026-04-17 21:59:06 +02:00
Updated HTML docs
This commit is contained in:
parent
66d0ad0bc9
commit
7900aad365
2073 changed files with 32986 additions and 41197 deletions
|
|
@ -14,6 +14,8 @@
|
|||
<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" />
|
||||
|
|
@ -38,7 +40,7 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="evennia-for-mush-users">
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="evennia-for-mush-users">
|
||||
<h1>Evennia for MUSH Users<a class="headerlink" href="#evennia-for-mush-users" title="Permalink to this headline">¶</a></h1>
|
||||
<p><em>This page is adopted from an article originally posted for the MUSH community <a class="reference external" href="https://musoapbox.net/topic/1150/evennia-for-mushers">here on
|
||||
musoapbox.net</a>.</em></p>
|
||||
|
|
@ -76,7 +78,7 @@ to use. So the <em>Player</em> usually operates by making use of the tools prepa
|
|||
<h2>Collaborating on a game - Python vs Softcode<a class="headerlink" href="#collaborating-on-a-game-python-vs-softcode" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For a <em>Player</em>, collaborating on a game need not be too different between MUSH and Evennia. The
|
||||
building and description of the game world can still happen mostly in-game using build commands,
|
||||
using text tags and <a class="reference external" href="Concepts/TextTags.html#inline-functions">inline functions</a> to prettify and customize the
|
||||
using text tags and <a class="reference internal" href="../Components/FuncParser.html"><span class="doc std std-doc">inline functions</span></a> to prettify and customize the
|
||||
experience. Evennia offers external ways to build a world but those are optional. There is also
|
||||
nothing <em>in principle</em> stopping a Developer from offering a softcode-like language to Players if
|
||||
that is deemed necessary.</p>
|
||||
|
|
@ -119,7 +121,7 @@ another which is again somewhat remniscent at least of the <em>effect</em> of <
|
|||
based inheritance of MUSH.</p>
|
||||
<p>There are other differences for sure, but that should give some feel for things. Enough with the
|
||||
theory. Let’s get down to more practical matters next. To install, see the
|
||||
<a class="reference internal" href="../Setup/Setup-Quickstart.html"><span class="doc">Getting Started instructions</span></a>.</p>
|
||||
<a class="reference internal" href="../Setup/Setup-Quickstart.html"><span class="doc std std-doc">Getting Started instructions</span></a>.</p>
|
||||
</section>
|
||||
<section id="a-first-step-making-things-more-familiar">
|
||||
<h2>A first step making things more familiar<a class="headerlink" href="#a-first-step-making-things-more-familiar" title="Permalink to this headline">¶</a></h2>
|
||||
|
|
@ -135,29 +137,7 @@ Open the module in a text editor. We won’t go into Evennia in-game <em>Command
|
|||
further here, but suffice to say Evennia allows you to change which commands (or versions of
|
||||
commands) are available to the player from moment to moment depending on circumstance.</p>
|
||||
<p>Add two new lines to the module as seen below:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
||||
<span class="normal"> 2</span>
|
||||
<span class="normal"> 3</span>
|
||||
<span class="normal"> 4</span>
|
||||
<span class="normal"> 5</span>
|
||||
<span class="normal"> 6</span>
|
||||
<span class="normal"> 7</span>
|
||||
<span class="normal"> 8</span>
|
||||
<span class="normal"> 9</span>
|
||||
<span class="normal">10</span>
|
||||
<span class="normal">11</span>
|
||||
<span class="normal">12</span>
|
||||
<span class="normal">13</span>
|
||||
<span class="normal">14</span>
|
||||
<span class="normal">15</span>
|
||||
<span class="normal">16</span>
|
||||
<span class="normal">17</span>
|
||||
<span class="normal">18</span>
|
||||
<span class="normal">19</span>
|
||||
<span class="normal">20</span>
|
||||
<span class="normal">21</span>
|
||||
<span class="normal">22</span>
|
||||
<span class="normal">23</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># the file mygame/commands/default_cmdsets.py</span>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># the file mygame/commands/default_cmdsets.py</span>
|
||||
<span class="c1"># [...] </span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.contrib</span> <span class="kn">import</span> <span class="n">multidescer</span> <span class="c1"># <- added now</span>
|
||||
|
|
@ -181,7 +161,7 @@ commands) are available to the player from moment to moment depending on circums
|
|||
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">multidescer</span><span class="o">.</span><span class="n">CmdMultiDesc</span><span class="p">())</span> <span class="c1"># <- added now </span>
|
||||
<span class="c1"># [...]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>Note that Python cares about indentation, so make sure to indent with the same number of spaces as
|
||||
shown above!</p>
|
||||
<p>So what happens above? We <a class="reference external" href="https://www.linuxtopia.org/online_books/programming_books/python_programming/python_ch28s03.html">import the
|
||||
|
|
@ -195,19 +175,14 @@ add it to the <code class="docutils literal notranslate"><span class="pre">Chara
|
|||
start. So we need to reload Evennia with <code class="docutils literal notranslate"><span class="pre">@reload</span></code> - no one will be disconnected by doing this. If
|
||||
all went well you should now be able to use <code class="docutils literal notranslate"><span class="pre">desc</span></code> (or <code class="docutils literal notranslate"><span class="pre">+desc</span></code>) and find that you have more
|
||||
possibilities:</p>
|
||||
<div class="highlight-text notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span>
|
||||
<span class="normal">5</span>
|
||||
<span class="normal">6</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span>> help +desc # get help on the command
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>> help +desc # get help on the command
|
||||
> +desc eyes = His eyes are blue.
|
||||
> +desc basic = A big guy.
|
||||
> +desc/set basic + + eyes # we add an extra space between
|
||||
> look me
|
||||
A big guy. His eyes are blue.
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>If there are errors, a <em>traceback</em> will show in the server log - several lines of text showing
|
||||
where the error occurred. Find where the error is by locating the line number related to the
|
||||
<code class="docutils literal notranslate"><span class="pre">default_cmdsets.py</span></code> file (it’s the only one you’ve changed so far). Most likely you mis-spelled
|
||||
|
|
@ -218,26 +193,26 @@ needed.</p>
|
|||
<h3>Customizing the multidescer syntax<a class="headerlink" href="#customizing-the-multidescer-syntax" title="Permalink to this headline">¶</a></h3>
|
||||
<p>As seen above the multidescer uses syntax like this (where <code class="docutils literal notranslate"><span class="pre">|/</span></code> are Evennia’s tags for line breaks)
|
||||
:</p>
|
||||
<div class="highlight-text notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span>> +desc/set basic + |/|/ + cape + footwear + |/|/ + attitude
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>> +desc/set basic + |/|/ + cape + footwear + |/|/ + attitude
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>This use of <code class="docutils literal notranslate"><span class="pre">+</span> </code> was prescribed by the <em>Developer</em> that coded this <code class="docutils literal notranslate"><span class="pre">+desc</span></code> command. What if the
|
||||
<em>Player</em> doesn’t like this syntax though? Do players need to pester the dev to change it? Not
|
||||
necessarily. While Evennia does not allow the player to build their own multi-descer on the command
|
||||
line, it does allow for <em>re-mapping</em> the command syntax to one they prefer. This is done using the
|
||||
<code class="docutils literal notranslate"><span class="pre">nick</span></code> command.</p>
|
||||
<p>Here’s a nick that changes how to input the command above:</p>
|
||||
<div class="highlight-text notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span>> nick setdesc $1 $2 $3 $4 = +desc/set $1 + |/|/ + $2 + $3 + |/|/ + $4
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>> nick setdesc $1 $2 $3 $4 = +desc/set $1 + |/|/ + $2 + $3 + |/|/ + $4
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>The string on the left will be matched against your input and if matching, it will be replaced with
|
||||
the string on the right. The <code class="docutils literal notranslate"><span class="pre">$</span></code>-type tags will store space-separated arguments and put them into
|
||||
the replacement. The nick allows <a class="reference external" href="http://www.linfo.org/wildcard.html">shell-like wildcards</a>, so you
|
||||
can use <code class="docutils literal notranslate"><span class="pre">*</span></code>, <code class="docutils literal notranslate"><span class="pre">?</span></code>, <code class="docutils literal notranslate"><span class="pre">[...]</span></code>, <code class="docutils literal notranslate"><span class="pre">[!...]</span></code> etc to match parts of the input.</p>
|
||||
<p>The same description as before can now be set as</p>
|
||||
<div class="highlight-text notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span>> setdesc basic cape footwear attitude
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>> setdesc basic cape footwear attitude
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>With the <code class="docutils literal notranslate"><span class="pre">nick</span></code> functionality players can mitigate a lot of syntax dislikes even without the
|
||||
developer changing the underlying Python code.</p>
|
||||
</section>
|
||||
|
|
@ -245,15 +220,15 @@ developer changing the underlying Python code.</p>
|
|||
<section id="next-steps">
|
||||
<h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this headline">¶</a></h2>
|
||||
<p>If you are a <em>Developer</em> and are interested in making a more MUSH-like Evennia game, a good start is
|
||||
to look into the Evennia <a class="reference internal" href="Starting/Part3/Tutorial-for-basic-MUSH-like-game.html"><span class="doc">Tutorial for a first MUSH-like game</span></a>.
|
||||
to look into the Evennia <a class="reference internal" href="Starting/Part3/Tutorial-for-basic-MUSH-like-game.html"><span class="doc std std-doc">Tutorial for a first MUSH-like game</span></a>.
|
||||
That steps through building a simple little game from scratch and helps to acquaint you with the
|
||||
various corners of Evennia. There is also the [Tutorial for running roleplaying sessions](Evennia-
|
||||
for-roleplaying-sessions) that can be of interest.</p>
|
||||
<p>An important aspect of making things more familiar for <em>Players</em> is adding new and tweaking existing
|
||||
commands. How this is done is covered by the [Tutorial on adding new commands](Adding-Command-
|
||||
Tutorial). You may also find it useful to shop through the <code class="docutils literal notranslate"><span class="pre">evennia/contrib/</span></code> folder. The
|
||||
<a class="reference internal" href="Starting/Part1/Tutorial-World-Introduction.html"><span class="doc">Tutorial world</span></a> is a small single-player quest you can try (it’s not very MUSH-
|
||||
like but it does show many Evennia concepts in action). Beyond that there are <a class="reference internal" href="Howto-Overview.html"><span class="doc">many more tutorials</span></a>
|
||||
<a class="reference internal" href="Starting/Part1/Tutorial-World-Introduction.html"><span class="doc std std-doc">Tutorial world</span></a> is a small single-player quest you can try (it’s not very MUSH-
|
||||
like but it does show many Evennia concepts in action). Beyond that there are <a class="reference internal" href="Howto-Overview.html"><span class="doc std std-doc">many more tutorials</span></a>
|
||||
to try out. If you feel you want a more visual overview you can also look at
|
||||
<a class="reference external" href="https://evennia.blogspot.se/2016/05/evennia-in-pictures.html">Evennia in pictures</a>.</p>
|
||||
<p>… And of course, if you need further help you can always drop into the <a class="reference external" href="https://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb">Evennia
|
||||
|
|
@ -318,7 +293,7 @@ or post a question in our <a class="reference external" href="https://groups.goo
|
|||
<h3>Versions</h3>
|
||||
<ul>
|
||||
<li><a href="Evennia-for-MUSH-Users.html">1.0-dev (develop branch)</a></li>
|
||||
<li><a href="../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
|
||||
<li><a href="../../0.95/index.html">0.95 (v0.9.5 branch)</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue