evennia/docs/1.0-dev/Grapevine.html

279 lines
10 KiB
HTML
Raw Normal View History

2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
2020-06-13 00:36:45 +02:00
<!DOCTYPE html>
2020-06-14 21:48:02 +02:00
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grapevine &mdash; Evennia 1.0-dev documentation</title>
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
2020-06-13 23:31:27 +02:00
<link rel="shortcut icon" href="_static/favicon.ico"/>
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Evennia 1.0-dev documentation" href="index.html"/>
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Evennia
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
</a>
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">Grapevine</a><ul>
<li><a class="reference internal" href="#configuring-grapevine">Configuring Grapevine</a></li>
<li><a class="reference internal" href="#setting-up-grapevine-step-by-step">Setting up Grapevine, step by step</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Evennia</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Grapevine</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Grapevine.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
2020-06-13 00:36:45 +02:00
<div class="section" id="grapevine">
<h1>Grapevine<a class="headerlink" href="#grapevine" title="Permalink to this headline"></a></h1>
<p><a class="reference external" href="http://grapevine.haus">Grapevine</a> is a new chat network for <code class="docutils literal notranslate"><span class="pre">MU*</span></code>*** games. By
connecting an in-game channel to the grapevine network, players on your game
can chat with players in other games, also non-Evennia ones.</p>
<div class="section" id="configuring-grapevine">
<h2>Configuring Grapevine<a class="headerlink" href="#configuring-grapevine" title="Permalink to this headline"></a></h2>
<p>To use Grapevine, you first need the <code class="docutils literal notranslate"><span class="pre">pyopenssl</span></code> module. Install it into your
Evennia python environment with</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">pyopenssl</span>
</pre></div>
</div>
<p>To configure Grapevine, youll need to activate it in your settings file.</p>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="n">GRAPEVINE_ENABLED</span> <span class="o">=</span> <span class="bp">True</span>
</pre></div>
</td></tr></table></div>
<p>Next, register an account at https://grapevine.haus. When you have logged in,
go to your Settings/Profile and to the <code class="docutils literal notranslate"><span class="pre">Games</span></code> sub menu. Here you register your
new game by filling in its information. At the end of registration you are going
to get a <code class="docutils literal notranslate"><span class="pre">Client</span> <span class="pre">ID</span></code> and a <code class="docutils literal notranslate"><span class="pre">Client</span> <span class="pre">Secret</span></code>. These should not be shared.</p>
<p>Open/create the file <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/secret_settings.py</span></code> and add the following:</p>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span></span> <span class="n">GRAPEVINE_CLIENT_ID</span> <span class="o">=</span> <span class="s2">&quot;&lt;client ID&gt;&quot;</span>
<span class="n">GRAPEVINE_CLIENT_SECRET</span> <span class="o">=</span> <span class="s2">&quot;&lt;client_secret&gt;&quot;</span>
</pre></div>
</td></tr></table></div>
<p>You can also customize the Grapevine channels you are allowed to connect to. This
is added to the <code class="docutils literal notranslate"><span class="pre">GRAPEVINE_CHANNELS</span></code> setting. You can see which channels are available
by going to the Grapevine online chat here: https://grapevine.haus/chat.</p>
<p>Start/reload Evennia and log in as a privileged user. You should now have a new
command available: <code class="docutils literal notranslate"><span class="pre">&#64;grapevine2chan</span></code>. This command is called like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@grapevine2chan</span><span class="p">[</span><span class="o">/</span><span class="n">switches</span><span class="p">]</span> <span class="o">&lt;</span><span class="n">evennia_channel</span><span class="o">&gt;</span> <span class="o">=</span> <span class="o">&lt;</span><span class="n">grapevine_channel</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Here, the <code class="docutils literal notranslate"><span class="pre">evennia_channel</span></code> must be the name of an existing Evennia channel and
<code class="docutils literal notranslate"><span class="pre">grapevine_channel</span></code> one of the supported channels in <code class="docutils literal notranslate"><span class="pre">GRAPEVINE_CHANNELS</span></code>.</p>
<blockquote>
<div><p>At the time of writing, the Grapevine network only has two channels:
<code class="docutils literal notranslate"><span class="pre">testing</span></code> and <code class="docutils literal notranslate"><span class="pre">gossip</span></code>. Evennia defaults to allowing connecting to both. Use
<code class="docutils literal notranslate"><span class="pre">testing</span></code> for trying your connection.</p>
</div></blockquote>
</div>
<div class="section" id="setting-up-grapevine-step-by-step">
<h2>Setting up Grapevine, step by step<a class="headerlink" href="#setting-up-grapevine-step-by-step" title="Permalink to this headline"></a></h2>
<p>You can connect Grapevine to any Evennia channel (so you could connect it to
the default <em>public</em> channel if you like), but for testing, lets set up a
new channel <code class="docutils literal notranslate"><span class="pre">gw</span></code>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> @ccreate gw = This is connected to an gw channel!
</pre></div>
</div>
<p>You will automatically join the new channel.</p>
<p>Next we will create a connection to the Grapevine network.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@grapevine2chan</span> <span class="n">gw</span> <span class="o">=</span> <span class="n">gossip</span>
</pre></div>
</div>
<p>Evennia will now create a new connection and connect it to Grapevine. Connect
to https://grapevine.haus/chat to check.</p>
<p>Write something in the Evennia channel <em>gw</em> and check so a message appears in
the Grapevine chat. Write a reply in the chat and the grapevine bot should echo
it to your channel in-game.</p>
<p>Your Evennia gamers can now chat with users on external Grapevine channels!</p>
</div>
</div>
2020-06-14 21:48:02 +02:00
</div>
2020-06-13 00:36:45 +02:00
</div>
2020-06-14 21:48:02 +02:00
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2020, The Evennia developer community.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> and ❤️ using a custom <a href="https://github.com/LinxiFan/Sphinx-theme">theme</a> based on <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
2020-06-13 00:36:45 +02:00
</div>
</div>
2020-06-14 21:48:02 +02:00
</section>
2020-06-13 00:36:45 +02:00
2020-06-14 21:48:02 +02:00
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0-dev',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
2020-06-13 00:36:45 +02:00
</html>