Updated HTML docs

This commit is contained in:
Griatch 2021-05-16 00:06:01 +02:00
parent 58f5ece91b
commit 1bbc93507a
1000 changed files with 39106 additions and 33861 deletions

View file

@ -4,7 +4,8 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Soft Code &#8212; 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" />
@ -37,7 +38,7 @@
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="soft-code">
<section 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
@ -48,22 +49,22 @@ problems.</p>
<p>Writing and installing softcode is done through a MUD client. Thus it is not a formatted language.
Each softcode function is a single line of varying size. Some functions can be a half of a page long
or more which is obviously not very readable nor (easily) maintainable over time.</p>
<div class="section" id="examples-of-softcode">
<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>1</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"><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!
</pre></div>
</td></tr></table></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">&#64;set</span></code>. Softcode also allows the use of the ampersand (<code class="docutils literal notranslate"><span class="pre">&amp;</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>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="p">&amp;</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"><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">&amp;</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>
<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>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="p">&amp;</span>HELLO_VALUE.D <span class="nv">me</span><span class="o">=</span>Hello World
<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">&amp;</span>HELLO_VALUE.D <span class="nv">me</span><span class="o">=</span>Hello World
<span class="p">&amp;</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>
@ -74,8 +75,8 @@ This shorter version looks like this:</p>
<li><p>http://www.tinymux.com/wiki/index.php/Softcode</p></li>
<li><p>http://www.duh.com/discordia/mushman/man2x1</p></li>
</ul>
</div>
<div class="section" id="problems-with-softcode">
</section>
<section id="problems-with-softcode">
<h2>Problems with Softcode<a class="headerlink" href="#problems-with-softcode" title="Permalink to this headline"></a></h2>
<p>Softcode is excellent at what it was intended for: <em>simple things</em>. It is a great tool for making an
interactive object, a room with ambiance, simple global commands, simple economies and coded
@ -85,8 +86,8 @@ objects across your entire code.</p>
<p>Not to mention, softcode is not an inherently fast language. It is not compiled, it is parsed with
each calling of a function. While MUX and MUSH parsers have jumped light years ahead of where they
once were they can still stutter under the weight of more complex systems if not designed properly.</p>
</div>
<div class="section" id="changing-times">
</section>
<section id="changing-times">
<h2>Changing Times<a class="headerlink" href="#changing-times" title="Permalink to this headline"></a></h2>
<p>Now that starting text-based games is easy and an option for even the most technically inarticulate,
new projects are a dime a dozen. People are starting new MUDs every day with varying levels of
@ -96,8 +97,8 @@ small, one or two developer games, some of the benefit of softcode fades.</p>
stepping on one anothers toes. As mentioned before, shell access is not necessary to develop a MUX
or a MUSH. However, now that we are seeing a lot more small, one or two-man shops, the issue of
shell access and stepping on each others toes is a lot less.</p>
</div>
<div class="section" id="our-solution">
</section>
<section id="our-solution">
<h2>Our Solution<a class="headerlink" href="#our-solution" title="Permalink to this headline"></a></h2>
<p>Evennia shuns in-game softcode for on-disk Python modules. Python is a popular, mature and
professional programming language. You code it using the conveniences of modern text editors.
@ -110,8 +111,8 @@ in Evennia is primarily intended to be done outside the game, in full-fledged Py
Advanced building is best handled by extending Evennias command system with your own sophisticated
building commands. We feel that with a small development team you are better off using a
professional source-control system (svn, git, bazaar, mercurial etc) anyway.</p>
</div>
<div class="section" id="your-solution">
</section>
<section id="your-solution">
<h2>Your Solution<a class="headerlink" href="#your-solution" title="Permalink to this headline"></a></h2>
<p>Adding advanced and flexible building commands to your game is easy and will probably be enough to
satisfy most creative builders. However, if you really, <em>really</em> want to offer online coding, there
@ -119,8 +120,8 @@ is of course nothing stopping you from adding that to Evennia, no matter our rec
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
pseudo-softcode plugin aimed at developers wanting to script their game from inside it.</p>
</div>
</div>
</section>
</section>
<div class="clearer"></div>