mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +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" />
|
||||
|
|
@ -47,19 +49,19 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="using-the-game-and-building-stuff">
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="using-the-game-and-building-stuff">
|
||||
<h1>Using the game and building stuff<a class="headerlink" href="#using-the-game-and-building-stuff" title="Permalink to this headline">¶</a></h1>
|
||||
<p>In this lesson we will test out what we can do in-game out-of-the-box. Evennia ships with
|
||||
<a class="reference external" href="../../../api/evennia.commands.default.html#modules">around 90 default commands</a>, and while you can override those as you please,
|
||||
<a class="reference internal" href="../../../Components/Default-Commands.html"><span class="doc std std-doc">around 90 default commands</span></a>, and while you can override those as you please,
|
||||
they can be quite useful.</p>
|
||||
<p>Connect and log into your new game and you will end up in the “Limbo” location. This
|
||||
is the only room in the game at this point. Let’s explore the commands a little.</p>
|
||||
<p>The default commands has syntax <a class="reference internal" href="../../../Concepts/Using-MUX-as-a-Standard.html"><span class="doc">similar to MUX</span></a>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">command</span><span class="p">[</span><span class="o">/</span><span class="n">switch</span><span class="o">/</span><span class="n">switch</span><span class="o">...</span><span class="p">]</span> <span class="p">[</span><span class="n">arguments</span> <span class="o">...</span><span class="p">]</span>
|
||||
<p>The default commands has syntax <a class="reference internal" href="../../../Concepts/Using-MUX-as-a-Standard.html"><span class="doc std std-doc">similar to MUX</span></a>:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> command[/switch/switch...] [arguments ...]
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An example would be</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">create</span><span class="o">/</span><span class="n">drop</span> <span class="n">box</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> create/drop box
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A <em>/switch</em> is a special, optional flag to the command to make it behave differently. It is always
|
||||
|
|
@ -72,11 +74,11 @@ the preceeding @.</p>
|
|||
</div></blockquote>
|
||||
<section id="getting-help">
|
||||
<h2>Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">help</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>help
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Will give you a list of all commands available to you. Use</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">help</span> <span class="o"><</span><span class="n">commandname</span><span class="o">></span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>help <commandname>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>to see the in-game help for that command.</p>
|
||||
|
|
@ -84,13 +86,13 @@ the preceeding @.</p>
|
|||
<section id="looking-around">
|
||||
<h2>Looking around<a class="headerlink" href="#looking-around" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The most common comman is</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">look</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>look
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will show you the description of the current location. <code class="docutils literal notranslate"><span class="pre">l</span></code> is an alias.</p>
|
||||
<p>When targeting objects in commands you have two special labels you can use, <code class="docutils literal notranslate"><span class="pre">here</span></code> for the current
|
||||
room or <code class="docutils literal notranslate"><span class="pre">me</span></code>/<code class="docutils literal notranslate"><span class="pre">self</span></code> to point back to yourself. So</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">look</span> <span class="n">me</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>look me
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>will give you your own description. <code class="docutils literal notranslate"><span class="pre">look</span> <span class="pre">here</span></code> is, in this case, the same as plain <code class="docutils literal notranslate"><span class="pre">look</span></code>.</p>
|
||||
|
|
@ -102,14 +104,14 @@ room or <code class="docutils literal notranslate"><span class="pre">me</span></
|
|||
restrictions such as locks. This can be useful, but it also hides some functionality that you might
|
||||
want to test.</p>
|
||||
<p>To temporarily step down from your superuser position you can use the <code class="docutils literal notranslate"><span class="pre">quell</span></code> command in-game:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">quell</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>quell
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will make you start using the permission of your current character’s level instead of your
|
||||
superuser level. If you didn’t change any settings your game Character should have an <em>Developer</em>
|
||||
level permission - high as can be without bypassing locks like the superuser does. This will work
|
||||
fine for the examples on this page. Use</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">unquell</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>unquell
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>to get superuser status again when you are done.</p>
|
||||
|
|
@ -118,20 +120,22 @@ fine for the examples on this page. Use</p>
|
|||
<h2>Creating an Object<a class="headerlink" href="#creating-an-object" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Basic objects can be anything – swords, flowers and non-player characters. They are created using
|
||||
the <code class="docutils literal notranslate"><span class="pre">create</span></code> command:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">create</span> <span class="n">box</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>create box
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This created a new ‘box’ (of the default object type) in your inventory. Use the command <code class="docutils literal notranslate"><span class="pre">inventory</span></code>
|
||||
(or <code class="docutils literal notranslate"><span class="pre">i</span></code>) to see it. Now, ‘box’ is a rather short name, let’s rename it and tack on a few aliases.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="n">box</span> <span class="o">=</span> <span class="n">very</span> <span class="n">large</span> <span class="n">box</span><span class="p">;</span><span class="n">box</span><span class="p">;</span><span class="n">very</span><span class="p">;</span><span class="n">crate</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name box = very large box;box;very;crate
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>MUD clients and semi-colon</p>
|
||||
<p>Some traditional MUD clients use the semi-colon <cite>;</cite> to separate client inputs. If so,
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Some traditional MUD clients use the semi-colon `;` to separate client inputs. If so,
|
||||
the above line will give an error. You need to change your client to use another command-separator
|
||||
or to put it in ‘verbatim’ mode. If you still have trouble, use the Evennia web client instead.</p>
|
||||
or to put it in 'verbatim' mode. If you still have trouble, use the Evennia web client instead.
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>We now renamed the box to <em>very large box</em> (and this is what we will see when looking at it), but we
|
||||
will also recognize it by any of the other names we give - like <em>crate</em> or simply <em>box</em> as before.
|
||||
|
|
@ -141,64 +145,64 @@ new object. If you had wanted to not change the name itself, but to only add ali
|
|||
used the <code class="docutils literal notranslate"><span class="pre">alias</span></code> command.</p>
|
||||
<p>We are currently carrying the box. Let’s drop it (there is also a short cut to create and drop in
|
||||
one go by using the <code class="docutils literal notranslate"><span class="pre">/drop</span></code> switch, for example <code class="docutils literal notranslate"><span class="pre">create/drop</span> <span class="pre">box</span></code>).</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">drop</span> <span class="n">box</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>drop box
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Hey presto - there it is on the ground, in all its normality.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">examine</span> <span class="n">box</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>examine box
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will show some technical details about the box object. For now we will ignore what this
|
||||
information means.</p>
|
||||
<p>Try to <code class="docutils literal notranslate"><span class="pre">look</span></code> at the box to see the (default) description.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">look</span> <span class="n">box</span>
|
||||
<span class="n">You</span> <span class="n">see</span> <span class="n">nothing</span> <span class="n">special</span><span class="o">.</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>look box
|
||||
You see nothing special.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The description you get is not very exciting. Let’s add some flavor.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">describe</span> <span class="n">box</span> <span class="o">=</span> <span class="n">This</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">large</span> <span class="ow">and</span> <span class="n">very</span> <span class="n">heavy</span> <span class="n">box</span><span class="o">.</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>describe box = This is a large and very heavy box.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you try the <code class="docutils literal notranslate"><span class="pre">get</span></code> command we will pick up the box. So far so good, but if we really want this to
|
||||
be a large and heavy box, people should <em>not</em> be able to run off with it that easily. To prevent
|
||||
this we need to lock it down. This is done by assigning a <em>Lock</em> to it. Make sure the box was
|
||||
dropped in the room, then try this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">lock</span> <span class="n">box</span> <span class="o">=</span> <span class="n">get</span><span class="p">:</span><span class="n">false</span><span class="p">()</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lock box = get:false()
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Locks represent a rather <a class="reference internal" href="../../../Components/Locks.html"><span class="doc">big topic</span></a>, but for now that will do what we want. This will lock
|
||||
<p>Locks represent a rather <a class="reference internal" href="../../../Components/Locks.html"><span class="doc std std-doc">big topic</span></a>, but for now that will do what we want. This will lock
|
||||
the box so noone can lift it. The exception is superusers, they override all locks and will pick it
|
||||
up anyway. Make sure you are quelling your superuser powers and try to get the box now:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">get</span> <span class="n">box</span>
|
||||
<span class="n">You</span> <span class="n">can</span><span class="s1">'t get that.</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>> get box
|
||||
You can't get that.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Think thís default error message looks dull? The <code class="docutils literal notranslate"><span class="pre">get</span></code> command looks for an <a class="reference internal" href="../../../Components/Attributes.html"><span class="doc">Attribute</span></a>
|
||||
<p>Think thís default error message looks dull? The <code class="docutils literal notranslate"><span class="pre">get</span></code> command looks for an <a class="reference internal" href="../../../Components/Attributes.html"><span class="doc std std-doc">Attribute</span></a>
|
||||
named <code class="docutils literal notranslate"><span class="pre">get_err_msg</span></code> for returning a nicer error message (we just happen to know this, you would need
|
||||
to peek into the
|
||||
<a class="reference external" href="https://github.com/evennia/evennia/blob/master/evennia/commands/default/general.py#L235">code</a> for
|
||||
the <code class="docutils literal notranslate"><span class="pre">get</span></code> command to find out.). You set attributes using the <code class="docutils literal notranslate"><span class="pre">set</span></code> command:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">set</span> <span class="n">box</span><span class="o">/</span><span class="n">get_err_msg</span> <span class="o">=</span> <span class="n">It</span><span class="s1">'s way too heavy for you to lift. </span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>set box/get_err_msg = It's way too heavy for you to lift.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Try to get it now and you should see a nicer error message echoed back to you. To see what this
|
||||
message string is in the future, you can use ‘examine.’</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">examine</span> <span class="n">box</span><span class="o">/</span><span class="n">get_err_msg</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>examine box/get_err_msg
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Examine will return the value of attributes, including color codes. <code class="docutils literal notranslate"><span class="pre">examine</span> <span class="pre">here/desc</span></code> would return
|
||||
the raw description of your current room (including color codes), so that you can copy-and-paste to
|
||||
set its description to something else.</p>
|
||||
<p>You create new Commands (or modify existing ones) in Python outside the game. We will get to that
|
||||
later, in the <a class="reference internal" href="Adding-Commands.html"><span class="doc">Commands tutorial</span></a>.</p>
|
||||
later, in the <a class="reference internal" href="Adding-Commands.html"><span class="doc std std-doc">Commands tutorial</span></a>.</p>
|
||||
</section>
|
||||
<section id="get-a-personality">
|
||||
<h2>Get a Personality<a class="headerlink" href="#get-a-personality" title="Permalink to this headline">¶</a></h2>
|
||||
<p><a class="reference internal" href="../../../Components/Scripts.html"><span class="doc">Scripts</span></a> are powerful out-of-character objects useful for many “under the hood” things.
|
||||
<p><a class="reference internal" href="../../../Components/Scripts.html"><span class="doc std std-doc">Scripts</span></a> are powerful out-of-character objects useful for many “under the hood” things.
|
||||
One of their optional abilities is to do things on a timer. To try out a first script, let’s put one
|
||||
on ourselves. There is an example script in <code class="docutils literal notranslate"><span class="pre">evennia/contrib/tutorial_examples/bodyfunctions.py</span></code>
|
||||
that is called <code class="docutils literal notranslate"><span class="pre">BodyFunctions</span></code>. To add this to us we will use the <code class="docutils literal notranslate"><span class="pre">script</span></code> command:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">script</span> <span class="bp">self</span> <span class="o">=</span> <span class="n">tutorial_examples</span><span class="o">.</span><span class="n">bodyfunctions</span><span class="o">.</span><span class="n">BodyFunctions</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>script self = tutorial_examples.bodyfunctions.BodyFunctions
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This string will tell Evennia to dig up the Python code at the place we indicate. It already knows
|
||||
|
|
@ -210,7 +214,7 @@ Python code <em>inside</em> files, like the <code class="docutils literal notran
|
|||
These “Python-paths” are used extensively throughout Evennia.</p>
|
||||
</div></blockquote>
|
||||
<p>Wait a while and you will notice yourself starting making random observations …</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">script</span> <span class="bp">self</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>script self
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will show details about scripts on yourself (also <code class="docutils literal notranslate"><span class="pre">examine</span></code> works). You will see how long it is
|
||||
|
|
@ -218,32 +222,32 @@ until it “fires” next. Don’t be alarmed if nothing happens when the countd
|
|||
particular script has a randomizer to determine if it will say something or not. So you will not see
|
||||
output every time it fires.</p>
|
||||
<p>When you are tired of your character’s “insights”, kill the script with</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">script</span><span class="o">/</span><span class="n">stop</span> <span class="bp">self</span> <span class="o">=</span> <span class="n">tutorial_examples</span><span class="o">.</span><span class="n">bodyfunctions</span><span class="o">.</span><span class="n">BodyFunctions</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>script/stop self = tutorial_examples.bodyfunctions.BodyFunctions
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You create your own scripts in Python, outside the game; the path you give to <code class="docutils literal notranslate"><span class="pre">script</span></code> is literally
|
||||
the Python path to your script file. The <a class="reference internal" href="../../../Components/Scripts.html"><span class="doc">Scripts</span></a> page explains more details.</p>
|
||||
the Python path to your script file. The <a class="reference internal" href="../../../Components/Scripts.html"><span class="doc std std-doc">Scripts</span></a> page explains more details.</p>
|
||||
</section>
|
||||
<section id="pushing-your-buttons">
|
||||
<h2>Pushing Your Buttons<a class="headerlink" href="#pushing-your-buttons" title="Permalink to this headline">¶</a></h2>
|
||||
<p>If we get back to the box we made, there is only so much fun you can have with it at this point. It’s
|
||||
just a dumb generic object. If you renamed it to <code class="docutils literal notranslate"><span class="pre">stone</span></code> and changed its description, noone would be
|
||||
the wiser. However, with the combined use of custom <a class="reference internal" href="../../../Components/Typeclasses.html"><span class="doc">Typeclasses</span></a>, <a class="reference internal" href="../../../Components/Scripts.html"><span class="doc">Scripts</span></a>
|
||||
and object-based <a class="reference internal" href="../../../Components/Commands.html"><span class="doc">Commands</span></a>, you could expand it and other items to be as unique, complex
|
||||
the wiser. However, with the combined use of custom <a class="reference internal" href="../../../Components/Typeclasses.html"><span class="doc std std-doc">Typeclasses</span></a>, <a class="reference internal" href="../../../Components/Scripts.html"><span class="doc std std-doc">Scripts</span></a>
|
||||
and object-based <a class="reference internal" href="../../../Components/Commands.html"><span class="doc std std-doc">Commands</span></a>, you could expand it and other items to be as unique, complex
|
||||
and interactive as you want.</p>
|
||||
<p>Let’s take an example. So far we have only created objects that use the default object typeclass
|
||||
named simply <code class="docutils literal notranslate"><span class="pre">Object</span></code>. Let’s create an object that is a little more interesting. Under
|
||||
<code class="docutils literal notranslate"><span class="pre">evennia/contrib/tutorial_examples</span></code> there is a module <code class="docutils literal notranslate"><span class="pre">red_button.py</span></code>. It contains the enigmatic
|
||||
<code class="docutils literal notranslate"><span class="pre">RedButton</span></code> class.</p>
|
||||
<p>Let’s make us one of <em>those</em>!</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">create</span><span class="o">/</span><span class="n">drop</span> <span class="n">button</span><span class="p">:</span><span class="n">tutorial_examples</span><span class="o">.</span><span class="n">red_button</span><span class="o">.</span><span class="n">RedButton</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>create/drop button:tutorial_examples.red_button.RedButton
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The same way we did with the Script Earler, we specify a “Python-path” to the Python code we want Evennia
|
||||
to use for creating the object. There you go - one red button.</p>
|
||||
<p>The RedButton is an example object intended to show off a few of Evennia’s features. You will find
|
||||
that the <a class="reference internal" href="../../../Components/Typeclasses.html"><span class="doc">Typeclass</span></a> and <a class="reference internal" href="../../../Components/Commands.html"><span class="doc">Commands</span></a> controlling it are
|
||||
inside <a class="reference external" href="../../../api/evennia.contrib.tutorial_examples.html">evennia/contrib/tutorial_examples</a></p>
|
||||
that the <a class="reference internal" href="../../../Components/Typeclasses.html"><span class="doc std std-doc">Typeclass</span></a> and <a class="reference internal" href="../../../Components/Commands.html"><span class="doc std std-doc">Commands</span></a> controlling it are
|
||||
inside <a class="reference internal" href="../../../api/evennia.contrib.tutorial_examples.html"><span class="doc std std-doc">evennia/contrib/tutorial_examples</span></a></p>
|
||||
<p>If you wait for a while (make sure you dropped it!) the button will blink invitingly.</p>
|
||||
<p>Why don’t you try to push it …?</p>
|
||||
<p>Surely a big red button is meant to be pushed.</p>
|
||||
|
|
@ -257,7 +261,7 @@ inside <a class="reference external" href="../../../api/evennia.contrib.tutorial
|
|||
<h2>Making Yourself a House<a class="headerlink" href="#making-yourself-a-house" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The main command for shaping the game world is <code class="docutils literal notranslate"><span class="pre">dig</span></code>. For example, if you are standing in Limbo you
|
||||
can dig a route to your new house location like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dig</span> <span class="n">house</span> <span class="o">=</span> <span class="n">large</span> <span class="n">red</span> <span class="n">door</span><span class="p">;</span><span class="n">door</span><span class="p">;</span><span class="ow">in</span><span class="p">,</span><span class="n">to</span> <span class="n">the</span> <span class="n">outside</span><span class="p">;</span><span class="n">out</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>dig house = large red door;door;in,to the outside;out
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will create a new room named ‘house’. Spaces at the start/end of names and aliases are ignored
|
||||
|
|
@ -268,28 +272,28 @@ the full thing all the time.</p>
|
|||
<p>If you wanted to use normal compass directions (north, west, southwest etc), you could do that with
|
||||
<code class="docutils literal notranslate"><span class="pre">dig</span></code> too. But Evennia also has a limited version of <code class="docutils literal notranslate"><span class="pre">dig</span></code> that helps for compass directions (and
|
||||
also up/down and in/out). It’s called <code class="docutils literal notranslate"><span class="pre">tunnel</span></code>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">tunnel</span> <span class="n">sw</span> <span class="o">=</span> <span class="n">cliff</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>tunnel sw = cliff
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will create a new room “cliff” with an exit “southwest” leading there and a path “northeast”
|
||||
leading back from the cliff to your current location.</p>
|
||||
<p>You can create new exits from where you are, using the <code class="docutils literal notranslate"><span class="pre">open</span></code> command:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">open</span> <span class="n">north</span><span class="p">;</span><span class="n">n</span> <span class="o">=</span> <span class="n">house</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>open north;n = house
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This opens an exit <code class="docutils literal notranslate"><span class="pre">north</span></code> (with an alias <code class="docutils literal notranslate"><span class="pre">n</span></code>) to the previously created room <code class="docutils literal notranslate"><span class="pre">house</span></code>.</p>
|
||||
<p>If you have many rooms named <code class="docutils literal notranslate"><span class="pre">house</span></code> you will get a list of matches and have to select which one you
|
||||
want to link to.</p>
|
||||
<p>Follow the north exit to your ‘house’ or <code class="docutils literal notranslate"><span class="pre">teleport</span></code> to it:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">north</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>north
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">teleport</span> <span class="n">house</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>teleport house
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To manually open an exit back to Limbo (if you didn’t do so with the <code class="docutils literal notranslate"><span class="pre">dig</span></code> command):</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">open</span> <span class="n">door</span> <span class="o">=</span> <span class="n">limbo</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>open door = limbo
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>(You can also us the #dbref of limbo, which you can find by using <code class="docutils literal notranslate"><span class="pre">examine</span> <span class="pre">here</span></code> when in limbo).</p>
|
||||
|
|
@ -298,25 +302,25 @@ want to link to.</p>
|
|||
<h2>Reshuffling the World<a class="headerlink" href="#reshuffling-the-world" title="Permalink to this headline">¶</a></h2>
|
||||
<p>You can find things using the <code class="docutils literal notranslate"><span class="pre">find</span></code> command. Assuming you are back at <code class="docutils literal notranslate"><span class="pre">Limbo</span></code>, let’s teleport the
|
||||
<em>large box</em> to our house.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">teleport</span> <span class="n">box</span> <span class="o">=</span> <span class="n">house</span>
|
||||
<span class="n">very</span> <span class="n">large</span> <span class="n">box</span> <span class="ow">is</span> <span class="n">leaving</span> <span class="n">Limbo</span><span class="p">,</span> <span class="n">heading</span> <span class="k">for</span> <span class="n">house</span><span class="o">.</span>
|
||||
<span class="n">Teleported</span> <span class="n">very</span> <span class="n">large</span> <span class="n">box</span> <span class="o">-></span> <span class="n">house</span><span class="o">.</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>teleport box = house
|
||||
very large box is leaving Limbo, heading for house.
|
||||
Teleported very large box -> house.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>We can still find the box by using find:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="n">box</span>
|
||||
<span class="n">One</span> <span class="n">Match</span><span class="p">(</span><span class="c1">#1-#8):</span>
|
||||
<span class="n">very</span> <span class="n">large</span> <span class="n">box</span><span class="p">(</span><span class="c1">#8) - src.objects.objects.Object</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>find box
|
||||
One Match(#1-#8):
|
||||
very large box(#8) - src.objects.objects.Object
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Knowing the <code class="docutils literal notranslate"><span class="pre">#dbref</span></code> of the box (#8 in this example), you can grab the box and get it back here
|
||||
without actually yourself going to <code class="docutils literal notranslate"><span class="pre">house</span></code> first:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">teleport</span> <span class="c1">#8 = here</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>teleport #8 = here
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>As mentioned, <code class="docutils literal notranslate"><span class="pre">here</span></code> is an alias for ‘your current location’. The box should now be back in Limbo with you.</p>
|
||||
<p>We are getting tired of the box. Let’s destroy it.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">destroy</span> <span class="n">box</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>destroy box
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>It will ask you for confirmation. Once you give it, the box will be gone.</p>
|
||||
|
|
@ -328,7 +332,7 @@ of #dbrefs, if they are not in the same location) to the command.</p>
|
|||
<p>The Command-help is something you modify in Python code. We’ll get to that when we get to how to
|
||||
add Commands. But you can also add regular help entries, for example to explain something about
|
||||
the history of your game world:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sethelp</span><span class="o">/</span><span class="n">add</span> <span class="n">History</span> <span class="o">=</span> <span class="n">At</span> <span class="n">the</span> <span class="n">dawn</span> <span class="n">of</span> <span class="n">time</span> <span class="o">...</span>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sethelp/add History = At the dawn of time ...
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You will now find your new <code class="docutils literal notranslate"><span class="pre">History</span></code> entry in the <code class="docutils literal notranslate"><span class="pre">help</span></code> list and read your help-text with <code class="docutils literal notranslate"><span class="pre">help</span> <span class="pre">History</span></code>.</p>
|
||||
|
|
@ -403,7 +407,7 @@ example. Evennia comes with a tutorial world for you to explore. We will try tha
|
|||
<h3>Versions</h3>
|
||||
<ul>
|
||||
<li><a href="Building-Quickstart.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