mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 00:06:30 +01: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="soft-code">
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="soft-code">
|
||||
<h1>Soft Code<a class="headerlink" href="#soft-code" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Softcode is a very simple programming language that was created for in-game development on TinyMUD
|
||||
derivatives such as MUX, PennMUSH, TinyMUSH, and RhostMUSH. The idea is that by providing a stripped
|
||||
|
|
@ -52,28 +54,27 @@ or more which is obviously not very readable nor (easily) maintainable over time
|
|||
<section id="examples-of-softcode">
|
||||
<h2>Examples of Softcode<a class="headerlink" href="#examples-of-softcode" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Here is a simple ‘Hello World!’ command:</p>
|
||||
<div class="highlight-bash 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> @set <span class="nv">me</span><span class="o">=</span>HELLO_WORLD.C:<span class="nv">$hello</span>:@pemit %#<span class="o">=</span>Hello World!
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> @set <span class="nv">me</span><span class="o">=</span>HELLO_WORLD.C:<span class="nv">$hello</span>:@pemit %#<span class="o">=</span>Hello World!
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>Pasting this into a MUX/MUSH and typing ‘hello’ will theoretically yield ‘Hello World!’, assuming
|
||||
certain flags are not set on your account object.</p>
|
||||
<p>Setting attributes is done via <code class="docutils literal notranslate"><span class="pre">@set</span></code>. Softcode also allows the use of the ampersand (<code class="docutils literal notranslate"><span class="pre">&</span></code>) symbol.
|
||||
This shorter version looks like this:</p>
|
||||
<div class="highlight-bash 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> <span class="p">&</span>HELLO_WORLD.C <span class="nv">me</span><span class="o">=</span><span class="nv">$hello</span>:@pemit %#<span class="o">=</span>Hello World!
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="p">&</span>HELLO_WORLD.C <span class="nv">me</span><span class="o">=</span><span class="nv">$hello</span>:@pemit %#<span class="o">=</span>Hello World!
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>Perhaps I want to break the Hello World into an attribute which is retrieved when emitting:</p>
|
||||
<div class="highlight-bash notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="p">&</span>HELLO_VALUE.D <span class="nv">me</span><span class="o">=</span>Hello World
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="p">&</span>HELLO_VALUE.D <span class="nv">me</span><span class="o">=</span>Hello World
|
||||
<span class="p">&</span>HELLO_WORLD.C <span class="nv">me</span><span class="o">=</span><span class="nv">$hello</span>:@pemit %#<span class="o">=[</span>v<span class="o">(</span>HELLO_VALUE.D<span class="o">)]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">v()</span></code> function returns the <code class="docutils literal notranslate"><span class="pre">HELLO_VALUE.D</span></code> attribute on the object that the command resides
|
||||
(<code class="docutils literal notranslate"><span class="pre">me</span></code>, which is yourself in this case). This should yield the same output as the first example.</p>
|
||||
<p>If you are still curious about how Softcode works, take a look at some external resources:</p>
|
||||
<ul class="simple">
|
||||
<li><p>https://wiki.tinymux.org/index.php/Softcode</p></li>
|
||||
<li><p>https://www.duh.com/discordia/mushman/man2x1</p></li>
|
||||
<li><p><a class="reference external" href="https://wiki.tinymux.org/index.php/Softcode">https://wiki.tinymux.org/index.php/Softcode</a></p></li>
|
||||
<li><p><a class="reference external" href="https://www.duh.com/discordia/mushman/man2x1">https://www.duh.com/discordia/mushman/man2x1</a></p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="problems-with-softcode">
|
||||
|
|
@ -118,7 +119,7 @@ professional source-control system (svn, git, bazaar, mercurial etc) anyway.</p>
|
|||
satisfy most creative builders. However, if you really, <em>really</em> want to offer online coding, there
|
||||
is of course nothing stopping you from adding that to Evennia, no matter our recommendations. You
|
||||
could even re-implement MUX’ softcode in Python should you be very ambitious. The
|
||||
<a class="reference internal" href="../Contribs/Dialogues-in-events.html"><span class="doc">in-game-python</span></a> is an optional
|
||||
<a class="reference internal" href="../Contribs/Dialogues-in-events.html"><span class="doc std std-doc">in-game-python</span></a> is an optional
|
||||
pseudo-softcode plugin aimed at developers wanting to script their game from inside it.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
|
@ -175,7 +176,7 @@ pseudo-softcode plugin aimed at developers wanting to script their game from ins
|
|||
<h3>Versions</h3>
|
||||
<ul>
|
||||
<li><a href="Soft-Code.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