Main¶
+-
+
Contrib: Refactored
dice.rollcontrib function to usesafe_eval. Can now +optionally be used asdice.roll("2d10 + 4 > 10"). Old way works too.
+
diff --git a/docs/2.x/.buildinfo b/docs/2.x/.buildinfo index d485e929e9..f33b692ef9 100644 --- a/docs/2.x/.buildinfo +++ b/docs/2.x/.buildinfo @@ -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: e46161c5c2689d6c5cde7fc1413af2c7 +config: 8eb51f907bcbb84e9e67cb80622ba9b8 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/2.x/Coding/Changelog.html b/docs/2.x/Coding/Changelog.html index 1a89be29ca..3d6772adbf 100644 --- a/docs/2.x/Coding/Changelog.html +++ b/docs/2.x/Coding/Changelog.html @@ -66,6 +66,7 @@
Contrib: Refactored dice.roll contrib function to use safe_eval. Can now
+optionally be used as dice.roll("2d10 + 4 > 10"). Old way works too.
June 17, 2023
diff --git a/docs/2.x/Coding/Coding-Overview.html b/docs/2.x/Coding/Coding-Overview.html index 85f2b37079..a9992b4f5c 100644 --- a/docs/2.x/Coding/Coding-Overview.html +++ b/docs/2.x/Coding/Coding-Overview.html @@ -170,6 +170,7 @@ make your game, also if you never coded before.Is a hidden roll that does not inform the room it happened.
+To roll dice in code, use the roll function from this module:
-from evennia.contrib.rpg import dice
-dice.roll(3, 10, ("+", 2)) # 3d10 + 2
+Rolling dice from code¶
+To roll dice in code, use the roll function from this module. It has two
+main ways to define the expected roll:
+from evennia.contrib.rpg.dice import roll
+
+roll(dice, dicetype=6, modifier=None, conditional=None, return_tuple=False,
+ max_dicenum=10, max_dicetype=1000)
+You can only roll one set of dice. If your RPG requires you to roll multiple
+sets of dice and combine them in more advanced ways, you can do so with multiple
+roll() calls.
+
+Roll dice based on a string¶
+You can specify the first argument as a string on standard RPG d-syntax (NdM,
+where N is the number of dice to roll, and M is the number sides per dice):
+roll("3d10 + 2")
+
+
+You can also give a conditional (you’ll then get a True/False back):
+roll("2d6 - 1 >= 10")
+
+
+
+
+Explicit arguments¶
+If you specify the first argument as an integer, it’s interpret as the number of
+dice to roll and you can then build the roll more explicitly. This can be
+useful if you are using the roller together with some other system and want to
+construct the roll from components.
+Here’s how to roll 3d10 + 2 with explicit syntax:
+roll(3, 10, modifier=("+", 2))
+
+
+Here’s how to roll 2d6 - 1 >= 10 (you’ll get back True/False back):
+roll(2, 6, modifier=("-", 1), conditional=(">=", 10))
+
+
+
+
+Get all roll details¶
+If you need the individual rolls (e.g. for a dice pool), set the return_tuple kwarg:
+roll("3d10 > 10", return_tuple=True)
+(13, True, 3, (3, 4, 6)) # (result, outcome, diff, rolls)
+
+
+The return is a tuple (result, outcome, diff, rolls), where result is the
+result of the roll, outcome is True/False if a conditional was
+given (None otherwise), diff is the absolute difference between the
+conditional and the result (None otherwise) and rolls is a tuple containing
+the individual roll results.
This document page is generated from evennia/contrib/rpg/dice/README.md. Changes to this
file will be overwritten, so edit that file rather than this one.
diff --git a/docs/2.x/_modules/evennia/contrib/rpg/dice/dice.html b/docs/2.x/_modules/evennia/contrib/rpg/dice/dice.html
index cd8c83c8bd..b24a311510 100644
--- a/docs/2.x/_modules/evennia/contrib/rpg/dice/dice.html
+++ b/docs/2.x/_modules/evennia/contrib/rpg/dice/dice.html
@@ -134,48 +134,62 @@
```python
from evennia.contrib.rpg import dice
-dice.roll_dice(3, 10, ("+", 2)) # 3d10 + 2
-
+dice.roll(3, 10, ("+", 2)) # 3d10 + 2
```
+or use the string syntax:
+
+dice.roll("3d10 + 2")
+
"""
import re
+from ast import literal_eval
from random import randint
from evennia import CmdSet, default_cmds
+from evennia.utils.utils import simple_eval
-[docs]def roll(dicenum, dicetype, modifier=None, conditional=None, return_tuple=False):
+[docs]def roll(
+ dice,
+ dicetype=6,
+ modifier=None,
+ conditional=None,
+ return_tuple=False,
+ max_dicenum=10,
+ max_dicetype=1000,
+):
"""
This is a standard dice roller.
Args:
- dicenum (int): Number of dice to roll (the result to be added).
- dicetype (int): Number of sides of the dice to be rolled.
- modifier (tuple): A tuple `(operator, value)`, where operator is
+ dice (int or str): If an `int`, this is the number of dice to roll, and `dicetype` is used
+ to determine the type. If a `str`, it should be on the form `NdM` where `N` is the number
+ of dice and `M` is the number of sides on each die. Also
+ `NdM [modifier] [number] [conditional]` is understood, e.g. `1d6 + 3`
+ or `2d10 / 2 > 10`.
+ dicetype (int, optional): Number of sides of the dice to be rolled. Ignored if
+ `dice` is a string.
+ modifier (tuple, optional): A tuple `(operator, value)`, where operator is
one of `"+"`, `"-"`, `"/"` or `"*"`. The result of the dice
- roll(s) will be modified by this value.
- conditional (tuple): A tuple `(conditional, value)`, where
+ roll(s) will be modified by this value. Ignored if `dice` is a string.
+ conditional (tuple, optional): A tuple `(conditional, value)`, where
conditional is one of `"=="`,`"<"`,`">"`,`">="`,`"<=`" or "`!=`".
- This allows the roller to directly return a result depending
- on if the conditional was passed or not.
+ Ignored if `dice` is a string.
return_tuple (bool): Return a tuple with all individual roll
results or not.
+ max_dicenum (int): The max number of dice to allow to be rolled.
+ max_dicetype (int): The max number of sides on the dice to roll.
Returns:
- roll_result (int): The result of the roll + modifiers. This is the
- default return.
- condition_result (bool): A True/False value returned if `conditional`
- is set but not `return_tuple`. This effectively hides the result
- of the roll.
- full_result (tuple): If, return_tuple` is `True`, instead
- return a tuple `(result, outcome, diff, rolls)`. Here,
- `result` is the normal result of the roll + modifiers.
- `outcome` and `diff` are the boolean result of the roll and
- absolute difference to the `conditional` input; they will
- be will be `None` if `conditional` is not set. `rolls` is
- itself a tuple holding all the individual rolls in the case of
- multiple die-rolls.
+ int, bool or tuple : By default, this is the result of the roll + modifiers. If
+ `conditional` is given, or `dice` is a string defining a conditional, then a True/False
+ value is returned. Finally, if `return_tuple` is set, this is a tuple
+ `(result, outcome, diff, rolls)`, where, `result` is the the normal result of the
+ roll + modifiers, `outcome` and `diff` are the boolean absolute difference between the roll
+ and the `conditional` input; both will be will be `None` if `conditional` is not set.
+ The `rolls` a tuple holding all the individual rolls (one or more depending on how many
+ dice were rolled).
Raises:
TypeError if non-supported modifiers or conditionals are given.
@@ -184,48 +198,100 @@
All input numbers are converted to integers.
Examples:
- print roll_dice(2, 6) # 2d6
- <<< 7
- print roll_dice(1, 100, ('+', 5) # 1d100 + 5
- <<< 34
- print roll_dice(1, 20, conditional=('<', 10) # let'say we roll 3
- <<< True
- print roll_dice(3, 10, return_tuple=True)
- <<< (11, None, None, (2, 5, 4))
- print roll_dice(2, 20, ('-', 2), conditional=('>=', 10), return_tuple=True)
- <<< (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+ ::
+ # explicit arguments
+ print roll(2, 6) # 2d6
+ 7
+ print roll(1, 100, ('+', 5) # 1d100 + 5
+ 4
+ print roll(1, 20, conditional=('<', 10) # let'say we roll 3
+ True
+ print roll(3, 10, return_tuple=True)
+ (11, None, None, (2, 5, 4))
+ print roll(2, 20, ('-', 2), conditional=('>=', 10), return_tuple=True)
+ (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+
+ # string form
+ print roll("3d6 + 2")
+ 10
+ print roll("2d10 + 2 > 10")
+ True
+ print roll("2d20 - 2 >= 10")
+ (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
"""
- dicenum = int(dicenum)
- dicetype = int(dicetype)
+
+ modifier_string = ""
+ conditional_string = ""
+ conditional_value = None
+ if isinstance(dice, str) and "d" in dice.lower():
+ # A string is given, parse it as NdM dice notation
+ roll_string = dice.lower()
+
+ # split to get the NdM syntax
+ dicenum, rest = roll_string.split("d", 1)
+
+ # parse packwards right-to-left
+ if any(True for cond in ("==", "<", ">", "!=", "<=", ">=") if cond in rest):
+ # split out any conditionals, like '< 12'
+ rest, *conditionals = re.split(r"(==|<=|>=|<|>|!=)", rest, maxsplit=1)
+ try:
+ conditional_value = int(conditionals[1])
+ except ValueError:
+ raise TypeError(
+ f"Conditional '{conditionals[-1]}' was not recognized. Must be a number."
+ )
+ conditional_string = "".join(conditionals)
+
+ if any(True for op in ("+", "-", "*", "/") if op in rest):
+ # split out any modifiers, like '+ 2'
+ rest, *modifiers = re.split(r"(\+|-|/|\*)", rest, maxsplit=1)
+ modifier_string = "".join(modifiers)
+
+ # whatever is left is the dice type
+ dicetype = rest
+
+ else:
+ # an integer is given - explicit modifiers and conditionals as part of kwargs
+ dicenum = int(dice)
+ dicetype = int(dicetype)
+ if modifier:
+ modifier_string = "".join(str(part) for part in modifier)
+ if conditional:
+ conditional_value = int(conditional[1])
+ conditional_string = "".join(str(part) for part in conditional)
+
+ try:
+ dicenum = int(dicenum)
+ dicetype = int(dicetype)
+ except Exception:
+ raise TypeError(
+ f"The number of dice and dice-size must both be numerical. Got '{dicenum}' "
+ f"and '{dicetype}'."
+ )
+ if 0 < dicenum > max_dicenum:
+ raise TypeError(f"Invalid number of dice rolled (must be between 1 and {max_dicenum}).")
+ if 0 < dicetype > max_dicetype:
+ raise TypeError(f"Invalid die-size used (must be between 1 and {max_dicetype} sides).")
# roll all dice, remembering each roll
- rolls = tuple([randint(1, dicetype) for roll in range(dicenum)])
+ rolls = tuple([randint(1, dicetype) for _ in range(dicenum)])
result = sum(rolls)
- if modifier:
- # make sure to check types well before eval
- mod, modvalue = modifier
- if mod not in ("+", "-", "*", "/"):
- raise TypeError("Non-supported dice modifier: %s" % mod)
- modvalue = int(modvalue) # for safety
- result = eval("%s %s %s" % (result, mod, modvalue))
+ if modifier_string:
+ result = simple_eval(f"{result} {modifier_string}")
+
outcome, diff = None, None
- if conditional:
- # make sure to check types well before eval
- cond, condvalue = conditional
- if cond not in (">", "<", ">=", "<=", "!=", "=="):
- raise TypeError("Non-supported dice result conditional: %s" % conditional)
- condvalue = int(condvalue) # for safety
- outcome = eval("%s %s %s" % (result, cond, condvalue)) # True/False
- diff = abs(result - condvalue)
+ if conditional_string and conditional_value:
+ outcome = simple_eval(f"{result} {conditional_string}")
+ diff = abs(result - conditional_value)
+
if return_tuple:
return result, outcome, diff, rolls
+ elif conditional or (conditional_string and conditional_value):
+ return outcome # True|False
else:
- if conditional:
- return outcome
- else:
- return result
+ return result # integer
# legacy alias
@@ -321,7 +387,8 @@
except ValueError:
self.caller.msg(
"You need to enter valid integer numbers, modifiers and operators."
- " |w%s|n was not understood." % self.args
+ " |w%s|n was not understood."
+ % self.args
)
return
# format output
diff --git a/docs/2.x/_modules/evennia/contrib/rpg/dice/tests.html b/docs/2.x/_modules/evennia/contrib/rpg/dice/tests.html
index 0c304613a2..994366dcd0 100644
--- a/docs/2.x/_modules/evennia/contrib/rpg/dice/tests.html
+++ b/docs/2.x/_modules/evennia/contrib/rpg/dice/tests.html
@@ -89,9 +89,8 @@
"""
-from mock import patch
-
from evennia.commands.default.tests import BaseEvenniaCommandTest
+from mock import patch
from . import dice
@@ -99,16 +98,28 @@
[docs]@patch("evennia.contrib.rpg.dice.dice.randint", return_value=5)
class TestDice(BaseEvenniaCommandTest):
[docs] def test_roll_dice(self, mocked_randint):
- self.assertEqual(dice.roll_dice(6, 6, modifier=("+", 4)), mocked_randint() * 6 + 4)
- self.assertEqual(dice.roll_dice(6, 6, conditional=("<", 35)), True)
- self.assertEqual(dice.roll_dice(6, 6, conditional=(">", 33)), False)
+ self.assertEqual(dice.roll(6, 6, modifier=("+", 4)), mocked_randint() * 6 + 4)
+ self.assertEqual(dice.roll(6, 6, conditional=("<", 35)), True)
+ self.assertEqual(dice.roll(6, 6, conditional=(">", 33)), False)
[docs] def test_cmddice(self, mocked_randint):
self.call(
dice.CmdDice(), "3d6 + 4", "You roll 3d6 + 4.| Roll(s): 5, 5 and 5. Total result is 19."
)
self.call(dice.CmdDice(), "100000d1000", "The maximum roll allowed is 10000d10000.")
- self.call(dice.CmdDice(), "/secret 3d6 + 4", "You roll 3d6 + 4 (secret, not echoed).") search_index_entry = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' pemit remit', '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 '}¶search_index_entry = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' remit pemit', '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 '}¶
search_index_entry = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcmd batchcommand', '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 '}¶search_index_entry = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcommand batchcmd', '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 '}¶
search_index_entry = {'aliases': '@del @delete', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy del delete', '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 '}¶search_index_entry = {'aliases': '@delete @del', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy delete del', '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 '}¶
aliases = ['@update', '@parent', '@swap', '@typeclasses', '@type']¶aliases = ['@type', '@swap', '@typeclasses', '@update', '@parent']¶
search_index_entry = {'aliases': '@update @parent @swap @typeclasses @type', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass update parent swap typeclasses type', '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 typeclasses or 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. This will also\n reset cmdsets!\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 "}¶search_index_entry = {'aliases': '@type @swap @typeclasses @update @parent', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass type swap typeclasses update parent', '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 typeclasses or 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. This will also\n reset cmdsets!\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 "}¶
search_index_entry = {'aliases': '@exam @ex', 'category': 'building', 'key': '@examine', 'no_prefix': 'examine exam ex', '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 script - examine a Script\n channel - examine a Channel\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 '}¶search_index_entry = {'aliases': '@ex @exam', 'category': 'building', 'key': '@examine', 'no_prefix': 'examine ex exam', '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 script - examine a Script\n channel - examine a Channel\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 '}¶
search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}¶search_index_entry = {'aliases': '@chan @channels', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel chan channels', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}¶
search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}¶search_index_entry = {'aliases': '@chan @channels', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel chan channels', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}¶
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}¶search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}¶
search_index_entry = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'no_prefix': ' " \'', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}¶search_index_entry = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'no_prefix': ' \' "', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}¶
search_index_entry = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'no_prefix': ' hierarchy groups', '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 '}¶search_index_entry = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'no_prefix': ' groups hierarchy', '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 '}¶
search_index_entry = {'aliases': '@delays @task', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks delays task', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}¶search_index_entry = {'aliases': '@task @delays', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks task delays', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}¶
Test the batch processor.
red_button = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpr2s2zjd_/df91d1860cb3ee045169a7719938e2f9e0e0f395/evennia/contrib/tutorials/red_button/red_button.py'>¶
search_index_entry = {'aliases': 'co con conn', 'category': 'general', 'key': 'connect', 'no_prefix': ' co con conn', '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 '}¶search_index_entry = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', '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 '}¶
search_index_entry = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' look l', '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 '}¶search_index_entry = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' l look', '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 '}¶
search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', '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 '}¶search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', '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 '}¶
search_index_entry = {'aliases': 'co con conn', 'category': 'general', 'key': 'connect', 'no_prefix': ' co con conn', '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 '}¶search_index_entry = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', '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 '}¶
search_index_entry = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' look l', '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 '}¶search_index_entry = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' l look', '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 '}¶
search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}¶search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}¶
search_index_entry = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}¶search_index_entry = {'aliases': 'chanalias aliaschan', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' chanalias aliaschan', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}¶
search_index_entry = {'aliases': 'delchanalias delaliaschan', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delchanalias delaliaschan', '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 "}¶search_index_entry = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delaliaschan delchanalias', '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 "}¶
search_index_entry = {'aliases': 'chicken out q abort quit', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out q abort quit', '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 '}¶search_index_entry = {'aliases': 'chicken out abort quit q', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out abort quit q', '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 '}¶
search_index_entry = {'aliases': '; shout whisper', 'category': 'general', 'key': 'say', 'no_prefix': ' ; shout whisper', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}¶search_index_entry = {'aliases': 'whisper ; shout', 'category': 'general', 'key': 'say', 'no_prefix': ' whisper ; shout', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}¶
search_index_entry = {'aliases': 'e unfocus ex examine', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' e unfocus ex examine', '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 '}¶search_index_entry = {'aliases': 'ex unfocus e examine', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' ex unfocus e examine', '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 '}¶
search_index_entry = {'aliases': 'i inv give inventory', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' i inv give inventory', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}¶search_index_entry = {'aliases': 'inventory inv give i', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' inventory inv give i', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}¶
search_index_entry = {'aliases': '@open @dig', 'category': 'general', 'key': 'open', 'no_prefix': ' open dig', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}¶search_index_entry = {'aliases': '@dig @open', 'category': 'general', 'key': 'open', 'no_prefix': ' dig open', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}¶
search_index_entry = {'aliases': 'deal offers', 'category': 'trading', 'key': 'status', 'no_prefix': ' deal offers', '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 "}¶search_index_entry = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'no_prefix': ' offers deal', '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 "}¶
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}¶search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}¶
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}¶
search_index_entry = {'aliases': 'fly dive', 'category': 'general', 'key': 'fly or dive', 'no_prefix': ' fly dive', 'tags': '', 'text': '\n Fly or Dive up and down.\n\n Usage:\n fly\n dive\n\n Will fly up one room or dive down one room at your current position. If\n there is no room above/below you, your movement will fail.\n\n '}¶search_index_entry = {'aliases': 'dive fly', 'category': 'general', 'key': 'fly or dive', 'no_prefix': ' dive fly', 'tags': '', 'text': '\n Fly or Dive up and down.\n\n Usage:\n fly\n dive\n\n Will fly up one room or dive down one room at your current position. If\n there is no room above/below you, your movement will fail.\n\n '}¶
To roll dice in code, use the roll function from this module:
from evennia.contrib.rpg import dice
-dice.roll_dice(3, 10, ("+", 2)) # 3d10 + 2
+dice.roll(3, 10, ("+", 2)) # 3d10 + 2
or use the string syntax:
+dice.roll(“3d10 + 2”)
evennia.contrib.rpg.dice.dice.roll(dicenum, dicetype, modifier=None, conditional=None, return_tuple=False)[source]¶evennia.contrib.rpg.dice.dice.roll(dice, dicetype=6, modifier=None, conditional=None, return_tuple=False, max_dicenum=10, max_dicetype=1000)[source]¶
This is a standard dice roller.
dicenum (int) – Number of dice to roll (the result to be added).
dicetype (int) – Number of sides of the dice to be rolled.
modifier (tuple) – A tuple (operator, value), where operator is +
dice (int or str) – If an int, this is the number of dice to roll, and dicetype is used +to determine the type. If a str, it should be on the form NdM where N is the number +of dice and M is the number of sides on each die. Also +NdM [modifier] [number] [conditional] is understood, e.g. 1d6 + 3 +or 2d10 / 2 > 10.
dicetype (int, optional) – Number of sides of the dice to be rolled. Ignored if +dice is a string.
modifier (tuple, optional) – A tuple (operator, value), where operator is one of “+”, “-”, “/” or “*”. The result of the dice -roll(s) will be modified by this value.
conditional (tuple) – A tuple (conditional, value), where +roll(s) will be modified by this value. Ignored if dice is a string.
conditional (tuple, optional) – A tuple (conditional, value), where conditional is one of “==”,**”<”,”>”,”>=”,”<=**” or “!=”. -This allows the roller to directly return a result depending -on if the conditional was passed or not.
return_tuple (bool) – Return a tuple with all individual roll results or not.
max_dicenum (int) – The max number of dice to allow to be rolled.
max_dicetype (int) – The max number of sides on the dice to roll.
roll_result (int) –
-default return.
-is set but not return_tuple. This effectively hides the result -of the roll.
-return a tuple (result, outcome, diff, rolls). Here, -result is the normal result of the roll + modifiers. -outcome and diff are the boolean result of the roll and -absolute difference to the conditional input; they will -be will be None if conditional is not set. rolls is -itself a tuple holding all the individual rolls in the case of -multiple die-rolls.
-int, bool or tuple – By default, this is the result of the roll + modifiers. If +conditional is given, or dice is a string defining a conditional, then a True/False +value is returned. Finally, if return_tuple is set, this is a tuple +(result, outcome, diff, rolls), where, result is the the normal result of the +roll + modifiers, outcome and diff are the boolean absolute difference between the roll +and the conditional input; both will be will be None if conditional is not set. +The rolls a tuple holding all the individual rolls (one or more depending on how many +dice were rolled).
TypeError if non-supported modifiers or conditionals are given. –
@@ -211,56 +210,64 @@ multiple die-rolls.Notes
All input numbers are converted to integers.
Examples
-print roll_dice(2, 6) # 2d6 -<<< 7 -print roll_dice(1, 100, (‘+’, 5) # 1d100 + 5 -<<< 34 -print roll_dice(1, 20, conditional=(‘<’, 10) # let’say we roll 3 -<<< True -print roll_dice(3, 10, return_tuple=True) -<<< (11, None, None, (2, 5, 4)) -print roll_dice(2, 20, (‘-’, 2), conditional=(‘>=’, 10), return_tuple=True) -<<< (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+# explicit arguments +print roll(2, 6) # 2d6 +7 +print roll(1, 100, (‘+’, 5) # 1d100 + 5 +4 +print roll(1, 20, conditional=(‘<’, 10) # let’say we roll 3 +True +print roll(3, 10, return_tuple=True) +(11, None, None, (2, 5, 4)) +print roll(2, 20, (‘-’, 2), conditional=(‘>=’, 10), return_tuple=True) +(8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+# string form +print roll(“3d6 + 2”) +10 +print roll(“2d10 + 2 > 10”) +True +print roll(“2d20 - 2 >= 10”) +(8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+evennia.contrib.rpg.dice.dice.roll_dice(dicenum, dicetype, modifier=None, conditional=None, return_tuple=False)¶evennia.contrib.rpg.dice.dice.roll_dice(dice, dicetype=6, modifier=None, conditional=None, return_tuple=False, max_dicenum=10, max_dicetype=1000)¶
This is a standard dice roller.
dicenum (int) – Number of dice to roll (the result to be added).
dicetype (int) – Number of sides of the dice to be rolled.
modifier (tuple) – A tuple (operator, value), where operator is +
dice (int or str) – If an int, this is the number of dice to roll, and dicetype is used +to determine the type. If a str, it should be on the form NdM where N is the number +of dice and M is the number of sides on each die. Also +NdM [modifier] [number] [conditional] is understood, e.g. 1d6 + 3 +or 2d10 / 2 > 10.
dicetype (int, optional) – Number of sides of the dice to be rolled. Ignored if +dice is a string.
modifier (tuple, optional) – A tuple (operator, value), where operator is one of “+”, “-”, “/” or “*”. The result of the dice -roll(s) will be modified by this value.
conditional (tuple) – A tuple (conditional, value), where +roll(s) will be modified by this value. Ignored if dice is a string.
conditional (tuple, optional) – A tuple (conditional, value), where conditional is one of “==”,**”<”,”>”,”>=”,”<=**” or “!=”. -This allows the roller to directly return a result depending -on if the conditional was passed or not.
return_tuple (bool) – Return a tuple with all individual roll results or not.
max_dicenum (int) – The max number of dice to allow to be rolled.
max_dicetype (int) – The max number of sides on the dice to roll.
roll_result (int) –
-default return.
-is set but not return_tuple. This effectively hides the result -of the roll.
-return a tuple (result, outcome, diff, rolls). Here, -result is the normal result of the roll + modifiers. -outcome and diff are the boolean result of the roll and -absolute difference to the conditional input; they will -be will be None if conditional is not set. rolls is -itself a tuple holding all the individual rolls in the case of -multiple die-rolls.
-int, bool or tuple – By default, this is the result of the roll + modifiers. If +conditional is given, or dice is a string defining a conditional, then a True/False +value is returned. Finally, if return_tuple is set, this is a tuple +(result, outcome, diff, rolls), where, result is the the normal result of the +roll + modifiers, outcome and diff are the boolean absolute difference between the roll +and the conditional input; both will be will be None if conditional is not set. +The rolls a tuple holding all the individual rolls (one or more depending on how many +dice were rolled).
TypeError if non-supported modifiers or conditionals are given. –
@@ -269,16 +276,27 @@ multiple die-rolls.Notes
All input numbers are converted to integers.
Examples
-print roll_dice(2, 6) # 2d6 -<<< 7 -print roll_dice(1, 100, (‘+’, 5) # 1d100 + 5 -<<< 34 -print roll_dice(1, 20, conditional=(‘<’, 10) # let’say we roll 3 -<<< True -print roll_dice(3, 10, return_tuple=True) -<<< (11, None, None, (2, 5, 4)) -print roll_dice(2, 20, (‘-’, 2), conditional=(‘>=’, 10), return_tuple=True) -<<< (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+# explicit arguments +print roll(2, 6) # 2d6 +7 +print roll(1, 100, (‘+’, 5) # 1d100 + 5 +4 +print roll(1, 20, conditional=(‘<’, 10) # let’say we roll 3 +True +print roll(3, 10, return_tuple=True) +(11, None, None, (2, 5, 4)) +print roll(2, 20, (‘-’, 2), conditional=(‘>=’, 10), return_tuple=True) +(8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+# string form +print roll(“3d6 + 2”) +10 +print roll(“2d10 + 2 > 10”) +True +print roll(“2d20 - 2 >= 10”) +(8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8
+aliases = ['@dice', 'roll']¶aliases = ['roll', '@dice']¶
search_index_entry = {'aliases': '@dice roll', 'category': 'general', 'key': 'dice', 'no_prefix': ' dice roll', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}¶search_index_entry = {'aliases': 'roll @dice', 'category': 'general', 'key': 'dice', 'no_prefix': ' roll dice', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}¶
test_cmddice(mocked_randint)[source]¶
+test_string_form(mocked_randint)[source]¶test_maxvals(mocked_randint)[source]¶aliases = ['"', "'"]¶aliases = ["'", '"']¶
search_index_entry = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'no_prefix': ' " \'', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}¶search_index_entry = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'no_prefix': ' \' "', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}¶
aliases = ['turnbased combat', 'hit']¶aliases = ['hit', 'turnbased combat']¶
search_index_entry = {'aliases': 'turnbased combat hit', 'category': 'general', 'key': 'attack', 'no_prefix': ' turnbased combat hit', 'tags': '', 'text': '\n Start or join combat.\n\n Usage:\n attack [<target>]\n\n '}¶search_index_entry = {'aliases': 'hit turnbased combat', 'category': 'general', 'key': 'attack', 'no_prefix': ' hit turnbased combat', 'tags': '', 'text': '\n Start or join combat.\n\n Usage:\n attack [<target>]\n\n '}¶
aliases = ['i', 'inv']¶aliases = ['inv', 'i']¶
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}¶search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}¶
aliases = ['unwear', 'unwield']¶aliases = ['unwield', 'unwear']¶
search_index_entry = {'aliases': 'unwear unwield', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwear unwield', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove <item>\n unwield <item>\n unwear <item>\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}¶search_index_entry = {'aliases': 'unwield unwear', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwield unwear', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove <item>\n unwield <item>\n unwear <item>\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}¶
aliases = ['press', 'press button', 'push']¶
search_index_entry = {'aliases': 'press press button push', 'category': 'general', 'key': 'push button', 'no_prefix': ' press press button push', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}¶
aliases = ['smash lid', 'smash', 'break lid']¶
search_index_entry = {'aliases': 'smash lid smash break lid', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' smash lid smash break lid', '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 '}¶
aliases = ['press', 'press button', 'push']¶
search_index_entry = {'aliases': 'press press button push', 'category': 'general', 'key': 'push button', 'no_prefix': ' press press button push', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}¶
aliases = ['listen', 'get', 'ex', 'examine', 'l', 'feel']¶
search_index_entry = {'aliases': 'listen get ex examine l feel', 'category': 'general', 'key': 'look', 'no_prefix': ' listen get ex examine l feel', '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 "}¶
aliases = ['burn', 'light']¶aliases = ['light', 'burn']¶
search_index_entry = {'aliases': 'burn light', 'category': 'tutorialworld', 'key': 'on', 'no_prefix': ' burn light', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}¶search_index_entry = {'aliases': 'light burn', 'category': 'tutorialworld', 'key': 'on', 'no_prefix': ' light burn', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}¶
aliases = ['push', 'pull', 'move', 'shiftroot']¶aliases = ['shiftroot', 'pull', 'move', 'push']¶
search_index_entry = {'aliases': 'push pull move shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' push pull move shiftroot', '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 '}¶search_index_entry = {'aliases': 'shiftroot pull move push', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' shiftroot pull move push', '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 '}¶
aliases = ['press button', 'push button', 'button']¶aliases = ['button', 'push button', 'press button']¶
search_index_entry = {'aliases': 'press button push button button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' press button push button button', 'tags': '', 'text': '\n Presses a button.\n '}¶search_index_entry = {'aliases': 'button push button press button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' button push button press button', 'tags': '', 'text': '\n Presses a button.\n '}¶
aliases = ['slash', 'pierce', 'kill', 'hit', 'stab', 'parry', 'chop', 'bash', 'defend', 'fight', 'thrust']¶aliases = ['kill', 'thrust', 'stab', 'chop', 'defend', 'fight', 'bash', 'parry', 'hit', 'slash', 'pierce']¶
search_index_entry = {'aliases': 'slash pierce kill hit stab parry chop bash defend fight thrust', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' slash pierce kill hit stab parry chop bash defend fight thrust', '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 '}¶search_index_entry = {'aliases': 'kill thrust stab chop defend fight bash parry hit slash pierce', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' kill thrust stab chop defend fight bash parry hit slash pierce', '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 '}¶
aliases = ['h', '?']¶aliases = ['?', 'h']¶
search_index_entry = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}¶search_index_entry = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}¶
aliases = ['l', 'search', 'feel around', 'fiddle', 'feel']¶aliases = ['feel around', 'fiddle', 'l', 'search', 'feel']¶
search_index_entry = {'aliases': 'l search feel around fiddle feel', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' l search feel around fiddle feel', '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 '}¶search_index_entry = {'aliases': 'feel around fiddle l search feel', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' feel around fiddle l search feel', '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 '}¶
directory = '/tmp/tmpv2qdke09/637a4a15a920ad2cd82a3c07826160dc726bfe78/evennia'¶directory = '/tmp/tmpr2s2zjd_/df91d1860cb3ee045169a7719938e2f9e0e0f395/evennia'¶
directory = '/tmp/tmpv2qdke09/637a4a15a920ad2cd82a3c07826160dc726bfe78/evennia/game_template'¶directory = '/tmp/tmpr2s2zjd_/df91d1860cb3ee045169a7719938e2f9e0e0f395/evennia/game_template'¶
aliases = [':q!', ':dw', ':s', ':!', ':uu', ':', ':x', ':wq', ':y', ':I', ':f', ':q', '::', ':i', ':DD', ':<', ':>', ':dd', ':j', ':UU', ':w', ':::', ':S', ':A', ':r', ':h', ':p', ':fd', ':fi', ':u', ':echo', ':=']¶aliases = [':A', ':i', ':fd', ':r', ':!', '::', ':dw', ':s', ':u', ':S', ':<', ':y', ':I', ':h', ':>', ':DD', ':j', ':uu', ':p', ':wq', ':', ':q!', ':w', ':fi', ':echo', ':x', ':f', ':dd', ':UU', ':::', ':q', ':=']¶
search_index_entry = {'aliases': ':q! :dw :s :! :uu : :x :wq :y :I :f :q :: :i :DD :< :> :dd :j :UU :w ::: :S :A :r :h :p :fd :fi :u :echo :=', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :q! :dw :s :! :uu : :x :wq :y :I :f :q :: :i :DD :< :> :dd :j :UU :w ::: :S :A :r :h :p :fd :fi :u :echo :=', 'tags': '', 'text': '\n Commands for the editor\n '}¶search_index_entry = {'aliases': ':A :i :fd :r :! :: :dw :s :u :S :< :y :I :h :> :DD :j :uu :p :wq : :q! :w :fi :echo :x :f :dd :UU ::: :q :=', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :A :i :fd :r :! :: :dw :s :u :S :< :y :I :h :> :DD :j :uu :p :wq : :q! :w :fi :echo :x :f :dd :UU ::: :q :=', 'tags': '', 'text': '\n Commands for the editor\n '}¶
aliases = ['abort', '__nomatch_command', 'no', 'yes', 'y', 'a', 'n']¶
search_index_entry = {'aliases': 'abort __nomatch_command no yes y a n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' abort __nomatch_command no yes y a n', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}¶
aliases = ['a', 'end', 'p', 'previous', 'top', 'abort', 't', 'next', 'e', 'q', 'n', 'quit']¶aliases = ['abort', 'e', 'q', 't', 'quit', 'p', 'previous', 'a', 'top', 'n', 'next', 'end']¶
search_index_entry = {'aliases': 'a end p previous top abort t next e q n quit', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' a end p previous top abort t next e q n quit', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}¶search_index_entry = {'aliases': 'abort e q t quit p previous a top n next end', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' abort e q t quit p previous a top n next end', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}¶