evennia/docs/latest/api/evennia.contrib.base_systems.custom_gametime.custom_gametime.html
Evennia docbuilder action 243d596662 Updated HTML docs.
2025-08-15 18:14:21 +00:00

433 lines
No EOL
32 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>evennia.contrib.base_systems.custom_gametime.custom_gametime &#8212; Evennia latest documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d75fae25" />
<link rel="stylesheet" type="text/css" href="../_static/nature.css?v=279e0f84" />
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=e4a91a55" />
<script src="../_static/documentation_options.js?v=c6e86fd7"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="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.contrib.base_systems.custom_gametime.tests" href="evennia.contrib.base_systems.custom_gametime.tests.html" />
<link rel="prev" title="evennia.contrib.base_systems.custom_gametime" href="evennia.contrib.base_systems.custom_gametime.html" />
</head><body>
<div class="related" role="navigation" aria-label="Related">
<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="evennia.contrib.base_systems.custom_gametime.tests.html" title="evennia.contrib.base_systems.custom_gametime.tests"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="evennia.contrib.base_systems.custom_gametime.html" title="evennia.contrib.base_systems.custom_gametime"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-4"><a href="evennia.contrib.html" >evennia.contrib</a> &#187;</li>
<li class="nav-item nav-item-5"><a href="evennia.contrib.base_systems.html" >evennia.contrib.base_systems</a> &#187;</li>
<li class="nav-item nav-item-6"><a href="evennia.contrib.base_systems.custom_gametime.html" accesskey="U">evennia.contrib.base_systems.custom_gametime</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.contrib.base_systems.custom_gametime.custom_gametime</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-evennia.contrib.base_systems.custom_gametime.custom_gametime">
<span id="evennia-contrib-base-systems-custom-gametime-custom-gametime"></span><h1>evennia.contrib.base_systems.custom_gametime.custom_gametime<a class="headerlink" href="#module-evennia.contrib.base_systems.custom_gametime.custom_gametime" title="Link to this heading"></a></h1>
<p>Custom gametime</p>
<p>Contrib - Griatch 2017, vlgeoff 2017</p>
<p>This implements the evennia.utils.gametime module but supporting
a custom calendar for your game world. It allows for scheduling
events to happen at given in-game times, taking this custom
calendar into account.</p>
<p>Usage:</p>
<p>Use as the normal gametime module, that is by importing and using the
helper functions in this module in your own code. The calendar can be
customized by adding the <strong>TIME_UNITS</strong> dictionary to your settings
file. This maps unit names to their length, expressed in the smallest
unit. Heres the default as an example:</p>
<blockquote>
<div><dl class="simple">
<dt>TIME_UNITS = {</dt><dd><p>“sec”: 1,
“min”: 60,
“hr”: 60 * 60,
“hour”: 60 * 60,
“day”: 60 * 60 * 24,
“week”: 60 * 60 * 24 * 7,
“month”: 60 * 60 * 24 * 7 * 4,
“yr”: 60 * 60 * 24 * 7 * 4 * 12,
“year”: 60 * 60 * 24 * 7 * 4 * 12, }</p>
</dd>
</dl>
</div></blockquote>
<p>When using a custom calendar, these time unit names are used as kwargs to
the converter functions in this module.</p>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.time_to_tuple">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">time_to_tuple</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seconds</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">divisors</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#time_to_tuple"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.time_to_tuple" title="Link to this definition"></a></dt>
<dd><p>Helper function. Creates a tuple of even dividends given a range
of divisors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>seconds</strong> (<em>int</em>) Number of seconds to format</p></li>
<li><p><strong>*divisors</strong> (<em>int</em>) a sequence of numbers of integer dividends. The
number of seconds will be integer-divided by the first number in
this sequence, the remainder will be divided with the second and
so on.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><p><em>time (tuple)</em> </p>
<dl class="simple">
<dt>This tuple has length len(<a href="#id1"><span class="problematic" id="id2">*</span></a>args)+1, with the</dt><dd><p>last element being the last remaining seconds not evenly
divided by the supplied dividends.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.gametime_to_realtime">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">gametime_to_realtime</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#gametime_to_realtime"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.gametime_to_realtime" title="Link to this definition"></a></dt>
<dd><p>This method helps to figure out the real-world time it will take until an
in-game time has passed. E.g. if an event should take place a month later
in-game, you will be able to find the number of real-world seconds this
corresponds to (hint: Interval events deal with real life seconds).</p>
<dl class="field-list simple">
<dt class="field-odd">Keyword Arguments<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>format</strong> (<em>bool</em>) Formatting the output.</p></li>
<li><p><strong>etc</strong> (<em>days</em><em>, </em><em>month</em>) These are the names of time units that must
match the <strong>settings.TIME_UNITS</strong> dict keys.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><p><em>time (float or tuple)</em> </p>
<dl class="simple">
<dt>The realtime difference or the same</dt><dd><p>time split up into time units.</p>
</dd>
</dl>
</p>
</dd>
</dl>
<p class="rubric">Example</p>
<dl class="simple">
<dt>gametime_to_realtime(days=2) -&gt; number of seconds in real life from</dt><dd><p>now after which 2 in-game days will have passed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.realtime_to_gametime">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">realtime_to_gametime</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">secs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hrs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">days</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">weeks</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">months</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">yrs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#realtime_to_gametime"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.realtime_to_gametime" title="Link to this definition"></a></dt>
<dd><p>This method calculates how much in-game time a real-world time
interval would correspond to. This is usually a lot less
interesting than the other way around.</p>
<dl class="field-list simple">
<dt class="field-odd">Keyword Arguments<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>times</strong> (<em>int</em>) The various components of the time.</p></li>
<li><p><strong>format</strong> (<em>bool</em>) Formatting the output.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><p><em>time (float or tuple)</em> </p>
<dl class="simple">
<dt>The gametime difference or the same</dt><dd><p>time split up into time units.</p>
</dd>
</dl>
</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<dl class="simple">
<dt>days/weeks/months start from 1 (there is no day/week/month 0). This makes it</dt><dd><p>consistent with the real world datetime.</p>
</dd>
</dl>
</div>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>ValueError</strong> If trying to add a days/weeks/months of &lt;=0.</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>realtime_to_gametime(days=2) -&gt; number of game-world seconds</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.custom_gametime">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">custom_gametime</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">absolute</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#custom_gametime"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.custom_gametime" title="Link to this definition"></a></dt>
<dd><p>Return the custom game time as a tuple of units, as defined in settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>absolute</strong> (<em>bool</em><em>, </em><em>optional</em>) return the relative or absolute time.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The tuple describing the game time. The length of the tuple
is related to the number of unique units defined in the
settings. By default, the tuple would be (year, month,
week, day, hour, minute, second).</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.real_seconds_until">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">real_seconds_until</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#real_seconds_until"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.real_seconds_until" title="Link to this definition"></a></dt>
<dd><p>Return the real seconds until game time.</p>
<p>If the game time is 5:00, TIME_FACTOR is set to 2 and you ask
the number of seconds until its 5:10, then this function should
return 300 (5 minutes).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>(</strong><strong>str</strong> (<em>times</em>) int): the time units.</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>real_seconds_until(hour=5, min=10, sec=0)</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The number of real seconds before the given game time is up.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>day/week/month start from 1, not from 0 (there is no month 0 for example)</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.schedule">
<span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">schedule</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">callback</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">repeat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#schedule"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.schedule" title="Link to this definition"></a></dt>
<dd><p>Call the callback when the game time is up.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>callback</strong> (<em>function</em>) The callback function that will be called. This
must be a top-level function since the script will be persistent.</p></li>
<li><p><strong>repeat</strong> (<em>bool</em><em>, </em><em>optional</em>) Should the callback be called regularly?</p></li>
<li><p><strong>day</strong> int): The time units to call the callback; should
match the keys of TIME_UNITS.</p></li>
<li><p><strong>month</strong> int): The time units to call the callback; should
match the keys of TIME_UNITS.</p></li>
<li><p><strong>(</strong><strong>str</strong> (<em>etc</em>) int): The time units to call the callback; should
match the keys of TIME_UNITS.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><em>script (Script)</em> The created script.</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>schedule(func, min=5, sec=0) # Will call next hour at :05.
schedule(func, hour=2, min=30, sec=0) # Will call the next day at 02:30.</p>
<p class="rubric">Notes</p>
<p>This function will setup a script that will be called when the
time corresponds to the game time. If the game is stopped for
more than a few seconds, the callback may be called with a
slight delay. If <strong>repeat</strong> is set to True, the callback will be
called again next time the game time matches the given time.
The time is given in units as keyword arguments.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.contrib.base_systems.custom_gametime.custom_gametime.</span></span><span class="sig-name descname"><span class="pre">GametimeScript</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#GametimeScript"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultScript</span></code></a></p>
<p>Gametime-sensitive script.</p>
<dl class="py method">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_script_creation">
<span class="sig-name descname"><span class="pre">at_script_creation</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#GametimeScript.at_script_creation"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_script_creation" title="Link to this definition"></a></dt>
<dd><p>The script is created.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_repeat">
<span class="sig-name descname"><span class="pre">at_repeat</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/base_systems/custom_gametime/custom_gametime.html#GametimeScript.at_repeat"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_repeat" title="Link to this definition"></a></dt>
<dd><p>Call the callback and reset interval.</p>
</dd></dl>
<dl class="py exception">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.DoesNotExist">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DoesNotExist</span></span><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.DoesNotExist" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.scripts.html#evennia.scripts.scripts.DefaultScript.DoesNotExist" title="evennia.scripts.scripts.DefaultScript.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">DoesNotExist</span></code></a></p>
</dd></dl>
<dl class="py exception">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.MultipleObjectsReturned">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MultipleObjectsReturned</span></span><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.MultipleObjectsReturned" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.scripts.html#evennia.scripts.scripts.DefaultScript.MultipleObjectsReturned" title="evennia.scripts.scripts.DefaultScript.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">MultipleObjectsReturned</span></code></a></p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.path">
<span class="sig-name descname"><span class="pre">path</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript'</span></em><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.path" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.typename">
<span class="sig-name descname"><span class="pre">typename</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'GametimeScript'</span></em><a class="headerlink" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.typename" title="Link to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo of Evennia"/>
</a></p>
<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">evennia.contrib.base_systems.custom_gametime.custom_gametime</a><ul>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.time_to_tuple"><code class="docutils literal notranslate"><span class="pre">time_to_tuple()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.gametime_to_realtime"><code class="docutils literal notranslate"><span class="pre">gametime_to_realtime()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.realtime_to_gametime"><code class="docutils literal notranslate"><span class="pre">realtime_to_gametime()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.custom_gametime"><code class="docutils literal notranslate"><span class="pre">custom_gametime()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.real_seconds_until"><code class="docutils literal notranslate"><span class="pre">real_seconds_until()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.schedule"><code class="docutils literal notranslate"><span class="pre">schedule()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript"><code class="docutils literal notranslate"><span class="pre">GametimeScript</span></code></a><ul>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_script_creation"><code class="docutils literal notranslate"><span class="pre">GametimeScript.at_script_creation()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.at_repeat"><code class="docutils literal notranslate"><span class="pre">GametimeScript.at_repeat()</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.DoesNotExist"><code class="docutils literal notranslate"><span class="pre">GametimeScript.DoesNotExist</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.MultipleObjectsReturned"><code class="docutils literal notranslate"><span class="pre">GametimeScript.MultipleObjectsReturned</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.path"><code class="docutils literal notranslate"><span class="pre">GametimeScript.path</span></code></a></li>
<li><a class="reference internal" href="#evennia.contrib.base_systems.custom_gametime.custom_gametime.GametimeScript.typename"><code class="docutils literal notranslate"><span class="pre">GametimeScript.typename</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="evennia.contrib.base_systems.custom_gametime.html"
title="previous chapter">evennia.contrib.base_systems.custom_gametime</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="evennia.contrib.base_systems.custom_gametime.tests.html"
title="next chapter">evennia.contrib.base_systems.custom_gametime.tests</a></p>
</div>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/api/evennia.contrib.base_systems.custom_gametime.custom_gametime.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li>
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
<a href="https://evennia.blogspot.com/">Blog</a>
</li>
</ul>
<h3>Doc Versions</h3>
<ul>
<li>
<a href="https://www.evennia.com/docs/latest/index.html">latest (main branch)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/5.x/index.html">v5.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/4.x/index.html">v4.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/3.x/index.html">v3.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/2.x/index.html">v2.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/1.x/index.html">v1.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/0.x/index.html">v0.9.5 branch (outdated)</a>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<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="evennia.contrib.base_systems.custom_gametime.tests.html" title="evennia.contrib.base_systems.custom_gametime.tests"
>next</a> |</li>
<li class="right" >
<a href="evennia.contrib.base_systems.custom_gametime.html" title="evennia.contrib.base_systems.custom_gametime"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-4"><a href="evennia.contrib.html" >evennia.contrib</a> &#187;</li>
<li class="nav-item nav-item-5"><a href="evennia.contrib.base_systems.html" >evennia.contrib.base_systems</a> &#187;</li>
<li class="nav-item nav-item-6"><a href="evennia.contrib.base_systems.custom_gametime.html" >evennia.contrib.base_systems.custom_gametime</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.contrib.base_systems.custom_gametime.custom_gametime</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2024, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
</div>
</body>
</html>