<linkrel="prev"title="Large Language Model (“Chat-bot AI”) integration"href="Contrib-Llm.html"/>
</head><body>
<divclass="admonition important">
<pclass="first admonition-title">Note</p>
<pclass="last">You are reading an old version of the Evennia documentation. <ahref="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.
<h1>Roleplaying base system for Evennia<aclass="headerlink"href="#roleplaying-base-system-for-evennia"title="Permalink to this headline">¶</a></h1>
<p>Contribution by Griatch, 2015</p>
<p>A full roleplaying emote system. Short-descriptions and recognition (only know people by their looks until you assign a name to them). Room poses. Masks/disguises (hide your description). Speak directly in emote, with optional language obscuration (words get garbled if you don’t know the language, you can also have different languages with different ‘sounding’ garbling). Whispers can be partly overheard from a distance. A very powerful in-emote reference system, for referencing and differentiate targets (including objects).</p>
<p>The system contains of two main modules - the roleplaying emote system and the language obscuration module.</p>
<sectionid="roleplaying-emotes">
<h2>Roleplaying emotes<aclass="headerlink"href="#roleplaying-emotes"title="Permalink to this headline">¶</a></h2>
<p>This module contains the ContribRPObject, ContribRPRoom and ContribRPCharacter typeclasses. If you inherit your objects/rooms/character from these (or make them the defaults) from these you will get the following features:</p>
<ulclass="simple">
<li><p>Objects/Rooms will get the ability to have poses and will report the poses of items inside them (the latter most useful for Rooms).</p></li>
<li><p>Characters will get poses and also sdescs (short descriptions) that will be used instead of their keys. They will gain commands for managing recognition (custom sdesc-replacement), masking themselves as well as an advanced free-form emote command.</p></li>
</ul>
<p>In more detail, This RP base system introduces the following features to a game, common to many RP-centric games:</p>
<ulclass="simple">
<li><p>emote system using director stance emoting (names/sdescs). This uses a customizable replacement noun (/me, @ etc) to represent you in the emote. You can use /sdesc, /nick, /key or /alias to reference objects in the room. You can use any number of sdesc sub-parts to differentiate a local sdesc, or use /1-sdesc etc to differentiate them. The emote also identifies nested says and separates case.</p></li>
<li><p>sdesc obscuration of real character names for use in emotes and in any referencing such as object.search(). This relies on an SdescHandler <codeclass="docutils literal notranslate"><spanclass="pre">sdesc</span></code> being set on the Character and makes use of a custom Character.get_display_name hook. If sdesc is not set, the character’s <codeclass="docutils literal notranslate"><spanclass="pre">key</span></code> is used instead. This is particularly used in the emoting system.</p></li>
<li><p>recog system to assign your own nicknames to characters, can then be used for referencing. The user may recog a user and assign any personal nick to them. This will be shown in descriptions and used to reference them. This is making use of the nick functionality of Evennia.</p></li>
<li><p>masks to hide your identity (using a simple lock).</p></li>
<li><p>pose system to set room-persistent poses, visible in room descriptions and when looking at the person/object. This is a simple Attribute that modifies how the characters is viewed when in a room as sdesc + pose.</p></li>
<li><p>in-emote says, including seamless integration with language obscuration routine (such as contrib/rplanguage.py)</p></li>
</ul>
<sectionid="installation">
<h3>Installation:<aclass="headerlink"href="#installation"title="Permalink to this headline">¶</a></h3>
<p>Add <codeclass="docutils literal notranslate"><spanclass="pre">RPSystemCmdSet</span></code> from this module to your CharacterCmdSet:</p>
<p>Above is an example of a player with an sdesc “a tall man”. It is also an example of a static <em>pose</em>: The “standing by the bar” has been set by the player of the tall man, so that people looking at him can tell at a glance what is going on.</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>> emote /me looks at /Tall and says "Hello!"
</pre></div>
</div>
<p>I see:</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>Griatch looks at Tall man and says "Hello".
</pre></div>
</div>
<p>Tall man (assuming his name is Tom) sees:</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>The godlike figure looks at Tom and says "Hello".
</pre></div>
</div>
<p>Note that by default, the case of the tag matters, so <codeclass="docutils literal notranslate"><spanclass="pre">/tall</span></code> will lead to ‘tall man’ while <codeclass="docutils literal notranslate"><spanclass="pre">/Tall</span></code> will become ‘Tall man’ and /TALL becomes /TALL MAN. If you don’t want this behavior, you can pass case_sensitive=False to the <codeclass="docutils literal notranslate"><spanclass="pre">send_emote</span></code> function.</p>
<h2>Language and whisper obfuscation system<aclass="headerlink"href="#language-and-whisper-obfuscation-system"title="Permalink to this headline">¶</a></h2>
<p>This module is intented to be used with an emoting system (such as <codeclass="docutils literal notranslate"><spanclass="pre">contrib/rpg/rpsystem.py</span></code>). It offers the ability to obfuscate spoken words in the game in various ways:</p>
<ulclass="simple">
<li><p>Language: The language functionality defines a pseudo-language map to any number of languages. The string will be obfuscated depending on a scaling that (most likely) will be input as a weighted average of the language skill of the speaker and listener.</p></li>
<li><p>Whisper: The whisper functionality will gradually “fade out” a whisper along as scale 0-1, where the fading is based on gradually removing sections of the whisper that is (supposedly) easier to overhear (for example “s” sounds tend to be audible even when no other meaning can be determined).</p></li>
</ul>
<sectionid="id1">
<h3>Installation<aclass="headerlink"href="#id1"title="Permalink to this headline">¶</a></h3>
<p>This module adds no new commands; embed it in your say/emote/whisper commands.</p>
</section>
<sectionid="usage">
<h3>Usage:<aclass="headerlink"href="#usage"title="Permalink to this headline">¶</a></h3>
<p>To set up new languages, import and use the <codeclass="docutils literal notranslate"><spanclass="pre">add_language()</span></code> helper method in this module. This allows you to customize the “feel” of the semi-random language you are creating. Especially the <codeclass="docutils literal notranslate"><spanclass="pre">word_length_variance</span></code> helps vary the length of translated words compared to the original and can help change the “feel” for the language you are creating. You can also add your own dictionary and “fix” random words for a list of input words.</p>
<p>Below is an example of “elvish”, using “rounder” vowels and sounds:</p>
<spanclass="c1"># you need a representative of all of the minimal grammars here, so if a</span>
<spanclass="c1"># grammar v exists, there must be atleast one phoneme available with only</span>
<spanclass="c1"># one vowel in it</span>
<spanclass="n">phonemes</span><spanclass="o">=</span><spanclass="p">(</span><spanclass="s2">"oi oh ee ae aa eh ah ao aw ay er ey ow ia ih iy "</span>
<spanclass="s2">"oy ua uh uw y p b t d f v t dh s z sh zh ch jh k "</span>
<spanclass="s2">"ng g m n l r w"</span><spanclass="p">)</span>
<spanclass="c1"># how much the translation varies in length compared to the original. 0 is</span>
<spanclass="c1"># smallest, higher values give ever bigger randomness (including removing</span>
<p>This will produce a decicively more “rounded” and “soft” language than the default one. The few <codeclass="docutils literal notranslate"><spanclass="pre">manual_translations</span></code> also make sure to make it at least look superficially “reasonable”.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">auto_translations</span></code> keyword is useful, this accepts either a list or a path to a text-file (with one word per line). This listing of words is used to ‘fix’ translations for those words according to the grammatical rules. These translations are stored persistently as long as the language exists.</p>
<p>This allows to quickly build a large corpus of translated words that never change. This produces a language that seem moderately consistent, since words like ‘the’ will always be translated to the same thing. The disadvantage (or advantage, depending on your game) is that players can end up learn what words mean even if their characters don’t know the langauge.</p>
<hrclass="docutils"/>
<p><small>This document page is generated from <codeclass="docutils literal notranslate"><spanclass="pre">evennia/contrib/rpg/rpsystem/README.md</span></code>. Changes to this
file will be overwritten, so edit that file rather than this one.</small></p>
<liclass="nav-item nav-item-this"><ahref="">Roleplaying base system for Evennia</a></li>
</ul>
</div>
<divclass="admonition important">
<pclass="first admonition-title">Note</p>
<pclass="last">You are reading an old version of the Evennia documentation. <ahref="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.
</div>
<divclass="footer"role="contentinfo">
© Copyright 2023, The Evennia developer community.
Created using <ahref="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.