mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 23:47:16 +02:00
Updated HTML docs
This commit is contained in:
parent
cb6e776605
commit
45741f6c6f
66 changed files with 1684 additions and 641 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 307de55c15128b2adf4bc8f918a22cf3
|
||||
config: accce89ccef2551c3083282d22ac39af
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@
|
|||
<span class="c1"># Portal-SessionHandler class</span>
|
||||
<span class="c1"># -------------------------------------------------------------</span>
|
||||
|
||||
<span class="n">DOS_PROTECTION_MSG</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s2">"</span><span class="si">{servername}</span><span class="s2"> DoS protection is active. You are queued to connect in </span><span class="si">{num}</span><span class="s2"> seconds ..."</span><span class="p">)</span>
|
||||
<span class="n">DOS_PROTECTION_MSG</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s2">"</span><span class="si">{servername}</span><span class="s2"> DoS protection is active."</span>
|
||||
<span class="s2">"You are queued to connect in </span><span class="si">{num}</span><span class="s2"> seconds ..."</span><span class="p">)</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="PortalSessionHandler"><a class="viewcode-back" href="../../../../api/evennia.server.portal.portalsessionhandler.html#evennia.server.portal.portalsessionhandler.PortalSessionHandler">[docs]</a><span class="k">class</span> <span class="nc">PortalSessionHandler</span><span class="p">(</span><span class="n">SessionHandler</span><span class="p">):</span>
|
||||
|
|
|
|||
|
|
@ -81,8 +81,16 @@
|
|||
<span class="kn">from</span> <span class="nn">twisted.internet</span> <span class="kn">import</span> <span class="n">reactor</span><span class="p">,</span> <span class="n">protocol</span>
|
||||
<span class="kn">from</span> <span class="nn">twisted.internet.task</span> <span class="kn">import</span> <span class="n">LoopingCall</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">time_format</span>
|
||||
<span class="kn">import</span> <span class="nn">django</span>
|
||||
<span class="n">django</span><span class="o">.</span><span class="n">setup</span><span class="p">()</span>
|
||||
<span class="kn">import</span> <span class="nn">evennia</span> <span class="c1"># noqa</span>
|
||||
<span class="n">evennia</span><span class="o">.</span><span class="n">_init</span><span class="p">()</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">time_format</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.command</span> <span class="kn">import</span> <span class="n">Command</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.cmdset</span> <span class="kn">import</span> <span class="n">CmdSet</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.ansi</span> <span class="kn">import</span> <span class="n">strip_ansi</span> <span class="c1"># noqa</span>
|
||||
|
||||
<span class="c1"># Load the dummyrunner settings module</span>
|
||||
|
||||
|
|
@ -92,8 +100,10 @@
|
|||
<span class="s2">"Error: Dummyrunner could not find settings file at </span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="o">%</span> <span class="n">settings</span><span class="o">.</span><span class="n">DUMMYRUNNER_SETTINGS_MODULE</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">IDMAPPER_CACHE_MAXSIZE</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">IDMAPPER_CACHE_MAXSIZE</span>
|
||||
|
||||
<span class="n">DATESTRING</span> <span class="o">=</span> <span class="s2">"%Y%m</span><span class="si">%d</span><span class="s2">%H%M%S"</span>
|
||||
<span class="n">CLIENTS</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
|
||||
<span class="c1"># Settings</span>
|
||||
|
||||
|
|
@ -112,18 +122,37 @@
|
|||
<span class="c1"># Port to use, if not specified on command line</span>
|
||||
<span class="n">TELNET_PORT</span> <span class="o">=</span> <span class="n">DUMMYRUNNER_SETTINGS</span><span class="o">.</span><span class="n">TELNET_PORT</span> <span class="ow">or</span> <span class="n">settings</span><span class="o">.</span><span class="n">TELNET_PORTS</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">NCONNECTED</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has received a connection</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has seen the login screen (server responded)</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client starting login procedure</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has authenticated and logged in</span>
|
||||
|
||||
|
||||
<span class="c1"># Messages</span>
|
||||
<span class="c1"># time when all clients have logged_in</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="c1"># actions since all logged in</span>
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="c1"># lag per 30s for all logged in</span>
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
||||
|
||||
<span class="n">INFO_STARTING</span> <span class="o">=</span> <span class="s2">"""</span>
|
||||
<span class="s2"> Dummyrunner starting using </span><span class="si">{N}</span><span class="s2"> dummy account(s). If you don't see</span>
|
||||
<span class="s2"> Dummyrunner starting using </span><span class="si">{nclients}</span><span class="s2"> dummy account(s). If you don't see</span>
|
||||
<span class="s2"> any connection messages, make sure that the Evennia server is</span>
|
||||
<span class="s2"> running.</span>
|
||||
|
||||
<span class="s2"> Use Ctrl-C to stop/disconnect clients.</span>
|
||||
<span class="s2"> TELNET_PORT = </span><span class="si">{port}</span><span class="s2"></span>
|
||||
<span class="s2"> IDMAPPER_CACHE_MAXSIZE = </span><span class="si">{idmapper_cache_size}</span><span class="s2"> MB</span>
|
||||
<span class="s2"> TIMESTEP = </span><span class="si">{timestep}</span><span class="s2"> (rate </span><span class="si">{rate}</span><span class="s2">/s)</span>
|
||||
<span class="s2"> CHANCE_OF_LOGIN = </span><span class="si">{chance_of_login}</span><span class="s2">% per time step</span>
|
||||
<span class="s2"> CHANCE_OF_ACTION = </span><span class="si">{chance_of_action}</span><span class="s2">% per time step</span>
|
||||
<span class="s2"> -> avg rate (per client, after login): </span><span class="si">{avg_rate}</span><span class="s2"> cmds/s</span>
|
||||
<span class="s2"> -> total avg rate (after login): </span><span class="si">{avg_rate_total}</span><span class="s2"> cmds/s</span>
|
||||
|
||||
<span class="s2"> Use Ctrl-C (or Cmd-C) to stop/disconnect all clients.</span>
|
||||
|
||||
<span class="s2"> """</span>
|
||||
|
||||
<span class="n">ERROR_NO_MIXIN</span> <span class="o">=</span> <span class="s2">"""</span>
|
||||
|
|
@ -138,6 +167,7 @@
|
|||
<span class="s2"> to test all commands</span>
|
||||
<span class="s2"> - change PASSWORD_HASHERS to use a faster (but less safe) algorithm</span>
|
||||
<span class="s2"> when creating large numbers of accounts at the same time</span>
|
||||
<span class="s2"> - set LOGIN_THROTTLE/CREATION_THROTTLE=None to disable it</span>
|
||||
|
||||
<span class="s2"> If you don't want to use the custom settings of the mixin for some</span>
|
||||
<span class="s2"> reason, you can change their values manually after the import, or</span>
|
||||
|
|
@ -209,6 +239,39 @@
|
|||
|
||||
<span class="s2">"""</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="CmdDummyRunnerEchoResponse"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">[docs]</a><span class="k">class</span> <span class="nc">CmdDummyRunnerEchoResponse</span><span class="p">(</span><span class="n">Command</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Dummyrunner command measuring the round-about response time</span>
|
||||
<span class="sd"> from sending to receiving a result.</span>
|
||||
|
||||
<span class="sd"> Usage:</span>
|
||||
<span class="sd"> dummyrunner_echo_response <timestamp></span>
|
||||
|
||||
<span class="sd"> Responds with</span>
|
||||
<span class="sd"> dummyrunner_echo_response:<timestamp>,<current_time></span>
|
||||
|
||||
<span class="sd"> The dummyrunner will send this and then compare the send time</span>
|
||||
<span class="sd"> with the receive time on both ends.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">key</span> <span class="o">=</span> <span class="s2">"dummyrunner_echo_response"</span>
|
||||
|
||||
<div class="viewcode-block" id="CmdDummyRunnerEchoResponse.func"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">[docs]</a> <span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="c1"># returns (dummy_client_timestamp,current_time)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="sa">f</span><span class="s2">"dummyrunner_echo_response:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">args</span><span class="si">}</span><span class="s2">,</span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">caller</span><span class="o">.</span><span class="n">account</span><span class="o">.</span><span class="n">is_superuser</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"cmddummyrunner lag in: </span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="nb">float</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">args</span><span class="p">)</span><span class="si">}</span><span class="s2">s"</span><span class="p">)</span></div></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyRunnerCmdSet"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">[docs]</a><span class="k">class</span> <span class="nc">DummyRunnerCmdSet</span><span class="p">(</span><span class="n">CmdSet</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Dummyrunner injected cmdset.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<div class="viewcode-block" id="DummyRunnerCmdSet.at_cmdset_creation"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">[docs]</a> <span class="k">def</span> <span class="nf">at_cmdset_creation</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">CmdDummyRunnerEchoResponse</span><span class="p">())</span></div></div>
|
||||
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
<span class="c1"># Helper functions</span>
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
|
|
@ -222,12 +285,12 @@
|
|||
<span class="sd"> Makes unique ids.</span>
|
||||
|
||||
<span class="sd"> Returns:</span>
|
||||
<span class="sd"> count (int): A globally unique counter.</span>
|
||||
<span class="sd"> str: A globally unique id.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">ICOUNT</span>
|
||||
<span class="n">ICOUNT</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ICOUNT</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="s2">"</span><span class="si">{:03d}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">ICOUNT</span><span class="p">))</span></div>
|
||||
|
||||
|
||||
<span class="n">GCOUNT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
|
@ -243,7 +306,7 @@
|
|||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">GCOUNT</span>
|
||||
<span class="n">GCOUNT</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">return</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="n">GCOUNT</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">_</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="n">GCOUNT</span><span class="p">)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="makeiter"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.makeiter">[docs]</a><span class="k">def</span> <span class="nf">makeiter</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
|
||||
|
|
@ -263,7 +326,6 @@
|
|||
<span class="c1"># Client classes</span>
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyClient"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient">[docs]</a><span class="k">class</span> <span class="nc">DummyClient</span><span class="p">(</span><span class="n">telnet</span><span class="o">.</span><span class="n">StatefulTelnetProtocol</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Handles connection to a running Evennia server,</span>
|
||||
|
|
@ -272,29 +334,80 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.report"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.report">[docs]</a> <span class="k">def</span> <span class="nf">report</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">clientkey</span><span class="p">):</span>
|
||||
<span class="n">pad</span> <span class="o">=</span> <span class="s2">" "</span> <span class="o">*</span> <span class="p">(</span><span class="mi">25</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">text</span><span class="p">))</span>
|
||||
<span class="n">tim</span> <span class="o">=</span> <span class="nb">round</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">connection_timestamp</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">text</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">clientkey</span><span class="si">}{</span><span class="n">pad</span><span class="si">}</span><span class="se">\t</span><span class="s2">"</span>
|
||||
<span class="sa">f</span><span class="s2">"conn: </span><span class="si">{</span><span class="n">NCONNECTED</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"welcome screen: </span><span class="si">{</span><span class="n">NLOGIN_SCREEN</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"authing: </span><span class="si">{</span><span class="n">NLOGGING_IN</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"loggedin/tot: </span><span class="si">{</span><span class="n">NLOGGED_IN</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">NCLIENTS</span><span class="si">}</span><span class="s2"> (after </span><span class="si">{</span><span class="n">tim</span><span class="si">}</span><span class="s2">s)"</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.connectionMade"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.connectionMade">[docs]</a> <span class="k">def</span> <span class="nf">connectionMade</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Called when connection is first established.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">NCONNECTED</span>
|
||||
<span class="c1"># public properties</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">cid</span> <span class="o">=</span> <span class="n">idcounter</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="s2">"Dummy-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">gid</span> <span class="o">=</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"Dummy-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">gid</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">)</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">exits</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># exit names created</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">objs</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># obj names created</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_timestamp</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_attempt</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">action_started</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_ready</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_report</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># already stepping in a cmd definition</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_login</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_actions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">addSystemEventTrigger</span><span class="p">(</span><span class="s2">"before"</span><span class="p">,</span> <span class="s2">"shutdown"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">logout</span><span class="p">)</span></div>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">addSystemEventTrigger</span><span class="p">(</span><span class="s2">"before"</span><span class="p">,</span> <span class="s2">"shutdown"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">logout</span><span class="p">)</span>
|
||||
|
||||
<span class="n">NCONNECTED</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"-> connected"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_retry_welcome_screen</span><span class="p">)</span></div>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_retry_welcome_screen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_ready</span><span class="p">:</span>
|
||||
<span class="c1"># we have connected but not received anything for 30s.</span>
|
||||
<span class="c1"># (unclear why this would be - overload?)</span>
|
||||
<span class="c1"># try sending a look to get something to start with</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"?? retrying welcome screen"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="s2">"look"</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span>
|
||||
<span class="c1"># make sure to check again later</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_retry_welcome_screen</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_print_statistics</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">global</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">,</span> <span class="n">TOTAL_ACTIONS</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_LAG</span><span class="p">,</span> <span class="n">TOTAL_LAG_MEASURES</span><span class="p">,</span> <span class="n">TOTAL_LAG_IN</span><span class="p">,</span> <span class="n">TOTAL_LAG_OUT</span>
|
||||
|
||||
<span class="n">tim</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">TIME_ALL_LOGIN</span>
|
||||
<span class="n">avgrate</span> <span class="o">=</span> <span class="nb">round</span><span class="p">(</span><span class="n">TOTAL_ACTIONS</span> <span class="o">/</span> <span class="n">tim</span><span class="p">)</span>
|
||||
<span class="n">lag</span> <span class="o">=</span> <span class="n">TOTAL_LAG</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">lag_in</span> <span class="o">=</span> <span class="n">TOTAL_LAG_IN</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">lag_out</span> <span class="o">=</span> <span class="n">TOTAL_LAG_OUT</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">".. running 30s average: ~</span><span class="si">{</span><span class="n">avgrate</span><span class="si">}</span><span class="s2"> actions/s "</span>
|
||||
<span class="sa">f</span><span class="s2">"lag: </span><span class="si">{</span><span class="n">lag</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s (in: </span><span class="si">{</span><span class="n">lag_in</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s, out: </span><span class="si">{</span><span class="n">lag_out</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s)"</span><span class="p">)</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_print_statistics</span><span class="p">)</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.dataReceived"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.dataReceived">[docs]</a> <span class="k">def</span> <span class="nf">dataReceived</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -305,15 +418,67 @@
|
|||
<span class="sd"> data (str): Incoming data.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="nb">chr</span><span class="p">(</span><span class="mi">255</span><span class="p">)):</span>
|
||||
<span class="c1"># wait until we actually get text back (not just telnet</span>
|
||||
<span class="c1"># negotiation)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="c1"># start client tick</span>
|
||||
<span class="n">d</span> <span class="o">=</span> <span class="n">LoopingCall</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">)</span>
|
||||
<span class="c1"># dissipate exact step by up to +/- 0.5 second</span>
|
||||
<span class="n">timestep</span> <span class="o">=</span> <span class="n">TIMESTEP</span> <span class="o">+</span> <span class="p">(</span><span class="o">-</span><span class="mf">0.5</span> <span class="o">+</span> <span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span> <span class="o">*</span> <span class="mf">1.0</span><span class="p">))</span>
|
||||
<span class="n">d</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">timestep</span><span class="p">,</span> <span class="n">now</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">addErrback</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">error</span><span class="p">)</span></div>
|
||||
<span class="k">global</span> <span class="n">NLOGIN_SCREEN</span><span class="p">,</span> <span class="n">NLOGGED_IN</span><span class="p">,</span> <span class="n">NLOGGING_IN</span><span class="p">,</span> <span class="n">NCONNECTED</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_ACTIONS</span><span class="p">,</span> <span class="n">TIME_ALL_LOGIN</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_LAG</span><span class="p">,</span> <span class="n">TOTAL_LAG_MEASURES</span><span class="p">,</span> <span class="n">TOTAL_LAG_IN</span><span class="p">,</span> <span class="n">TOTAL_LAG_OUT</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="sa">b</span><span class="s2">"</span><span class="se">\xff</span><span class="s2">"</span><span class="p">):</span>
|
||||
<span class="c1"># regular text, not a telnet command</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">NCLIENTS</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"dummy-client sees:"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">"utf-8"</span><span class="p">))</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span><span class="p">:</span>
|
||||
<span class="c1"># waiting for connection</span>
|
||||
<span class="c1"># wait until we actually get text back (not just telnet</span>
|
||||
<span class="c1"># negotiation)</span>
|
||||
<span class="c1"># start client tick</span>
|
||||
<span class="n">d</span> <span class="o">=</span> <span class="n">LoopingCall</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">)</span>
|
||||
<span class="n">df</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">TIMESTEP</span> <span class="o">*</span> <span class="mf">0.001</span><span class="p">),</span> <span class="nb">min</span><span class="p">(</span><span class="n">TIMESTEP</span><span class="o">/</span><span class="mi">10</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">))</span>
|
||||
<span class="c1"># dither next attempt with random time</span>
|
||||
<span class="n">timestep</span> <span class="o">=</span> <span class="n">TIMESTEP</span> <span class="o">+</span> <span class="p">(</span><span class="o">-</span><span class="n">df</span> <span class="o">+</span> <span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span> <span class="o">*</span> <span class="n">df</span><span class="p">))</span>
|
||||
<span class="n">d</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">timestep</span><span class="p">,</span> <span class="n">now</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">addErrback</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_attempt</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="n">NCONNECTED</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"<- server sent login screen"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
|
||||
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_ready</span><span class="p">:</span>
|
||||
<span class="c1"># logged in, ready to run</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_ready</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"== logged in"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">NLOGGED_IN</span> <span class="o">==</span> <span class="n">NCLIENTS</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">:</span>
|
||||
<span class="c1"># all are logged in! We can start collecting statistics</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">".. All clients connected and logged in!"</span><span class="p">)</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_print_statistics</span><span class="p">)</span>
|
||||
|
||||
<span class="k">elif</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">:</span>
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">data</span> <span class="o">=</span> <span class="n">strip_ansi</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">"utf-8"</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"dummyrunner_echo_response:"</span><span class="p">):</span>
|
||||
<span class="c1"># handle special lag-measuring command. This returns</span>
|
||||
<span class="c1"># dummyrunner_echo_response:<starttime>,<midpointtime></span>
|
||||
<span class="n">now</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">_</span><span class="p">,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">":"</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">start_time</span><span class="p">,</span> <span class="n">mid_time</span> <span class="o">=</span> <span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">part</span><span class="p">)</span> <span class="k">for</span> <span class="n">part</span> <span class="ow">in</span> <span class="n">data</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">","</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
|
||||
<span class="n">lag_in</span> <span class="o">=</span> <span class="n">mid_time</span> <span class="o">-</span> <span class="n">start_time</span>
|
||||
<span class="n">lag_out</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">mid_time</span>
|
||||
<span class="n">total_lag</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">start_time</span> <span class="c1"># full round-about time</span>
|
||||
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">+=</span> <span class="n">total_lag</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">+=</span> <span class="n">lag_in</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">+=</span> <span class="n">lag_out</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
|
||||
<span class="k">pass</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.connectionLost"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.connectionLost">[docs]</a> <span class="k">def</span> <span class="nf">connectionLost</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">reason</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -324,7 +489,7 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"client </span><span class="si">%s</span><span class="s2">(</span><span class="si">%s</span><span class="s2">) lost connection (</span><span class="si">%s</span><span class="s2">)"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">,</span> <span class="n">reason</span><span class="p">))</span></div>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"XX lost connection"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.error"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.error">[docs]</a> <span class="k">def</span> <span class="nf">error</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">err</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -351,9 +516,9 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logout</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"client </span><span class="si">%s</span><span class="s2">(</span><span class="si">%s</span><span class="s2">) logout (</span><span class="si">%s</span><span class="s2"> actions)"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">istep</span><span class="p">))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span></div>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logout</span><span class="p">(</span><span class="bp">self</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="sa">f</span><span class="s2">"-> logout/disconnect (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">istep</span><span class="si">}</span><span class="s2"> actions)"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.step"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.step">[docs]</a> <span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -362,7 +527,7 @@
|
|||
<span class="sd"> all "intelligence" of the dummy client.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">NLOGGED_IN</span>
|
||||
<span class="k">global</span> <span class="n">NLOGGING_IN</span><span class="p">,</span> <span class="n">NLOGIN_SCREEN</span>
|
||||
|
||||
<span class="n">rand</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span>
|
||||
|
||||
|
|
@ -370,11 +535,13 @@
|
|||
<span class="c1"># no commands ready. Load some.</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_LOGIN</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_LOGIN</span> <span class="ow">or</span> <span class="n">NLOGGING_IN</span> <span class="o"><</span> <span class="mi">10</span><span class="p">:</span>
|
||||
<span class="c1"># lower rate of logins, but not below 1 / s</span>
|
||||
<span class="c1"># get the login commands</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">makeiter</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_login</span><span class="p">(</span><span class="bp">self</span><span class="p">)))</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">+=</span> <span class="mi">1</span> <span class="c1"># this is for book-keeping</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"connecting client </span><span class="si">%s</span><span class="s2"> (</span><span class="si">%i</span><span class="s2">/</span><span class="si">%i</span><span class="s2">)..."</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="n">NLOGGED_IN</span><span class="p">,</span> <span class="n">NCLIENTS</span><span class="p">))</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">+=</span> <span class="mi">1</span> <span class="c1"># this is for book-keeping</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"-> create/login"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># no login yet, so cmdlist not yet set</span>
|
||||
|
|
@ -388,12 +555,26 @@
|
|||
<span class="c1"># at this point we always have a list of commands</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_ACTION</span><span class="p">:</span>
|
||||
<span class="c1"># send to the game</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">+=</span> <span class="mi">1</span></div></div>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">cmd</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"dummyrunner_echo_response"</span><span class="p">):</span>
|
||||
<span class="c1"># we need to set the timer element as close to</span>
|
||||
<span class="c1"># the send as possible</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="n">cmd</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">timestamp</span><span class="o">=</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">())</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">action_started</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">NCLIENTS</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"dummy-client sent: </span><span class="si">{</span><span class="n">cmd</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span></div></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyFactory"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">[docs]</a><span class="k">class</span> <span class="nc">DummyFactory</span><span class="p">(</span><span class="n">protocol</span><span class="o">.</span><span class="n">ClientFactory</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="DummyFactory"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">[docs]</a><span class="k">class</span> <span class="nc">DummyFactory</span><span class="p">(</span><span class="n">protocol</span><span class="o">.</span><span class="n">ReconnectingClientFactory</span><span class="p">):</span>
|
||||
<span class="n">protocol</span> <span class="o">=</span> <span class="n">DummyClient</span>
|
||||
<span class="n">initialDelay</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">maxDelay</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">noisy</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyFactory.__init__"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.__init__">[docs]</a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">actions</span><span class="p">):</span>
|
||||
<span class="s2">"Setup the factory base (shared by all clients)"</span>
|
||||
|
|
@ -438,7 +619,7 @@
|
|||
<span class="c1"># setting up all clients (they are automatically started)</span>
|
||||
<span class="n">factory</span> <span class="o">=</span> <span class="n">DummyFactory</span><span class="p">(</span><span class="n">actions</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">NCLIENTS</span><span class="p">):</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">connectTCP</span><span class="p">(</span><span class="s2">"localhost"</span><span class="p">,</span> <span class="n">TELNET_PORT</span><span class="p">,</span> <span class="n">factory</span><span class="p">)</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">connectTCP</span><span class="p">(</span><span class="s2">"127.0.0.1"</span><span class="p">,</span> <span class="n">TELNET_PORT</span><span class="p">,</span> <span class="n">factory</span><span class="p">)</span>
|
||||
<span class="c1"># start reactor</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">run</span><span class="p">()</span></div>
|
||||
|
||||
|
|
@ -463,12 +644,23 @@
|
|||
<span class="p">)</span>
|
||||
|
||||
<span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
|
||||
<span class="n">nclients</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">INFO_STARTING</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">N</span><span class="o">=</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">INFO_STARTING</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
|
||||
<span class="n">nclients</span><span class="o">=</span><span class="n">nclients</span><span class="p">,</span>
|
||||
<span class="n">port</span><span class="o">=</span><span class="n">TELNET_PORT</span><span class="p">,</span>
|
||||
<span class="n">idmapper_cache_size</span><span class="o">=</span><span class="n">IDMAPPER_CACHE_MAXSIZE</span><span class="p">,</span>
|
||||
<span class="n">timestep</span><span class="o">=</span><span class="n">TIMESTEP</span><span class="p">,</span>
|
||||
<span class="n">rate</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="n">TIMESTEP</span><span class="p">,</span>
|
||||
<span class="n">chance_of_login</span><span class="o">=</span><span class="n">CHANCE_OF_LOGIN</span> <span class="o">*</span> <span class="mi">100</span><span class="p">,</span>
|
||||
<span class="n">chance_of_action</span><span class="o">=</span><span class="n">CHANCE_OF_ACTION</span> <span class="o">*</span> <span class="mi">100</span><span class="p">,</span>
|
||||
<span class="n">avg_rate</span><span class="o">=</span><span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">TIMESTEP</span><span class="p">)</span> <span class="o">*</span> <span class="n">CHANCE_OF_ACTION</span><span class="p">,</span>
|
||||
<span class="n">avg_rate_total</span><span class="o">=</span><span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">TIMESTEP</span><span class="p">)</span> <span class="o">*</span> <span class="n">CHANCE_OF_ACTION</span> <span class="o">*</span> <span class="n">nclients</span>
|
||||
<span class="p">))</span>
|
||||
|
||||
<span class="c1"># run the dummyrunner</span>
|
||||
<span class="n">t0</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">start_all_dummy_clients</span><span class="p">(</span><span class="n">nclients</span><span class="o">=</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
<span class="n">TIME_START</span> <span class="o">=</span> <span class="n">t0</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">start_all_dummy_clients</span><span class="p">(</span><span class="n">nclients</span><span class="o">=</span><span class="n">nclients</span><span class="p">)</span>
|
||||
<span class="n">ttot</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">t0</span>
|
||||
|
||||
<span class="c1"># output runtime</span>
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@
|
|||
|
||||
<span class="sd">The settings are global variables:</span>
|
||||
|
||||
<span class="sd">- TIMESTEP - time in seconds between each 'tick'</span>
|
||||
<span class="sd">- CHANCE_OF_ACTION - chance 0-1 of action happening</span>
|
||||
<span class="sd">- CHANCE_OF_LOGIN - chance 0-1 of login happening</span>
|
||||
<span class="sd">- TIMESTEP - time in seconds between each 'tick'. 1 is a good start.</span>
|
||||
<span class="sd">- CHANCE_OF_ACTION - chance 0-1 of action happening. Default is 0.5.</span>
|
||||
<span class="sd">- CHANCE_OF_LOGIN - chance 0-1 of login happening. 0.01 is a good number.</span>
|
||||
<span class="sd">- TELNET_PORT - port to use, defaults to settings.TELNET_PORT</span>
|
||||
<span class="sd">- ACTIONS - see below</span>
|
||||
|
||||
|
|
@ -57,23 +57,25 @@
|
|||
|
||||
<span class="sd">```python</span>
|
||||
<span class="sd">(login_func, logout_func, (0.3, func1), (0.1, func2) ... )</span>
|
||||
|
||||
<span class="sd">```</span>
|
||||
|
||||
<span class="sd">where the first entry is the function to call on first connect, with a</span>
|
||||
<span class="sd">chance of occurring given by CHANCE_OF_LOGIN. This function is usually</span>
|
||||
<span class="sd">responsible for logging in the account. The second entry is always</span>
|
||||
<span class="sd">called when the dummyrunner disconnects from the server and should</span>
|
||||
<span class="sd">thus issue a logout command. The other entries are tuples (chance,</span>
|
||||
<span class="sd">thus issue a logout command. The other entries are tuples (chance,</span>
|
||||
<span class="sd">func). They are picked randomly, their commonality based on the</span>
|
||||
<span class="sd">cumulative chance given (the chance is normalized between all options</span>
|
||||
<span class="sd">so if will still work also if the given chances don't add up to 1).</span>
|
||||
<span class="sd">Since each function can return a list of game-command strings, each</span>
|
||||
<span class="sd">function may result in multiple operations.</span>
|
||||
|
||||
<span class="sd">The PROFILE variable define pre-made ACTION tuples for convenience.</span>
|
||||
|
||||
<span class="sd">Each function should return an iterable of one or more command-call</span>
|
||||
<span class="sd">strings (like "look here"), so each can group multiple command operations.</span>
|
||||
|
||||
<span class="sd">An action-function is called with a "client" argument which is a</span>
|
||||
<span class="sd">reference to the dummy client currently performing the action. It</span>
|
||||
<span class="sd">returns a string or a list of command strings to execute. Use the</span>
|
||||
<span class="sd">client object for optionally saving data between actions.</span>
|
||||
<span class="sd">reference to the dummy client currently performing the action.</span>
|
||||
|
||||
<span class="sd">The client object has the following relevant properties and methods:</span>
|
||||
|
||||
|
|
@ -96,11 +98,15 @@
|
|||
<span class="sd">----</span>
|
||||
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">import</span> <span class="nn">random</span>
|
||||
<span class="kn">import</span> <span class="nn">string</span>
|
||||
|
||||
<span class="c1"># Dummy runner settings</span>
|
||||
|
||||
<span class="c1"># Time between each dummyrunner "tick", in seconds. Each dummy</span>
|
||||
<span class="c1"># will be called with this frequency.</span>
|
||||
<span class="n">TIMESTEP</span> <span class="o">=</span> <span class="mi">2</span>
|
||||
<span class="n">TIMESTEP</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="c1"># TIMESTEP = 0.025 # 40/s</span>
|
||||
|
||||
<span class="c1"># Chance of a dummy actually performing an action on a given tick.</span>
|
||||
<span class="c1"># This spreads out usage randomly, like it would be in reality.</span>
|
||||
|
|
@ -109,7 +115,7 @@
|
|||
<span class="c1"># Chance of a currently unlogged-in dummy performing its login</span>
|
||||
<span class="c1"># action every tick. This emulates not all accounts logging in</span>
|
||||
<span class="c1"># at exactly the same time.</span>
|
||||
<span class="n">CHANCE_OF_LOGIN</span> <span class="o">=</span> <span class="mf">1.0</span>
|
||||
<span class="n">CHANCE_OF_LOGIN</span> <span class="o">=</span> <span class="mf">0.01</span>
|
||||
|
||||
<span class="c1"># Which telnet port to connect to. If set to None, uses the first</span>
|
||||
<span class="c1"># default telnet port of the running server.</span>
|
||||
|
|
@ -120,9 +126,10 @@
|
|||
|
||||
<span class="c1"># some convenient templates</span>
|
||||
|
||||
<span class="n">DUMMY_NAME</span> <span class="o">=</span> <span class="s2">"Dummy-</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_PWD</span> <span class="o">=</span> <span class="s2">"password-</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">START_ROOM</span> <span class="o">=</span> <span class="s2">"testing_room_start_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_NAME</span> <span class="o">=</span> <span class="s2">"Dummy_</span><span class="si">{gid}</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_PWD</span> <span class="o">=</span> <span class="p">(</span><span class="s1">''</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">string</span><span class="o">.</span><span class="n">ascii_letters</span> <span class="o">+</span> <span class="n">string</span><span class="o">.</span><span class="n">digits</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">20</span><span class="p">))</span> <span class="o">+</span> <span class="s2">"-</span><span class="si">{gid}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="n">START_ROOM</span> <span class="o">=</span> <span class="s2">"testing_room_start_</span><span class="si">{gid}</span><span class="s2">"</span>
|
||||
<span class="n">ROOM_TEMPLATE</span> <span class="o">=</span> <span class="s2">"testing_room_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">EXIT_TEMPLATE</span> <span class="o">=</span> <span class="s2">"exit_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">OBJ_TEMPLATE</span> <span class="o">=</span> <span class="s2">"testing_obj_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
|
|
@ -135,26 +142,27 @@
|
|||
|
||||
<span class="c1"># login/logout</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_login"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_login">[docs]</a><span class="k">def</span> <span class="nf">c_login</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"logins to the game"</span>
|
||||
<span class="c1"># we always use a new client name</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
<span class="n">room_name</span> <span class="o">=</span> <span class="n">START_ROOM</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># set up for digging a first room (to move to and keep the</span>
|
||||
<span class="c1"># login room clean)</span>
|
||||
<span class="n">roomname</span> <span class="o">=</span> <span class="n">ROOM_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname1</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname2</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">])</span>
|
||||
<span class="c1"># we assign the dummyrunner cmdsert to ourselves so # we can use special commands</span>
|
||||
<span class="n">add_cmdset</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"py from evennia.server.profiling.dummyrunner import DummyRunnerCmdSet;"</span>
|
||||
<span class="s2">"self.cmdset.add(DummyRunnerCmdSet, persistent=False)"</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="c1"># create character, log in, then immediately dig a new location and</span>
|
||||
<span class="c1"># teleport it (to keep the login room clean)</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"create </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span>
|
||||
<span class="s2">"connect </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span>
|
||||
<span class="s2">"@dig </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">START_ROOM</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">,</span>
|
||||
<span class="s2">"@teleport </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">START_ROOM</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">,</span>
|
||||
<span class="s2">"@dig </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">),</span>
|
||||
<span class="sa">f</span><span class="s2">"create </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"connect </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"dig </span><span class="si">{</span><span class="n">room_name</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"teleport </span><span class="si">{</span><span class="n">room_name</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="n">add_cmdset</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
|
@ -163,14 +171,16 @@
|
|||
<span class="s2">"logins, don't dig its own room"</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"create </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span> <span class="s2">"connect </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">))</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="sa">f</span><span class="s2">"create </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"connect </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_logout"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_logout">[docs]</a><span class="k">def</span> <span class="nf">c_logout</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"logouts of the game"</span>
|
||||
<span class="k">return</span> <span class="s2">"@quit"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"quit"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># random commands</span>
|
||||
|
|
@ -182,7 +192,7 @@
|
|||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"look </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">exi</span> <span class="k">for</span> <span class="n">exi</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="s2">"look"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"look"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -192,7 +202,7 @@
|
|||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"examine </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">exi</span> <span class="k">for</span> <span class="n">exi</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="s2">"examine me"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"examine me"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -204,7 +214,7 @@
|
|||
|
||||
<div class="viewcode-block" id="c_help"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_help">[docs]</a><span class="k">def</span> <span class="nf">c_help</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"reads help files"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"help"</span><span class="p">,</span> <span class="s2">"help @teleport"</span><span class="p">,</span> <span class="s2">"help look"</span><span class="p">,</span> <span class="s2">"help @tunnel"</span><span class="p">,</span> <span class="s2">"help @dig"</span><span class="p">)</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"help"</span><span class="p">,</span> <span class="s2">"dummyrunner_echo_response"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -214,7 +224,7 @@
|
|||
<span class="n">exitname1</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname2</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">])</span>
|
||||
<span class="k">return</span> <span class="s2">"@dig/tel </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"@dig/tel </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">),)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_creates_obj"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_creates_obj">[docs]</a><span class="k">def</span> <span class="nf">c_creates_obj</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
|
|
@ -241,9 +251,7 @@
|
|||
<div class="viewcode-block" id="c_socialize"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_socialize">[docs]</a><span class="k">def</span> <span class="nf">c_socialize</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"socializechats on channel"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"ooc Hello!"</span><span class="p">,</span>
|
||||
<span class="s2">"ooc Testing ..."</span><span class="p">,</span>
|
||||
<span class="s2">"ooc Testing ... times 2"</span><span class="p">,</span>
|
||||
<span class="s2">"pub Hello!"</span><span class="p">,</span>
|
||||
<span class="s2">"say Yo!"</span><span class="p">,</span>
|
||||
<span class="s2">"emote stands looking around."</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
|
@ -253,84 +261,120 @@
|
|||
<div class="viewcode-block" id="c_moves"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves">[docs]</a><span class="k">def</span> <span class="nf">c_moves</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"moves to a previously created room, using the stored exits"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span> <span class="c1"># try all exits - finally one will work</span>
|
||||
<span class="k">return</span> <span class="s2">"look"</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span> <span class="k">else</span> <span class="n">cmds</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"look"</span><span class="p">,)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span> <span class="k">else</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_moves_n"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves_n">[docs]</a><span class="k">def</span> <span class="nf">c_moves_n</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"move through north exit if available"</span>
|
||||
<span class="k">return</span> <span class="s2">"north"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"north"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_moves_s"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves_s">[docs]</a><span class="k">def</span> <span class="nf">c_moves_s</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"move through south exit if available"</span>
|
||||
<span class="k">return</span> <span class="s2">"south"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"south"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># Action tuple (required)</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="c1"># This is a tuple of client action functions. The first element is the</span>
|
||||
<span class="c1"># function the client should use to log into the game and move to</span>
|
||||
<span class="c1"># STARTROOM . The second element is the logout command, for cleanly</span>
|
||||
<span class="c1"># exiting the mud. The following elements are 2-tuples of (probability,</span>
|
||||
<span class="c1"># action_function). The probablities should normally sum up to 1,</span>
|
||||
<span class="c1"># otherwise the system will normalize them.</span>
|
||||
<div class="viewcode-block" id="c_measure_lag"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_measure_lag">[docs]</a><span class="k">def</span> <span class="nf">c_measure_lag</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Special dummyrunner command, injected in c_login. It measures</span>
|
||||
<span class="sd"> response time. Including this in the ACTION tuple will give more</span>
|
||||
<span class="sd"> dummyrunner output about just how fast commands are being processed.</span>
|
||||
|
||||
<span class="sd"> The dummyrunner will treat this special and inject the</span>
|
||||
<span class="sd"> {timestamp} just before sending.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"dummyrunner_echo_response </span><span class="si">{timestamp}</span><span class="s2">"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># Action profile (required)</span>
|
||||
|
||||
<span class="c1"># Some pre-made profiles to test. To make your own, just assign a tuple to ACTIONS.</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="c1"># idler - does nothing after logging in</span>
|
||||
<span class="c1"># looker - just looks around</span>
|
||||
<span class="c1"># normal_player - moves around, reads help, looks around (digs rarely) (spammy)</span>
|
||||
<span class="c1"># normal_builder - digs now and then, examines, creates objects, moves</span>
|
||||
<span class="c1"># heavy_builder - digs and creates a lot, moves and examines</span>
|
||||
<span class="c1"># socializing_builder - builds a lot, creates help entries, moves, chat (spammy)</span>
|
||||
<span class="c1"># only_digger - extreme builder that only digs room after room</span>
|
||||
|
||||
<span class="n">PROFILE</span> <span class="o">=</span> <span class="s2">"looker"</span>
|
||||
|
||||
|
||||
<span class="c1"># "normal builder" definitionj</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.5, c_looks),</span>
|
||||
<span class="c1"># (0.08, c_examines),</span>
|
||||
<span class="c1"># (0.1, c_help),</span>
|
||||
<span class="c1"># (0.01, c_digs),</span>
|
||||
<span class="c1"># (0.01, c_creates_obj),</span>
|
||||
<span class="c1"># (0.3, c_moves))</span>
|
||||
<span class="c1"># "heavy" builder definition</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.2, c_looks),</span>
|
||||
<span class="c1"># (0.1, c_examines),</span>
|
||||
<span class="c1"># (0.2, c_help),</span>
|
||||
<span class="c1"># (0.1, c_digs),</span>
|
||||
<span class="c1"># (0.1, c_creates_obj),</span>
|
||||
<span class="c1"># #(0.01, c_creates_button),</span>
|
||||
<span class="c1"># (0.2, c_moves))</span>
|
||||
<span class="c1"># "passive account" definition</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.7, c_looks),</span>
|
||||
<span class="c1"># #(0.1, c_examines),</span>
|
||||
<span class="c1"># (0.3, c_help))</span>
|
||||
<span class="c1"># #(0.1, c_digs),</span>
|
||||
<span class="c1"># #(0.1, c_creates_obj),</span>
|
||||
<span class="c1"># #(0.1, c_creates_button),</span>
|
||||
<span class="c1"># #(0.4, c_moves))</span>
|
||||
<span class="c1"># "inactive account" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login_nodig,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_idles))</span>
|
||||
<span class="c1"># "normal account" definition</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span><span class="n">c_login</span><span class="p">,</span> <span class="n">c_logout</span><span class="p">,</span> <span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.39</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.4</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">))</span>
|
||||
<span class="c1"># walking tester. This requires a pre-made</span>
|
||||
<span class="c1"># "loop" of multiple rooms that ties back</span>
|
||||
<span class="c1"># to limbo (using @tunnel and @open)</span>
|
||||
<span class="c1"># ACTIONS = (c_login_nodig,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_moves_n))</span>
|
||||
<span class="c1"># "socializing heavy builder" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.1, c_socialize),</span>
|
||||
<span class="c1"># (0.1, c_looks),</span>
|
||||
<span class="c1"># (0.2, c_help),</span>
|
||||
<span class="c1"># (0.1, c_creates_obj),</span>
|
||||
<span class="c1"># (0.2, c_digs),</span>
|
||||
<span class="c1"># (0.3, c_moves))</span>
|
||||
<span class="c1"># "heavy digger memory tester" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_digs))</span>
|
||||
<span class="k">if</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'idler'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">c_idles</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">),</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'looker'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.8</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'normal_player'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.29</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.05</span><span class="p">,</span> <span class="n">c_socialize</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'normal_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.08</span><span class="p">,</span> <span class="n">c_examines</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'heavy_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_examines</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'socializing_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_socialize</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'only_digger'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"No dummyrunner ACTION profile defined."</span><span class="p">)</span>
|
||||
<span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
|
||||
<div class="clearer"></div>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@
|
|||
|
||||
<span class="sd"> Keyword Args:</span>
|
||||
<span class="sd"> name (str): Name of this throttle.</span>
|
||||
<span class="sd"> limit (int): Max number of failures before imposing limiter</span>
|
||||
<span class="sd"> limit (int): Max number of failures before imposing limiter. If `None`,</span>
|
||||
<span class="sd"> the throttle is disabled.</span>
|
||||
<span class="sd"> timeout (int): number of timeout seconds after</span>
|
||||
<span class="sd"> max number of tries has been reached.</span>
|
||||
<span class="sd"> cache_size (int): Max number of attempts to record per IP within a</span>
|
||||
|
|
@ -238,6 +239,10 @@
|
|||
<span class="sd"> False otherwise.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">limit</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="c1"># throttle is disabled</span>
|
||||
<span class="k">return</span> <span class="kc">False</span>
|
||||
|
||||
<span class="n">now</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">ip</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">ip</span><span class="p">)</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -101,7 +101,7 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ to accounts respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pemit', 'remit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['remit', 'pemit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -285,7 +285,7 @@ to accounts respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -1268,7 +1268,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['update', 'type', 'swap', 'parent']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['type', 'parent', 'swap', 'update']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1299,7 +1299,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'update type swap parent', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'type parent swap update', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -1452,7 +1452,7 @@ If object is not specified, the current location is examined.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdExamine.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'exam']</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['exam', 'ex']</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1549,7 +1549,7 @@ non-persistent data stored on object</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdExamine.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex exam', 'category': 'building', 'key': 'examine', 'tags': '', 'text': '\n get detailed information about an object\n\n Usage:\n examine [<object>[/attrname]]\n examine [*<account>[/attrname]]\n\n Switch:\n account - examine an Account (same as adding *)\n object - examine an Object (useful when OOC)\n\n The examine command shows detailed game info about an\n object and optionally a specific attribute on it.\n If object is not specified, the current location is examined.\n\n Append a * before the search string to examine an account.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'exam ex', 'category': 'building', 'key': 'examine', 'tags': '', 'text': '\n get detailed information about an object\n\n Usage:\n examine [<object>[/attrname]]\n examine [*<account>[/attrname]]\n\n Switch:\n account - examine an Account (same as adding *)\n object - examine an Object (useful when OOC)\n\n The examine command shows detailed game info about an\n object and optionally a specific attribute on it.\n If object is not specified, the current location is examined.\n\n Append a * before the search string to examine an account.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ for that channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdDelCom.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['delaliaschan', 'delchanalias']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['delchanalias', 'delaliaschan']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -832,7 +832,7 @@ for that channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdDelCom.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delchanalias delaliaschan', 'category': 'comms', 'key': 'delcom', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -143,7 +143,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -205,7 +205,7 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nickname', 'nicks']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nicks', 'nickname']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -237,7 +237,7 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -700,7 +700,7 @@ which permission groups you are a member of.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['groups', 'hierarchy']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hierarchy', 'groups']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -731,7 +731,7 @@ which permission groups you are a member of.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ given, <nr> defaults to 10.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['db', 'listobjects', 'stats', 'listobjs']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['db', 'listobjects', 'listobjs', 'stats']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -411,7 +411,7 @@ given, <nr> defaults to 10.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'db listobjects stats listobjs', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'db listobjects listobjs stats', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -612,7 +612,7 @@ the released memory will instead be re-used by the program.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdServerLoad.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['serverprocess', 'serverload']</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['serverload', 'serverprocess']</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -643,7 +643,7 @@ the released memory will instead be re-used by the program.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdServerLoad.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'serverprocess serverload', 'category': 'system', 'key': 'server', 'tags': '', 'text': "\n show server load and memory statistics\n\n Usage:\n server[/mem]\n\n Switches:\n mem - return only a string of the current memory usage\n flushmem - flush the idmapper cache\n\n This command shows server load statistics and dynamic memory\n usage. It also allows to flush the cache of accessed database\n objects.\n\n Some Important statistics in the table:\n\n |wServer load|n is an average of processor usage. It's usually\n between 0 (no usage) and 1 (100% usage), but may also be\n temporarily higher if your computer has multiple CPU cores.\n\n The |wResident/Virtual memory|n displays the total memory used by\n the server process.\n\n Evennia |wcaches|n all retrieved database entities when they are\n loaded by use of the idmapper functionality. This allows Evennia\n to maintain the same instances of an entity and allowing\n non-persistent storage schemes. The total amount of cached objects\n are displayed plus a breakdown of database object types.\n\n The |wflushmem|n switch allows to flush the object cache. Please\n note that due to how Python's memory management works, releasing\n caches may not show you a lower Residual/Virtual memory footprint,\n the released memory will instead be re-used by the program.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'serverload serverprocess', 'category': 'system', 'key': 'server', 'tags': '', 'text': "\n show server load and memory statistics\n\n Usage:\n server[/mem]\n\n Switches:\n mem - return only a string of the current memory usage\n flushmem - flush the idmapper cache\n\n This command shows server load statistics and dynamic memory\n usage. It also allows to flush the cache of accessed database\n objects.\n\n Some Important statistics in the table:\n\n |wServer load|n is an average of processor usage. It's usually\n between 0 (no usage) and 1 (100% usage), but may also be\n temporarily higher if your computer has multiple CPU cores.\n\n The |wResident/Virtual memory|n displays the total memory used by\n the server process.\n\n Evennia |wcaches|n all retrieved database entities when they are\n loaded by use of the idmapper functionality. This allows Evennia\n to maintain the same instances of an entity and allowing\n non-persistent storage schemes. The total amount of cached objects\n are displayed plus a breakdown of database object types.\n\n The |wflushmem|n switch allows to flush the object cache. Please\n note that due to how Python's memory management works, releasing\n caches may not show you a lower Residual/Virtual memory footprint,\n the released memory will instead be re-used by the program.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ connect “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'con', 'co']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -94,7 +94,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -118,7 +118,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -149,7 +149,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -173,7 +173,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['qu', 'q']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'qu']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -199,7 +199,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedQuit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'qu q', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit when in unlogged-in state\n\n Usage:\n quit\n\n We maintain a different version of the quit command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit when in unlogged-in state\n\n Usage:\n quit\n\n We maintain a different version of the quit command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -223,7 +223,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -249,7 +249,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -272,7 +272,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -298,7 +298,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -681,7 +681,7 @@ try to influence the other part in the deal.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdStatus.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['deal', 'offers']</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['offers', 'deal']</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -707,7 +707,7 @@ try to influence the other part in the deal.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'deal offers', 'category': 'trading', 'key': 'status', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ at them with this command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -109,7 +109,7 @@ that is checked by the @ic command directly.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look <character>\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n "self".\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look <character>\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n "self".\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'con', 'co']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -104,7 +104,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -126,7 +126,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -162,7 +162,7 @@ name enclosed in quotes:</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -181,7 +181,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['qu', 'q']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'qu']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -207,7 +207,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'qu q', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n We maintain a different version of the `quit` command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n We maintain a different version of the `quit` command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -226,7 +226,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -252,7 +252,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -270,7 +270,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -296,7 +296,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -296,7 +296,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdRecog.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['recognize', 'forget']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['forget', 'recognize']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -828,7 +828,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdRecog.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'recognize forget', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'forget recognize', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ such as when closing the lid and un-blinding a character.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['push', 'press button', 'press']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['press', 'press button', 'push']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -108,7 +108,7 @@ check if the lid is open or closed.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press press button push', 'category': 'general', 'key': 'push button', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidClosed.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -178,7 +178,7 @@ check if the lid is open or closed.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['smash', 'break lid', 'smash lid']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['break lid', 'smash', 'smash lid']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -205,7 +205,7 @@ break.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'smash break lid smash lid', 'category': 'general', 'key': 'smash glass', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'break lid smash smash lid', 'category': 'general', 'key': 'smash glass', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -305,7 +305,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['push', 'press button', 'press']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['press', 'press button', 'push']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -334,7 +334,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press press button push', 'category': 'general', 'key': 'push button', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdPushLidOpen.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -432,7 +432,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel', 'examine', 'get', 'l', 'ex', 'listen']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['examine', 'listen', 'get', 'l', 'feel', 'ex']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -458,7 +458,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel examine get l ex listen', 'category': 'general', 'key': 'look', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'examine listen get l feel ex', 'category': 'general', 'key': 'look', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ of the object. We overload it with our own version.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['burn', 'light']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['light', 'burn']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -388,7 +388,7 @@ to sit on a “lightable” object, we operate only on self.obj.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'burn light', 'category': 'tutorialworld', 'key': 'on', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'light burn', 'category': 'tutorialworld', 'key': 'on', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -492,7 +492,7 @@ shift green root up/down</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['push', 'pull', 'move', 'shiftroot']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pull', 'push', 'move', 'shiftroot']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -528,7 +528,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push pull move shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pull push move shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -545,7 +545,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['press button', 'push button', 'button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['push button', 'press button', 'button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -571,7 +571,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press button push button button', 'category': 'tutorialworld', 'key': 'press', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push button press button button', 'category': 'tutorialworld', 'key': 'press', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -715,7 +715,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['fight', 'parry', 'defend', 'hit', 'stab', 'thrust', 'bash', 'kill', 'pierce', 'slash', 'chop']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['chop', 'kill', 'stab', 'thrust', 'parry', 'defend', 'slash', 'hit', 'bash', 'pierce', 'fight']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -741,7 +741,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'fight parry defend hit stab thrust bash kill pierce slash chop', 'category': 'tutorialworld', 'key': 'attack', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chop kill stab thrust parry defend slash hit bash pierce fight', 'category': 'tutorialworld', 'key': 'attack', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ code except for adding in the details.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -199,7 +199,7 @@ code except for adding in the details.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -713,7 +713,7 @@ if they fall off the bridge.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -739,7 +739,7 @@ if they fall off the bridge.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -865,7 +865,7 @@ to find something.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel', 'feel around', 'l', 'fiddle', 'search']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel around', 'fiddle', 'l', 'feel', 'search']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -893,7 +893,7 @@ random chance of eventually finding a light source.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel feel around l fiddle search', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel around fiddle l feel search', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -67,13 +67,83 @@ change which actions by adding a path to</p>
|
|||
</div></blockquote>
|
||||
<p>in your settings. See utils.dummyrunner_actions.py
|
||||
for instructions on how to define this module.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">CmdDummyRunnerEchoResponse</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#CmdDummyRunnerEchoResponse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.commands.command.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||||
<p>Dummyrunner command measuring the round-about response time
|
||||
from sending to receiving a result.</p>
|
||||
<dl class="simple">
|
||||
<dt>Usage:</dt><dd><p>dummyrunner_echo_response <timestamp></p>
|
||||
</dd>
|
||||
<dt>Responds with</dt><dd><p>dummyrunner_echo_response:<timestamp>,<current_time></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The dummyrunner will send this and then compare the send time
|
||||
with the receive time on both ends.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key">
|
||||
<code class="sig-name descname">key</code><em class="property"> = 'dummyrunner_echo_response'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">
|
||||
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#CmdDummyRunnerEchoResponse.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This is the actual executing part of the command. It is
|
||||
called directly after self.parse(). See the docstring of this
|
||||
module for which object properties are available (beyond those
|
||||
set in self.parse())</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category">
|
||||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage">
|
||||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'dummyrunner_echo_response', 'tags': '', 'text': '\n Dummyrunner command measuring the round-about response time\n from sending to receiving a result.\n\n Usage:\n dummyrunner_echo_response <timestamp>\n\n Responds with\n dummyrunner_echo_response:<timestamp>,<current_time>\n\n The dummyrunner will send this and then compare the send time\n with the receive time on both ends.\n\n '}</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">DummyRunnerCmdSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cmdsetobj</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyRunnerCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.commands.cmdset.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||||
<p>Dummyrunner injected cmdset.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">
|
||||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyRunnerCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||||
class, and should take care of populating the cmdset by use of
|
||||
self.add().</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.server.profiling.dummyrunner.DummyRunnerCmdSet'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.server.profiling.dummyrunner.idcounter">
|
||||
<code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">idcounter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#idcounter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.idcounter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Makes unique ids.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>count (int)</em> – A globally unique counter.</p>
|
||||
<dd class="field-odd"><p><em>str</em> – A globally unique id.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -110,6 +180,11 @@ for instructions on how to define this module.</p>
|
|||
<p>Handles connection to a running Evennia server,
|
||||
mimicking a real account by sending commands on
|
||||
a timer.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyClient.report">
|
||||
<code class="sig-name descname">report</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">text</span></em>, <em class="sig-param"><span class="n">clientkey</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyClient.report"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyClient.report" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyClient.connectionMade">
|
||||
<code class="sig-name descname">connectionMade</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyClient.connectionMade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyClient.connectionMade" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -180,13 +255,28 @@ all “intelligence” of the dummy client.</p>
|
|||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">DummyFactory</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">actions</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.internet.protocol.ClientFactory</span></code></p>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.internet.protocol.ReconnectingClientFactory</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.protocol">
|
||||
<code class="sig-name descname">protocol</code><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.protocol" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="#evennia.server.profiling.dummyrunner.DummyClient" title="evennia.server.profiling.dummyrunner.DummyClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">DummyClient</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.initialDelay">
|
||||
<code class="sig-name descname">initialDelay</code><em class="property"> = 1</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.initialDelay" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.maxDelay">
|
||||
<code class="sig-name descname">maxDelay</code><em class="property"> = 1</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.maxDelay" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.noisy">
|
||||
<code class="sig-name descname">noisy</code><em class="property"> = False</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.noisy" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">actions</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyFactory.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@
|
|||
the actions available to dummy accounts.</p>
|
||||
<p>The settings are global variables:</p>
|
||||
<ul class="simple">
|
||||
<li><p>TIMESTEP - time in seconds between each ‘tick’</p></li>
|
||||
<li><p>CHANCE_OF_ACTION - chance 0-1 of action happening</p></li>
|
||||
<li><p>CHANCE_OF_LOGIN - chance 0-1 of login happening</p></li>
|
||||
<li><p>TIMESTEP - time in seconds between each ‘tick’. 1 is a good start.</p></li>
|
||||
<li><p>CHANCE_OF_ACTION - chance 0-1 of action happening. Default is 0.5.</p></li>
|
||||
<li><p>CHANCE_OF_LOGIN - chance 0-1 of login happening. 0.01 is a good number.</p></li>
|
||||
<li><p>TELNET_PORT - port to use, defaults to settings.TELNET_PORT</p></li>
|
||||
<li><p>ACTIONS - see below</p></li>
|
||||
</ul>
|
||||
|
|
@ -58,16 +58,15 @@ the actions available to dummy accounts.</p>
|
|||
chance of occurring given by CHANCE_OF_LOGIN. This function is usually
|
||||
responsible for logging in the account. The second entry is always
|
||||
called when the dummyrunner disconnects from the server and should
|
||||
thus issue a logout command. The other entries are tuples (chance,
|
||||
thus issue a logout command. The other entries are tuples (chance,
|
||||
func). They are picked randomly, their commonality based on the
|
||||
cumulative chance given (the chance is normalized between all options
|
||||
so if will still work also if the given chances don’t add up to 1).
|
||||
Since each function can return a list of game-command strings, each
|
||||
function may result in multiple operations.</p>
|
||||
so if will still work also if the given chances don’t add up to 1).</p>
|
||||
<p>The PROFILE variable define pre-made ACTION tuples for convenience.</p>
|
||||
<p>Each function should return an iterable of one or more command-call
|
||||
strings (like “look here”), so each can group multiple command operations.</p>
|
||||
<p>An action-function is called with a “client” argument which is a
|
||||
reference to the dummy client currently performing the action. It
|
||||
returns a string or a list of command strings to execute. Use the
|
||||
client object for optionally saving data between actions.</p>
|
||||
reference to the dummy client currently performing the action.</p>
|
||||
<p>The client object has the following relevant properties and methods:</p>
|
||||
<ul class="simple">
|
||||
<li><p>key - an optional client key. This is only used for dummyrunner output.
|
||||
|
|
@ -170,6 +169,16 @@ commands (such as creating an account and logging in).</p>
|
|||
<dd><p>move through south exit if available</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.server.profiling.dummyrunner_settings.c_measure_lag">
|
||||
<code class="sig-prename descclassname">evennia.server.profiling.dummyrunner_settings.</code><code class="sig-name descname">c_measure_lag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">client</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner_settings.html#c_measure_lag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner_settings.c_measure_lag" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Special dummyrunner command, injected in c_login. It measures
|
||||
response time. Including this in the ACTION tuple will give more
|
||||
dummyrunner output about just how fast commands are being processed.</p>
|
||||
<p>The dummyrunner will treat this special and inject the
|
||||
{timestamp} just before sending.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ caches for automatic key eviction and persistence configurability.</p>
|
|||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<em>str</em>) – Name of this throttle.</p></li>
|
||||
<li><p><strong>limit</strong> (<em>int</em>) – Max number of failures before imposing limiter</p></li>
|
||||
<li><p><strong>limit</strong> (<em>int</em>) – Max number of failures before imposing limiter. If <strong>None</strong>,
|
||||
the throttle is disabled.</p></li>
|
||||
<li><p><strong>timeout</strong> (<em>int</em>) – number of timeout seconds after
|
||||
max number of tries has been reached.</p></li>
|
||||
<li><p><strong>cache_size</strong> (<em>int</em>) – Max number of attempts to record per IP within a
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ indentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':w', ':x', ':r', ':UU', '::', ':dd', ':uu', ':s', ':q!', ':y', ':fi', ':=', ':<', ':p', ':A', ':::', ':q', ':dw', ':h', ':i', ':', ':!', ':f', ':wq', ':I', ':u', ':S', ':fd', ':j', ':>', ':echo', ':DD']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['::', ':uu', ':r', ':x', ':I', ':UU', ':dd', ':y', ':', ':S', ':dw', ':h', ':<', ':::', ':A', ':!', ':s', ':fd', ':wq', ':j', ':fi', ':w', ':p', ':>', ':echo', ':=', ':i', ':u', ':DD', ':f', ':q!', ':q']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -302,7 +302,7 @@ efficient presentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':w :x :r :UU :: :dd :uu :s :q! :y :fi := :< :p :A ::: :q :dw :h :i : :! :f :wq :I :u :S :fd :j :> :echo :DD', 'category': 'general', 'key': ':editor_command_group', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':: :uu :r :x :I :UU :dd :y : :S :dw :h :< ::: :A :! :s :fd :wq :j :fi :w :p :> :echo := :i :u :DD :f :q! :q', 'category': 'general', 'key': ':editor_command_group', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -940,7 +940,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['no', 'n', 'yes', 'a', 'abort', '__nomatch_command', 'y']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['y', 'no', 'a', 'yes', 'abort', '__nomatch_command', 'n']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -966,7 +966,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'no n yes a abort __nomatch_command y', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'y no a yes abort __nomatch_command n', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['b', 'next', 'e', 'end', 'q', 'n', 'a', 'abort', 'top', 'quit', 't', 'back']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['next', 'end', 'b', 'quit', 'top', 'a', 't', 'abort', 'q', 'n', 'e', 'back']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -101,7 +101,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'b next e end q n a abort top quit t back', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'next end b quit top a t abort q n e back', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -961,6 +961,8 @@
|
|||
<li><a href="api/evennia.help.models.html#evennia.help.models.HelpEntry.aliases">(evennia.help.models.HelpEntry attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.aliases">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject.aliases">(evennia.typeclasses.models.TypedObject attribute)</a>
|
||||
</li>
|
||||
|
|
@ -1345,6 +1347,8 @@
|
|||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.DarkCmdSet.at_cmdset_creation">(evennia.contrib.tutorial_world.rooms.DarkCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.TutorialRoomCmdSet.at_cmdset_creation">(evennia.contrib.tutorial_world.rooms.TutorialRoomCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">(evennia.server.profiling.dummyrunner.DummyRunnerCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.EvEditorCmdSet.at_cmdset_creation">(evennia.utils.eveditor.EvEditorCmdSet method)</a>
|
||||
</li>
|
||||
|
|
@ -2084,6 +2088,8 @@
|
|||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_logout">c_logout() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_looks">c_looks() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_measure_lag">c_measure_lag() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves">c_moves() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
|
|
@ -2511,6 +2517,8 @@
|
|||
<li><a href="api/evennia.contrib.clothing.html#evennia.contrib.clothing.CmdDrop">(class in evennia.contrib.clothing)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">CmdDummyRunnerEchoResponse (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdEast">CmdEast (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase">CmdEditorBase (class in evennia.utils.eveditor)</a>
|
||||
|
|
@ -2608,11 +2616,11 @@
|
|||
<li><a href="api/evennia.commands.default.building.html#evennia.commands.default.building.CmdLock">CmdLock (class in evennia.commands.default.building)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.commands.default.general.html#evennia.commands.default.general.CmdLook">CmdLook (class in evennia.commands.default.general)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdLookBridge">CmdLookBridge (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdLookBridge">CmdLookBridge (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdLookDark">CmdLookDark (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.mail.html#evennia.contrib.mail.CmdMail">CmdMail (class in evennia.contrib.mail)</a>
|
||||
|
|
@ -3513,14 +3521,14 @@
|
|||
<li><a href="api/evennia.server.inputfuncs.html#evennia.server.inputfuncs.default">(in module evennia.server.inputfuncs)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.commands.default.building.html#evennia.commands.default.building.CmdDestroy.default_confirm">default_confirm (evennia.commands.default.building.CmdDestroy attribute)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="api/evennia.contrib.puzzles.html#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.default_confirm">(evennia.contrib.puzzles.CmdCreatePuzzleRecipe attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.utils.picklefield.html#evennia.utils.picklefield.PickledFormField.default_error_messages">default_error_messages (evennia.utils.picklefield.PickledFormField attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.accounts.accounts.html#evennia.accounts.accounts.DefaultAccount">DefaultAccount (class in evennia.accounts.accounts)</a>
|
||||
|
|
@ -3834,6 +3842,8 @@
|
|||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient">DummyClient (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">DummyFactory (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">DummyRunnerCmdSet (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.sessionhandler.html#evennia.server.sessionhandler.DummySession">DummySession (class in evennia.server.sessionhandler)</a>
|
||||
</li>
|
||||
|
|
@ -6035,6 +6045,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.func">(evennia.contrib.unixcommand.UnixCommand method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.func">(evennia.objects.objects.ExitCommand method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorGroup.func">(evennia.utils.eveditor.CmdEditorGroup method)</a>
|
||||
</li>
|
||||
|
|
@ -7053,6 +7065,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.help_category">(evennia.contrib.unixcommand.UnixCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.help_category">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.help_category">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -7257,6 +7271,8 @@
|
|||
<li><a href="api/evennia.server.portal.grapevine.html#evennia.server.portal.grapevine.RestartingWebsocketServerFactory.initialDelay">(evennia.server.portal.grapevine.RestartingWebsocketServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.irc.html#evennia.server.portal.irc.IRCBotFactory.initialDelay">(evennia.server.portal.irc.IRCBotFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.initialDelay">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.contrib.turnbattle.tb_basic.html#evennia.contrib.turnbattle.tb_basic.TBBasicTurnHandler.initialize_for_combat">initialize_for_combat() (evennia.contrib.turnbattle.tb_basic.TBBasicTurnHandler method)</a>
|
||||
|
|
@ -7977,6 +7993,8 @@
|
|||
<li><a href="api/evennia.server.portal.amp.html#evennia.server.portal.amp.MsgServer2Portal.key">(evennia.server.portal.amp.MsgServer2Portal attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.amp.html#evennia.server.portal.amp.MsgStatus.key">(evennia.server.portal.amp.MsgStatus attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.key">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -8607,6 +8625,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.lock_storage">(evennia.contrib.unixcommand.UnixCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.lock_storage">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.lock_storage">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -9105,6 +9125,8 @@
|
|||
<li><a href="api/evennia.server.portal.grapevine.html#evennia.server.portal.grapevine.RestartingWebsocketServerFactory.maxDelay">(evennia.server.portal.grapevine.RestartingWebsocketServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.irc.html#evennia.server.portal.irc.IRCBotFactory.maxDelay">(evennia.server.portal.irc.IRCBotFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.maxDelay">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestHelp.maxDiff">maxDiff (evennia.commands.default.tests.TestHelp attribute)</a>
|
||||
|
|
@ -9940,6 +9962,8 @@
|
|||
<li><a href="api/evennia.server.portal.ssh.html#evennia.server.portal.ssh.TerminalSessionTransport_getPeer.noisy">(evennia.server.portal.ssh.TerminalSessionTransport_getPeer attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.telnet.html#evennia.server.portal.telnet.TelnetServerFactory.noisy">(evennia.server.portal.telnet.TelnetServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.noisy">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.webserver.html#evennia.server.webserver.Website.noisy">(evennia.server.webserver.Website attribute)</a>
|
||||
</li>
|
||||
|
|
@ -10462,6 +10486,8 @@
|
|||
<li><a href="api/evennia.scripts.scripts.html#evennia.scripts.scripts.Store.path">(evennia.scripts.scripts.Store attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.models.html#evennia.server.models.ServerConfig.path">(evennia.server.models.ServerConfig attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path">(evennia.server.profiling.dummyrunner.DummyRunnerCmdSet attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.memplot.html#evennia.server.profiling.memplot.Memplot.path">(evennia.server.profiling.memplot.Memplot attribute)</a>
|
||||
</li>
|
||||
|
|
@ -10987,6 +11013,8 @@
|
|||
<li><a href="api/evennia.utils.evtable.html#evennia.utils.evtable.EvCell.replace_data">replace_data() (evennia.utils.evtable.EvCell method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.extended_room.html#evennia.contrib.extended_room.ExtendedRoom.replace_timeslots">replace_timeslots() (evennia.contrib.extended_room.ExtendedRoom method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.report">report() (evennia.server.profiling.dummyrunner.DummyClient method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.ssh.html#evennia.server.portal.ssh.AccountDBPasswordChecker.requestAvatarId">requestAvatarId() (evennia.server.portal.ssh.AccountDBPasswordChecker method)</a>
|
||||
</li>
|
||||
|
|
@ -11752,6 +11780,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.search_index_entry">(evennia.contrib.unixcommand.UnixCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.search_index_entry">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.search_index_entry">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: e0bc497724c2b3b18c21a70ff6a5e373
|
||||
config: 6c95c9d81767e3a1ec6e070261720226
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
|||
|
|
@ -43,23 +43,26 @@
|
|||
<p><em>This is considered an advanced topic mainly of interest to server developers.</em></p>
|
||||
<section id="introduction">
|
||||
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Sometimes it can be useful to try to determine just how efficient a particular piece of code is, or
|
||||
to figure out if one could speed up things more than they are. There are many ways to test the
|
||||
performance of Python and the running server.</p>
|
||||
<p>Before digging into this section, remember Donald Knuth’s <a class="reference external" href="https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize">words of
|
||||
wisdom</a>:</p>
|
||||
<p>Sometimes it can be useful to try to determine just how efficient a particular
|
||||
piece of code is, or to figure out if one could speed up things more than they
|
||||
are. There are many ways to test the performance of Python and the running
|
||||
server.</p>
|
||||
<p>Before digging into this section, remember Donald Knuth’s
|
||||
<a class="reference external" href="https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize">words of wisdom</a>:</p>
|
||||
<blockquote>
|
||||
<div><p><em>[…]about 97% of the time: Premature optimization is the root of all evil</em>.</p>
|
||||
</div></blockquote>
|
||||
<p>That is, don’t start to try to optimize your code until you have actually identified a need to do
|
||||
so. This means your code must actually be working before you start to consider optimization.
|
||||
Optimization will also often make your code more complex and harder to read. Consider readability
|
||||
and maintainability and you may find that a small gain in speed is just not worth it.</p>
|
||||
<p>That is, don’t start to try to optimize your code until you have actually
|
||||
identified a need to do so. This means your code must actually be working before
|
||||
you start to consider optimization. Optimization will also often make your code
|
||||
more complex and harder to read. Consider readability and maintainability and
|
||||
you may find that a small gain in speed is just not worth it.</p>
|
||||
</section>
|
||||
<section id="simple-timer-tests">
|
||||
<h2>Simple timer tests<a class="headerlink" href="#simple-timer-tests" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Python’s <code class="docutils literal notranslate"><span class="pre">timeit</span></code> module is very good for testing small things. For example, in order to test if it
|
||||
is faster to use a <code class="docutils literal notranslate"><span class="pre">for</span></code> loop or a list comprehension you could use the following code:</p>
|
||||
<p>Python’s <code class="docutils literal notranslate"><span class="pre">timeit</span></code> module is very good for testing small things. For example, in
|
||||
order to test if it is faster to use a <code class="docutils literal notranslate"><span class="pre">for</span></code> loop or a list comprehension you
|
||||
could use the following code:</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>
|
||||
|
|
@ -75,87 +78,251 @@ is faster to use a <code class="docutils literal notranslate"><span class="pre">
|
|||
<span class="o"><<<</span> <span class="mf">5.358283996582031</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">setup</span></code> keyword is used to set up things that should not be included in the time measurement,
|
||||
like <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">[]</span></code> in the first call.</p>
|
||||
<p>By default the <code class="docutils literal notranslate"><span class="pre">timeit</span></code> function will re-run the given test 1000000 times and returns the <em>total
|
||||
time</em> to do so (so <em>not</em> the average per test). A hint is to not use this default for testing
|
||||
something that includes database writes - for that you may want to use a lower number of repeats
|
||||
(say 100 or 1000) using the <code class="docutils literal notranslate"><span class="pre">number=100</span></code> keyword.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">setup</span></code> keyword is used to set up things that should not be included in the
|
||||
time measurement, like <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">[]</span></code> in the first call.</p>
|
||||
<p>By default the <code class="docutils literal notranslate"><span class="pre">timeit</span></code> function will re-run the given test 1000000 times and
|
||||
returns the <em>total time</em> to do so (so <em>not</em> the average per test). A hint is to
|
||||
not use this default for testing something that includes database writes - for
|
||||
that you may want to use a lower number of repeats (say 100 or 1000) using the
|
||||
<code class="docutils literal notranslate"><span class="pre">number=100</span></code> keyword.</p>
|
||||
</section>
|
||||
<section id="using-cprofile">
|
||||
<h2>Using cProfile<a class="headerlink" href="#using-cprofile" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Python comes with its own profiler, named cProfile (this is for cPython, no tests have been done
|
||||
with <code class="docutils literal notranslate"><span class="pre">pypy</span></code> at this point). Due to the way Evennia’s processes are handled, there is no point in
|
||||
using the normal way to start the profiler (<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">cProfile</span> <span class="pre">evennia.py</span></code>). Instead you start the
|
||||
profiler through the launcher:</p>
|
||||
<p>Python comes with its own profiler, named cProfile (this is for cPython, no
|
||||
tests have been done with <code class="docutils literal notranslate"><span class="pre">pypy</span></code> at this point). Due to the way Evennia’s
|
||||
processes are handled, there is no point in using the normal way to start the
|
||||
profiler (<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">cProfile</span> <span class="pre">evennia.py</span></code>). Instead you start the profiler
|
||||
through the launcher:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">evennia</span> <span class="o">--</span><span class="n">profiler</span> <span class="n">start</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will start Evennia with the Server component running (in daemon mode) under cProfile. You could
|
||||
instead try <code class="docutils literal notranslate"><span class="pre">--profile</span></code> with the <code class="docutils literal notranslate"><span class="pre">portal</span></code> argument to profile the Portal (you would then need to
|
||||
<p>This will start Evennia with the Server component running (in daemon mode) under
|
||||
cProfile. You could instead try <code class="docutils literal notranslate"><span class="pre">--profile</span></code> with the <code class="docutils literal notranslate"><span class="pre">portal</span></code> argument to
|
||||
profile the Portal (you would then need to
|
||||
<a class="reference internal" href="../Setup/Start-Stop-Reload.html"><span class="doc">start the Server separately</span></a>).</p>
|
||||
<p>Please note that while the profiler is running, your process will use a lot more memory than usual.
|
||||
Memory usage is even likely to climb over time. So don’t leave it running perpetually but monitor it
|
||||
carefully (for example using the <code class="docutils literal notranslate"><span class="pre">top</span></code> command on Linux or the Task Manager’s memory display on
|
||||
Windows).</p>
|
||||
<p>Once you have run the server for a while, you need to stop it so the profiler can give its report.
|
||||
Do <em>not</em> kill the program from your task manager or by sending it a kill signal - this will most
|
||||
likely also mess with the profiler. Instead either use <code class="docutils literal notranslate"><span class="pre">evennia.py</span> <span class="pre">stop</span></code> or (which may be even
|
||||
better), use <code class="docutils literal notranslate"><span class="pre">@shutdown</span></code> from inside the game.</p>
|
||||
<p>Once the server has fully shut down (this may be a lot slower than usual) you will find that
|
||||
profiler has created a new file <code class="docutils literal notranslate"><span class="pre">mygame/server/logs/server.prof</span></code>.</p>
|
||||
</section>
|
||||
<p>Please note that while the profiler is running, your process will use a lot more
|
||||
memory than usual. Memory usage is even likely to climb over time. So don’t
|
||||
leave it running perpetually but monitor it carefully (for example using the
|
||||
<code class="docutils literal notranslate"><span class="pre">top</span></code> command on Linux or the Task Manager’s memory display on Windows).</p>
|
||||
<p>Once you have run the server for a while, you need to stop it so the profiler
|
||||
can give its report. Do <em>not</em> kill the program from your task manager or by
|
||||
sending it a kill signal - this will most likely also mess with the profiler.
|
||||
Instead either use <code class="docutils literal notranslate"><span class="pre">evennia.py</span> <span class="pre">stop</span></code> or (which may be even better), use
|
||||
<code class="docutils literal notranslate"><span class="pre">@shutdown</span></code> from inside the game.</p>
|
||||
<p>Once the server has fully shut down (this may be a lot slower than usual) you
|
||||
will find that profiler has created a new file <code class="docutils literal notranslate"><span class="pre">mygame/server/logs/server.prof</span></code>.</p>
|
||||
<section id="analyzing-the-profile">
|
||||
<h2>Analyzing the profile<a class="headerlink" href="#analyzing-the-profile" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">server.prof</span></code> file is a binary file. There are many ways to analyze and display its contents,
|
||||
all of which has only been tested in Linux (If you are a Windows/Mac user, let us know what works).</p>
|
||||
<p>We recommend the
|
||||
<a class="reference external" href="http://www.vrplumber.com/programming/runsnakerun/">Runsnake</a> visualizer to see the processor usage
|
||||
of different processes in a graphical form. For more detailed listing of usage time, you can use
|
||||
<a class="reference external" href="http://kcachegrind.sourceforge.net/html/Home.html">KCachegrind</a>. To make KCachegrind work with
|
||||
Python profiles you also need the wrapper script
|
||||
<a class="reference external" href="https://pypi.python.org/pypi/pyprof2calltree/">pyprof2calltree</a>. You can get pyprof2calltree via
|
||||
<code class="docutils literal notranslate"><span class="pre">pip</span></code> whereas KCacheGrind is something you need to get via your package manager or their homepage.</p>
|
||||
<p>How to analyze and interpret profiling data is not a trivial issue and depends on what you are
|
||||
profiling for. Evennia being an asynchronous server can also confuse profiling. Ask on the mailing
|
||||
list if you need help and be ready to be able to supply your <code class="docutils literal notranslate"><span class="pre">server.prof</span></code> file for comparison,
|
||||
along with the exact conditions under which it was obtained.</p>
|
||||
<h3>Analyzing the profile<a class="headerlink" href="#analyzing-the-profile" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">server.prof</span></code> file is a binary file. There are many ways to analyze and
|
||||
display its contents, all of which has only been tested in Linux (If you are a
|
||||
Windows/Mac user, let us know what works).</p>
|
||||
<p>You can look at the contents of the profile file with Python’s in-built <code class="docutils literal notranslate"><span class="pre">pstats</span></code>
|
||||
module in the evennia shell (it’s recommended you install <code class="docutils literal notranslate"><span class="pre">ipython</span></code> with <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">ipython</span></code> in your virtualenv first, for prettier output):</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">evennia</span> <span class="n">shell</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then in the shell</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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pstats</span>
|
||||
<span class="kn">from</span> <span class="nn">pstats</span> <span class="kn">import</span> <span class="n">SortKey</span>
|
||||
|
||||
<span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'server/log/server.prof'</span><span class="p">)</span>
|
||||
<span class="n">p</span><span class="o">.</span><span class="n">strip_dirs</span><span class="p">()</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>See the
|
||||
<a class="reference external" href="https://docs.python.org/3/library/profile.html#instant-user-s-manual">Python profiling documentation</a>
|
||||
for more information.</p>
|
||||
<p>You can also visualize the data in various ways.</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://pypi.org/project/RunSnakeRun/">Runsnake</a> visualizes the profile to
|
||||
give a good overview. Install with <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">runsnakerun</span></code>. Note that this
|
||||
may require a C compiler and be quite slow to install.</p></li>
|
||||
<li><p>For more detailed listing of usage time, you can use
|
||||
<a class="reference external" href="http://kcachegrind.sourceforge.net/html/Home.html">KCachegrind</a>. To make
|
||||
KCachegrind work with Python profiles you also need the wrapper script
|
||||
<a class="reference external" href="https://pypi.python.org/pypi/pyprof2calltree/">pyprof2calltree</a>. You can get
|
||||
<code class="docutils literal notranslate"><span class="pre">pyprof2calltree</span></code> via <code class="docutils literal notranslate"><span class="pre">pip</span></code> whereas KCacheGrind is something you need to get
|
||||
via your package manager or their homepage.</p></li>
|
||||
</ul>
|
||||
<p>How to analyze and interpret profiling data is not a trivial issue and depends
|
||||
on what you are profiling for. Evennia being an asynchronous server can also
|
||||
confuse profiling. Ask on the mailing list if you need help and be ready to be
|
||||
able to supply your <code class="docutils literal notranslate"><span class="pre">server.prof</span></code> file for comparison, along with the exact
|
||||
conditions under which it was obtained.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="the-dummyrunner">
|
||||
<h2>The Dummyrunner<a class="headerlink" href="#the-dummyrunner" title="Permalink to this headline">¶</a></h2>
|
||||
<p>It is difficult to test “actual” game performance without having players in your game. For this
|
||||
reason Evennia comes with the <em>Dummyrunner</em> system. The Dummyrunner is a stress-testing system: a
|
||||
separate program that logs into your game with simulated players (aka “bots” or “dummies”). Once
|
||||
connected these dummies will semi-randomly perform various tasks from a list of possible actions.
|
||||
Use <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code> to stop the Dummyrunner.</p>
|
||||
<blockquote>
|
||||
<div><p>Warning: You should not run the Dummyrunner on a production database. It will spawn many objects
|
||||
and also needs to run with general permissions.</p>
|
||||
</div></blockquote>
|
||||
<p>To launch the Dummyrunner, first start your server normally (with or without profiling, as above).
|
||||
Then start a new terminal/console window and active your virtualenv there too. In the new terminal,
|
||||
try to connect 10 dummy players:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">evennia</span> <span class="o">--</span><span class="n">dummyrunner</span> <span class="mi">10</span>
|
||||
<p>It is difficult to test “actual” game performance without having players in your
|
||||
game. For this reason Evennia comes with the <em>Dummyrunner</em> system. The
|
||||
Dummyrunner is a stress-testing system: a separate program that logs into your
|
||||
game with simulated players (aka “bots” or “dummies”). Once connected, these
|
||||
dummies will semi-randomly perform various tasks from a list of possible
|
||||
actions. Use <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code> to stop the Dummyrunner.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>You should not run the Dummyrunner on a production database. It
|
||||
will spawn many objects and also needs to run with general permissions.</p>
|
||||
</div>
|
||||
<p>This is the recommended process for using the dummy runner:</p>
|
||||
<ol>
|
||||
<li><p>Stop your server completely with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">stop</span></code>.</p></li>
|
||||
<li><p>At <em>the end</em> of your <code class="docutils literal notranslate"><span class="pre">mygame/server/conf.settings.py</span></code> file, add the line</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="kn">from</span> <span class="nn">evennia.server.profiling.settings_mixin</span> <span class="kn">import</span> <span class="o">*</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The first time you do this you will most likely get a warning from Dummyrunner. It will tell you to
|
||||
copy an import string to the end of your settings file. Quit the Dummyrunner (<code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code>) and follow
|
||||
the instructions. Restart Evennia and try <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--dummyrunner</span> <span class="pre">10</span></code> again. Make sure to remove that
|
||||
extra settings line when running a public server.</p>
|
||||
<p>The actions perform by the dummies is controlled by a settings file. The default Dummyrunner
|
||||
settings file is <code class="docutils literal notranslate"><span class="pre">evennia/server/server/profiling/dummyrunner_settings.py</span></code> but you shouldn’t modify
|
||||
this directly. Rather create/copy the default file to <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/</span></code> and modify it there. To
|
||||
make sure to use your file over the default, add the following line to your settings file:</p>
|
||||
<div class="highlight-python 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="n">DUMMYRUNNER_SETTINGS_MODULE</span> <span class="o">=</span> <span class="s2">"server/conf/dummyrunner_settings.py"</span>
|
||||
<p>This will override your settings and disable Evennia’s rate limiters and
|
||||
DoS-protections, which would otherwise block mass-connecting clients from
|
||||
one IP. Notably, it will also change to a different (faster) password hasher.</p>
|
||||
</li>
|
||||
<li><p>(recommended): Build a new database. If you use default Sqlite3 and want to
|
||||
keep your existing database, just rename <code class="docutils literal notranslate"><span class="pre">mygame/server/evennia.db3</span></code> to
|
||||
<code class="docutils literal notranslate"><span class="pre">mygame/server/evennia.db3_backup</span></code> and run <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">migrate</span></code> and <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span></code> to create a new superuser as usual.</p></li>
|
||||
<li><p>(recommended) Log into the game as your superuser. This is just so you
|
||||
can manually check response. If you kept an old database, you will <em>not</em>
|
||||
be able to connect with an <em>existing</em> user since the password hasher changed!</p></li>
|
||||
<li><p>Start the dummyrunner with 10 dummy users from the terminal with</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">evennia</span> <span class="o">--</span><span class="n">dummyrunner</span> <span class="mi">10</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code> (or <code class="docutils literal notranslate"><span class="pre">Cmd-C</span></code>) to stop it.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>If you want to see what the dummies are actually doing you can run with a single
|
||||
dummy:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">evennia</span> <span class="o">--</span><span class="n">dummyrunner</span> <span class="mi">1</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The inputs/outputs from the dummy will then be printed. By default the runner
|
||||
uses the ‘looker’ profile, which just logs in and sends the ‘look’ command
|
||||
over and over. To change the settings, copy the file
|
||||
<code class="docutils literal notranslate"><span class="pre">evennia/server/profiling/dummyrunner_settings.py</span></code> to your <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/</span></code>
|
||||
directory, then add this line to your settings file to use it in the new
|
||||
location:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DUMMYRUNNER_SETTINGS_MODULE</span> <span class="o">=</span> <span class="s2">"server/conf/dummyrunner_settings.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The dummyrunner settings file is a python code module in its own right - it
|
||||
defines the actions available to the dummies. These are just tuples of command
|
||||
strings (like “look here”) for the dummy to send to the server along with a
|
||||
probability of them happening. The dummyrunner looks for a global variable
|
||||
<code class="docutils literal notranslate"><span class="pre">ACTIONS</span></code>, a list of tuples, where the first two elements define the
|
||||
commands for logging in/out of the server.</p>
|
||||
<p>Below is a simplified minimal setup (the default settings file adds a lot more
|
||||
functionality and info):</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>
|
||||
<span class="normal">24</span>
|
||||
<span class="normal">25</span>
|
||||
<span class="normal">26</span>
|
||||
<span class="normal">27</span>
|
||||
<span class="normal">28</span>
|
||||
<span class="normal">29</span>
|
||||
<span class="normal">30</span>
|
||||
<span class="normal">31</span>
|
||||
<span class="normal">32</span>
|
||||
<span class="normal">33</span>
|
||||
<span class="normal">34</span>
|
||||
<span class="normal">35</span>
|
||||
<span class="normal">36</span>
|
||||
<span class="normal">37</span>
|
||||
<span class="normal">38</span>
|
||||
<span class="normal">39</span>
|
||||
<span class="normal">40</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># minimal dummyrunner setup file</span>
|
||||
|
||||
<span class="c1"># Time between each dummyrunner "tick", in seconds. Each dummy will be called</span>
|
||||
<span class="c1"># with this frequency.</span>
|
||||
<span class="n">TIMESTEP</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="c1"># Chance of a dummy actually performing an action on a given tick. This</span>
|
||||
<span class="c1"># spreads out usage randomly, like it would be in reality.</span>
|
||||
<span class="n">CHANCE_OF_ACTION</span> <span class="o">=</span> <span class="mf">0.5</span>
|
||||
|
||||
<span class="c1"># Chance of a currently unlogged-in dummy performing its login action every</span>
|
||||
<span class="c1"># tick. This emulates not all accounts logging in at exactly the same time.</span>
|
||||
<span class="n">CHANCE_OF_LOGIN</span> <span class="o">=</span> <span class="mf">0.01</span>
|
||||
|
||||
<span class="c1"># Which telnet port to connect to. If set to None, uses the first default</span>
|
||||
<span class="c1"># telnet port of the running server.</span>
|
||||
<span class="n">TELNET_PORT</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
|
||||
<span class="c1"># actions</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">c_login</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="n">name</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"Character-</span><span class="si">{</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="n">pwd</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"23fwsf23sdfw23wef23"</span>
|
||||
<span class="k">return</span> <span class="p">(</span>
|
||||
<span class="sa">f</span><span class="s2">"create </span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">pwd</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="sa">f</span><span class="s2">"connect </span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">pwd</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">c_logout</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"quit"</span><span class="p">,</span> <span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">c_look</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"look here"</span><span class="p">,</span> <span class="s2">"look me"</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># this is read by dummyrunner.</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="n">c_look</span><span class="p">)</span> <span class="c1"># (probability, command-generator)</span>
|
||||
<span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<blockquote>
|
||||
<div><p>Hint: Don’t start with too many dummies. The Dummyrunner defaults to taxing the server much more
|
||||
intensely than an equal number of human players. A good dummy number to start with is 10-100.</p>
|
||||
</div></blockquote>
|
||||
<p>Once you have the dummyrunner running, stop it with <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code>.</p>
|
||||
<p>Generally, the dummyrunner system makes for a decent test of general performance; but it is of
|
||||
course hard to actually mimic human user behavior. For this, actual real-game testing is required.</p>
|
||||
<p>At the bottom of the default file are a few default profiles you can test out
|
||||
by just setting the <code class="docutils literal notranslate"><span class="pre">PROFILE</span></code> variable to one of the options.</p>
|
||||
<section id="dummyrunner-hints">
|
||||
<h3>Dummyrunner hints<a class="headerlink" href="#dummyrunner-hints" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><p>Don’t start with too many dummies. The Dummyrunner taxes the server much more
|
||||
than ‘real’ users tend to do. Start with 10-100 to begin with.</p></li>
|
||||
<li><p>Stress-testing can be fun, but also consider what a ‘realistic’ number of
|
||||
users would be for your game.</p></li>
|
||||
<li><p>Note in the dummyrunner output how many commands/s are being sent to the
|
||||
server by all dummies. This is usually a lot higher than what you’d
|
||||
realistically expect to see from the same number of users.</p></li>
|
||||
<li><p>The default settings sets up a ‘lag’ measure to measaure the round-about
|
||||
message time. It updates with an average every 30 seconds. It can be worth to
|
||||
have this running for a small number of dummies in one terminal before adding
|
||||
more by starting another dummyrunner in another terminal - the first one will
|
||||
act as a measure of how lag changes with different loads. Also verify the
|
||||
lag-times by entering commands manually in-game.</p></li>
|
||||
<li><p>Check the CPU usage of your server using <code class="docutils literal notranslate"><span class="pre">top/htop</span></code> (linux). In-game, use the
|
||||
<code class="docutils literal notranslate"><span class="pre">server</span></code> command.</p></li>
|
||||
<li><p>You can run the server with <code class="docutils literal notranslate"><span class="pre">--profiler</span> <span class="pre">start</span></code> to test it with dummies. Note
|
||||
that the profiler will itself affect server performance, especially memory
|
||||
consumption.</p></li>
|
||||
<li><p>Generally, the dummyrunner system makes for a decent test of general
|
||||
performance; but it is of course hard to actually mimic human user behavior.
|
||||
For this, actual real-game testing is required.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
|
@ -184,9 +351,14 @@ course hard to actually mimic human user behavior. For this, actual real-game te
|
|||
<li><a class="reference internal" href="#">Profiling</a><ul>
|
||||
<li><a class="reference internal" href="#introduction">Introduction</a></li>
|
||||
<li><a class="reference internal" href="#simple-timer-tests">Simple timer tests</a></li>
|
||||
<li><a class="reference internal" href="#using-cprofile">Using cProfile</a></li>
|
||||
<li><a class="reference internal" href="#using-cprofile">Using cProfile</a><ul>
|
||||
<li><a class="reference internal" href="#analyzing-the-profile">Analyzing the profile</a></li>
|
||||
<li><a class="reference internal" href="#the-dummyrunner">The Dummyrunner</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#the-dummyrunner">The Dummyrunner</a><ul>
|
||||
<li><a class="reference internal" href="#dummyrunner-hints">Dummyrunner hints</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ bar Hello again!
|
|||
</div>
|
||||
<p>And even remove the default one if they don’t want to use it</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">channel</span><span class="o">/</span><span class="n">unalias</span> <span class="n">public</span>
|
||||
<span class="n">public</span> <span class="n">Hello</span>
|
||||
<span class="n">public</span> <span class="n">Hello</span> <span class="p">(</span><span class="n">gives</span> <span class="n">a</span> <span class="n">command</span><span class="o">-</span><span class="ow">not</span><span class="o">-</span><span class="n">found</span> <span class="n">error</span> <span class="n">now</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>But you can also use your alias with the <code class="docutils literal notranslate"><span class="pre">channel</span></code> command:</p>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@
|
|||
<span class="c1"># Portal-SessionHandler class</span>
|
||||
<span class="c1"># -------------------------------------------------------------</span>
|
||||
|
||||
<span class="n">DOS_PROTECTION_MSG</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s2">"</span><span class="si">{servername}</span><span class="s2"> DoS protection is active. You are queued to connect in </span><span class="si">{num}</span><span class="s2"> seconds ..."</span><span class="p">)</span>
|
||||
<span class="n">DOS_PROTECTION_MSG</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s2">"</span><span class="si">{servername}</span><span class="s2"> DoS protection is active."</span>
|
||||
<span class="s2">"You are queued to connect in </span><span class="si">{num}</span><span class="s2"> seconds ..."</span><span class="p">)</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="PortalSessionHandler"><a class="viewcode-back" href="../../../../api/evennia.server.portal.portalsessionhandler.html#evennia.server.portal.portalsessionhandler.PortalSessionHandler">[docs]</a><span class="k">class</span> <span class="nc">PortalSessionHandler</span><span class="p">(</span><span class="n">SessionHandler</span><span class="p">):</span>
|
||||
|
|
|
|||
|
|
@ -82,8 +82,16 @@
|
|||
<span class="kn">from</span> <span class="nn">twisted.internet</span> <span class="kn">import</span> <span class="n">reactor</span><span class="p">,</span> <span class="n">protocol</span>
|
||||
<span class="kn">from</span> <span class="nn">twisted.internet.task</span> <span class="kn">import</span> <span class="n">LoopingCall</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">time_format</span>
|
||||
<span class="kn">import</span> <span class="nn">django</span>
|
||||
<span class="n">django</span><span class="o">.</span><span class="n">setup</span><span class="p">()</span>
|
||||
<span class="kn">import</span> <span class="nn">evennia</span> <span class="c1"># noqa</span>
|
||||
<span class="n">evennia</span><span class="o">.</span><span class="n">_init</span><span class="p">()</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">time_format</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.command</span> <span class="kn">import</span> <span class="n">Command</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.cmdset</span> <span class="kn">import</span> <span class="n">CmdSet</span> <span class="c1"># noqa</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.ansi</span> <span class="kn">import</span> <span class="n">strip_ansi</span> <span class="c1"># noqa</span>
|
||||
|
||||
<span class="c1"># Load the dummyrunner settings module</span>
|
||||
|
||||
|
|
@ -93,8 +101,10 @@
|
|||
<span class="s2">"Error: Dummyrunner could not find settings file at </span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="o">%</span> <span class="n">settings</span><span class="o">.</span><span class="n">DUMMYRUNNER_SETTINGS_MODULE</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">IDMAPPER_CACHE_MAXSIZE</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">IDMAPPER_CACHE_MAXSIZE</span>
|
||||
|
||||
<span class="n">DATESTRING</span> <span class="o">=</span> <span class="s2">"%Y%m</span><span class="si">%d</span><span class="s2">%H%M%S"</span>
|
||||
<span class="n">CLIENTS</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
|
||||
<span class="c1"># Settings</span>
|
||||
|
||||
|
|
@ -113,18 +123,37 @@
|
|||
<span class="c1"># Port to use, if not specified on command line</span>
|
||||
<span class="n">TELNET_PORT</span> <span class="o">=</span> <span class="n">DUMMYRUNNER_SETTINGS</span><span class="o">.</span><span class="n">TELNET_PORT</span> <span class="ow">or</span> <span class="n">settings</span><span class="o">.</span><span class="n">TELNET_PORTS</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">NCONNECTED</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has received a connection</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has seen the login screen (server responded)</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client starting login procedure</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># client has authenticated and logged in</span>
|
||||
|
||||
|
||||
<span class="c1"># Messages</span>
|
||||
<span class="c1"># time when all clients have logged_in</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="c1"># actions since all logged in</span>
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="c1"># lag per 30s for all logged in</span>
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
||||
|
||||
<span class="n">INFO_STARTING</span> <span class="o">=</span> <span class="s2">"""</span>
|
||||
<span class="s2"> Dummyrunner starting using </span><span class="si">{N}</span><span class="s2"> dummy account(s). If you don't see</span>
|
||||
<span class="s2"> Dummyrunner starting using </span><span class="si">{nclients}</span><span class="s2"> dummy account(s). If you don't see</span>
|
||||
<span class="s2"> any connection messages, make sure that the Evennia server is</span>
|
||||
<span class="s2"> running.</span>
|
||||
|
||||
<span class="s2"> Use Ctrl-C to stop/disconnect clients.</span>
|
||||
<span class="s2"> TELNET_PORT = </span><span class="si">{port}</span><span class="s2"></span>
|
||||
<span class="s2"> IDMAPPER_CACHE_MAXSIZE = </span><span class="si">{idmapper_cache_size}</span><span class="s2"> MB</span>
|
||||
<span class="s2"> TIMESTEP = </span><span class="si">{timestep}</span><span class="s2"> (rate </span><span class="si">{rate}</span><span class="s2">/s)</span>
|
||||
<span class="s2"> CHANCE_OF_LOGIN = </span><span class="si">{chance_of_login}</span><span class="s2">% per time step</span>
|
||||
<span class="s2"> CHANCE_OF_ACTION = </span><span class="si">{chance_of_action}</span><span class="s2">% per time step</span>
|
||||
<span class="s2"> -> avg rate (per client, after login): </span><span class="si">{avg_rate}</span><span class="s2"> cmds/s</span>
|
||||
<span class="s2"> -> total avg rate (after login): </span><span class="si">{avg_rate_total}</span><span class="s2"> cmds/s</span>
|
||||
|
||||
<span class="s2"> Use Ctrl-C (or Cmd-C) to stop/disconnect all clients.</span>
|
||||
|
||||
<span class="s2"> """</span>
|
||||
|
||||
<span class="n">ERROR_NO_MIXIN</span> <span class="o">=</span> <span class="s2">"""</span>
|
||||
|
|
@ -139,6 +168,7 @@
|
|||
<span class="s2"> to test all commands</span>
|
||||
<span class="s2"> - change PASSWORD_HASHERS to use a faster (but less safe) algorithm</span>
|
||||
<span class="s2"> when creating large numbers of accounts at the same time</span>
|
||||
<span class="s2"> - set LOGIN_THROTTLE/CREATION_THROTTLE=None to disable it</span>
|
||||
|
||||
<span class="s2"> If you don't want to use the custom settings of the mixin for some</span>
|
||||
<span class="s2"> reason, you can change their values manually after the import, or</span>
|
||||
|
|
@ -210,6 +240,39 @@
|
|||
|
||||
<span class="s2">"""</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="CmdDummyRunnerEchoResponse"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">[docs]</a><span class="k">class</span> <span class="nc">CmdDummyRunnerEchoResponse</span><span class="p">(</span><span class="n">Command</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Dummyrunner command measuring the round-about response time</span>
|
||||
<span class="sd"> from sending to receiving a result.</span>
|
||||
|
||||
<span class="sd"> Usage:</span>
|
||||
<span class="sd"> dummyrunner_echo_response <timestamp></span>
|
||||
|
||||
<span class="sd"> Responds with</span>
|
||||
<span class="sd"> dummyrunner_echo_response:<timestamp>,<current_time></span>
|
||||
|
||||
<span class="sd"> The dummyrunner will send this and then compare the send time</span>
|
||||
<span class="sd"> with the receive time on both ends.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">key</span> <span class="o">=</span> <span class="s2">"dummyrunner_echo_response"</span>
|
||||
|
||||
<div class="viewcode-block" id="CmdDummyRunnerEchoResponse.func"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">[docs]</a> <span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="c1"># returns (dummy_client_timestamp,current_time)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="sa">f</span><span class="s2">"dummyrunner_echo_response:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">args</span><span class="si">}</span><span class="s2">,</span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">caller</span><span class="o">.</span><span class="n">account</span><span class="o">.</span><span class="n">is_superuser</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"cmddummyrunner lag in: </span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="nb">float</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">args</span><span class="p">)</span><span class="si">}</span><span class="s2">s"</span><span class="p">)</span></div></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyRunnerCmdSet"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">[docs]</a><span class="k">class</span> <span class="nc">DummyRunnerCmdSet</span><span class="p">(</span><span class="n">CmdSet</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Dummyrunner injected cmdset.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<div class="viewcode-block" id="DummyRunnerCmdSet.at_cmdset_creation"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">[docs]</a> <span class="k">def</span> <span class="nf">at_cmdset_creation</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">CmdDummyRunnerEchoResponse</span><span class="p">())</span></div></div>
|
||||
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
<span class="c1"># Helper functions</span>
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
|
|
@ -223,12 +286,12 @@
|
|||
<span class="sd"> Makes unique ids.</span>
|
||||
|
||||
<span class="sd"> Returns:</span>
|
||||
<span class="sd"> count (int): A globally unique counter.</span>
|
||||
<span class="sd"> str: A globally unique id.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">ICOUNT</span>
|
||||
<span class="n">ICOUNT</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ICOUNT</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="s2">"</span><span class="si">{:03d}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">ICOUNT</span><span class="p">))</span></div>
|
||||
|
||||
|
||||
<span class="n">GCOUNT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
|
@ -244,7 +307,7 @@
|
|||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">GCOUNT</span>
|
||||
<span class="n">GCOUNT</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">return</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="n">GCOUNT</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">_</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="n">GCOUNT</span><span class="p">)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="makeiter"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.makeiter">[docs]</a><span class="k">def</span> <span class="nf">makeiter</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
|
||||
|
|
@ -264,7 +327,6 @@
|
|||
<span class="c1"># Client classes</span>
|
||||
<span class="c1"># ------------------------------------------------------------</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyClient"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient">[docs]</a><span class="k">class</span> <span class="nc">DummyClient</span><span class="p">(</span><span class="n">telnet</span><span class="o">.</span><span class="n">StatefulTelnetProtocol</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Handles connection to a running Evennia server,</span>
|
||||
|
|
@ -273,29 +335,80 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.report"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.report">[docs]</a> <span class="k">def</span> <span class="nf">report</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">clientkey</span><span class="p">):</span>
|
||||
<span class="n">pad</span> <span class="o">=</span> <span class="s2">" "</span> <span class="o">*</span> <span class="p">(</span><span class="mi">25</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">text</span><span class="p">))</span>
|
||||
<span class="n">tim</span> <span class="o">=</span> <span class="nb">round</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">connection_timestamp</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">text</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">clientkey</span><span class="si">}{</span><span class="n">pad</span><span class="si">}</span><span class="se">\t</span><span class="s2">"</span>
|
||||
<span class="sa">f</span><span class="s2">"conn: </span><span class="si">{</span><span class="n">NCONNECTED</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"welcome screen: </span><span class="si">{</span><span class="n">NLOGIN_SCREEN</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"authing: </span><span class="si">{</span><span class="n">NLOGGING_IN</span><span class="si">}</span><span class="s2"> -> "</span>
|
||||
<span class="sa">f</span><span class="s2">"loggedin/tot: </span><span class="si">{</span><span class="n">NLOGGED_IN</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">NCLIENTS</span><span class="si">}</span><span class="s2"> (after </span><span class="si">{</span><span class="n">tim</span><span class="si">}</span><span class="s2">s)"</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.connectionMade"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.connectionMade">[docs]</a> <span class="k">def</span> <span class="nf">connectionMade</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Called when connection is first established.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">NCONNECTED</span>
|
||||
<span class="c1"># public properties</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">cid</span> <span class="o">=</span> <span class="n">idcounter</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="s2">"Dummy-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">gid</span> <span class="o">=</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"Dummy-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">gid</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">DATESTRING</span><span class="p">)</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">exits</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># exit names created</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">objs</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># obj names created</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_timestamp</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_attempt</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">action_started</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_ready</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_report</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># already stepping in a cmd definition</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_login</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_actions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">factory</span><span class="o">.</span><span class="n">actions</span><span class="p">[</span><span class="mi">2</span><span class="p">:]</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">addSystemEventTrigger</span><span class="p">(</span><span class="s2">"before"</span><span class="p">,</span> <span class="s2">"shutdown"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">logout</span><span class="p">)</span></div>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">addSystemEventTrigger</span><span class="p">(</span><span class="s2">"before"</span><span class="p">,</span> <span class="s2">"shutdown"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">logout</span><span class="p">)</span>
|
||||
|
||||
<span class="n">NCONNECTED</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"-> connected"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_retry_welcome_screen</span><span class="p">)</span></div>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_retry_welcome_screen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_ready</span><span class="p">:</span>
|
||||
<span class="c1"># we have connected but not received anything for 30s.</span>
|
||||
<span class="c1"># (unclear why this would be - overload?)</span>
|
||||
<span class="c1"># try sending a look to get something to start with</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"?? retrying welcome screen"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="s2">"look"</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span>
|
||||
<span class="c1"># make sure to check again later</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_retry_welcome_screen</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_print_statistics</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">global</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">,</span> <span class="n">TOTAL_ACTIONS</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_LAG</span><span class="p">,</span> <span class="n">TOTAL_LAG_MEASURES</span><span class="p">,</span> <span class="n">TOTAL_LAG_IN</span><span class="p">,</span> <span class="n">TOTAL_LAG_OUT</span>
|
||||
|
||||
<span class="n">tim</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">TIME_ALL_LOGIN</span>
|
||||
<span class="n">avgrate</span> <span class="o">=</span> <span class="nb">round</span><span class="p">(</span><span class="n">TOTAL_ACTIONS</span> <span class="o">/</span> <span class="n">tim</span><span class="p">)</span>
|
||||
<span class="n">lag</span> <span class="o">=</span> <span class="n">TOTAL_LAG</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">lag_in</span> <span class="o">=</span> <span class="n">TOTAL_LAG_IN</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">lag_out</span> <span class="o">=</span> <span class="n">TOTAL_LAG_OUT</span> <span class="o">/</span> <span class="p">(</span><span class="n">TOTAL_LAG_MEASURES</span> <span class="ow">or</span> <span class="mi">1</span><span class="p">)</span>
|
||||
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">".. running 30s average: ~</span><span class="si">{</span><span class="n">avgrate</span><span class="si">}</span><span class="s2"> actions/s "</span>
|
||||
<span class="sa">f</span><span class="s2">"lag: </span><span class="si">{</span><span class="n">lag</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s (in: </span><span class="si">{</span><span class="n">lag_in</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s, out: </span><span class="si">{</span><span class="n">lag_out</span><span class="si">:</span><span class="s2">.2</span><span class="si">}</span><span class="s2">s)"</span><span class="p">)</span>
|
||||
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_print_statistics</span><span class="p">)</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.dataReceived"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.dataReceived">[docs]</a> <span class="k">def</span> <span class="nf">dataReceived</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -306,15 +419,67 @@
|
|||
<span class="sd"> data (str): Incoming data.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="nb">chr</span><span class="p">(</span><span class="mi">255</span><span class="p">)):</span>
|
||||
<span class="c1"># wait until we actually get text back (not just telnet</span>
|
||||
<span class="c1"># negotiation)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="c1"># start client tick</span>
|
||||
<span class="n">d</span> <span class="o">=</span> <span class="n">LoopingCall</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">)</span>
|
||||
<span class="c1"># dissipate exact step by up to +/- 0.5 second</span>
|
||||
<span class="n">timestep</span> <span class="o">=</span> <span class="n">TIMESTEP</span> <span class="o">+</span> <span class="p">(</span><span class="o">-</span><span class="mf">0.5</span> <span class="o">+</span> <span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span> <span class="o">*</span> <span class="mf">1.0</span><span class="p">))</span>
|
||||
<span class="n">d</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">timestep</span><span class="p">,</span> <span class="n">now</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">addErrback</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">error</span><span class="p">)</span></div>
|
||||
<span class="k">global</span> <span class="n">NLOGIN_SCREEN</span><span class="p">,</span> <span class="n">NLOGGED_IN</span><span class="p">,</span> <span class="n">NLOGGING_IN</span><span class="p">,</span> <span class="n">NCONNECTED</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_ACTIONS</span><span class="p">,</span> <span class="n">TIME_ALL_LOGIN</span>
|
||||
<span class="k">global</span> <span class="n">TOTAL_LAG</span><span class="p">,</span> <span class="n">TOTAL_LAG_MEASURES</span><span class="p">,</span> <span class="n">TOTAL_LAG_IN</span><span class="p">,</span> <span class="n">TOTAL_LAG_OUT</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="sa">b</span><span class="s2">"</span><span class="se">\xff</span><span class="s2">"</span><span class="p">):</span>
|
||||
<span class="c1"># regular text, not a telnet command</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">NCLIENTS</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"dummy-client sees:"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">"utf-8"</span><span class="p">))</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connected</span><span class="p">:</span>
|
||||
<span class="c1"># waiting for connection</span>
|
||||
<span class="c1"># wait until we actually get text back (not just telnet</span>
|
||||
<span class="c1"># negotiation)</span>
|
||||
<span class="c1"># start client tick</span>
|
||||
<span class="n">d</span> <span class="o">=</span> <span class="n">LoopingCall</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">)</span>
|
||||
<span class="n">df</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">TIMESTEP</span> <span class="o">*</span> <span class="mf">0.001</span><span class="p">),</span> <span class="nb">min</span><span class="p">(</span><span class="n">TIMESTEP</span><span class="o">/</span><span class="mi">10</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">))</span>
|
||||
<span class="c1"># dither next attempt with random time</span>
|
||||
<span class="n">timestep</span> <span class="o">=</span> <span class="n">TIMESTEP</span> <span class="o">+</span> <span class="p">(</span><span class="o">-</span><span class="n">df</span> <span class="o">+</span> <span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span> <span class="o">*</span> <span class="n">df</span><span class="p">))</span>
|
||||
<span class="n">d</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">timestep</span><span class="p">,</span> <span class="n">now</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">addErrback</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">connection_attempt</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_connected</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="n">NCONNECTED</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"<- server sent login screen"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
|
||||
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_ready</span><span class="p">:</span>
|
||||
<span class="c1"># logged in, ready to run</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_ready</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"== logged in"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">NLOGGED_IN</span> <span class="o">==</span> <span class="n">NCLIENTS</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">:</span>
|
||||
<span class="c1"># all are logged in! We can start collecting statistics</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">".. All clients connected and logged in!"</span><span class="p">)</span>
|
||||
<span class="n">TIME_ALL_LOGIN</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">callLater</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_print_statistics</span><span class="p">)</span>
|
||||
|
||||
<span class="k">elif</span> <span class="n">TIME_ALL_LOGIN</span><span class="p">:</span>
|
||||
<span class="n">TOTAL_ACTIONS</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">data</span> <span class="o">=</span> <span class="n">strip_ansi</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">"utf-8"</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"dummyrunner_echo_response:"</span><span class="p">):</span>
|
||||
<span class="c1"># handle special lag-measuring command. This returns</span>
|
||||
<span class="c1"># dummyrunner_echo_response:<starttime>,<midpointtime></span>
|
||||
<span class="n">now</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">_</span><span class="p">,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">":"</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">start_time</span><span class="p">,</span> <span class="n">mid_time</span> <span class="o">=</span> <span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">part</span><span class="p">)</span> <span class="k">for</span> <span class="n">part</span> <span class="ow">in</span> <span class="n">data</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">","</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
|
||||
<span class="n">lag_in</span> <span class="o">=</span> <span class="n">mid_time</span> <span class="o">-</span> <span class="n">start_time</span>
|
||||
<span class="n">lag_out</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">mid_time</span>
|
||||
<span class="n">total_lag</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">start_time</span> <span class="c1"># full round-about time</span>
|
||||
|
||||
<span class="n">TOTAL_LAG</span> <span class="o">+=</span> <span class="n">total_lag</span>
|
||||
<span class="n">TOTAL_LAG_IN</span> <span class="o">+=</span> <span class="n">lag_in</span>
|
||||
<span class="n">TOTAL_LAG_OUT</span> <span class="o">+=</span> <span class="n">lag_out</span>
|
||||
<span class="n">TOTAL_LAG_MEASURES</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
|
||||
<span class="k">pass</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.connectionLost"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.connectionLost">[docs]</a> <span class="k">def</span> <span class="nf">connectionLost</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">reason</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -325,7 +490,7 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"client </span><span class="si">%s</span><span class="s2">(</span><span class="si">%s</span><span class="s2">) lost connection (</span><span class="si">%s</span><span class="s2">)"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">,</span> <span class="n">reason</span><span class="p">))</span></div>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"XX lost connection"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.error"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.error">[docs]</a> <span class="k">def</span> <span class="nf">error</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">err</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -352,9 +517,9 @@
|
|||
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_logging_out</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logout</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"client </span><span class="si">%s</span><span class="s2">(</span><span class="si">%s</span><span class="s2">) logout (</span><span class="si">%s</span><span class="s2"> actions)"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cid</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">istep</span><span class="p">))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span></div>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_logout</span><span class="p">(</span><span class="bp">self</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="sa">f</span><span class="s2">"-> logout/disconnect (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">istep</span><span class="si">}</span><span class="s2"> actions)"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span></div>
|
||||
|
||||
<div class="viewcode-block" id="DummyClient.step"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.step">[docs]</a> <span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
|
|
@ -363,7 +528,7 @@
|
|||
<span class="sd"> all "intelligence" of the dummy client.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">NLOGGED_IN</span>
|
||||
<span class="k">global</span> <span class="n">NLOGGING_IN</span><span class="p">,</span> <span class="n">NLOGIN_SCREEN</span>
|
||||
|
||||
<span class="n">rand</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">()</span>
|
||||
|
||||
|
|
@ -371,11 +536,13 @@
|
|||
<span class="c1"># no commands ready. Load some.</span>
|
||||
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_LOGIN</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_LOGIN</span> <span class="ow">or</span> <span class="n">NLOGGING_IN</span> <span class="o"><</span> <span class="mi">10</span><span class="p">:</span>
|
||||
<span class="c1"># lower rate of logins, but not below 1 / s</span>
|
||||
<span class="c1"># get the login commands</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">makeiter</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_login</span><span class="p">(</span><span class="bp">self</span><span class="p">)))</span>
|
||||
<span class="n">NLOGGED_IN</span> <span class="o">+=</span> <span class="mi">1</span> <span class="c1"># this is for book-keeping</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"connecting client </span><span class="si">%s</span><span class="s2"> (</span><span class="si">%i</span><span class="s2">/</span><span class="si">%i</span><span class="s2">)..."</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="n">NLOGGED_IN</span><span class="p">,</span> <span class="n">NCLIENTS</span><span class="p">))</span>
|
||||
<span class="n">NLOGGING_IN</span> <span class="o">+=</span> <span class="mi">1</span> <span class="c1"># this is for book-keeping</span>
|
||||
<span class="n">NLOGIN_SCREEN</span> <span class="o">-=</span> <span class="mi">1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">report</span><span class="p">(</span><span class="s2">"-> create/login"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_loggedin</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># no login yet, so cmdlist not yet set</span>
|
||||
|
|
@ -389,12 +556,26 @@
|
|||
<span class="c1"># at this point we always have a list of commands</span>
|
||||
<span class="k">if</span> <span class="n">rand</span> <span class="o"><</span> <span class="n">CHANCE_OF_ACTION</span><span class="p">:</span>
|
||||
<span class="c1"># send to the game</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">+=</span> <span class="mi">1</span></div></div>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_cmdlist</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">cmd</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"dummyrunner_echo_response"</span><span class="p">):</span>
|
||||
<span class="c1"># we need to set the timer element as close to</span>
|
||||
<span class="c1"># the send as possible</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="n">cmd</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">timestamp</span><span class="o">=</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">())</span>
|
||||
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sendLine</span><span class="p">(</span><span class="nb">bytes</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="s1">'utf-8'</span><span class="p">))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">action_started</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">istep</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">NCLIENTS</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"dummy-client sent: </span><span class="si">{</span><span class="n">cmd</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span></div></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="DummyFactory"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">[docs]</a><span class="k">class</span> <span class="nc">DummyFactory</span><span class="p">(</span><span class="n">protocol</span><span class="o">.</span><span class="n">ClientFactory</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="DummyFactory"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">[docs]</a><span class="k">class</span> <span class="nc">DummyFactory</span><span class="p">(</span><span class="n">protocol</span><span class="o">.</span><span class="n">ReconnectingClientFactory</span><span class="p">):</span>
|
||||
<span class="n">protocol</span> <span class="o">=</span> <span class="n">DummyClient</span>
|
||||
<span class="n">initialDelay</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">maxDelay</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">noisy</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
|
||||
<div class="viewcode-block" id="DummyFactory.__init__"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.__init__">[docs]</a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">actions</span><span class="p">):</span>
|
||||
<span class="s2">"Setup the factory base (shared by all clients)"</span>
|
||||
|
|
@ -439,7 +620,7 @@
|
|||
<span class="c1"># setting up all clients (they are automatically started)</span>
|
||||
<span class="n">factory</span> <span class="o">=</span> <span class="n">DummyFactory</span><span class="p">(</span><span class="n">actions</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">NCLIENTS</span><span class="p">):</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">connectTCP</span><span class="p">(</span><span class="s2">"localhost"</span><span class="p">,</span> <span class="n">TELNET_PORT</span><span class="p">,</span> <span class="n">factory</span><span class="p">)</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">connectTCP</span><span class="p">(</span><span class="s2">"127.0.0.1"</span><span class="p">,</span> <span class="n">TELNET_PORT</span><span class="p">,</span> <span class="n">factory</span><span class="p">)</span>
|
||||
<span class="c1"># start reactor</span>
|
||||
<span class="n">reactor</span><span class="o">.</span><span class="n">run</span><span class="p">()</span></div>
|
||||
|
||||
|
|
@ -464,12 +645,23 @@
|
|||
<span class="p">)</span>
|
||||
|
||||
<span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
|
||||
<span class="n">nclients</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">INFO_STARTING</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">N</span><span class="o">=</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">INFO_STARTING</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
|
||||
<span class="n">nclients</span><span class="o">=</span><span class="n">nclients</span><span class="p">,</span>
|
||||
<span class="n">port</span><span class="o">=</span><span class="n">TELNET_PORT</span><span class="p">,</span>
|
||||
<span class="n">idmapper_cache_size</span><span class="o">=</span><span class="n">IDMAPPER_CACHE_MAXSIZE</span><span class="p">,</span>
|
||||
<span class="n">timestep</span><span class="o">=</span><span class="n">TIMESTEP</span><span class="p">,</span>
|
||||
<span class="n">rate</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="n">TIMESTEP</span><span class="p">,</span>
|
||||
<span class="n">chance_of_login</span><span class="o">=</span><span class="n">CHANCE_OF_LOGIN</span> <span class="o">*</span> <span class="mi">100</span><span class="p">,</span>
|
||||
<span class="n">chance_of_action</span><span class="o">=</span><span class="n">CHANCE_OF_ACTION</span> <span class="o">*</span> <span class="mi">100</span><span class="p">,</span>
|
||||
<span class="n">avg_rate</span><span class="o">=</span><span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">TIMESTEP</span><span class="p">)</span> <span class="o">*</span> <span class="n">CHANCE_OF_ACTION</span><span class="p">,</span>
|
||||
<span class="n">avg_rate_total</span><span class="o">=</span><span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">TIMESTEP</span><span class="p">)</span> <span class="o">*</span> <span class="n">CHANCE_OF_ACTION</span> <span class="o">*</span> <span class="n">nclients</span>
|
||||
<span class="p">))</span>
|
||||
|
||||
<span class="c1"># run the dummyrunner</span>
|
||||
<span class="n">t0</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">start_all_dummy_clients</span><span class="p">(</span><span class="n">nclients</span><span class="o">=</span><span class="n">args</span><span class="o">.</span><span class="n">nclients</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
<span class="n">TIME_START</span> <span class="o">=</span> <span class="n">t0</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">start_all_dummy_clients</span><span class="p">(</span><span class="n">nclients</span><span class="o">=</span><span class="n">nclients</span><span class="p">)</span>
|
||||
<span class="n">ttot</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">t0</span>
|
||||
|
||||
<span class="c1"># output runtime</span>
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
|
||||
<span class="sd">The settings are global variables:</span>
|
||||
|
||||
<span class="sd">- TIMESTEP - time in seconds between each 'tick'</span>
|
||||
<span class="sd">- CHANCE_OF_ACTION - chance 0-1 of action happening</span>
|
||||
<span class="sd">- CHANCE_OF_LOGIN - chance 0-1 of login happening</span>
|
||||
<span class="sd">- TIMESTEP - time in seconds between each 'tick'. 1 is a good start.</span>
|
||||
<span class="sd">- CHANCE_OF_ACTION - chance 0-1 of action happening. Default is 0.5.</span>
|
||||
<span class="sd">- CHANCE_OF_LOGIN - chance 0-1 of login happening. 0.01 is a good number.</span>
|
||||
<span class="sd">- TELNET_PORT - port to use, defaults to settings.TELNET_PORT</span>
|
||||
<span class="sd">- ACTIONS - see below</span>
|
||||
|
||||
|
|
@ -58,23 +58,25 @@
|
|||
|
||||
<span class="sd">```python</span>
|
||||
<span class="sd">(login_func, logout_func, (0.3, func1), (0.1, func2) ... )</span>
|
||||
|
||||
<span class="sd">```</span>
|
||||
|
||||
<span class="sd">where the first entry is the function to call on first connect, with a</span>
|
||||
<span class="sd">chance of occurring given by CHANCE_OF_LOGIN. This function is usually</span>
|
||||
<span class="sd">responsible for logging in the account. The second entry is always</span>
|
||||
<span class="sd">called when the dummyrunner disconnects from the server and should</span>
|
||||
<span class="sd">thus issue a logout command. The other entries are tuples (chance,</span>
|
||||
<span class="sd">thus issue a logout command. The other entries are tuples (chance,</span>
|
||||
<span class="sd">func). They are picked randomly, their commonality based on the</span>
|
||||
<span class="sd">cumulative chance given (the chance is normalized between all options</span>
|
||||
<span class="sd">so if will still work also if the given chances don't add up to 1).</span>
|
||||
<span class="sd">Since each function can return a list of game-command strings, each</span>
|
||||
<span class="sd">function may result in multiple operations.</span>
|
||||
|
||||
<span class="sd">The PROFILE variable define pre-made ACTION tuples for convenience.</span>
|
||||
|
||||
<span class="sd">Each function should return an iterable of one or more command-call</span>
|
||||
<span class="sd">strings (like "look here"), so each can group multiple command operations.</span>
|
||||
|
||||
<span class="sd">An action-function is called with a "client" argument which is a</span>
|
||||
<span class="sd">reference to the dummy client currently performing the action. It</span>
|
||||
<span class="sd">returns a string or a list of command strings to execute. Use the</span>
|
||||
<span class="sd">client object for optionally saving data between actions.</span>
|
||||
<span class="sd">reference to the dummy client currently performing the action.</span>
|
||||
|
||||
<span class="sd">The client object has the following relevant properties and methods:</span>
|
||||
|
||||
|
|
@ -97,11 +99,15 @@
|
|||
<span class="sd">----</span>
|
||||
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">import</span> <span class="nn">random</span>
|
||||
<span class="kn">import</span> <span class="nn">string</span>
|
||||
|
||||
<span class="c1"># Dummy runner settings</span>
|
||||
|
||||
<span class="c1"># Time between each dummyrunner "tick", in seconds. Each dummy</span>
|
||||
<span class="c1"># will be called with this frequency.</span>
|
||||
<span class="n">TIMESTEP</span> <span class="o">=</span> <span class="mi">2</span>
|
||||
<span class="n">TIMESTEP</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="c1"># TIMESTEP = 0.025 # 40/s</span>
|
||||
|
||||
<span class="c1"># Chance of a dummy actually performing an action on a given tick.</span>
|
||||
<span class="c1"># This spreads out usage randomly, like it would be in reality.</span>
|
||||
|
|
@ -110,7 +116,7 @@
|
|||
<span class="c1"># Chance of a currently unlogged-in dummy performing its login</span>
|
||||
<span class="c1"># action every tick. This emulates not all accounts logging in</span>
|
||||
<span class="c1"># at exactly the same time.</span>
|
||||
<span class="n">CHANCE_OF_LOGIN</span> <span class="o">=</span> <span class="mf">1.0</span>
|
||||
<span class="n">CHANCE_OF_LOGIN</span> <span class="o">=</span> <span class="mf">0.01</span>
|
||||
|
||||
<span class="c1"># Which telnet port to connect to. If set to None, uses the first</span>
|
||||
<span class="c1"># default telnet port of the running server.</span>
|
||||
|
|
@ -121,9 +127,10 @@
|
|||
|
||||
<span class="c1"># some convenient templates</span>
|
||||
|
||||
<span class="n">DUMMY_NAME</span> <span class="o">=</span> <span class="s2">"Dummy-</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_PWD</span> <span class="o">=</span> <span class="s2">"password-</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">START_ROOM</span> <span class="o">=</span> <span class="s2">"testing_room_start_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_NAME</span> <span class="o">=</span> <span class="s2">"Dummy_</span><span class="si">{gid}</span><span class="s2">"</span>
|
||||
<span class="n">DUMMY_PWD</span> <span class="o">=</span> <span class="p">(</span><span class="s1">''</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">string</span><span class="o">.</span><span class="n">ascii_letters</span> <span class="o">+</span> <span class="n">string</span><span class="o">.</span><span class="n">digits</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">20</span><span class="p">))</span> <span class="o">+</span> <span class="s2">"-</span><span class="si">{gid}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="n">START_ROOM</span> <span class="o">=</span> <span class="s2">"testing_room_start_</span><span class="si">{gid}</span><span class="s2">"</span>
|
||||
<span class="n">ROOM_TEMPLATE</span> <span class="o">=</span> <span class="s2">"testing_room_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">EXIT_TEMPLATE</span> <span class="o">=</span> <span class="s2">"exit_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
<span class="n">OBJ_TEMPLATE</span> <span class="o">=</span> <span class="s2">"testing_obj_</span><span class="si">%s</span><span class="s2">"</span>
|
||||
|
|
@ -136,26 +143,27 @@
|
|||
|
||||
<span class="c1"># login/logout</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_login"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_login">[docs]</a><span class="k">def</span> <span class="nf">c_login</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"logins to the game"</span>
|
||||
<span class="c1"># we always use a new client name</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
<span class="n">room_name</span> <span class="o">=</span> <span class="n">START_ROOM</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">gid</span><span class="o">=</span><span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># set up for digging a first room (to move to and keep the</span>
|
||||
<span class="c1"># login room clean)</span>
|
||||
<span class="n">roomname</span> <span class="o">=</span> <span class="n">ROOM_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname1</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname2</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">])</span>
|
||||
<span class="c1"># we assign the dummyrunner cmdsert to ourselves so # we can use special commands</span>
|
||||
<span class="n">add_cmdset</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"py from evennia.server.profiling.dummyrunner import DummyRunnerCmdSet;"</span>
|
||||
<span class="s2">"self.cmdset.add(DummyRunnerCmdSet, persistent=False)"</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="c1"># create character, log in, then immediately dig a new location and</span>
|
||||
<span class="c1"># teleport it (to keep the login room clean)</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"create </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span>
|
||||
<span class="s2">"connect </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span>
|
||||
<span class="s2">"@dig </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">START_ROOM</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">,</span>
|
||||
<span class="s2">"@teleport </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">START_ROOM</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span><span class="p">,</span>
|
||||
<span class="s2">"@dig </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">),</span>
|
||||
<span class="sa">f</span><span class="s2">"create </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"connect </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"dig </span><span class="si">{</span><span class="n">room_name</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"teleport </span><span class="si">{</span><span class="n">room_name</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="n">add_cmdset</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
|
@ -164,14 +172,16 @@
|
|||
<span class="s2">"logins, don't dig its own room"</span>
|
||||
<span class="n">cname</span> <span class="o">=</span> <span class="n">DUMMY_NAME</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
<span class="n">cpwd</span> <span class="o">=</span> <span class="n">DUMMY_PWD</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">gid</span>
|
||||
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"create </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">),</span> <span class="s2">"connect </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">cname</span><span class="p">,</span> <span class="n">cpwd</span><span class="p">))</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="sa">f</span><span class="s2">"create </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span>
|
||||
<span class="sa">f</span><span class="s2">"connect </span><span class="si">{</span><span class="n">cname</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">cpwd</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_logout"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_logout">[docs]</a><span class="k">def</span> <span class="nf">c_logout</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"logouts of the game"</span>
|
||||
<span class="k">return</span> <span class="s2">"@quit"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"quit"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># random commands</span>
|
||||
|
|
@ -183,7 +193,7 @@
|
|||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"look </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">exi</span> <span class="k">for</span> <span class="n">exi</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="s2">"look"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"look"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -193,7 +203,7 @@
|
|||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"examine </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">exi</span> <span class="k">for</span> <span class="n">exi</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span><span class="p">:</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="s2">"examine me"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"examine me"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -205,7 +215,7 @@
|
|||
|
||||
<div class="viewcode-block" id="c_help"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_help">[docs]</a><span class="k">def</span> <span class="nf">c_help</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"reads help files"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"help"</span><span class="p">,</span> <span class="s2">"help @teleport"</span><span class="p">,</span> <span class="s2">"help look"</span><span class="p">,</span> <span class="s2">"help @tunnel"</span><span class="p">,</span> <span class="s2">"help @dig"</span><span class="p">)</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"help"</span><span class="p">,</span> <span class="s2">"dummyrunner_echo_response"</span><span class="p">,)</span>
|
||||
<span class="k">return</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
|
|
@ -215,7 +225,7 @@
|
|||
<span class="n">exitname1</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">exitname2</span> <span class="o">=</span> <span class="n">EXIT_TEMPLATE</span> <span class="o">%</span> <span class="n">client</span><span class="o">.</span><span class="n">counter</span><span class="p">()</span>
|
||||
<span class="n">client</span><span class="o">.</span><span class="n">exits</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">])</span>
|
||||
<span class="k">return</span> <span class="s2">"@dig/tel </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"@dig/tel </span><span class="si">%s</span><span class="s2"> = </span><span class="si">%s</span><span class="s2">, </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">roomname</span><span class="p">,</span> <span class="n">exitname1</span><span class="p">,</span> <span class="n">exitname2</span><span class="p">),)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_creates_obj"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_creates_obj">[docs]</a><span class="k">def</span> <span class="nf">c_creates_obj</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
|
|
@ -242,9 +252,7 @@
|
|||
<div class="viewcode-block" id="c_socialize"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_socialize">[docs]</a><span class="k">def</span> <span class="nf">c_socialize</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"socializechats on channel"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"ooc Hello!"</span><span class="p">,</span>
|
||||
<span class="s2">"ooc Testing ..."</span><span class="p">,</span>
|
||||
<span class="s2">"ooc Testing ... times 2"</span><span class="p">,</span>
|
||||
<span class="s2">"pub Hello!"</span><span class="p">,</span>
|
||||
<span class="s2">"say Yo!"</span><span class="p">,</span>
|
||||
<span class="s2">"emote stands looking around."</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
|
@ -254,84 +262,120 @@
|
|||
<div class="viewcode-block" id="c_moves"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves">[docs]</a><span class="k">def</span> <span class="nf">c_moves</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"moves to a previously created room, using the stored exits"</span>
|
||||
<span class="n">cmds</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">exits</span> <span class="c1"># try all exits - finally one will work</span>
|
||||
<span class="k">return</span> <span class="s2">"look"</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span> <span class="k">else</span> <span class="n">cmds</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"look"</span><span class="p">,)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">cmds</span> <span class="k">else</span> <span class="n">cmds</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_moves_n"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves_n">[docs]</a><span class="k">def</span> <span class="nf">c_moves_n</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"move through north exit if available"</span>
|
||||
<span class="k">return</span> <span class="s2">"north"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"north"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="c_moves_s"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves_s">[docs]</a><span class="k">def</span> <span class="nf">c_moves_s</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="s2">"move through south exit if available"</span>
|
||||
<span class="k">return</span> <span class="s2">"south"</span></div>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"south"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># Action tuple (required)</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="c1"># This is a tuple of client action functions. The first element is the</span>
|
||||
<span class="c1"># function the client should use to log into the game and move to</span>
|
||||
<span class="c1"># STARTROOM . The second element is the logout command, for cleanly</span>
|
||||
<span class="c1"># exiting the mud. The following elements are 2-tuples of (probability,</span>
|
||||
<span class="c1"># action_function). The probablities should normally sum up to 1,</span>
|
||||
<span class="c1"># otherwise the system will normalize them.</span>
|
||||
<div class="viewcode-block" id="c_measure_lag"><a class="viewcode-back" href="../../../../api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_measure_lag">[docs]</a><span class="k">def</span> <span class="nf">c_measure_lag</span><span class="p">(</span><span class="n">client</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Special dummyrunner command, injected in c_login. It measures</span>
|
||||
<span class="sd"> response time. Including this in the ACTION tuple will give more</span>
|
||||
<span class="sd"> dummyrunner output about just how fast commands are being processed.</span>
|
||||
|
||||
<span class="sd"> The dummyrunner will treat this special and inject the</span>
|
||||
<span class="sd"> {timestamp} just before sending.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="s2">"dummyrunner_echo_response </span><span class="si">{timestamp}</span><span class="s2">"</span><span class="p">,)</span></div>
|
||||
|
||||
|
||||
<span class="c1"># Action profile (required)</span>
|
||||
|
||||
<span class="c1"># Some pre-made profiles to test. To make your own, just assign a tuple to ACTIONS.</span>
|
||||
<span class="c1">#</span>
|
||||
<span class="c1"># idler - does nothing after logging in</span>
|
||||
<span class="c1"># looker - just looks around</span>
|
||||
<span class="c1"># normal_player - moves around, reads help, looks around (digs rarely) (spammy)</span>
|
||||
<span class="c1"># normal_builder - digs now and then, examines, creates objects, moves</span>
|
||||
<span class="c1"># heavy_builder - digs and creates a lot, moves and examines</span>
|
||||
<span class="c1"># socializing_builder - builds a lot, creates help entries, moves, chat (spammy)</span>
|
||||
<span class="c1"># only_digger - extreme builder that only digs room after room</span>
|
||||
|
||||
<span class="n">PROFILE</span> <span class="o">=</span> <span class="s2">"looker"</span>
|
||||
|
||||
|
||||
<span class="c1"># "normal builder" definitionj</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.5, c_looks),</span>
|
||||
<span class="c1"># (0.08, c_examines),</span>
|
||||
<span class="c1"># (0.1, c_help),</span>
|
||||
<span class="c1"># (0.01, c_digs),</span>
|
||||
<span class="c1"># (0.01, c_creates_obj),</span>
|
||||
<span class="c1"># (0.3, c_moves))</span>
|
||||
<span class="c1"># "heavy" builder definition</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.2, c_looks),</span>
|
||||
<span class="c1"># (0.1, c_examines),</span>
|
||||
<span class="c1"># (0.2, c_help),</span>
|
||||
<span class="c1"># (0.1, c_digs),</span>
|
||||
<span class="c1"># (0.1, c_creates_obj),</span>
|
||||
<span class="c1"># #(0.01, c_creates_button),</span>
|
||||
<span class="c1"># (0.2, c_moves))</span>
|
||||
<span class="c1"># "passive account" definition</span>
|
||||
<span class="c1"># ACTIONS = ( c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.7, c_looks),</span>
|
||||
<span class="c1"># #(0.1, c_examines),</span>
|
||||
<span class="c1"># (0.3, c_help))</span>
|
||||
<span class="c1"># #(0.1, c_digs),</span>
|
||||
<span class="c1"># #(0.1, c_creates_obj),</span>
|
||||
<span class="c1"># #(0.1, c_creates_button),</span>
|
||||
<span class="c1"># #(0.4, c_moves))</span>
|
||||
<span class="c1"># "inactive account" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login_nodig,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_idles))</span>
|
||||
<span class="c1"># "normal account" definition</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span><span class="n">c_login</span><span class="p">,</span> <span class="n">c_logout</span><span class="p">,</span> <span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.39</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.4</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">))</span>
|
||||
<span class="c1"># walking tester. This requires a pre-made</span>
|
||||
<span class="c1"># "loop" of multiple rooms that ties back</span>
|
||||
<span class="c1"># to limbo (using @tunnel and @open)</span>
|
||||
<span class="c1"># ACTIONS = (c_login_nodig,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_moves_n))</span>
|
||||
<span class="c1"># "socializing heavy builder" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (0.1, c_socialize),</span>
|
||||
<span class="c1"># (0.1, c_looks),</span>
|
||||
<span class="c1"># (0.2, c_help),</span>
|
||||
<span class="c1"># (0.1, c_creates_obj),</span>
|
||||
<span class="c1"># (0.2, c_digs),</span>
|
||||
<span class="c1"># (0.3, c_moves))</span>
|
||||
<span class="c1"># "heavy digger memory tester" definition</span>
|
||||
<span class="c1"># ACTIONS = (c_login,</span>
|
||||
<span class="c1"># c_logout,</span>
|
||||
<span class="c1"># (1.0, c_digs))</span>
|
||||
<span class="k">if</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'idler'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">c_idles</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">),</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'looker'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.8</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'normal_player'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.29</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.05</span><span class="p">,</span> <span class="n">c_socialize</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'normal_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.08</span><span class="p">,</span> <span class="n">c_examines</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'heavy_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_examines</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'socializing_builder'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_socialize</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_looks</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_help</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_creates_obj</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">c_moves</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">PROFILE</span> <span class="o">==</span> <span class="s1">'only_digger'</span><span class="p">:</span>
|
||||
<span class="n">ACTIONS</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">c_login</span><span class="p">,</span>
|
||||
<span class="n">c_logout</span><span class="p">,</span>
|
||||
<span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">c_digs</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">c_measure_lag</span><span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"No dummyrunner ACTION profile defined."</span><span class="p">)</span>
|
||||
<span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
|
||||
<div class="clearer"></div>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@
|
|||
|
||||
<span class="sd"> Keyword Args:</span>
|
||||
<span class="sd"> name (str): Name of this throttle.</span>
|
||||
<span class="sd"> limit (int): Max number of failures before imposing limiter</span>
|
||||
<span class="sd"> limit (int): Max number of failures before imposing limiter. If `None`,</span>
|
||||
<span class="sd"> the throttle is disabled.</span>
|
||||
<span class="sd"> timeout (int): number of timeout seconds after</span>
|
||||
<span class="sd"> max number of tries has been reached.</span>
|
||||
<span class="sd"> cache_size (int): Max number of attempts to record per IP within a</span>
|
||||
|
|
@ -239,6 +240,10 @@
|
|||
<span class="sd"> False otherwise.</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">limit</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="c1"># throttle is disabled</span>
|
||||
<span class="k">return</span> <span class="kc">False</span>
|
||||
|
||||
<span class="n">now</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">ip</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">ip</span><span class="p">)</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,24 +4,27 @@
|
|||
|
||||
## Introduction
|
||||
|
||||
Sometimes it can be useful to try to determine just how efficient a particular piece of code is, or
|
||||
to figure out if one could speed up things more than they are. There are many ways to test the
|
||||
performance of Python and the running server.
|
||||
Sometimes it can be useful to try to determine just how efficient a particular
|
||||
piece of code is, or to figure out if one could speed up things more than they
|
||||
are. There are many ways to test the performance of Python and the running
|
||||
server.
|
||||
|
||||
Before digging into this section, remember Donald Knuth's [words of
|
||||
wisdom](https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize):
|
||||
Before digging into this section, remember Donald Knuth's
|
||||
[words of wisdom](https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize):
|
||||
|
||||
> *[...]about 97% of the time: Premature optimization is the root of all evil*.
|
||||
|
||||
That is, don't start to try to optimize your code until you have actually identified a need to do
|
||||
so. This means your code must actually be working before you start to consider optimization.
|
||||
Optimization will also often make your code more complex and harder to read. Consider readability
|
||||
and maintainability and you may find that a small gain in speed is just not worth it.
|
||||
That is, don't start to try to optimize your code until you have actually
|
||||
identified a need to do so. This means your code must actually be working before
|
||||
you start to consider optimization. Optimization will also often make your code
|
||||
more complex and harder to read. Consider readability and maintainability and
|
||||
you may find that a small gain in speed is just not worth it.
|
||||
|
||||
## Simple timer tests
|
||||
|
||||
Python's `timeit` module is very good for testing small things. For example, in order to test if it
|
||||
is faster to use a `for` loop or a list comprehension you could use the following code:
|
||||
Python's `timeit` module is very good for testing small things. For example, in
|
||||
order to test if it is faster to use a `for` loop or a list comprehension you
|
||||
could use the following code:
|
||||
|
||||
```python
|
||||
import timeit
|
||||
|
|
@ -33,93 +36,218 @@ is faster to use a `for` loop or a list comprehension you could use the followin
|
|||
<<< 5.358283996582031
|
||||
```
|
||||
|
||||
The `setup` keyword is used to set up things that should not be included in the time measurement,
|
||||
like `a = []` in the first call.
|
||||
The `setup` keyword is used to set up things that should not be included in the
|
||||
time measurement, like `a = []` in the first call.
|
||||
|
||||
By default the `timeit` function will re-run the given test 1000000 times and returns the *total
|
||||
time* to do so (so *not* the average per test). A hint is to not use this default for testing
|
||||
something that includes database writes - for that you may want to use a lower number of repeats
|
||||
(say 100 or 1000) using the `number=100` keyword.
|
||||
By default the `timeit` function will re-run the given test 1000000 times and
|
||||
returns the *total time* to do so (so *not* the average per test). A hint is to
|
||||
not use this default for testing something that includes database writes - for
|
||||
that you may want to use a lower number of repeats (say 100 or 1000) using the
|
||||
`number=100` keyword.
|
||||
|
||||
## Using cProfile
|
||||
|
||||
Python comes with its own profiler, named cProfile (this is for cPython, no tests have been done
|
||||
with `pypy` at this point). Due to the way Evennia's processes are handled, there is no point in
|
||||
using the normal way to start the profiler (`python -m cProfile evennia.py`). Instead you start the
|
||||
profiler through the launcher:
|
||||
Python comes with its own profiler, named cProfile (this is for cPython, no
|
||||
tests have been done with `pypy` at this point). Due to the way Evennia's
|
||||
processes are handled, there is no point in using the normal way to start the
|
||||
profiler (`python -m cProfile evennia.py`). Instead you start the profiler
|
||||
through the launcher:
|
||||
|
||||
evennia --profiler start
|
||||
|
||||
This will start Evennia with the Server component running (in daemon mode) under cProfile. You could
|
||||
instead try `--profile` with the `portal` argument to profile the Portal (you would then need to
|
||||
This will start Evennia with the Server component running (in daemon mode) under
|
||||
cProfile. You could instead try `--profile` with the `portal` argument to
|
||||
profile the Portal (you would then need to
|
||||
[start the Server separately](../Setup/Start-Stop-Reload)).
|
||||
|
||||
Please note that while the profiler is running, your process will use a lot more memory than usual.
|
||||
Memory usage is even likely to climb over time. So don't leave it running perpetually but monitor it
|
||||
carefully (for example using the `top` command on Linux or the Task Manager's memory display on
|
||||
Windows).
|
||||
Please note that while the profiler is running, your process will use a lot more
|
||||
memory than usual. Memory usage is even likely to climb over time. So don't
|
||||
leave it running perpetually but monitor it carefully (for example using the
|
||||
`top` command on Linux or the Task Manager's memory display on Windows).
|
||||
|
||||
Once you have run the server for a while, you need to stop it so the profiler can give its report.
|
||||
Do *not* kill the program from your task manager or by sending it a kill signal - this will most
|
||||
likely also mess with the profiler. Instead either use `evennia.py stop` or (which may be even
|
||||
better), use `@shutdown` from inside the game.
|
||||
Once you have run the server for a while, you need to stop it so the profiler
|
||||
can give its report. Do *not* kill the program from your task manager or by
|
||||
sending it a kill signal - this will most likely also mess with the profiler.
|
||||
Instead either use `evennia.py stop` or (which may be even better), use
|
||||
`@shutdown` from inside the game.
|
||||
|
||||
Once the server has fully shut down (this may be a lot slower than usual) you will find that
|
||||
profiler has created a new file `mygame/server/logs/server.prof`.
|
||||
Once the server has fully shut down (this may be a lot slower than usual) you
|
||||
will find that profiler has created a new file `mygame/server/logs/server.prof`.
|
||||
|
||||
## Analyzing the profile
|
||||
### Analyzing the profile
|
||||
|
||||
The `server.prof` file is a binary file. There are many ways to analyze and display its contents,
|
||||
all of which has only been tested in Linux (If you are a Windows/Mac user, let us know what works).
|
||||
The `server.prof` file is a binary file. There are many ways to analyze and
|
||||
display its contents, all of which has only been tested in Linux (If you are a
|
||||
Windows/Mac user, let us know what works).
|
||||
|
||||
We recommend the
|
||||
[Runsnake](http://www.vrplumber.com/programming/runsnakerun/) visualizer to see the processor usage
|
||||
of different processes in a graphical form. For more detailed listing of usage time, you can use
|
||||
[KCachegrind](http://kcachegrind.sourceforge.net/html/Home.html). To make KCachegrind work with
|
||||
Python profiles you also need the wrapper script
|
||||
[pyprof2calltree](https://pypi.python.org/pypi/pyprof2calltree/). You can get pyprof2calltree via
|
||||
`pip` whereas KCacheGrind is something you need to get via your package manager or their homepage.
|
||||
You can look at the contents of the profile file with Python's in-built `pstats`
|
||||
module in the evennia shell (it's recommended you install `ipython` with `pip
|
||||
install ipython` in your virtualenv first, for prettier output):
|
||||
|
||||
How to analyze and interpret profiling data is not a trivial issue and depends on what you are
|
||||
profiling for. Evennia being an asynchronous server can also confuse profiling. Ask on the mailing
|
||||
list if you need help and be ready to be able to supply your `server.prof` file for comparison,
|
||||
along with the exact conditions under which it was obtained.
|
||||
evennia shell
|
||||
|
||||
Then in the shell
|
||||
|
||||
```python
|
||||
import pstats
|
||||
from pstats import SortKey
|
||||
|
||||
p = pstats.Stats('server/log/server.prof')
|
||||
p.strip_dirs().sort_stats(-1).print_stats()
|
||||
|
||||
```
|
||||
|
||||
See the
|
||||
[Python profiling documentation](https://docs.python.org/3/library/profile.html#instant-user-s-manual)
|
||||
for more information.
|
||||
|
||||
You can also visualize the data in various ways.
|
||||
- [Runsnake](https://pypi.org/project/RunSnakeRun/) visualizes the profile to
|
||||
give a good overview. Install with `pip install runsnakerun`. Note that this
|
||||
may require a C compiler and be quite slow to install.
|
||||
- For more detailed listing of usage time, you can use
|
||||
[KCachegrind](http://kcachegrind.sourceforge.net/html/Home.html). To make
|
||||
KCachegrind work with Python profiles you also need the wrapper script
|
||||
[pyprof2calltree](https://pypi.python.org/pypi/pyprof2calltree/). You can get
|
||||
`pyprof2calltree` via `pip` whereas KCacheGrind is something you need to get
|
||||
via your package manager or their homepage.
|
||||
|
||||
How to analyze and interpret profiling data is not a trivial issue and depends
|
||||
on what you are profiling for. Evennia being an asynchronous server can also
|
||||
confuse profiling. Ask on the mailing list if you need help and be ready to be
|
||||
able to supply your `server.prof` file for comparison, along with the exact
|
||||
conditions under which it was obtained.
|
||||
|
||||
## The Dummyrunner
|
||||
|
||||
It is difficult to test "actual" game performance without having players in your game. For this
|
||||
reason Evennia comes with the *Dummyrunner* system. The Dummyrunner is a stress-testing system: a
|
||||
separate program that logs into your game with simulated players (aka "bots" or "dummies"). Once
|
||||
connected these dummies will semi-randomly perform various tasks from a list of possible actions.
|
||||
Use `Ctrl-C` to stop the Dummyrunner.
|
||||
It is difficult to test "actual" game performance without having players in your
|
||||
game. For this reason Evennia comes with the *Dummyrunner* system. The
|
||||
Dummyrunner is a stress-testing system: a separate program that logs into your
|
||||
game with simulated players (aka "bots" or "dummies"). Once connected, these
|
||||
dummies will semi-randomly perform various tasks from a list of possible
|
||||
actions. Use `Ctrl-C` to stop the Dummyrunner.
|
||||
|
||||
> Warning: You should not run the Dummyrunner on a production database. It will spawn many objects
|
||||
and also needs to run with general permissions.
|
||||
```warning::
|
||||
|
||||
To launch the Dummyrunner, first start your server normally (with or without profiling, as above).
|
||||
Then start a new terminal/console window and active your virtualenv there too. In the new terminal,
|
||||
try to connect 10 dummy players:
|
||||
You should not run the Dummyrunner on a production database. It
|
||||
will spawn many objects and also needs to run with general permissions.
|
||||
|
||||
evennia --dummyrunner 10
|
||||
|
||||
The first time you do this you will most likely get a warning from Dummyrunner. It will tell you to
|
||||
copy an import string to the end of your settings file. Quit the Dummyrunner (`Ctrl-C`) and follow
|
||||
the instructions. Restart Evennia and try `evennia --dummyrunner 10` again. Make sure to remove that
|
||||
extra settings line when running a public server.
|
||||
|
||||
The actions perform by the dummies is controlled by a settings file. The default Dummyrunner
|
||||
settings file is `evennia/server/server/profiling/dummyrunner_settings.py` but you shouldn't modify
|
||||
this directly. Rather create/copy the default file to `mygame/server/conf/` and modify it there. To
|
||||
make sure to use your file over the default, add the following line to your settings file:
|
||||
|
||||
```python
|
||||
DUMMYRUNNER_SETTINGS_MODULE = "server/conf/dummyrunner_settings.py"
|
||||
This is the recommended process for using the dummy runner:
|
||||
```
|
||||
|
||||
> Hint: Don't start with too many dummies. The Dummyrunner defaults to taxing the server much more
|
||||
intensely than an equal number of human players. A good dummy number to start with is 10-100.
|
||||
1. Stop your server completely with `evennia stop`.
|
||||
1. At _the end_ of your `mygame/server/conf.settings.py` file, add the line
|
||||
|
||||
Once you have the dummyrunner running, stop it with `Ctrl-C`.
|
||||
from evennia.server.profiling.settings_mixin import *
|
||||
|
||||
This will override your settings and disable Evennia's rate limiters and
|
||||
DoS-protections, which would otherwise block mass-connecting clients from
|
||||
one IP. Notably, it will also change to a different (faster) password hasher.
|
||||
1. (recommended): Build a new database. If you use default Sqlite3 and want to
|
||||
keep your existing database, just rename `mygame/server/evennia.db3` to
|
||||
`mygame/server/evennia.db3_backup` and run `evennia migrate` and `evennia
|
||||
start` to create a new superuser as usual.
|
||||
1. (recommended) Log into the game as your superuser. This is just so you
|
||||
can manually check response. If you kept an old database, you will _not_
|
||||
be able to connect with an _existing_ user since the password hasher changed!
|
||||
1. Start the dummyrunner with 10 dummy users from the terminal with
|
||||
|
||||
evennia --dummyrunner 10
|
||||
|
||||
Use `Ctrl-C` (or `Cmd-C`) to stop it.
|
||||
|
||||
If you want to see what the dummies are actually doing you can run with a single
|
||||
dummy:
|
||||
|
||||
evennia --dummyrunner 1
|
||||
|
||||
The inputs/outputs from the dummy will then be printed. By default the runner
|
||||
uses the 'looker' profile, which just logs in and sends the 'look' command
|
||||
over and over. To change the settings, copy the file
|
||||
`evennia/server/profiling/dummyrunner_settings.py` to your `mygame/server/conf/`
|
||||
directory, then add this line to your settings file to use it in the new
|
||||
location:
|
||||
|
||||
DUMMYRUNNER_SETTINGS_MODULE = "server/conf/dummyrunner_settings.py"
|
||||
|
||||
The dummyrunner settings file is a python code module in its own right - it
|
||||
defines the actions available to the dummies. These are just tuples of command
|
||||
strings (like "look here") for the dummy to send to the server along with a
|
||||
probability of them happening. The dummyrunner looks for a global variable
|
||||
`ACTIONS`, a list of tuples, where the first two elements define the
|
||||
commands for logging in/out of the server.
|
||||
|
||||
Below is a simplified minimal setup (the default settings file adds a lot more
|
||||
functionality and info):
|
||||
|
||||
```python
|
||||
# minimal dummyrunner setup file
|
||||
|
||||
# Time between each dummyrunner "tick", in seconds. Each dummy will be called
|
||||
# with this frequency.
|
||||
TIMESTEP = 1
|
||||
|
||||
# Chance of a dummy actually performing an action on a given tick. This
|
||||
# spreads out usage randomly, like it would be in reality.
|
||||
CHANCE_OF_ACTION = 0.5
|
||||
|
||||
# Chance of a currently unlogged-in dummy performing its login action every
|
||||
# tick. This emulates not all accounts logging in at exactly the same time.
|
||||
CHANCE_OF_LOGIN = 0.01
|
||||
|
||||
# Which telnet port to connect to. If set to None, uses the first default
|
||||
# telnet port of the running server.
|
||||
TELNET_PORT = None
|
||||
|
||||
# actions
|
||||
|
||||
def c_login(client):
|
||||
name = f"Character-{client.gid}"
|
||||
pwd = f"23fwsf23sdfw23wef23"
|
||||
return (
|
||||
f"create {name} {pwd}"
|
||||
f"connect {name} {pwd}"
|
||||
)
|
||||
|
||||
def c_logout(client):
|
||||
return ("quit", )
|
||||
|
||||
def c_look(client):
|
||||
return ("look here", "look me")
|
||||
|
||||
# this is read by dummyrunner.
|
||||
ACTIONS = (
|
||||
c_login,
|
||||
c_logout,
|
||||
(1.0, c_look) # (probability, command-generator)
|
||||
)
|
||||
|
||||
```
|
||||
|
||||
At the bottom of the default file are a few default profiles you can test out
|
||||
by just setting the `PROFILE` variable to one of the options.
|
||||
|
||||
### Dummyrunner hints
|
||||
|
||||
- Don't start with too many dummies. The Dummyrunner taxes the server much more
|
||||
than 'real' users tend to do. Start with 10-100 to begin with.
|
||||
- Stress-testing can be fun, but also consider what a 'realistic' number of
|
||||
users would be for your game.
|
||||
- Note in the dummyrunner output how many commands/s are being sent to the
|
||||
server by all dummies. This is usually a lot higher than what you'd
|
||||
realistically expect to see from the same number of users.
|
||||
- The default settings sets up a 'lag' measure to measaure the round-about
|
||||
message time. It updates with an average every 30 seconds. It can be worth to
|
||||
have this running for a small number of dummies in one terminal before adding
|
||||
more by starting another dummyrunner in another terminal - the first one will
|
||||
act as a measure of how lag changes with different loads. Also verify the
|
||||
lag-times by entering commands manually in-game.
|
||||
- Check the CPU usage of your server using `top/htop` (linux). In-game, use the
|
||||
`server` command.
|
||||
- You can run the server with `--profiler start` to test it with dummies. Note
|
||||
that the profiler will itself affect server performance, especially memory
|
||||
consumption.
|
||||
- Generally, the dummyrunner system makes for a decent test of general
|
||||
performance; but it is of course hard to actually mimic human user behavior.
|
||||
For this, actual real-game testing is required.
|
||||
|
||||
Generally, the dummyrunner system makes for a decent test of general performance; but it is of
|
||||
course hard to actually mimic human user behavior. For this, actual real-game testing is required.
|
||||
|
|
@ -85,7 +85,7 @@ You can now just do
|
|||
And even remove the default one if they don't want to use it
|
||||
|
||||
channel/unalias public
|
||||
public Hello
|
||||
public Hello (gives a command-not-found error now)
|
||||
|
||||
But you can also use your alias with the `channel` command:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Toc
|
||||
- [API root](api/evennia-api.rst)
|
||||
|
||||
- [Coding/Coding Introduction](Coding/Coding-Introduction)
|
||||
- [Coding/Coding Overview](Coding/Coding-Overview)
|
||||
- [Coding/Continuous Integration](Coding/Continuous-Integration)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -102,7 +102,7 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ to accounts respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pemit', 'remit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['remit', 'pemit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -286,7 +286,7 @@ to accounts respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ skipping, reloading etc.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcmd', 'batchcommand']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcommand', 'batchcmd']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -107,7 +107,7 @@ skipping, reloading etc.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ You can specify the /force switch to bypass this confirmation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDestroy.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['delete', 'del']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['del', 'delete']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -571,7 +571,7 @@ You can specify the /force switch to bypass this confirmation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDestroy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delete del', 'category': 'building', 'key': 'destroy', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'del delete', 'category': 'building', 'key': 'destroy', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -1269,7 +1269,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['update', 'type', 'swap', 'parent']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['update', 'parent', 'swap', 'type']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1300,7 +1300,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'update type swap parent', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'update parent swap type', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -1584,7 +1584,7 @@ one is given.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['search', 'locate']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['locate', 'search']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1615,7 +1615,7 @@ one is given.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'search locate', 'category': 'building', 'key': 'find', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'locate search', 'category': 'building', 'key': 'find', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -113,7 +113,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -144,7 +144,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -536,7 +536,7 @@ placing it in their inventory.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdSay.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['"', "'"]</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ["'", '"']</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -562,7 +562,7 @@ placing it in their inventory.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdSay.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -642,7 +642,7 @@ automatically begin with your name.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdPose.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['emote', ':']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':', 'emote']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -678,7 +678,7 @@ space.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdPose.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'emote :', 'category': 'general', 'key': 'pose', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ': emote', 'category': 'general', 'key': 'pose', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -701,7 +701,7 @@ which permission groups you are a member of.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['groups', 'hierarchy']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hierarchy', 'groups']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -732,7 +732,7 @@ which permission groups you are a member of.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ given, <nr> defaults to 10.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['db', 'listobjs', 'listobjects', 'stats']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['db', 'listobjects', 'listobjs', 'stats']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -412,7 +412,7 @@ given, <nr> defaults to 10.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'db listobjs listobjects stats', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'db listobjects listobjs stats', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ connect “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'con', 'co']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -95,7 +95,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -119,7 +119,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -150,7 +150,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -224,7 +224,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -250,7 +250,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ at them with this command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -110,7 +110,7 @@ that is checked by the @ic command directly.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look <character>\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n "self".\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look <character>\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n "self".\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'con', 'co']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -105,7 +105,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -127,7 +127,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -163,7 +163,7 @@ name enclosed in quotes:</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -227,7 +227,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -253,7 +253,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ the operation will be general or on the room.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdGiveUp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'chicken out', 'abort', 'quit']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['quit', 'q', 'chicken out', 'abort']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -172,7 +172,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdGiveUp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q chicken out abort quit', 'category': 'evscaperoom', 'key': 'give up', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'quit q chicken out abort', 'category': 'evscaperoom', 'key': 'give up', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -193,7 +193,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -227,7 +227,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'evscaperoom', 'key': 'look', 'tags': '', 'text': '\n Look at the room, an object or the currently focused object\n\n Usage:\n look [obj]\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'evscaperoom', 'key': 'look', 'tags': '', 'text': '\n Look at the room, an object or the currently focused object\n\n Usage:\n look [obj]\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -308,7 +308,7 @@ shout</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdSpeak.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shout', 'whisper', ';']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [';', 'whisper', 'shout']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -337,7 +337,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdSpeak.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'shout whisper ;', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '; whisper shout', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -365,7 +365,7 @@ emote /me points to /box and /lever.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdEmote.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':', 'pose']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdEmote.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pose', ':']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdEmote.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -404,7 +404,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdEmote.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ': pose', 'category': 'general', 'key': 'emote', 'tags': '', 'text': '\n Perform a free-form emote. Use /me to\n include yourself in the emote and /name\n to include other objects or characters.\n Use "..." to enact speech.\n\n Usage:\n emote <emote>\n :<emote\n\n Example:\n emote /me smiles at /peter\n emote /me points to /box and /lever.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdEmote.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pose :', 'category': 'general', 'key': 'emote', 'tags': '', 'text': '\n Perform a free-form emote. Use /me to\n include yourself in the emote and /name\n to include other objects or characters.\n Use "..." to enact speech.\n\n Usage:\n emote <emote>\n :<emote\n\n Example:\n emote /me smiles at /peter\n emote /me points to /box and /lever.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdEmote.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -427,7 +427,7 @@ looks and what actions is available.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdFocus.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'unfocus', 'e', 'examine']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['unfocus', 'e', 'examine', 'ex']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -456,7 +456,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdFocus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex unfocus e examine', 'category': 'evscaperoom', 'key': 'focus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unfocus e examine ex', 'category': 'evscaperoom', 'key': 'focus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -518,7 +518,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdGet.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inventory', 'give', 'inv']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i', 'give', 'inventory']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -542,7 +542,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdGet.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inventory give inv', 'category': 'evscaperoom', 'key': 'get', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inv i give inventory', 'category': 'evscaperoom', 'key': 'get', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -563,7 +563,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdRerouter.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@open', '@dig']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdRerouter.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@dig', '@open']</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdRerouter.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -586,7 +586,7 @@ to all the variables defined therein.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.evscaperoom.commands.CmdRerouter.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@open @dig', 'category': 'general', 'key': 'open', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdRerouter.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@dig @open', 'category': 'general', 'key': 'open', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}</em><a class="headerlink" href="#evennia.contrib.evscaperoom.commands.CmdRerouter.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -297,7 +297,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.ingame_python.commands.CmdCallback.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@callbacks', '@callback', '@calls']</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@callback', '@calls', '@callbacks']</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -134,7 +134,7 @@ on user permission.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.ingame_python.commands.CmdCallback.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@callbacks @callback @calls', 'category': 'building', 'key': '@call', 'tags': '', 'text': '\n Command to edit callbacks.\n '}</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@callback @calls @callbacks', 'category': 'building', 'key': '@call', 'tags': '', 'text': '\n Command to edit callbacks.\n '}</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ a different language.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdSay.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['"', "'"]</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ["'", '"']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -663,7 +663,7 @@ a different language.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdSay.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -802,7 +802,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdRecog.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['forget', 'recognize']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['recognize', 'forget']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -829,7 +829,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdRecog.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'forget recognize', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'recognize forget', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['examine', 'ex', 'listen', 'l', 'feel', 'get']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'get', 'examine', 'feel', 'listen', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -459,7 +459,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'examine ex listen l feel get', 'category': 'general', 'key': 'look', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex get examine feel listen l', 'category': 'general', 'key': 'look', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ of the object. We overload it with our own version.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['burn', 'light']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['light', 'burn']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -389,7 +389,7 @@ to sit on a “lightable” object, we operate only on self.obj.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'burn light', 'category': 'tutorialworld', 'key': 'on', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'light burn', 'category': 'tutorialworld', 'key': 'on', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -493,7 +493,7 @@ shift green root up/down</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shiftroot', 'move', 'push', 'pull']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shiftroot', 'push', 'pull', 'move']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -529,7 +529,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'shiftroot move push pull', 'category': 'tutorialworld', 'key': 'shift', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'shiftroot push pull move', 'category': 'tutorialworld', 'key': 'shift', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -546,7 +546,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['press button', 'button', 'push button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['button', 'press button', 'push button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -572,7 +572,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press button button push button', 'category': 'tutorialworld', 'key': 'press', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'button press button push button', 'category': 'tutorialworld', 'key': 'press', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -716,7 +716,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['stab', 'thrust', 'kill', 'pierce', 'parry', 'defend', 'chop', 'hit', 'bash', 'fight', 'slash']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['chop', 'defend', 'thrust', 'stab', 'kill', 'hit', 'slash', 'bash', 'parry', 'fight', 'pierce']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -742,7 +742,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'stab thrust kill pierce parry defend chop hit bash fight slash', 'category': 'tutorialworld', 'key': 'attack', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chop defend thrust stab kill hit slash bash parry fight pierce', 'category': 'tutorialworld', 'key': 'attack', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ code except for adding in the details.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -200,7 +200,7 @@ code except for adding in the details.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -866,7 +866,7 @@ to find something.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['search', 'fiddle', 'feel around', 'l', 'feel']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel around', 'search', 'fiddle', 'feel', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -894,7 +894,7 @@ random chance of eventually finding a light source.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'search fiddle feel around l feel', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel around search fiddle feel l', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -68,13 +68,83 @@ change which actions by adding a path to</p>
|
|||
</div></blockquote>
|
||||
<p>in your settings. See utils.dummyrunner_actions.py
|
||||
for instructions on how to define this module.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">CmdDummyRunnerEchoResponse</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#CmdDummyRunnerEchoResponse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.commands.command.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||||
<p>Dummyrunner command measuring the round-about response time
|
||||
from sending to receiving a result.</p>
|
||||
<dl class="simple">
|
||||
<dt>Usage:</dt><dd><p>dummyrunner_echo_response <timestamp></p>
|
||||
</dd>
|
||||
<dt>Responds with</dt><dd><p>dummyrunner_echo_response:<timestamp>,<current_time></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The dummyrunner will send this and then compare the send time
|
||||
with the receive time on both ends.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key">
|
||||
<code class="sig-name descname">key</code><em class="property"> = 'dummyrunner_echo_response'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">
|
||||
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#CmdDummyRunnerEchoResponse.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This is the actual executing part of the command. It is
|
||||
called directly after self.parse(). See the docstring of this
|
||||
module for which object properties are available (beyond those
|
||||
set in self.parse())</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category">
|
||||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage">
|
||||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'dummyrunner_echo_response', 'tags': '', 'text': '\n Dummyrunner command measuring the round-about response time\n from sending to receiving a result.\n\n Usage:\n dummyrunner_echo_response <timestamp>\n\n Responds with\n dummyrunner_echo_response:<timestamp>,<current_time>\n\n The dummyrunner will send this and then compare the send time\n with the receive time on both ends.\n\n '}</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">DummyRunnerCmdSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cmdsetobj</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyRunnerCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.commands.cmdset.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||||
<p>Dummyrunner injected cmdset.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">
|
||||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyRunnerCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||||
class, and should take care of populating the cmdset by use of
|
||||
self.add().</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.server.profiling.dummyrunner.DummyRunnerCmdSet'</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.server.profiling.dummyrunner.idcounter">
|
||||
<code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">idcounter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#idcounter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.idcounter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Makes unique ids.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>count (int)</em> – A globally unique counter.</p>
|
||||
<dd class="field-odd"><p><em>str</em> – A globally unique id.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -111,6 +181,11 @@ for instructions on how to define this module.</p>
|
|||
<p>Handles connection to a running Evennia server,
|
||||
mimicking a real account by sending commands on
|
||||
a timer.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyClient.report">
|
||||
<code class="sig-name descname">report</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">text</span></em>, <em class="sig-param"><span class="n">clientkey</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyClient.report"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyClient.report" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyClient.connectionMade">
|
||||
<code class="sig-name descname">connectionMade</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyClient.connectionMade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyClient.connectionMade" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -181,13 +256,28 @@ all “intelligence” of the dummy client.</p>
|
|||
<dl class="py class">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.profiling.dummyrunner.</code><code class="sig-name descname">DummyFactory</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">actions</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.internet.protocol.ClientFactory</span></code></p>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.internet.protocol.ReconnectingClientFactory</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.protocol">
|
||||
<code class="sig-name descname">protocol</code><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.protocol" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="#evennia.server.profiling.dummyrunner.DummyClient" title="evennia.server.profiling.dummyrunner.DummyClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">DummyClient</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.initialDelay">
|
||||
<code class="sig-name descname">initialDelay</code><em class="property"> = 1</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.initialDelay" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.maxDelay">
|
||||
<code class="sig-name descname">maxDelay</code><em class="property"> = 1</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.maxDelay" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.noisy">
|
||||
<code class="sig-name descname">noisy</code><em class="property"> = False</em><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.noisy" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.profiling.dummyrunner.DummyFactory.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">actions</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner.html#DummyFactory.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner.DummyFactory.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@
|
|||
the actions available to dummy accounts.</p>
|
||||
<p>The settings are global variables:</p>
|
||||
<ul class="simple">
|
||||
<li><p>TIMESTEP - time in seconds between each ‘tick’</p></li>
|
||||
<li><p>CHANCE_OF_ACTION - chance 0-1 of action happening</p></li>
|
||||
<li><p>CHANCE_OF_LOGIN - chance 0-1 of login happening</p></li>
|
||||
<li><p>TIMESTEP - time in seconds between each ‘tick’. 1 is a good start.</p></li>
|
||||
<li><p>CHANCE_OF_ACTION - chance 0-1 of action happening. Default is 0.5.</p></li>
|
||||
<li><p>CHANCE_OF_LOGIN - chance 0-1 of login happening. 0.01 is a good number.</p></li>
|
||||
<li><p>TELNET_PORT - port to use, defaults to settings.TELNET_PORT</p></li>
|
||||
<li><p>ACTIONS - see below</p></li>
|
||||
</ul>
|
||||
|
|
@ -59,16 +59,15 @@ the actions available to dummy accounts.</p>
|
|||
chance of occurring given by CHANCE_OF_LOGIN. This function is usually
|
||||
responsible for logging in the account. The second entry is always
|
||||
called when the dummyrunner disconnects from the server and should
|
||||
thus issue a logout command. The other entries are tuples (chance,
|
||||
thus issue a logout command. The other entries are tuples (chance,
|
||||
func). They are picked randomly, their commonality based on the
|
||||
cumulative chance given (the chance is normalized between all options
|
||||
so if will still work also if the given chances don’t add up to 1).
|
||||
Since each function can return a list of game-command strings, each
|
||||
function may result in multiple operations.</p>
|
||||
so if will still work also if the given chances don’t add up to 1).</p>
|
||||
<p>The PROFILE variable define pre-made ACTION tuples for convenience.</p>
|
||||
<p>Each function should return an iterable of one or more command-call
|
||||
strings (like “look here”), so each can group multiple command operations.</p>
|
||||
<p>An action-function is called with a “client” argument which is a
|
||||
reference to the dummy client currently performing the action. It
|
||||
returns a string or a list of command strings to execute. Use the
|
||||
client object for optionally saving data between actions.</p>
|
||||
reference to the dummy client currently performing the action.</p>
|
||||
<p>The client object has the following relevant properties and methods:</p>
|
||||
<ul class="simple">
|
||||
<li><p>key - an optional client key. This is only used for dummyrunner output.
|
||||
|
|
@ -171,6 +170,16 @@ commands (such as creating an account and logging in).</p>
|
|||
<dd><p>move through south exit if available</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.server.profiling.dummyrunner_settings.c_measure_lag">
|
||||
<code class="sig-prename descclassname">evennia.server.profiling.dummyrunner_settings.</code><code class="sig-name descname">c_measure_lag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">client</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner_settings.html#c_measure_lag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner_settings.c_measure_lag" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Special dummyrunner command, injected in c_login. It measures
|
||||
response time. Including this in the ACTION tuple will give more
|
||||
dummyrunner output about just how fast commands are being processed.</p>
|
||||
<p>The dummyrunner will treat this special and inject the
|
||||
{timestamp} just before sending.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ caches for automatic key eviction and persistence configurability.</p>
|
|||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<em>str</em>) – Name of this throttle.</p></li>
|
||||
<li><p><strong>limit</strong> (<em>int</em>) – Max number of failures before imposing limiter</p></li>
|
||||
<li><p><strong>limit</strong> (<em>int</em>) – Max number of failures before imposing limiter. If <strong>None</strong>,
|
||||
the throttle is disabled.</p></li>
|
||||
<li><p><strong>timeout</strong> (<em>int</em>) – number of timeout seconds after
|
||||
max number of tries has been reached.</p></li>
|
||||
<li><p><strong>cache_size</strong> (<em>int</em>) – Max number of attempts to record per IP within a
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ indentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':A', ':f', ':S', ':p', ':UU', '::', ':fd', ':q!', ':fi', ':q', ':uu', ':<', ':w', ':::', ':I', ':i', ':x', ':s', ':wq', ':h', ':>', ':', ':r', ':DD', ':y', ':!', ':dw', ':dd', ':j', ':=', ':u', ':echo']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':dd', ':j', ':wq', ':fd', ':dw', ':I', ':r', ':u', ':h', ':', ':i', ':q', ':<', ':=', ':S', ':p', ':y', ':w', '::', ':A', ':fi', ':x', ':!', ':>', ':s', ':q!', ':echo', ':UU', ':f', ':uu', ':::', ':DD']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -303,7 +303,7 @@ efficient presentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':A :f :S :p :UU :: :fd :q! :fi :q :uu :< :w ::: :I :i :x :s :wq :h :> : :r :DD :y :! :dw :dd :j := :u :echo', 'category': 'general', 'key': ':editor_command_group', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':dd :j :wq :fd :dw :I :r :u :h : :i :q :< := :S :p :y :w :: :A :fi :x :! :> :s :q! :echo :UU :f :uu ::: :DD', 'category': 'general', 'key': ':editor_command_group', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -941,7 +941,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['n', 'yes', 'y', 'no', '__nomatch_command', 'abort', 'a']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['y', 'a', 'no', 'n', 'abort', '__nomatch_command', 'yes']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -967,7 +967,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'n yes y no __nomatch_command abort a', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'y a no n abort __nomatch_command yes', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'n', 'end', 'back', 'b', 'top', 't', 'e', 'abort', 'a', 'quit', 'next']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['b', 'e', 'end', 'top', 'back', 'quit', 'a', 'q', 'n', 'abort', 't', 'next']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -102,7 +102,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q n end back b top t e abort a quit next', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'b e end top back quit a q n abort t next', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -1112,6 +1112,8 @@
|
|||
<li><a href="api/evennia.help.models.html#evennia.help.models.HelpEntry.aliases">(evennia.help.models.HelpEntry attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.aliases">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.aliases">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject.aliases">(evennia.typeclasses.models.TypedObject attribute)</a>
|
||||
</li>
|
||||
|
|
@ -1572,6 +1574,8 @@
|
|||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.DarkCmdSet.at_cmdset_creation">(evennia.contrib.tutorial_world.rooms.DarkCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.TutorialRoomCmdSet.at_cmdset_creation">(evennia.contrib.tutorial_world.rooms.TutorialRoomCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.at_cmdset_creation">(evennia.server.profiling.dummyrunner.DummyRunnerCmdSet method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.EvEditorCmdSet.at_cmdset_creation">(evennia.utils.eveditor.EvEditorCmdSet method)</a>
|
||||
</li>
|
||||
|
|
@ -2543,6 +2547,8 @@
|
|||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_logout">c_logout() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_looks">c_looks() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_measure_lag">c_measure_lag() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner_settings.html#evennia.server.profiling.dummyrunner_settings.c_moves">c_moves() (in module evennia.server.profiling.dummyrunner_settings)</a>
|
||||
</li>
|
||||
|
|
@ -3072,6 +3078,8 @@
|
|||
<li><a href="api/evennia.contrib.clothing.html#evennia.contrib.clothing.CmdDrop">(class in evennia.contrib.clothing)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse">CmdDummyRunnerEchoResponse (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdEast">CmdEast (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase">CmdEditorBase (class in evennia.utils.eveditor)</a>
|
||||
|
|
@ -3192,14 +3200,14 @@
|
|||
</li>
|
||||
<li><a href="api/evennia.commands.default.building.html#evennia.commands.default.building.CmdLock">CmdLock (class in evennia.commands.default.building)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.commands.default.general.html#evennia.commands.default.general.CmdLook">CmdLook (class in evennia.commands.default.general)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="api/evennia.contrib.evscaperoom.commands.html#evennia.contrib.evscaperoom.commands.CmdLook">(class in evennia.contrib.evscaperoom.commands)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdLookBridge">CmdLookBridge (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.tutorial_world.rooms.html#evennia.contrib.tutorial_world.rooms.CmdLookDark">CmdLookDark (class in evennia.contrib.tutorial_world.rooms)</a>
|
||||
|
|
@ -4651,6 +4659,8 @@
|
|||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient">DummyClient (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory">DummyFactory (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet">DummyRunnerCmdSet (class in evennia.server.profiling.dummyrunner)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.sessionhandler.html#evennia.server.sessionhandler.DummySession">DummySession (class in evennia.server.sessionhandler)</a>
|
||||
</li>
|
||||
|
|
@ -7502,6 +7512,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.func">(evennia.contrib.unixcommand.UnixCommand method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.func">(evennia.objects.objects.ExitCommand method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.func">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorGroup.func">(evennia.utils.eveditor.CmdEditorGroup method)</a>
|
||||
</li>
|
||||
|
|
@ -8768,6 +8780,8 @@
|
|||
<li><a href="api/evennia.help.filehelp.html#evennia.help.filehelp.FileHelpEntry.help_category">(evennia.help.filehelp.FileHelpEntry attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.help_category">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.help_category">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.help_category">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -9018,6 +9032,8 @@
|
|||
<li><a href="api/evennia.server.portal.grapevine.html#evennia.server.portal.grapevine.RestartingWebsocketServerFactory.initialDelay">(evennia.server.portal.grapevine.RestartingWebsocketServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.irc.html#evennia.server.portal.irc.IRCBotFactory.initialDelay">(evennia.server.portal.irc.IRCBotFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.initialDelay">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.contrib.turnbattle.tb_basic.html#evennia.contrib.turnbattle.tb_basic.TBBasicTurnHandler.initialize_for_combat">initialize_for_combat() (evennia.contrib.turnbattle.tb_basic.TBBasicTurnHandler method)</a>
|
||||
|
|
@ -9032,10 +9048,10 @@
|
|||
<li><a href="api/evennia.contrib.turnbattle.tb_range.html#evennia.contrib.turnbattle.tb_range.TBRangeTurnHandler.initialize_for_combat">(evennia.contrib.turnbattle.tb_range.TBRangeTurnHandler method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.typeclasses.attributes.html#evennia.typeclasses.attributes.initialize_nick_templates">initialize_nick_templates() (in module evennia.typeclasses.attributes)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="api/evennia.typeclasses.attributes.html#evennia.typeclasses.attributes.initialize_nick_templates">initialize_nick_templates() (in module evennia.typeclasses.attributes)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.web.admin.accounts.html#evennia.web.admin.accounts.AccountAdmin.inlines">inlines (evennia.web.admin.accounts.AccountAdmin attribute)</a>
|
||||
|
||||
<ul>
|
||||
|
|
@ -9802,6 +9818,8 @@
|
|||
<li><a href="api/evennia.server.portal.amp.html#evennia.server.portal.amp.MsgServer2Portal.key">(evennia.server.portal.amp.MsgServer2Portal attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.amp.html#evennia.server.portal.amp.MsgStatus.key">(evennia.server.portal.amp.MsgStatus attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.key">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.key">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -10578,6 +10596,8 @@
|
|||
<li><a href="api/evennia.help.filehelp.html#evennia.help.filehelp.FileHelpEntry.lock_storage">(evennia.help.filehelp.FileHelpEntry attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.lock_storage">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.lock_storage">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.lock_storage">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
@ -11104,6 +11124,8 @@
|
|||
<li><a href="api/evennia.server.portal.grapevine.html#evennia.server.portal.grapevine.RestartingWebsocketServerFactory.maxDelay">(evennia.server.portal.grapevine.RestartingWebsocketServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.irc.html#evennia.server.portal.irc.IRCBotFactory.maxDelay">(evennia.server.portal.irc.IRCBotFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.maxDelay">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestHelp.maxDiff">maxDiff (evennia.commands.default.tests.TestHelp attribute)</a>
|
||||
|
|
@ -12335,6 +12357,8 @@
|
|||
<li><a href="api/evennia.server.portal.ssh.html#evennia.server.portal.ssh.TerminalSessionTransport_getPeer.noisy">(evennia.server.portal.ssh.TerminalSessionTransport_getPeer attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.telnet.html#evennia.server.portal.telnet.TelnetServerFactory.noisy">(evennia.server.portal.telnet.TelnetServerFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyFactory.noisy">(evennia.server.profiling.dummyrunner.DummyFactory attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.webserver.html#evennia.server.webserver.Website.noisy">(evennia.server.webserver.Website attribute)</a>
|
||||
</li>
|
||||
|
|
@ -13105,6 +13129,8 @@
|
|||
<li><a href="api/evennia.scripts.scripts.html#evennia.scripts.scripts.Store.path">(evennia.scripts.scripts.Store attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.models.html#evennia.server.models.ServerConfig.path">(evennia.server.models.ServerConfig attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyRunnerCmdSet.path">(evennia.server.profiling.dummyrunner.DummyRunnerCmdSet attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.memplot.html#evennia.server.profiling.memplot.Memplot.path">(evennia.server.profiling.memplot.Memplot attribute)</a>
|
||||
</li>
|
||||
|
|
@ -13786,6 +13812,8 @@
|
|||
<li><a href="api/evennia.utils.evtable.html#evennia.utils.evtable.EvCell.replace_data">replace_data() (evennia.utils.evtable.EvCell method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.contrib.extended_room.html#evennia.contrib.extended_room.ExtendedRoom.replace_timeslots">replace_timeslots() (evennia.contrib.extended_room.ExtendedRoom method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.DummyClient.report">report() (evennia.server.profiling.dummyrunner.DummyClient method)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.portal.ssh.html#evennia.server.portal.ssh.AccountDBPasswordChecker.requestAvatarId">requestAvatarId() (evennia.server.portal.ssh.AccountDBPasswordChecker method)</a>
|
||||
</li>
|
||||
|
|
@ -14723,6 +14751,8 @@
|
|||
<li><a href="api/evennia.contrib.unixcommand.html#evennia.contrib.unixcommand.UnixCommand.search_index_entry">(evennia.contrib.unixcommand.UnixCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.ExitCommand.search_index_entry">(evennia.objects.objects.ExitCommand attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.server.profiling.dummyrunner.html#evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse.search_index_entry">(evennia.server.profiling.dummyrunner.CmdDummyRunnerEchoResponse attribute)</a>
|
||||
</li>
|
||||
<li><a href="api/evennia.utils.eveditor.html#evennia.utils.eveditor.CmdEditorBase.search_index_entry">(evennia.utils.eveditor.CmdEditorBase attribute)</a>
|
||||
</li>
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -42,7 +42,6 @@
|
|||
<h1>Toc<a class="headerlink" href="#toc" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="api/evennia-api.html">API root</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Coding/Coding-Introduction.html">Coding/Coding Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Coding/Coding-Overview.html">Coding/Coding Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Coding/Continuous-Integration.html">Coding/Continuous Integration</a></li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue