mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 06:16:31 +01:00
365 lines
No EOL
32 KiB
HTML
365 lines
No EOL
32 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Planning the use of some useful contribs — Evennia 1.0-dev documentation</title>
|
||
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
|
||
<script src="../../../_static/jquery.js"></script>
|
||
<script src="../../../_static/underscore.js"></script>
|
||
<script src="../../../_static/doctools.js"></script>
|
||
<script src="../../../_static/language_data.js"></script>
|
||
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../../../genindex.html" />
|
||
<link rel="search" title="Search" href="../../../search.html" />
|
||
<link rel="next" title="Evennia Starting Tutorial (Part 3)" href="../Part3/Starting-Part3.html" />
|
||
<link rel="prev" title="On Planning a Game" href="Game-Planning.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="../Part3/Starting-Part3.html" title="Evennia Starting Tutorial (Part 3)"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Game-Planning.html" title="On Planning a Game"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Part1/Starting-Part1.html" >Starting Tutorial (Part 1)</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="Starting-Part2.html" accesskey="U">Evennia Starting Tutorial (Part 2)</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Planning the use of some useful contribs</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="planning-the-use-of-some-useful-contribs">
|
||
<h1>Planning the use of some useful contribs<a class="headerlink" href="#planning-the-use-of-some-useful-contribs" title="Permalink to this headline">¶</a></h1>
|
||
<p>Evennia is deliberately bare-bones out of the box. The idea is that you should be as unrestricted as possible
|
||
in designing your game. This is why you can easily replace the few defaults we have and why we don’t try to
|
||
prescribe any major game systems on you.</p>
|
||
<p>That said, Evennia <em>does</em> offer some more game-opinionated <em>optional</em> stuff. These are referred to as <em>Contribs</em>
|
||
and is an ever-growing treasure trove of code snippets, concepts and even full systems you can pick and choose
|
||
from to use, tweak or take inspiration from when you make your game.</p>
|
||
<p>The <a class="reference internal" href="../../../Contribs/Contrib-Overview.html"><span class="doc">Contrib overview</span></a> page gives the full list of the current roster of contributions. On
|
||
this page we will review a few contribs we will make use of for our game. We will do the actual installation
|
||
of them when we start coding in the next part of this tutorial series. While we will introduce them here, you
|
||
are wise to read their doc-strings yourself for the details.</p>
|
||
<p>This is the things we know we need:</p>
|
||
<ul class="simple">
|
||
<li><p>A barter system</p></li>
|
||
<li><p>Character generation</p></li>
|
||
<li><p>Some concept of wearing armor</p></li>
|
||
<li><p>The ability to roll dice</p></li>
|
||
<li><p>Rooms with awareness of day, night and season</p></li>
|
||
<li><p>Roleplaying with short-descs, poses and emotes</p></li>
|
||
<li><p>Quests</p></li>
|
||
<li><p>Combat (with players and against monsters)</p></li>
|
||
</ul>
|
||
<div class="section" id="barter-contrib">
|
||
<h2>Barter contrib<a class="headerlink" href="#barter-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.barter.html">source</a></p>
|
||
<p>Reviewing this contrib suggests that it allows for safe trading between two parties. The basic principle
|
||
is that the parties puts up the stuff they want to sell and the system will guarantee that these systems are
|
||
exactly what is being offered. Both sides can modify their offers (bartering) until both mark themselves happy
|
||
with the deal. Only then the deal is sealed and the objects are exchanged automatically. Interestingly, this
|
||
works just fine for money too - just put coin objects on one side of the transaction.</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>Sue > trade Tom: Hi, I have a necklace to sell; wanna trade for a healing potion?
|
||
Tom > trade Sue: Hm, I could use a necklace ...
|
||
<both accepted trade. Start trade>
|
||
Sue > offer necklace: This necklace is really worth it.
|
||
Tom > evaluate necklace:
|
||
<Tom sees necklace stats>
|
||
Tom > offer ration: I don't have a healing potion, but I'll trade you an iron ration!
|
||
Sue > Hey, this is a nice necklace, I need more than a ration for it...
|
||
Tom > offer ration, 10gold: Ok, a ration and 10 gold as well.
|
||
Sue > accept: Ok, that sounds fair!
|
||
Tom > accept: Good! Nice doing business with you.
|
||
<goods change hands automatically. Trade ends>
|
||
</pre></div>
|
||
</div>
|
||
<p>Arguably, in a small game you are just fine to just talk to people and use <code class="docutils literal notranslate"><span class="pre">give</span></code> to do the exchange. The
|
||
barter system guarantees trading safety if you don’t trust your counterpart to try to give you the wrong thing or
|
||
to run away with your money.</p>
|
||
<p>We will use the barter contrib as an optional feature for player-player bartering. More importantly we can
|
||
add it for NPC shopkeepers and expand it with a little AI, which allows them to potentially trade in other
|
||
things than boring gold coin.</p>
|
||
</div>
|
||
<div class="section" id="character-generation-contrib">
|
||
<h2>Character generation contrib<a class="headerlink" href="#character-generation-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.chargen.html">source</a></p>
|
||
<p>This contrib is an example module for creating characters. Since we will be using <code class="docutils literal notranslate"><span class="pre">MULTISESSION_MODE=3</span></code> we will
|
||
get a selection screen like this automatically. We also plan to use a proper menu to build our character, so
|
||
we will <em>not</em> be using this contrib.</p>
|
||
</div>
|
||
<div class="section" id="clothing-contrib">
|
||
<h2>Clothing contrib<a class="headerlink" href="#clothing-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.clothing.html">source</a></p>
|
||
<p>This contrib provides a full system primarily aimed at wearing clothes, but it could also work for armor. You wear
|
||
an object in a particular location and this will then be reflected in your character’s description. You can
|
||
also add roleplaying flavor:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">wear</span> <span class="n">helmet</span> <span class="n">slightly</span> <span class="n">askew</span> <span class="n">on</span> <span class="n">her</span> <span class="n">head</span>
|
||
<span class="n">look</span> <span class="bp">self</span>
|
||
<span class="n">Username</span> <span class="ow">is</span> <span class="n">wearing</span> <span class="n">a</span> <span class="n">helmet</span> <span class="n">slightly</span> <span class="n">askew</span> <span class="n">on</span> <span class="n">her</span> <span class="n">head</span><span class="o">.</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>By default there are no ‘body locations’ in this contrib, we will need to expand on it a little to make it useful
|
||
for things like armor. It’s a good contrib to build from though, so that’s what we’ll do.</p>
|
||
</div>
|
||
<div class="section" id="dice-contrib">
|
||
<h2>Dice contrib<a class="headerlink" href="#dice-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.dice.html">source</a></p>
|
||
<p>The dice contrib presents a general dice roller to use in game.</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">roll</span> <span class="mi">2</span><span class="n">d6</span>
|
||
<span class="n">Roll</span><span class="p">(</span><span class="n">s</span><span class="p">):</span> <span class="mi">2</span> <span class="ow">and</span> <span class="mf">5.</span> <span class="n">Total</span> <span class="n">result</span> <span class="ow">is</span> <span class="mf">7.</span>
|
||
<span class="o">></span> <span class="n">roll</span> <span class="mi">1</span><span class="n">d100</span> <span class="o">+</span> <span class="mi">2</span>
|
||
<span class="n">Roll</span><span class="p">(</span><span class="n">s</span><span class="p">):</span> <span class="mf">43.</span> <span class="n">Total</span> <span class="n">result</span> <span class="ow">is</span> <span class="mi">47</span>
|
||
<span class="o">></span> <span class="n">roll</span> <span class="mi">1</span><span class="n">d20</span> <span class="o">></span> <span class="mi">12</span>
|
||
<span class="n">Roll</span><span class="p">(</span><span class="n">s</span><span class="p">):</span> <span class="mf">7.</span> <span class="n">Total</span> <span class="n">result</span> <span class="ow">is</span> <span class="mf">7.</span> <span class="n">This</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">failure</span> <span class="p">(</span><span class="n">by</span> <span class="mi">5</span><span class="p">)</span>
|
||
<span class="o">></span> <span class="n">roll</span><span class="o">/</span><span class="n">hidden</span> <span class="mi">1</span><span class="n">d20</span> <span class="o">></span> <span class="mi">12</span>
|
||
<span class="n">Roll</span><span class="p">(</span><span class="n">s</span><span class="p">):</span> <span class="mf">18.</span> <span class="n">Total</span> <span class="n">result</span> <span class="ow">is</span> <span class="mf">17.</span> <span class="n">This</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">success</span> <span class="p">(</span><span class="n">by</span> <span class="mi">6</span><span class="p">)</span><span class="o">.</span> <span class="p">(</span><span class="ow">not</span> <span class="n">echoed</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>The contrib also has a python function for producing these results in-code. However, while
|
||
we will emulate rolls for our rule system, we’ll do this as simply as possible with Python’s <code class="docutils literal notranslate"><span class="pre">random</span></code>
|
||
module.</p>
|
||
<p>So while this contrib is fun to have around for GMs or for players who want to get a random result
|
||
or play a game, we will not need it for the core of our game.</p>
|
||
</div>
|
||
<div class="section" id="extended-room-contrib">
|
||
<h2>Extended room contrib<a class="headerlink" href="#extended-room-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.extended_room.html">source</a></p>
|
||
<p>This is a custom Room typeclass that changes its description based on time of day and season.</p>
|
||
<p>For example, at night, in wintertime you could show the room as being dark and frost-covered while in daylight
|
||
at summer it could describe a flowering meadow. The description can also contain special markers, so
|
||
<code class="docutils literal notranslate"><span class="pre"><morning></span> <span class="pre">...</span> <span class="pre"></morning></span></code> would include text only visible at morning.</p>
|
||
<p>The extended room also supports <em>details</em>, which are things to “look at” in the room without there having
|
||
to be a separate database object created for it. For example, a player in a church may do <code class="docutils literal notranslate"><span class="pre">look</span> <span class="pre">window</span></code> and
|
||
get a description of the windows without there needing to be an actual <code class="docutils literal notranslate"><span class="pre">window</span></code> object in the room.</p>
|
||
<p>Adding all those extra descriptions can be a lot of work, so they are optional; if not given the room works
|
||
like a normal room.</p>
|
||
<p>The contrib is simple to add and provides a lot of optional flexibility, so we’ll add it to our
|
||
game, why not!</p>
|
||
</div>
|
||
<div class="section" id="rp-system-contrib">
|
||
<h2>RP-System contrib<a class="headerlink" href="#rp-system-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.rpsystem.html">source</a></p>
|
||
<p>This contrib adds a full roleplaying subsystem to your game. It gives every character a “short-description”
|
||
(sdesc) that is what people will see when first meeting them. Let’s say Tom has an sdesc “A tall man” and
|
||
Sue has the sdesc “A muscular, blonde woman”</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Tom</span> <span class="o">></span> <span class="n">look</span>
|
||
<span class="n">Tom</span><span class="p">:</span> <span class="o"><</span><span class="n">room</span> <span class="n">desc</span><span class="o">></span> <span class="o">...</span> <span class="n">You</span> <span class="n">see</span><span class="p">:</span> <span class="n">A</span> <span class="n">muscular</span><span class="p">,</span> <span class="n">blonde</span> <span class="n">woman</span>
|
||
<span class="n">Tom</span> <span class="o">></span> <span class="n">emote</span> <span class="o">/</span><span class="n">me</span> <span class="n">smiles</span> <span class="n">to</span> <span class="o">/</span><span class="n">muscular</span><span class="o">.</span>
|
||
<span class="n">Tom</span><span class="p">:</span> <span class="n">Tom</span> <span class="n">smiles</span> <span class="n">to</span> <span class="n">A</span> <span class="n">muscular</span><span class="p">,</span> <span class="n">blonde</span> <span class="n">woman</span><span class="o">.</span>
|
||
<span class="n">Sue</span><span class="p">:</span> <span class="n">A</span> <span class="n">tall</span> <span class="n">man</span> <span class="n">smiles</span> <span class="n">to</span> <span class="n">Sue</span><span class="o">.</span>
|
||
<span class="n">Tom</span> <span class="o">></span> <span class="n">emote</span> <span class="n">Leaning</span> <span class="n">forward</span><span class="p">,</span> <span class="o">/</span><span class="n">me</span> <span class="n">says</span><span class="p">,</span> <span class="s2">"Well hello, what's yer name?"</span>
|
||
<span class="n">Tom</span><span class="p">:</span> <span class="n">Leaning</span> <span class="n">forward</span><span class="p">,</span> <span class="n">Tom</span> <span class="n">says</span><span class="p">,</span> <span class="s2">"Well hello..."</span>
|
||
<span class="n">Sue</span><span class="p">:</span> <span class="n">Leaning</span> <span class="n">forward</span><span class="p">,</span> <span class="n">A</span> <span class="n">tall</span> <span class="n">man</span> <span class="n">says</span><span class="p">,</span> <span class="s2">"Well hello, what's yer name?"</span>
|
||
<span class="n">Sue</span> <span class="o">></span> <span class="n">emote</span> <span class="o">/</span><span class="n">me</span> <span class="n">grins</span><span class="o">.</span> <span class="s2">"I'm Angelica"</span><span class="p">,</span> <span class="n">she</span> <span class="n">says</span><span class="o">.</span>
|
||
<span class="n">Sue</span><span class="p">:</span> <span class="n">Sue</span> <span class="n">grins</span><span class="o">.</span> <span class="s2">"I'm Angelica"</span><span class="p">,</span> <span class="n">she</span> <span class="n">says</span><span class="o">.</span>
|
||
<span class="n">Tom</span><span class="p">:</span> <span class="n">A</span> <span class="n">muscular</span><span class="p">,</span> <span class="n">blonde</span> <span class="n">woman</span> <span class="n">grins</span><span class="o">.</span> <span class="s2">"I'm Angelica"</span><span class="p">,</span> <span class="n">she</span> <span class="n">says</span><span class="o">.</span>
|
||
<span class="n">Tom</span> <span class="o">></span> <span class="n">recog</span> <span class="n">muscular</span> <span class="n">Angelica</span>
|
||
<span class="n">Tom</span> <span class="o">></span> <span class="n">emote</span> <span class="o">/</span><span class="n">me</span> <span class="n">nods</span> <span class="n">to</span> <span class="o">/</span><span class="n">angelica</span><span class="p">:</span> <span class="s2">"I have a message for you ..."</span>
|
||
<span class="n">Tom</span><span class="p">:</span> <span class="n">Tom</span> <span class="n">nods</span> <span class="n">to</span> <span class="n">Angelica</span><span class="p">:</span> <span class="s2">"I have a message for you ..."</span>
|
||
<span class="n">Sue</span><span class="p">:</span> <span class="n">A</span> <span class="n">tall</span> <span class="n">man</span> <span class="n">nods</span> <span class="n">to</span> <span class="n">Sue</span><span class="p">:</span> <span class="s2">"I have a message for you ..."</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Above, Sue introduces herself as “Angelica” and Tom uses this info to <code class="docutils literal notranslate"><span class="pre">recoc</span></code> her as “Angelica” hereafter. He
|
||
could have <code class="docutils literal notranslate"><span class="pre">recoc</span></code>-ed her with whatever name he liked - it’s only for his own benefit. There is no separate
|
||
<code class="docutils literal notranslate"><span class="pre">say</span></code>, the spoken words are embedded in the emotes in quotes <code class="docutils literal notranslate"><span class="pre">"..."</span></code>.</p>
|
||
<p>The RPSystem module also includes options for <code class="docutils literal notranslate"><span class="pre">poses</span></code>, which help to establish your position in the room
|
||
when others look at you.</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Tom</span> <span class="o">></span> <span class="n">pose</span> <span class="n">stands</span> <span class="n">by</span> <span class="n">the</span> <span class="n">bar</span><span class="p">,</span> <span class="n">looking</span> <span class="n">bored</span><span class="o">.</span>
|
||
<span class="n">Sue</span> <span class="o">></span> <span class="n">look</span>
|
||
<span class="n">Sue</span><span class="p">:</span> <span class="o"><</span><span class="n">room</span> <span class="n">desc</span><span class="o">></span> <span class="o">...</span> <span class="n">A</span> <span class="n">tall</span> <span class="n">man</span> <span class="n">stands</span> <span class="n">by</span> <span class="n">the</span> <span class="n">bar</span><span class="p">,</span> <span class="n">looking</span> <span class="n">bored</span><span class="o">.</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>You can also wear a mask to hide your identity; your sdesc will then be changed to the sdesc of the mask,
|
||
like <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">person</span> <span class="pre">with</span> <span class="pre">a</span> <span class="pre">mask</span></code>.</p>
|
||
<p>The RPSystem gives a lot of roleplaying power out of the box, so we will add it. There is also a separate
|
||
<a class="reference external" href="../../../api/evennia.contrib.rplanguage.html">rplanguage</a> module that integrates with the spoken words in your emotes and garbles them if you don’t understand
|
||
the language spoken. In order to restrict the scope we will not include languages for the tutorial game.</p>
|
||
</div>
|
||
<div class="section" id="talking-npc-contrib">
|
||
<h2>Talking NPC contrib<a class="headerlink" href="#talking-npc-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.talking_npc.html">source</a></p>
|
||
<p>This exemplifies an NPC with a menu-driven dialogue tree. We will not use this contrib explicitly, but it’s
|
||
good as inspiration for how we’ll do quest-givers later.</p>
|
||
</div>
|
||
<div class="section" id="traits-contrib">
|
||
<h2>Traits contrib<a class="headerlink" href="#traits-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.traits.html">source</a></p>
|
||
<p>An issue with dealing with roleplaying attributes like strength, dexterity, or skills like hunting, sword etc
|
||
is how to keep track of the values in the moment. Your strength may temporarily be buffed by a strength-potion.
|
||
Your swordmanship may be worse because you are encumbered. And when you drink your health potion you must make
|
||
sure that those +20 health does not bring your health higher than its maximum. All this adds complexity.</p>
|
||
<p>The <em>Traits</em> contrib consists of several types of objects to help track and manage values like this. When
|
||
installed, the traits are accessed on a new handler <code class="docutils literal notranslate"><span class="pre">.traits</span></code>, for example</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">100</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span> <span class="o">-=</span> <span class="mi">20</span> <span class="c1"># getting hurt</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">80</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> <span class="c1"># drink a potion</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">100</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>A Trait is persistent (it uses an Attribute under the hood) and tracks changes, min/max and other things
|
||
automatically. They can also be added together in various mathematical operations.</p>
|
||
<p>The contrib introduces three main Trait-classes</p>
|
||
<ul class="simple">
|
||
<li><p><em>Static</em> traits for single values like str, dex, things that at most gets a modifier.</p></li>
|
||
<li><p><em>Counters</em> is a value that never moves outside a given range, even with modifiers. For example a skill
|
||
that can at most get a maximum amount of buff. Counters can also easily be <em>timed</em> so that they decrease
|
||
or increase with a certain rate per second. This could be good for a time-limited curse for example.</p></li>
|
||
<li><p><em>Gauge</em> is like a fuel-gauge; it starts at a max value and then empties gradually. This is perfect for
|
||
things like health, stamina and the like. Gauges can also change with a rate, which works well for the
|
||
effects of slow poisons and healing both.</p></li>
|
||
</ul>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">100</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> <span class="c1"># poisoned! </span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">ratetarget</span> <span class="o">=</span> <span class="mi">50</span> <span class="c1"># stop at 50 hp</span>
|
||
<span class="c1"># Wait 30s</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">70</span>
|
||
<span class="c1"># Wait another 30s</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">50</span> <span class="c1"># stopped at 50</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># no more poison</span>
|
||
<span class="o">></span> <span class="n">py</span> <span class="bp">self</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">5</span> <span class="c1"># healing magic!</span>
|
||
<span class="c1"># wait 5s </span>
|
||
<span class="o">></span> <span class="n">pyself</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||
<span class="mi">75</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Traits will be very practical to use for our character sheets.</p>
|
||
</div>
|
||
<div class="section" id="turnbattle-contrib">
|
||
<h2>Turnbattle contrib<a class="headerlink" href="#turnbattle-contrib" title="Permalink to this headline">¶</a></h2>
|
||
<p><a class="reference external" href="../../../api/evennia.contrib.turnbattle.html">source</a></p>
|
||
<p>This contrib consists of several implementations of a turn-based combat system, divivided into complexity:</p>
|
||
<ul class="simple">
|
||
<li><p>basic - initiative and turn order, attacks against defense values, damage.</p></li>
|
||
<li><p>equip - considers weapons and armor, wielding and weapon accuracy.</p></li>
|
||
<li><p>items - adds usable items with conditions and status effects</p></li>
|
||
<li><p>magic - adds spellcasting system using MP.</p></li>
|
||
<li><p>range - adds abstract positioning and 1D movement to differentiate between melee and ranged attacks.</p></li>
|
||
</ul>
|
||
<p>The turnbattle system is comprehensive, but it’s meant as a base to start from rather than offer
|
||
a complete system. It’s also not built with <em>Traits</em> in mind, so we will need to adjust it for that.</p>
|
||
</div>
|
||
<div class="section" id="conclusions">
|
||
<h2>Conclusions<a class="headerlink" href="#conclusions" title="Permalink to this headline">¶</a></h2>
|
||
<p>With some contribs selected, we have pieces to build from and don’t have to write everything from scratch.
|
||
We will need Quests and will likely need to do a bunch of work on Combat to adapt the combat contrib
|
||
to our needs.</p>
|
||
<p>We will now move into actually starting to implement our tutorial game
|
||
in the next part of this tutorial series. When doing this for yourself, remember to refer
|
||
back to your planning and adjust it as you learn what works and what does not.</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../../../index.html">
|
||
<img class="logo" src="../../../_static/evennia_logo.png" alt="Logo"/>
|
||
</a></p>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../../../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<p><h3><a href="../../../index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Planning the use of some useful contribs</a><ul>
|
||
<li><a class="reference internal" href="#barter-contrib">Barter contrib</a></li>
|
||
<li><a class="reference internal" href="#character-generation-contrib">Character generation contrib</a></li>
|
||
<li><a class="reference internal" href="#clothing-contrib">Clothing contrib</a></li>
|
||
<li><a class="reference internal" href="#dice-contrib">Dice contrib</a></li>
|
||
<li><a class="reference internal" href="#extended-room-contrib">Extended room contrib</a></li>
|
||
<li><a class="reference internal" href="#rp-system-contrib">RP-System contrib</a></li>
|
||
<li><a class="reference internal" href="#talking-npc-contrib">Talking NPC contrib</a></li>
|
||
<li><a class="reference internal" href="#traits-contrib">Traits contrib</a></li>
|
||
<li><a class="reference internal" href="#turnbattle-contrib">Turnbattle contrib</a></li>
|
||
<li><a class="reference internal" href="#conclusions">Conclusions</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="Game-Planning.html"
|
||
title="previous chapter">On Planning a Game</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="../Part3/Starting-Part3.html"
|
||
title="next chapter">Evennia Starting Tutorial (Part 3)</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../../../_sources/Howto/Starting/Part2/Planning-Some-Useful-Contribs.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="Planning-Some-Useful-Contribs.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../../../../0.9.5/index.html">0.9.5 (master branch)</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="../Part3/Starting-Part3.html" title="Evennia Starting Tutorial (Part 3)"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Game-Planning.html" title="On Planning a Game"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Part1/Starting-Part1.html" >Starting Tutorial (Part 1)</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="Starting-Part2.html" >Evennia Starting Tutorial (Part 2)</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Planning the use of some useful contribs</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2020, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |