Clean up contrib docs, autogeneration

This commit is contained in:
Griatch 2022-01-08 14:40:58 +01:00
parent b922cf9b3c
commit e96bbb4b86
94 changed files with 4126 additions and 2536 deletions

View file

@ -72,19 +72,18 @@ Each contrib contains installation instructions for how to integrate it
with your other code. If you want to tweak the code of a contrib, just with your other code. If you want to tweak the code of a contrib, just
copy its entire folder to your game directory and modify/use it from there. copy its entire folder to your game directory and modify/use it from there.
If you want to contribute yourself, see [here](Contributing)!
> Hint: Additional (potentially un-maintained) code snippets from the community can be found > Hint: Additional (potentially un-maintained) code snippets from the community can be found
in our discussion forum's [Community Contribs & Snippets](https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets) category. in our discussion forum's [Community Contribs & Snippets](https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets) category.
If you want to contribute yourself, see [here](Contributing)!
""" """
TOCTREE = """ TOCTREE = """
```{{toctree}} ```{{toctree}}
:depth: 2
{listing} {listing}
```
""" """
@ -101,11 +100,11 @@ _{category_desc}_
BLURB = """ BLURB = """
### Contrib: `{name}` ### Contrib: `{name}`
{credits} _{credits}_
{blurb} {blurb}
[Read the documentation]({filename}) [Read the documentation](./{filename}) - [Browse the Code](api:{code_location})
""" """
@ -121,7 +120,7 @@ INDEX_FOOTER = """
---- ----
<small>This document page is auto-generated from the sources. Manual changes <small>This document page is auto-generated. Manual changes
will be overwritten.</small> will be overwritten.</small>
""" """
@ -141,6 +140,8 @@ def readmes2docs(directory=_SOURCE_DIR):
# paths are e.g. evennia/contrib/utils/auditing/README.md # paths are e.g. evennia/contrib/utils/auditing/README.md
_, category, name, _ = file_path.rsplit(sep, 3) _, category, name, _ = file_path.rsplit(sep, 3)
pypath = f"evennia.contrib.{category}.{name}"
filename = "Contrib-" + "-".join( filename = "Contrib-" + "-".join(
_FILENAME_MAP.get( _FILENAME_MAP.get(
part, part.capitalize() if part[0].islower() else part) part, part.capitalize() if part[0].islower() else part)
@ -162,7 +163,7 @@ def readmes2docs(directory=_SOURCE_DIR):
with open(outfile, 'w') as fil: with open(outfile, 'w') as fil:
fil.write(data) fil.write(data)
categories[category].append((name, credits, blurb, filename)) categories[category].append((name, credits, blurb, filename, pypath))
ncount += 1 ncount += 1
# build the index with blurbs # build the index with blurbs
@ -179,6 +180,7 @@ def readmes2docs(directory=_SOURCE_DIR):
credits=tup[1], credits=tup[1],
blurb=tup[2], blurb=tup[2],
filename=tup[3], filename=tup[3],
code_location=tup[4]
) )
) )
filenames.append(f"Contribs{sep}{tup[3]}") filenames.append(f"Contribs{sep}{tup[3]}")
@ -190,15 +192,13 @@ def readmes2docs(directory=_SOURCE_DIR):
) )
) )
lines.append(TOCTREE.format( lines.append(TOCTREE.format(
listing="\n".join(filenames)) listing="\n ".join(filenames))
) )
lines.append(INDEX_FOOTER) lines.append(INDEX_FOOTER)
text = "\n".join(lines) text = "\n".join(lines)
with open(_OUT_INDEX_FILE, 'w') as fil: with open(_OUT_INDEX_FILE, 'w') as fil:
fil.write(text) fil.write(text)

View file

@ -214,7 +214,7 @@ in poor condition" ...`
The `$funcparser` inline functions are very powerful for the game developer, but they may The `$funcparser` inline functions are very powerful for the game developer, but they may
be a bit too much to write for the regular player. be a bit too much to write for the regular player.
The [rpsystem contrib](evennia.contribs.rpsystem) implements a full dynamic emote/pose and recognition The [rpsystem contrib](evennia.contrib.rpg.rpsystem) implements a full dynamic emote/pose and recognition
system with short-descriptions and disguises. It uses director stance with a custom markup system with short-descriptions and disguises. It uses director stance with a custom markup
language, like `/me` `/gun` and `/tall man` to refer to players and objects in the location. It can be language, like `/me` `/gun` and `/tall man` to refer to players and objects in the location. It can be
worth checking out for inspiration. worth checking out for inspiration.

View file

@ -90,5 +90,5 @@ Adding advanced and flexible building commands to your game is easy and will pro
satisfy most creative builders. However, if you really, *really* want to offer online coding, there satisfy most creative builders. However, if you really, *really* want to offer online coding, there
is of course nothing stopping you from adding that to Evennia, no matter our recommendations. You is of course nothing stopping you from adding that to Evennia, no matter our recommendations. You
could even re-implement MUX' softcode in Python should you be very ambitious. The could even re-implement MUX' softcode in Python should you be very ambitious. The
[in-game-python](../Contribs/Dialogues-in-events.md) is an optional [in-game-python](../Contribs/Contrib-Ingame-Python.md) is an optional
pseudo-softcode plugin aimed at developers wanting to script their game from inside it. pseudo-softcode plugin aimed at developers wanting to script their game from inside it.

View file

@ -1,12 +1,10 @@
# AWSstorage system # AWSstorage system
Contrib by The Right Honourable Reverend (trhr) 2020 Contrib by The Right Honourable Reverend (trhr), 2020
## What is this for?
This plugin migrates the Web-based portion of Evennia, namely images, This plugin migrates the Web-based portion of Evennia, namely images,
javascript, and other items located inside staticfiles into Amazon AWS (S3) for javascript, and other items located inside staticfiles into Amazon AWS (S3)
hosting. cloud hosting. Great for those serving media with the game.
Files hosted on S3 are "in the cloud," and while your personal Files hosted on S3 are "in the cloud," and while your personal
server may be sufficient for serving multimedia to a minimal number of users, server may be sufficient for serving multimedia to a minimal number of users,

View file

@ -1,15 +1,15 @@
# Input/Output Auditing # Input/Output Auditing
Contrib - Johnny 2017 Contribution by Johnny, 2017
This is a tap that optionally intercepts all data sent to/from clients and the Utility that taps and intercepts all data sent to/from clients and the
server and passes it to a callback of your choosing. server and passes it to a callback of your choosing. This is intended for
quality assurance, post-incident investigations and debugging.
It is intended for quality assurance, post-incident investigations and debugging Note that this should be used with care since it can obviously be abused. All
but obviously can be abused. All data is recorded in cleartext. Please data is recorded in cleartext. Please be ethical, and if you are unwilling to
be ethical, and if you are unwilling to properly deal with the implications of properly deal with the implications of recording user passwords or private
recording user passwords or private communications, please do not enable communications, please do not enable this module.
this module.
Some checks have been implemented to protect the privacy of users. Some checks have been implemented to protect the privacy of users.

View file

@ -1,18 +1,14 @@
# Barter system # Barter system
Evennia contribution - Griatch 2012 Contribution by Griatch, 2012
This implements a full barter system - a way for players to safely This implements a full barter system - a way for players to safely
trade items between each other using code rather than simple free-form trade items between each other in code rather than simple `give/get`
talking. The advantage of this is increased buy/sell safety but it commands. This increases both safety (at no time will one player have
also streamlines the process and makes it faster when doing many both goods and payment in-hand) and speed, since agreed goods will
transactions (since goods are automatically exchanged once both be moved automatically). By just replacing one side with coin objects,
agree). (or a mix of coins and goods), this also works fine for regular money
transactions.
This system is primarily intended for a barter economy, but can easily
be used in a monetary economy as well -- just let the "goods" on one
side be coin objects (this is more flexible than a simple "buy"
command since you can mix coins and goods in your trade).
## Installation ## Installation

View file

@ -1,10 +1,10 @@
# Batch processor examples # Batch processor examples
Contibution - Griatch 2012 Contibution by Griatch, 2012
The batch processor is used for generating in-game content from one or more Simple examples for the batch-processor. The batch processor is used for generating
static files. Files can be stored with version control and then 'applied' in-game content from one or more static files. Files can be stored with version
to the game to create content. control and then 'applied' to the game to create content.
There are two batch processor types: There are two batch processor types:

View file

@ -1,9 +1,9 @@
# Script example # Script example
Griatch - 2012 Contribution by Griatch, 2012
Example script for testing. This adds a simple timer that has your Example script for testing. This adds a simple timer that has your
character make observations and notices at irregular intervals. character make small verbal observations at irregular intervals.
To test, use (in game) To test, use (in game)

View file

@ -1,15 +1,13 @@
# Building menu # Building menu
Module containing the building menu system. Contrib by vincent-lg, 2018
Evennia contributor: vincent-lg 2018
Building menus are in-game menus, not unlike `EvMenu` though using a Building menus are in-game menus, not unlike `EvMenu` though using a
different approach. Building menus have been specifically designed to edit different approach. Building menus have been specifically designed to edit
information as a builder. Creating a building menu in a command allows information as a builder. Creating a building menu in a command allows
builders quick-editing of a given object, like a room. If you follow the builders quick-editing of a given object, like a room. If you follow the
steps below to add the contrib, you will have access to an `@edit` command steps to add the contrib, you will have access to an `edit` command
that will edit any default object offering to change its key and description. that will edit any default object, offering to change its key and description.
## Install ## Install

View file

@ -1,9 +1,9 @@
# Clothing # Clothing
Evennia contribution - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
Provides a typeclass and commands for wearable clothing, Provides a typeclass and commands for wearable clothing. These
which is appended to a character's description when worn. look of these clothes are appended to the character's description when worn.
Clothing items, when worn, are added to the character's description Clothing items, when worn, are added to the character's description
in a list. For example, if wearing the following clothing items: in a list. For example, if wearing the following clothing items:
@ -13,6 +13,11 @@ in a list. For example, if wearing the following clothing items:
one nice hat one nice hat
a very pretty dress a very pretty dress
Would result in this added description:
Tim is wearing one nice hat, a thin and delicate necklace,
a very pretty dress and a pair of regular ol' shoes.
## Installation ## Installation
To install, import this module and have your default character To install, import this module and have your default character

View file

@ -1,9 +1,10 @@
# Color markups # Color markups
Contribution, Griatch 2017 Contrib by Griatch, 2017
Additional color markup styles for Evennia (extending or replacing the default Additional color markup styles for Evennia (extending or replacing the default
`|r`, `|234` etc). `|r`, `|234`). Adds support for MUSH-style (`%cr`, `%c123`) and/or legacy-Evennia
(`{r`, `{123`).
## Installation ## Installation

View file

@ -1,13 +1,12 @@
# Cooldown contrib module. # Cooldowns
Evennia contrib - owllex, 2021 Contribution by owllex, 2021
This contrib provides a simple cooldown handler that can be attached to any Cooldowns are used modelling rate-limited actions, like how often a
typeclassed Object or Account. A cooldown is a lightweight persistent character can perform a given action; until a certain time has passed their
asynchronous timer that you can query to see if it is ready. command can not be used again. This contrib provides a simple cooldown
handler that can be attached to any typeclass. A cooldown is a lightweight persistent
Cooldowns are good for modelling rate-limited actions, like how often a asynchronous timer that you can query to see if a certain time has yet passed.
character can perform a given command.
Cooldowns are completely asynchronous and must be queried to know their Cooldowns are completely asynchronous and must be queried to know their
state. They do not fire callbacks, so are not a good fit for use cases state. They do not fire callbacks, so are not a good fit for use cases

View file

@ -1,25 +1,46 @@
# Crafting system # Crafting system
Contrib - Griatch 2020 Contribution by Griatch 2020
This implements a full crafting system. The principle is that of a 'recipe': This implements a full crafting system. The principle is that of a 'recipe',
where you combine items (tagged as ingredients) create something new. The recipe can also
require certain (non-consumed) tools. An example would be to use the 'bread recipe' to
combine 'flour', 'water' and 'yeast' with an 'oven' to bake a 'loaf of bread'.
ingredient1 + ingredient2 + ... + tool1 + tool2 + ... + craft_recipe -> objectA, objectB, ... The recipe process can be understood like this:
ingredient(s) + tool(s) + recipe -> object(s)
Here, 'ingredients' are consumed by the crafting process, whereas 'tools' are Here, 'ingredients' are consumed by the crafting process, whereas 'tools' are
necessary for the process by will not be destroyed by it. necessary for the process but will not be destroyed by it.
An example would be to use the tools 'bowl' and 'oven' to use the ingredients The included `craft` command works like this:
'flour', 'salt', 'yeast' and 'water' to create 'bread' using the 'bread recipe'.
A recipe does not have to use tools, like 'snow' + 'snowball-recipe' becomes craft <recipe> [from <ingredient>,...] [using <tool>, ...]
'snowball'. Conversely one could also imagine using tools without consumables,
like using 'spell book' and 'wand' to produce 'fireball' by having the recipe
check some magic skill on the character.
The system is generic enough to be used also for adventure-like puzzles, like ## Examples
combining 'stick', 'string' and 'hook' to get a 'makeshift fishing rod' that
you can use with 'storm drain' (treated as a tool) to get 'key' ... Using the `craft` command:
craft toy car from plank, wooden wheels, nails using saw, hammer
A recipe does not have to use tools or even multiple ingredients:
snow + snowball_recipe -> snowball
Conversely one could also imagine using tools without consumables, like
spell_book + wand + fireball_recipe -> fireball
The system is generic enough to be used also for adventure-like puzzles (but
one would need to change the command and determine the recipe on based on what
is being combined instead):
stick + string + hook -> makeshift_fishing_rod
makeshift_fishing_rod + storm_drain -> key
See the [sword example](evennia.contrib.game_systems.crafting.example_recipes) for an example
of how to design a recipe tree for crafting a sword from base elements.
## Intallation and Usage ## Intallation and Usage
@ -29,18 +50,30 @@ available to you:
craft <recipe> [from <ingredient>,...] [using <tool>, ...] craft <recipe> [from <ingredient>,...] [using <tool>, ...]
For example In code, you can craft using the
`evennia.contrib.game_systems.crafting.craft` function:
craft toy car from plank, wooden wheels, nails using saw, hammer ```python
from evennia.contrib.game_systems.crafting import craft
To use crafting you need recipes. Add a new variable to `mygame/server/conf/settings.py`: result = craft(caller, "recipename", *inputs)
```
Here, `caller` is the one doing the crafting and `*inputs` is any combination of
consumables and/or tool Objects. The system will identify which is which by the
[Tags](../Components/Tags.md) on them (see below) The `result` is always a list.
To use crafting you need recipes. Add a new variable to
`mygame/server/conf/settings.py`:
CRAFT_RECIPE_MODULES = ['world.recipes'] CRAFT_RECIPE_MODULES = ['world.recipes']
All top-level classes in these modules (whose name does not start with `_`) All top-level classes in these modules (whose name does not start with `_`) will
will be parsed by Evennia as recipes to make available to the crafting system. be parsed by Evennia as recipes to make available to the crafting system. Using
Using the above example, create `mygame/world/recipes.py` and add your recipies the above example, create `mygame/world/recipes.py` and add your recipies in
in there: there:
A quick example (read on for more details):
```python ```python
@ -69,37 +102,202 @@ class RecipeBread(CraftingRecipe):
def pre_craft(self, **kwargs): def pre_craft(self, **kwargs):
# validates inputs etc. Raise `CraftingValidationError` if fails # validates inputs etc. Raise `CraftingValidationError` if fails
def craft(self, **kwargs): def do_craft(self, **kwargs):
# performs the craft - but it can still fail (check skills etc here) # performs the craft - report errors directly to user and return None (if
# failed) and the created object(s) if successful.
def craft(self, result, **kwargs): def post_craft(self, result, **kwargs):
# any post-crafting effects. Always called, even if crafting failed (be # any post-crafting effects. Always called, even if do_craft failed (the
# result would be None then) # result would be None then)
``` ```
## Technical ## Adding new recipes
The Recipe is a class that specifies the consumables, tools and output along A *recipe* is a class inheriting from
with various methods (that you can override) to do the the validation of inputs `evennia.contrib.crafting.crafting.CraftingRecipe`. This class implements the
and perform the crafting itself. most common form of crafting - that using in-game objects. Each recipe is a
separate class which gets initialized with the consumables/tools you provide.
By default the input is a list of object-tags (using the "crafting_material" For the `craft` command to find your custom recipes, you need to tell Evennia
and "crafting_tool" tag-categories respectively). Providing a set of objects where they are. Add a new line to your `mygame/server/conf/settings.py` file,
matching these tags are required for the crafting to be done. The use of tags with a list to any new modules with recipe classes.
means that multiple different objects could all work for the same recipe, as
long as they have the right tag. This can be very useful for allowing players
to experiment and explore alternative ways to create things!
The output is given by a set of prototype-dicts. If the input is correct and ```python
other checks are passed (such as crafting skill, for example), these prototypes CRAFT_RECIPE_MODULES = ["world.myrecipes"]
will be used to generate the new object(s) being crafted. ```
(You need to reload after adding this). All global-level classes in these
modules (whose names don't start with underscore) are considered by the system
as viable recipes.
Here we assume you created `mygame/world/myrecipes.py` to match the above
example setting:
```python
# in mygame/world/myrecipes.py
from evennia.contrib.crafting.crafting import CraftingRecipe
class WoodenPuppetRecipe(CraftingRecipe):
"""A puppet""""
name = "wooden puppet" # name to refer to this recipe as
tool_tags = ["knife"]
consumable_tags = ["wood"]
output_prototypes = [
{"key": "A carved wooden doll",
"typeclass": "typeclasses.objects.decorations.Toys",
"desc": "A small carved doll"}
]
```
This specifies which tags to look for in the inputs. It defines a
[Prototype](../Components/Prototypes.md) for the recipe to use to spawn the
result on the fly (a recipe could spawn more than one result if needed).
Instead of specifying the full prototype-dict, you could also just provide a
list of `prototype_key`s to existing prototypes you have.
After reloading the server, this recipe would now be available to use. To try it
we should create materials and tools to insert into the recipe.
The recipe analyzes inputs, looking for [Tags](../Components/Tags.md) with
specific tag-categories. The tag-category used can be set per-recipe using the
(`.consumable_tag_category` and `.tool_tag_category` respectively). The defaults
are `crafting_material` and `crafting_tool`. For
the puppet we need one object with the `wood` tag and another with the `knife`
tag:
```python
from evennia import create_object
knife = create_object(key="Hobby knife", tags=[("knife", "crafting_tool")])
wood = create_object(key="Piece of wood", tags[("wood", "crafting_material")])
```
Note that the objects can have any name, all that matters is the
tag/tag-category. This means if a "bayonet" also had the "knife" crafting tag,
it could also be used to carve a puppet. This is also potentially interesting
for use in puzzles and to allow users to experiment and find alternatives to
know ingredients.
By the way, there is also a simple shortcut for doing this:
```
tools, consumables = WoodenPuppetRecipe.seed()
```
The `seed` class-method will create simple dummy objects that fulfills the
recipe's requirements. This is great for testing.
Assuming these objects were put in our inventory, we could now craft using the
in-game command:
```bash
> craft wooden puppet from wood using hobby knife
```
In code we would do
```python
from evennia.contrub.crafting.crafting import craft
puppet = craft(crafter, "wooden puppet", knife, wood)
```
In the call to `craft`, the order of `knife` and `wood` doesn't matter - the
recipe will sort out which is which based on their tags.
## Deeper customization of recipes
For customizing recipes further, it helps to understand how to use the
recipe-class directly:
```python
class MyRecipe(CraftingRecipe):
# ...
tools, consumables = MyRecipe.seed()
recipe = MyRecipe(crafter, *(tools + consumables))
result = recipe.craft()
```
This is useful for testing and allows you to use the class directly without
adding it to a module in `settings.CRAFTING_RECIPE_MODULES`.
Even without modifying more than the class properties, there are a lot of
options to set on the `CraftingRecipe` class. Easiest is to refer to the
[CraftingRecipe api
documentation](evennia.contrib.game_systems.crafting.crafting.CraftingRecipe). For example,
you can customize the validation-error messages, decide if the ingredients have
to be exactly right, if a failure still consumes the ingredients or not, and
much more.
For even more control you can override hooks in your own class:
- `pre_craft` - this should handle input validation and store its data in `.validated_consumables` and
`validated_tools` respectively. On error, this reports the error to the crafter and raises the
`CraftingValidationError`.
- `craft` - this will only be called if `pre_craft` finished without an exception. This should
return the result of the crafting, by spawnging the prototypes. Or the empty list if crafting
fails for some reason. This is the place to add skill-checks or random chance if you need it
for your game.
- `post_craft` - this receives the result from `craft` and handles error messages and also deletes
any consumables as needed. It may also modify the result before returning it.
- `msg` - this is a wrapper for `self.crafter.msg` and should be used to send messages to the
crafter. Centralizing this means you can also easily modify the sending style in one place later.
The class constructor (and the `craft` access function) takes optional `**kwargs`. These are passed
into each crafting hook. These are unused by default but could be used to customize things per-call.
### Skilled crafters
What the crafting system does not have out of the box is a 'skill' system - the
notion of being able to fail the craft if you are not skilled enough. Just how
skills work is game-dependent, so to add this you need to make your own recipe
parent class and have your recipes inherit from this.
```python
from random import randint
from evennia.contrib.crafting.crafting import CraftingRecipe
class SkillRecipe(CraftingRecipe):
"""A recipe that considers skill"""
difficulty = 20
def craft(self, **kwargs):
"""The input is ok. Determine if crafting succeeds"""
# this is set at initialization
crafter = self.crafte
# let's assume the skill is stored directly on the crafter
# - the skill is 0..100.
crafting_skill = crafter.db.skill_crafting
# roll for success:
if randint(1, 100) <= (crafting_skill - self.difficulty):
# all is good, craft away
return super().craft()
else:
self.msg("You are not good enough to craft this. Better luck next time!")
return []
```
In this example we introduce a `.difficulty` for the recipe and makes a 'dice roll' to see
if we succed. We would of course make this a lot more immersive and detailed in a full game. In
principle you could customize each recipe just the way you want it, but you could also inherit from
a central parent like this to cut down on work.
The [sword recipe example module](evennia.contrib.game_systems.crafting.example_recipes) also shows an example
of a random skill-check being implemented in a parent and then inherited for multiple use.
## Even more customization
If you want to build something even more custom (maybe using different input types of validation logic)
you could also look at the `CraftingRecipe` parent class `CraftingRecipeBase`.
It implements just the minimum needed to be a recipe and for big changes you may be better off starting
from this rather than the more opinionated `CraftingRecipe`.
Each recipe is a stand-alone entity which allows for very advanced
customization for every recipe - for example one could have a recipe that
checks other properties of the inputs (like quality, color etc) and have that
affect the result. Your recipes could also (and likely would) tie into your
game's skill system to determine the success or outcome of the crafting.
---- ----

View file

@ -1,10 +1,11 @@
# Custom gameime # Custom gameime
Contrib - Griatch 2017, vlgeoff 2017 Contrib by vlgeoff, 2017 - based on Griatch's core original
This reimplements the `evennia.utils.gametime` module but supporting a custom This reimplements the `evennia.utils.gametime` module but with a _custom_
calendar for your game world. It allows for scheduling events to happen at given calendar (unusual number of days per week/month/year etc) for your game world.
in-game times, taking this custom calendar into account. Like the original, it allows for scheduling events to happen at given
in-game times, but now taking this custom calendar into account.
## Installation ## Installation

View file

@ -1,8 +1,12 @@
# Dice # Dice
Rolls dice for roleplaying, in-game gambling or GM:ing Contribution by Griatch, 2012
A dice roller for any number and side of dice. Adds in-game dice rolling
(`roll 2d10 + 1`) as well as conditionals (roll under/over/equal to a target)
and functions for rolling dice in code. Command also supports hidden or secret
rolls for use by a human game master.
Evennia contribution - Griatch 2012
# Installation: # Installation:

View file

@ -1,9 +1,10 @@
# Email-based login system # Email-based login system
Evennia contrib - Griatch 2012 Contrib by Griatch, 2012
This is a variant of the login system that requires an email-address This is a variant of the login system that asks for an email-address
instead of a username to login. instead of a username to login. Note that it does not verify the email,
it just uses it as the identifier rather than a username.
This used to be the default Evennia login before replacing it with a This used to be the default Evennia login before replacing it with a
more standard username + password system (having to supply an email more standard username + password system (having to supply an email

View file

@ -1,10 +1,12 @@
# EvscapeRoom # EvscapeRoom
Evennia contrib - Griatch 2019 Contribution by Griatch, 2019
This 'Evennia escaperoom game engine' was created for the MUD Coders Guild game A full engine for creating multiplayer escape-rooms in Evennia. Allows players to
Jam, April 14-May 15 2019. The theme for the jam was "One Room". This contains the spawn and join puzzle rooms that track their state independently. Any number of players
utilities and base classes and an empty example room. can join to solve a room together. This is the engine created for 'EvscapeRoom', which won
the MUD Coders Guild "One Room" Game Jam in April-May, 2019. The contrib has no game
content but contains the utilities and base classes and an empty example room.
The original code for the contest is found at The original code for the contest is found at
https://github.com/Griatch/evscaperoom but the version on the public Evennia https://github.com/Griatch/evscaperoom but the version on the public Evennia

View file

@ -1,10 +1,11 @@
# Extended Room # Extended Room
Evennia Contribution - Griatch 2012, vincent-lg 2019 Contribution - Griatch 2012, vincent-lg 2019
This is an extended Room typeclass for Evennia. It is supported This extends the normal `Room` typeclass to allow its description to change
by an extended `Look` command and an extended `desc` command, also with time-of-day and/or season. It also adds 'details' for the player to look at
in this module. in the room (without having to create a new in-game object for each). The room is
supported by new `look` and `desc` commands.
## Installation/testing: ## Installation/testing:

View file

@ -1,14 +1,16 @@
# Easy fillable form # Easy fillable form
Contrib - Tim Ashley Jenkins 2018 Contribution by Tim Ashley Jenkins, 2018
This module contains a function that calls an easily customizable EvMenu - this This module contains a function that generates an `EvMenu` for you - this
menu presents the player with a fillable form, with fields that can be filled menu presents the player with a form of fields that can be filled
out in any order. Each field's value can be verified, with the function out in any order (e.g. for character generation or building). Each field's value can
allowing easy checks for text and integer input, minimum and maximum values / be verified, with the function allowing easy checks for text and integer input,
character lengths, or can even be verified by a custom function. Once the form minimum and maximum values / character lengths, or can even be verified by a custom
is submitted, the form's data is submitted as a dictionary to any callable of function. Once the form is submitted, the form's data is submitted as a dictionary
your choice. to any callable of your choice.
## Usage
The function that initializes the fillable form menu is fairly simple, and The function that initializes the fillable form menu is fairly simple, and
includes the caller, the template for the form, and the callback(caller, result) includes the caller, the template for the form, and the callback(caller, result)

View file

@ -1,6 +1,6 @@
# Gendersub # Gendersub
Contrib - Griatch 2015 Contribution by Griatch 2015
This is a simple gender-aware Character class for allowing users to This is a simple gender-aware Character class for allowing users to
insert custom markers in their text to indicate gender-aware insert custom markers in their text to indicate gender-aware

View file

@ -1,11 +1,11 @@
# Health Bar # Health Bar
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
The function provided in this module lets you easily display visual The function provided in this module lets you easily display visual
bars or meters - "health bar" is merely the most obvious use for this, bars or meters as a colorful bar instead of just a number. A "health bar"
though these bars are highly customizable and can be used for any sort is merely the most obvious use for this, but the bar is highly customizable
of appropriate data besides player health. and can be used for any sort of appropriate data besides player health.
Today's players may be more used to seeing statistics like health, Today's players may be more used to seeing statistics like health,
stamina, magic, and etc. displayed as bars rather than bare numerical stamina, magic, and etc. displayed as bars rather than bare numerical

View file

@ -1,23 +1,19 @@
# Dialogues in events # Dialogues in events
This tutorial will walk you through the steps to create several dialogues with
- Next tutorial: [adding a voice-operated elevator with events](A-voice-operated-elevator-using- characters, using the Ingame-Python system. This tutorial assumes the in-game
events). Python system is installed in your game. If it isn't, you can follow the
installation steps given in [The main In-game Python
This tutorial will walk you through the steps to create several dialogues with characters, using the docs](./Contrib-Ingame-Python.md) and come back on this tutorial once the
[in-game Python system is installed. **You do not need to read** the entire documentation, it's
system](https://github.com/evennia/evennia/blob/master/evennia/contrib/ingame_python/README.md). a good reference, but not the easiest way to learn about it. Hence these
This tutorial assumes the in-game Python system is installed in your game. If it isn't, you can
follow the installation steps given in [the documentation on in-game
Python](https://github.com/evennia/evennia/blob/master/evennia/contrib/ingame_python/README.md), and
come back on this tutorial once the system is installed. **You do not need to read** the entire
documentation, it's a good reference, but not the easiest way to learn about it. Hence these
tutorials. tutorials.
The in-game Python system allows to run code on individual objects in some situations. You don't The in-game Python system allows to run code on individual objects in some
have to modify the source code to add these features, past the installation. The entire system situations. You don't have to modify the source code to add these features,
makes it easy to add specific features to some objects, but not all. This is why it can be very past the installation. The entire system makes it easy to add specific features
useful to create a dialogue system taking advantage of the in-game Python system. to some objects, but not all. This is why it can be very useful to create a
dialogue system taking advantage of the in-game Python system.
> What will we try to do? > What will we try to do?

View file

@ -1,15 +1,8 @@
# A voice operated elevator using events # A voice operated elevator using events
- Previous tutorial: [Adding dialogues in events](./Dialogues-in-events.md)
This tutorial will walk you through the steps to create a voice-operated elevator, using the [in- This tutorial will walk you through the steps to create a voice-operated elevator, using the [in-
game Python game Python system](./Contrib-Ingame-Python.md). This tutorial assumes the in-game Python
system](https://github.com/evennia/evennia/blob/master/evennia/contrib/ingame_python/README.md). system is installed per the instructions in that doc. **You do not need to read** the entire
This tutorial assumes the in-game Python system is installed in your game. If it isn't, you can
follow the installation steps given in [the documentation on in-game
Python](https://github.com/evennia/evennia/blob/master/evennia/contrib/ingame_python/README.md), and
come back on this tutorial once the system is installed. **You do not need to read** the entire
documentation, it's a good reference, but not the easiest way to learn about it. Hence these documentation, it's a good reference, but not the easiest way to learn about it. Hence these
tutorials. tutorials.
@ -97,7 +90,8 @@ things to decorate it a bit.
But what we want now is to be able to say "1", "2" or "3" and have the elevator move in that But what we want now is to be able to say "1", "2" or "3" and have the elevator move in that
direction. direction.
If you have read [the previous tutorial about adding dialogues in events](./Dialogues-in-events.md), you If you have read
[the other in-game Python tutorial about adding dialogues in events](./Contrib-Ingame-Python-Tutorial-Dialogue.md), you
may remember what we need to do. If not, here's a summary: we need to run some code when somebody may remember what we need to do. If not, here's a summary: we need to run some code when somebody
speaks in the room. So we need to create a callback (the callback will contain our lines of code). speaks in the room. So we need to create a callback (the callback will contain our lines of code).
We just need to know on which event this should be set. You can enter `call here` to see the We just need to know on which event this should be set. You can enter `call here` to see the
@ -244,7 +238,7 @@ This is a great opportunity to learn about chained events. Chained events are v
pauses. Contrary to the events we have seen so far, chained events aren't called automatically. pauses. Contrary to the events we have seen so far, chained events aren't called automatically.
They must be called by you, and can be called after some time. They must be called by you, and can be called after some time.
- Chained events always have the name "chain_X". Usually, X is a number, but you can give the - Chained events always have the name `"chain_X"`. Usually, X is a number, but you can give the
chained event a more explicit name. chained event a more explicit name.
- In our original callback, we will call our chained events in, say, 15 seconds. - In our original callback, we will call our chained events in, say, 15 seconds.
- We'll also have to make sure the elevator isn't already moving. - We'll also have to make sure the elevator isn't already moving.
@ -254,7 +248,7 @@ event in our elevator, that will only contain the code necessary to open the doo
call/add here = chain_1 call/add here = chain_1
The callback is added to the "chain_1" event, an event that will not be automatically called by the The callback is added to the `"chain_1"` event, an event that will not be automatically called by the
system when something happens. Inside this event, you can paste the code to open the doors at the system when something happens. Inside this event, you can paste the code to open the doors at the
new floor. You can notice a few differences: new floor. You can notice a few differences:
@ -273,7 +267,7 @@ Now let's edit our callback in the "say" event. We'll have to change it a bit:
- The callback will have to check the elevator isn't already moving. - The callback will have to check the elevator isn't already moving.
- It must change the exits when the elevator move. - It must change the exits when the elevator move.
- It has to call the "chain_1" event we have defined. It should call it 15 seconds later. - It has to call the `"chain_1"` event we have defined. It should call it 15 seconds later.
Let's see the code in our callback. Let's see the code in our callback.
@ -415,8 +409,8 @@ constraints on persistent attributes. A callback will not be stored in this way
This variable will not be available in your chained event. This variable will not be available in your chained event.
- **Q:** when you say I can call my chained events something else than "chain_1", "chain_2" and - **Q:** when you say I can call my chained events something else than "chain_1", "chain_2" and
such, what is the naming convention? such, what is the naming convention?
- **A:** chained events have names beginning by "chain_". This is useful for you and for the - **A:** chained events have names beginning by `"chain_"`. This is useful for you and for the
system. But after the underscore, you can give a more useful name, like "chain_open_doors" in our system. But after the underscore, you can give a more useful name, like `"chain_open_doors"` in our
case. case.
- **Q:** do I have to pause several seconds to call a chained event? - **Q:** do I have to pause several seconds to call a chained event?
- **A:** no, you can call it right away. Just leave the third parameter of `call_event` out (it - **A:** no, you can call it right away. Just leave the third parameter of `call_event` out (it
@ -432,5 +426,3 @@ for instance.
to consider adding the code in the source itself. Another possibility is to call chained events to consider adding the code in the source itself. Another possibility is to call chained events
with the expected behavior, which makes porting code very easy. This side of chained events will be with the expected behavior, which makes porting code very easy. This side of chained events will be
shown in the next tutorial. shown in the next tutorial.
- Previous tutorial: [Adding dialogues in events](./Dialogues-in-events.md)

View file

@ -1,15 +1,15 @@
# Evennia in-game Python system # Evennia in-game Python system
Vincent Le Goff 2017 Contrib by Vincent Le Goff 2017
This contrib adds the system of in-game Python in Evennia, allowing immortals This contrib adds the ability to script with Python in-game. It allows trusted
(or other trusted builders) to dynamically add features to individual objects. staff/builders to dynamically add features and triggers to individual objects
Using custom Python set in-game, every immortal or privileged users could have a without needing to do it in external Python modules. Using custom Python in-game,
specific room, exit, character, object or something else behave differently from specific rooms, exits, characters, objects etc can be made to behave differently from
its "cousins". For these familiar with the use of softcode in MU`*`, like SMAUG its "cousins". This is similar to how softcode works for MU or MudProgs for DIKU.
MudProgs, the ability to add arbitrary behavior to individual objects is a step Keep in mind, however, that allowing Python in-game comes with _severe_
toward freedom. Keep in mind, however, the warning below, and read it carefully security concerns (you must trust your builders deeply), so read the warnings in
before the rest of the documentation. this module carefully before continuing.
## A WARNING REGARDING SECURITY ## A WARNING REGARDING SECURITY
@ -22,6 +22,17 @@ will have to keep in mind these points before deciding to install it:
2. You can do all of this in Python outside the game. The in-game Python system 2. You can do all of this in Python outside the game. The in-game Python system
is not to replace all your game feature. is not to replace all your game feature.
## Extra tutorials
These tutorials cover examples of using ingame python. Once you have the system
installed (see below) they may be an easier way to learn than reading the full
documentation from beginning to end.
- [Dialogue events](./Contrib-Ingame-Python-Tutorial-Dialogue.md), where
NPCs react to things said.
- [A voice operated elevator](./Contrib-Ingame-Python-Tutorial-Elevator.md)
using ingame-python events.
## Basic structure and vocabulary ## Basic structure and vocabulary
- At the basis of the in-game Python system are **events**. An **event** - At the basis of the in-game Python system are **events**. An **event**
@ -73,7 +84,9 @@ default. You need to do it manually, following these steps:
This is the quick summary. Scroll down for more detailed help on each step. This is the quick summary. Scroll down for more detailed help on each step.
1. Launch the main script (important!): 1. Launch the main script (important!):
```py evennia.create_script("evennia.contrib.base_systems.ingame_python.scripts.EventHandler")```
py evennia.create_script("evennia.contrib.base_systems.ingame_python.scripts.EventHandler")
2. Set the permissions (optional): 2. Set the permissions (optional):
- `EVENTS_WITH_VALIDATION`: a group that can edit callbacks, but will need approval (default to - `EVENTS_WITH_VALIDATION`: a group that can edit callbacks, but will need approval (default to
`None`). `None`).
@ -176,7 +189,7 @@ the `EVENTS_WITH_VALIDATION` setting will be able to call the command (with diff
### Adding the `call` command ### Adding the `call` command
You also have to add the `@call` command to your Character CmdSet. This command allows your users You also have to add the `@call` command to your Character CmdSet. This command allows your users
to add, edit and delete callbacks in-game. In your `commands/default_cmdsets, it might look like to add, edit and delete callbacks in-game. In your `commands/default_cmdsets`, it might look like
this: this:
```python ```python
@ -277,7 +290,7 @@ We'll see callbacks with parameters later. For the time being, let's try to pre
from going through the "north" exit of this room: from going through the "north" exit of this room:
``` ```
@call north call north
+------------------+---------+-----------------------------------------------+ +------------------+---------+-----------------------------------------------+
| Event name | Number | Description | | Event name | Number | Description |
+~~~~~~~~~~~~~~~~~~+~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ +~~~~~~~~~~~~~~~~~~+~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+

View file

@ -1,13 +1,15 @@
# In-Game Mail system # In-Game Mail system
Evennia Contribution - grungies1138 2016 Contribution by grungies1138 2016
A simple Brandymail style mail system that uses the Msg class from Evennia A simple Brandymail style mail system that uses the `Msg` class from Evennia
Core. It has two Commands, both of which can be used on their own: Core. It has two Commands for either sending mails between Accounts (out of game)
or between Characters (in-game). The two types of mails can be used together or
on their own.
- CmdMail - this should sit on the Account cmdset and makes the `mail` command - `CmdMail` - this should sit on the Account cmdset and makes the `mail` command
available both IC and OOC. Mails will always go to Accounts (other players). available both IC and OOC. Mails will always go to Accounts (other players).
- CmdMailCharacter - this should sit on the Character cmdset and makes the `mail` - `CmdMailCharacter` - this should sit on the Character cmdset and makes the `mail`
command ONLY available when puppeting a character. Mails will be sent to other command ONLY available when puppeting a character. Mails will be sent to other
Characters only and will not be available when OOC. Characters only and will not be available when OOC.
- If adding *both* commands to their respective cmdsets, you'll get two separate - If adding *both* commands to their respective cmdsets, you'll get two separate

View file

@ -1,8 +1,8 @@
# Map Builder # Map Builder
Contribution - Cloud_Keeper 2016 Contribution by Cloud_Keeper 2016
Build a map from a 2D ASCII map. Build a game map from the drawing of a 2D ASCII map.
This is a command which takes two inputs: This is a command which takes two inputs:

View file

@ -1,10 +1,10 @@
# Menu-based login system # Menu-based login system
Contribution - Vincent-lg 2016, Griatch 2019 (rework for modern EvMenu) Contribution by Vincent-lg 2016. Reworked for modern EvMenu by Griatch, 2019.
This changes the Evennia login to ask for the account name and password in This changes the Evennia login to ask for the account name and password as a series
sequence instead of requiring you to enter both at once. It uses EvMenu under of questions instead of requiring you to enter both at once. It uses Evennia's
the hood. menu system `EvMenu` under the hood.
## Installation ## Installation

View file

@ -1,8 +1,8 @@
# TutorialMirror # TutorialMirror
A simple mirror object to experiment with. Contribution by Griatch, 2017
A simple mirror object that A simple mirror object to experiment with. It will respond to being looked at.
- echoes back the description of the object looking at it - echoes back the description of the object looking at it
- echoes back whatever is being sent to its .msg - to the - echoes back whatever is being sent to its .msg - to the

View file

@ -1,15 +1,16 @@
# Evennia Multidescer # Evennia Multidescer
Contrib - Griatch 2016 Contribution by Griatch 2016
A "multidescer" is a concept from the MUSH world. It allows for A "multidescer" is a concept from the MUSH world. It allows for
creating, managing and switching between multiple character creating, managing and switching between multiple character
descriptions. This multidescer will not require any changes to the descriptions and is a way for quickly managing your look (such as when
Character class, rather it will use the `multidescs` Attribute (a changing clothes) in more free-form roleplaying systems. This will also
list) and create it if it does not exist. work well together with the `rpsystem` contrib.
This contrib also works well together with the rpsystem contrib (which This multidescer will not
also adds the short descriptions and the `sdesc` command). require any changes to the Character class, rather it will use the `multidescs`
Attribute (a list) and create it if it does not exist.
## Installation ## Installation

View file

@ -1,22 +1,24 @@
# Legacy Comms-commands # Legacy Comms-commands
Contribution - Griatch 2021 Contribution by Griatch 2021
In Evennia 1.0, the old Channel commands (originally inspired by MUX) were In Evennia 1.0+, the old Channel commands (originally inspired by MUX) were
replaced by the single `channel` command that performs all these function. replaced by the single `channel` command that performs all these functions.
That command is still required to talk on channels. This contrib (extracted This contrib (extracted from Evennia 0.9.5) breaks out the functionality into
from Evennia 0.9.5) reuses the channel-management of the base Channel command separate Commands more familiar to MU* users. This is just for show though, the
but breaks out its functionality into separate Commands with MUX-familiar names. main `channel` command is still called under the hood.
- `allcom` - `channel/all` and `channel` | Contrib syntax | Default `channel` syntax |
- `addcom` - `channel/alias`, `channel/sub` and `channel/unmute` | -------------- | --------------------------------------------------------- |
- `delcom` - `channel/unalias`, `alias/unsub` and `channel/mute` | `allcom` | `channel/all` and `channel` |
- `cboot` - `channel/boot` (`channel/ban` and `/unban` not supported) | `addcom` | `channel/alias`, `channel/sub` and `channel/unmute` |
- `cwho` - `channel/who` | `delcom` | `channel/unalias`, `alias/unsub` and `channel/mute` |
- `ccreate` - `channel/create` | `cboot` | `channel/boot` (`channel/ban` and `/unban` not supported) |
- `cdestroy` - `channel/destroy` | `cwho` | `channel/who` |
- `clock` - `channel/lock` | `ccreate` | `channel/create` |
- `cdesc` - `channel/desc` | `cdestroy` | `channel/destroy` |
| `clock` | `channel/lock` |
| `cdesc` | `channel/desc` |
## Installation ## Installation

View file

@ -13,11 +13,10 @@ Each contrib contains installation instructions for how to integrate it
with your other code. If you want to tweak the code of a contrib, just with your other code. If you want to tweak the code of a contrib, just
copy its entire folder to your game directory and modify/use it from there. copy its entire folder to your game directory and modify/use it from there.
If you want to contribute yourself, see [here](../Contributing.md)!
> Hint: Additional (potentially un-maintained) code snippets from the community can be found > Hint: Additional (potentially un-maintained) code snippets from the community can be found
in our discussion forum's [Community Contribs & Snippets](https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets) category. in our discussion forum's [Community Contribs & Snippets](https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets) category.
If you want to contribute yourself, see [here](../Contributing.md)!
## base_systems ## base_systems
@ -29,113 +28,123 @@ login systems, new command syntaxes, and build helpers._
### Contrib: `awsstorage` ### Contrib: `awsstorage`
Contrib by The Right Honourable Reverend (trhr) 2020 _Contrib by The Right Honourable Reverend (trhr), 2020_
## What is this for? This plugin migrates the Web-based portion of Evennia, namely images,
javascript, and other items located inside staticfiles into Amazon AWS (S3)
cloud hosting. Great for those serving media with the game.
[Read the documentation](./Contrib-AWSStorage.md) [Read the documentation](./Contrib-AWSStorage.md) - [Browse the Code](evennia.contrib.base_systems.awsstorage)
### Contrib: `building_menu` ### Contrib: `building_menu`
Module containing the building menu system. _Contrib by vincent-lg, 2018_
Evennia contributor: vincent-lg 2018 Building menus are in-game menus, not unlike `EvMenu` though using a
different approach. Building menus have been specifically designed to edit
information as a builder. Creating a building menu in a command allows
builders quick-editing of a given object, like a room. If you follow the
steps to add the contrib, you will have access to an `edit` command
that will edit any default object, offering to change its key and description.
[Read the documentation](./Contrib-Building-Menu.md) [Read the documentation](./Contrib-Building-Menu.md) - [Browse the Code](evennia.contrib.base_systems.building_menu)
### Contrib: `color_markups` ### Contrib: `color_markups`
Contribution, Griatch 2017 _Contrib by Griatch, 2017_
Additional color markup styles for Evennia (extending or replacing the default Additional color markup styles for Evennia (extending or replacing the default
`|r`, `|234` etc). `|r`, `|234`). Adds support for MUSH-style (`%cr`, `%c123`) and/or legacy-Evennia
(`{r`, `{123`).
[Read the documentation](./Contrib-Color-Markups.md) [Read the documentation](./Contrib-Color-Markups.md) - [Browse the Code](evennia.contrib.base_systems.color_markups)
### Contrib: `custom_gametime` ### Contrib: `custom_gametime`
Contrib - Griatch 2017, vlgeoff 2017 _Contrib by vlgeoff, 2017 - based on Griatch's core original_
This reimplements the `evennia.utils.gametime` module but supporting a custom This reimplements the `evennia.utils.gametime` module but with a _custom_
calendar for your game world. It allows for scheduling events to happen at given calendar (unusual number of days per week/month/year etc) for your game world.
in-game times, taking this custom calendar into account. Like the original, it allows for scheduling events to happen at given
in-game times, but now taking this custom calendar into account.
[Read the documentation](./Contrib-Custom-Gametime.md) [Read the documentation](./Contrib-Custom-Gametime.md) - [Browse the Code](evennia.contrib.base_systems.custom_gametime)
### Contrib: `email_login` ### Contrib: `email_login`
Evennia contrib - Griatch 2012 _Contrib by Griatch, 2012_
This is a variant of the login system that requires an email-address This is a variant of the login system that asks for an email-address
instead of a username to login. instead of a username to login. Note that it does not verify the email,
it just uses it as the identifier rather than a username.
[Read the documentation](./Contrib-Email-Login.md) [Read the documentation](./Contrib-Email-Login.md) - [Browse the Code](evennia.contrib.base_systems.email_login)
### Contrib: `ingame_python` ### Contrib: `ingame_python`
Vincent Le Goff 2017 _Contrib by Vincent Le Goff 2017_
This contrib adds the system of in-game Python in Evennia, allowing immortals This contrib adds the ability to script with Python in-game. It allows trusted
(or other trusted builders) to dynamically add features to individual objects. staff/builders to dynamically add features and triggers to individual objects
Using custom Python set in-game, every immortal or privileged users could have a without needing to do it in external Python modules. Using custom Python in-game,
specific room, exit, character, object or something else behave differently from specific rooms, exits, characters, objects etc can be made to behave differently from
its "cousins". For these familiar with the use of softcode in MU`*`, like SMAUG its "cousins". This is similar to how softcode works for MU or MudProgs for DIKU.
MudProgs, the ability to add arbitrary behavior to individual objects is a step Keep in mind, however, that allowing Python in-game comes with _severe_
toward freedom. Keep in mind, however, the warning below, and read it carefully security concerns (you must trust your builders deeply), so read the warnings in
before the rest of the documentation. this module carefully before continuing.
[Read the documentation](./Contrib-Ingame-Python.md) [Read the documentation](./Contrib-Ingame-Python.md) - [Browse the Code](evennia.contrib.base_systems.ingame_python)
### Contrib: `menu_login` ### Contrib: `menu_login`
Contribution - Vincent-lg 2016, Griatch 2019 (rework for modern EvMenu) _Contribution by Vincent-lg 2016. Reworked for modern EvMenu by Griatch, 2019._
This changes the Evennia login to ask for the account name and password in This changes the Evennia login to ask for the account name and password as a series
sequence instead of requiring you to enter both at once. It uses EvMenu under of questions instead of requiring you to enter both at once. It uses Evennia's
the hood. menu system `EvMenu` under the hood.
[Read the documentation](./Contrib-Menu-Login.md) [Read the documentation](./Contrib-Menu-Login.md) - [Browse the Code](evennia.contrib.base_systems.menu_login)
### Contrib: `mux_comms_cmds` ### Contrib: `mux_comms_cmds`
Contribution - Griatch 2021 _Contribution by Griatch 2021_
In Evennia 1.0, the old Channel commands (originally inspired by MUX) were In Evennia 1.0+, the old Channel commands (originally inspired by MUX) were
replaced by the single `channel` command that performs all these function. replaced by the single `channel` command that performs all these functions.
That command is still required to talk on channels. This contrib (extracted This contrib (extracted from Evennia 0.9.5) breaks out the functionality into
from Evennia 0.9.5) reuses the channel-management of the base Channel command separate Commands more familiar to MU* users. This is just for show though, the
but breaks out its functionality into separate Commands with MUX-familiar names. main `channel` command is still called under the hood.
[Read the documentation](./Contrib-Mux-Comms-Cmds.md) [Read the documentation](./Contrib-Mux-Comms-Cmds.md) - [Browse the Code](evennia.contrib.base_systems.mux_comms_cmds)
### Contrib: `unixcommand` ### Contrib: `unixcommand`
Evennia contribution, Vincent Le Geoff 2017 _Contribution by Vincent Le Geoff (vlgeoff), 2017_
This module contains a command class that allows for unix-style command syntax This module contains a command class with an alternate syntax parser implementing
in-game, using --options, positional arguments and stuff like -n 10 etc Unix-style command syntax in-game. This means `--options`, positional arguments
similarly to a unix command. It might not the best syntax for the average player and stuff like `-n 10`. It might not the best syntax for the average player
but can be really useful for builders when they need to have a single command do but can be really useful for builders when they need to have a single command do
many things with many options. It uses the ArgumentParser from Python's standard many things with many options. It uses the `ArgumentParser` from Python's standard
library under the hood. library under the hood.
[Read the documentation](./Contrib-Unixcommand.md) [Read the documentation](./Contrib-Unixcommand.md) - [Browse the Code](evennia.contrib.base_systems.unixcommand)
@ -150,13 +159,15 @@ to start creating content without no further additions (unless you want to)._
### Contrib: `evscaperoom` ### Contrib: `evscaperoom`
Evennia contrib - Griatch 2019 _Contribution by Griatch, 2019_
This 'Evennia escaperoom game engine' was created for the MUD Coders Guild game A full engine for creating multiplayer escape-rooms in Evennia. Allows players to
Jam, April 14-May 15 2019. The theme for the jam was "One Room". This contains the spawn and join puzzle rooms that track their state independently. Any number of players
utilities and base classes and an empty example room. can join to solve a room together. This is the engine created for 'EvscapeRoom', which won
the MUD Coders Guild "One Room" Game Jam in April-May, 2019. The contrib has no game
content but contains the utilities and base classes and an empty example room.
[Read the documentation](./Contrib-Evscaperoom.md) [Read the documentation](./Contrib-Evscaperoom.md) - [Browse the Code](evennia.contrib.full_systems.evscaperoom)
@ -173,104 +184,115 @@ roleplaying-specific systems, those are found in the `rpg` folder._
### Contrib: `barter` ### Contrib: `barter`
Evennia contribution - Griatch 2012 _Contribution by Griatch, 2012_
This implements a full barter system - a way for players to safely This implements a full barter system - a way for players to safely
trade items between each other using code rather than simple free-form trade items between each other in code rather than simple `give/get`
talking. The advantage of this is increased buy/sell safety but it commands. This increases both safety (at no time will one player have
also streamlines the process and makes it faster when doing many both goods and payment in-hand) and speed, since agreed goods will
transactions (since goods are automatically exchanged once both be moved automatically). By just replacing one side with coin objects,
agree). (or a mix of coins and goods), this also works fine for regular money
transactions.
[Read the documentation](./Contrib-Barter.md) [Read the documentation](./Contrib-Barter.md) - [Browse the Code](evennia.contrib.game_systems.barter)
### Contrib: `clothing` ### Contrib: `clothing`
Evennia contribution - Tim Ashley Jenkins 2017 _Contribution by Tim Ashley Jenkins, 2017_
Provides a typeclass and commands for wearable clothing, Provides a typeclass and commands for wearable clothing. These
which is appended to a character's description when worn. look of these clothes are appended to the character's description when worn.
[Read the documentation](./Contrib-Clothing.md) [Read the documentation](./Contrib-Clothing.md) - [Browse the Code](evennia.contrib.game_systems.clothing)
### Contrib: `cooldowns` ### Contrib: `cooldowns`
Evennia contrib - owllex, 2021 _Contribution by owllex, 2021_
This contrib provides a simple cooldown handler that can be attached to any Cooldowns are used modelling rate-limited actions, like how often a
typeclassed Object or Account. A cooldown is a lightweight persistent character can perform a given action; until a certain time has passed their
asynchronous timer that you can query to see if it is ready. command can not be used again. This contrib provides a simple cooldown
handler that can be attached to any typeclass. A cooldown is a lightweight persistent
asynchronous timer that you can query to see if a certain time has yet passed.
[Read the documentation](./Contrib-Cooldowns.md) [Read the documentation](./Contrib-Cooldowns.md) - [Browse the Code](evennia.contrib.game_systems.cooldowns)
### Contrib: `crafting` ### Contrib: `crafting`
Contrib - Griatch 2020 _Contribution by Griatch 2020_
This implements a full crafting system. The principle is that of a 'recipe': This implements a full crafting system. The principle is that of a 'recipe',
where you combine items (tagged as ingredients) create something new. The recipe can also
require certain (non-consumed) tools. An example would be to use the 'bread recipe' to
combine 'flour', 'water' and 'yeast' with an 'oven' to bake a 'loaf of bread'.
[Read the documentation](./Contrib-Crafting.md) [Read the documentation](./Contrib-Crafting.md) - [Browse the Code](evennia.contrib.game_systems.crafting)
### Contrib: `gendersub` ### Contrib: `gendersub`
Contrib - Griatch 2015 _Contribution by Griatch 2015_
This is a simple gender-aware Character class for allowing users to This is a simple gender-aware Character class for allowing users to
insert custom markers in their text to indicate gender-aware insert custom markers in their text to indicate gender-aware
messaging. It relies on a modified msg() and is meant as an messaging. It relies on a modified msg() and is meant as an
inspiration and starting point to how to do stuff like this. inspiration and starting point to how to do stuff like this.
[Read the documentation](./Contrib-Gendersub.md) [Read the documentation](./Contrib-Gendersub.md) - [Browse the Code](evennia.contrib.game_systems.gendersub)
### Contrib: `mail` ### Contrib: `mail`
Evennia Contribution - grungies1138 2016 _Contribution by grungies1138 2016_
A simple Brandymail style mail system that uses the Msg class from Evennia A simple Brandymail style mail system that uses the `Msg` class from Evennia
Core. It has two Commands, both of which can be used on their own: Core. It has two Commands for either sending mails between Accounts (out of game)
or between Characters (in-game). The two types of mails can be used together or
on their own.
[Read the documentation](./Contrib-Mail.md) [Read the documentation](./Contrib-Mail.md) - [Browse the Code](evennia.contrib.game_systems.mail)
### Contrib: `multidescer` ### Contrib: `multidescer`
Contrib - Griatch 2016 _Contribution by Griatch 2016_
A "multidescer" is a concept from the MUSH world. It allows for A "multidescer" is a concept from the MUSH world. It allows for
creating, managing and switching between multiple character creating, managing and switching between multiple character
descriptions. This multidescer will not require any changes to the descriptions and is a way for quickly managing your look (such as when
Character class, rather it will use the `multidescs` Attribute (a changing clothes) in more free-form roleplaying systems. This will also
list) and create it if it does not exist. work well together with the `rpsystem` contrib.
[Read the documentation](./Contrib-Multidescer.md) [Read the documentation](./Contrib-Multidescer.md) - [Browse the Code](evennia.contrib.game_systems.multidescer)
### Contrib: `puzzles` ### Contrib: `puzzles`
Evennia contribution - Henddher 2018 _Contribution by Henddher 2018_
Provides a typeclass and commands for objects that can be combined (i.e. 'use'd) Intended for adventure-game style combination puzzles, such as combining fruits
to produce new objects. and a blender to create a smoothie. Provides a typeclass and commands for objects
that can be combined (i.e. used together). Unlike the `crafting` contrib, each
puzzle is built from unique objects rather than using tags and a builder can create
the puzzle entirely from in-game.
[Read the documentation](./Contrib-Puzzles.md) [Read the documentation](./Contrib-Puzzles.md) - [Browse the Code](evennia.contrib.game_systems.puzzles)
### Contrib: `turnbattle` ### Contrib: `turnbattle`
Contrib - Tim Ashley Jenkins 2017 _Contribution by Tim Ashley Jenkins, 2017_
This is a framework for a simple turn-based combat system, similar This is a framework for a simple turn-based combat system, similar
to those used in D&D-style tabletop role playing games. It allows to those used in D&D-style tabletop role playing games. It allows
@ -280,7 +302,7 @@ has a limited time to decide their action for that turn (30 seconds by
default), and combat progresses through the turn order, looping through default), and combat progresses through the turn order, looping through
the participants until the fight ends. the participants until the fight ends.
[Read the documentation](./Contrib-Turnbattle.md) [Read the documentation](./Contrib-Turnbattle.md) - [Browse the Code](evennia.contrib.game_systems.turnbattle)
@ -295,80 +317,77 @@ contribs related to rooms, exits and map building._
### Contrib: `extended_room` ### Contrib: `extended_room`
Evennia Contribution - Griatch 2012, vincent-lg 2019 _Contribution - Griatch 2012, vincent-lg 2019_
This is an extended Room typeclass for Evennia. It is supported This extends the normal `Room` typeclass to allow its description to change
by an extended `Look` command and an extended `desc` command, also with time-of-day and/or season. It also adds 'details' for the player to look at
in this module. in the room (without having to create a new in-game object for each). The room is
supported by new `look` and `desc` commands.
[Read the documentation](./Contrib-Extended-Room.md) [Read the documentation](./Contrib-Extended-Room.md) - [Browse the Code](evennia.contrib.grid.extended_room)
### Contrib: `mapbuilder` ### Contrib: `mapbuilder`
Contribution - Cloud_Keeper 2016 _Contribution by Cloud_Keeper 2016_
Build a map from a 2D ASCII map. Build a game map from the drawing of a 2D ASCII map.
[Read the documentation](./Contrib-Mapbuilder.md) [Read the documentation](./Contrib-Mapbuilder.md) - [Browse the Code](evennia.contrib.grid.mapbuilder)
### Contrib: `simpledoor` ### Contrib: `simpledoor`
Contribution - Griatch 2016 _Contribution by Griatch, 2016_
A simple two-way exit that represents a door that can be opened and A simple two-way exit that represents a door that can be opened and
closed. Can easily be expanded from to make it lockable, destroyable closed from both sides. Can easily be expanded to make it lockable,
etc. Note that the simpledoor is based on Evennia locks, so it will destroyable etc.
not work for a superuser (which bypasses all locks) - the superuser
will always appear to be able to close/open the door over and over
without the locks stopping you. To use the door, use `@quell` or a
non-superuser account.
[Read the documentation](./Contrib-Simpledoor.md) [Read the documentation](./Contrib-Simpledoor.md) - [Browse the Code](evennia.contrib.grid.simpledoor)
### Contrib: `slow_exit` ### Contrib: `slow_exit`
Contribution - Griatch 2014 _Contribution by Griatch 2014_
This is an example of an Exit-type that delays its traversal. This simulates An example of an Exit-type that delays its traversal. This simulates
slow movement, common in many different types of games. The contrib also slow movement, common in many games. The contrib also
contains two commands, `CmdSetSpeed` and CmdStop for changing the movement speed contains two commands, `setspeed` and `stop` for changing the movement speed
and abort an ongoing traversal, respectively. and abort an ongoing traversal, respectively.
[Read the documentation](./Contrib-Slow-Exit.md) [Read the documentation](./Contrib-Slow-Exit.md) - [Browse the Code](evennia.contrib.grid.slow_exit)
### Contrib: `wilderness` ### Contrib: `wilderness`
Evennia contrib - titeuf87 2017 _Contribution by titeuf87, 2017_
This contrib provides a wilderness map without actually creating a large number This contrib provides a wilderness map without actually creating a large number
of rooms - as you move, your room is instead updated with different of rooms - as you move, you instead end up back in the same room but its description
descriptions. This means you can make huge areas with little database use as changes. This means you can make huge areas with little database use as
long as the rooms are relatively similar (name/desc changing). long as the rooms are relatively similar (name/desc changing).
[Read the documentation](./Contrib-Wilderness.md) [Read the documentation](./Contrib-Wilderness.md) - [Browse the Code](evennia.contrib.grid.wilderness)
### Contrib: `xyzgrid` ### Contrib: `xyzgrid`
Full grid coordinate- pathfinding and visualization system _Contribution by Griatch 2021_
Evennia Contrib by Griatch 2021
The default Evennia's rooms are non-euclidian - they can connect Places Evennia's game world on an xy (z being different maps) coordinate grid.
to each other with any types of exits without necessarily having a clear Grid is created and maintained externally by drawing and parsing 2D ASCII maps,
position relative to each other. This gives maximum flexibility, but many games including teleports, map transitions and special markers to aid pathfinding.
want to use cardinal movements (north, east etc) and also features like finding Supports very fast shortest-route pathfinding on each map. Also includes a
the shortest-path between two points. fast view function for seeing only a limited number of steps away from your
current location (useful for displaying the grid as an in-game, updating map).
[Read the documentation](./Contrib-XYZGrid.md) [Read the documentation](./Contrib-XYZGrid.md) - [Browse the Code](evennia.contrib.grid.xyzgrid)
@ -383,48 +402,59 @@ and rule implementation like character traits, dice rolling and emoting._
### Contrib: `dice` ### Contrib: `dice`
Rolls dice for roleplaying, in-game gambling or GM:ing _Contribution by Griatch, 2012_
Evennia contribution - Griatch 2012 A dice roller for any number and side of dice. Adds in-game dice rolling
(`roll 2d10 + 1`) as well as conditionals (roll under/over/equal to a target)
and functions for rolling dice in code. Command also supports hidden or secret
rolls for use by a human game master.
[Read the documentation](./Contrib-Dice.md) [Read the documentation](./Contrib-Dice.md) - [Browse the Code](evennia.contrib.rpg.dice)
### Contrib: `health_bar` ### Contrib: `health_bar`
Contrib - Tim Ashley Jenkins 2017 _Contribution by Tim Ashley Jenkins, 2017_
The function provided in this module lets you easily display visual The function provided in this module lets you easily display visual
bars or meters - "health bar" is merely the most obvious use for this, bars or meters as a colorful bar instead of just a number. A "health bar"
though these bars are highly customizable and can be used for any sort is merely the most obvious use for this, but the bar is highly customizable
of appropriate data besides player health. and can be used for any sort of appropriate data besides player health.
[Read the documentation](./Contrib-Health-Bar.md) [Read the documentation](./Contrib-Health-Bar.md) - [Browse the Code](evennia.contrib.rpg.health_bar)
### Contrib: `rpsystem` ### Contrib: `rpsystem`
Roleplaying emotes/sdescs - Griatch, 2015 _Contribution by Griatch, 2015_
Language/whisper emotes - Griatch, 2015
## Roleplaying emotes A full roleplaying emote system. Short-descriptions and recognition (only
know people by their looks until you assign a name to them). Room poses. Masks/disguises
(hide your description). Speak directly in emote, with optional language obscuration
(words get garbled if you don't know the language, you can also have different languages
with different 'sounding' garbling). Whispers can be partly overheard from a distance. A
very powerful in-emote reference system, for referencing and differentiate targets
(including objects).
[Read the documentation](./Contrib-RPSystem.md) [Read the documentation](./Contrib-RPSystem.md) - [Browse the Code](evennia.contrib.rpg.rpsystem)
### Contrib: `traits` ### Contrib: `traits`
Whitenoise 2014, Ainneve contributors, _Contribution by Griatch 2020, based on code by Whitenoise and Ainneve contribs, 2014_
Griatch 2020
A `Trait` represents a modifiable property on (usually) a Character. They can A `Trait` represents a modifiable property on (usually) a Character. They can
be used to represent everything from attributes (str, agi etc) to skills be used to represent everything from attributes (str, agi etc) to skills
(hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc. (hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc.
Traits differ from normal Attributes in that they track their changes and limit
themselves to particular value-ranges. One can add/subtract from them easily and
they can even change dynamically at a particular rate (like you being poisoned or
healed).
[Read the documentation](./Contrib-Traits.md) [Read the documentation](./Contrib-Traits.md) - [Browse the Code](evennia.contrib.rpg.traits)
@ -440,71 +470,72 @@ tutorials are found here. Also the home of the Tutorial World demo adventure._
### Contrib: `batchprocessor` ### Contrib: `batchprocessor`
Contibution - Griatch 2012 _Contibution by Griatch, 2012_
The batch processor is used for generating in-game content from one or more Simple examples for the batch-processor. The batch processor is used for generating
static files. Files can be stored with version control and then 'applied' in-game content from one or more static files. Files can be stored with version
to the game to create content. control and then 'applied' to the game to create content.
[Read the documentation](./Contrib-Batchprocessor.md) [Read the documentation](./Contrib-Batchprocessor.md) - [Browse the Code](evennia.contrib.tutorials.batchprocessor)
### Contrib: `bodyfunctions` ### Contrib: `bodyfunctions`
Griatch - 2012 _Contribution by Griatch, 2012_
Example script for testing. This adds a simple timer that has your Example script for testing. This adds a simple timer that has your
character make observations and notices at irregular intervals. character make small verbal observations at irregular intervals.
[Read the documentation](./Contrib-Bodyfunctions.md) [Read the documentation](./Contrib-Bodyfunctions.md) - [Browse the Code](evennia.contrib.tutorials.bodyfunctions)
### Contrib: `mirror` ### Contrib: `mirror`
A simple mirror object to experiment with. _Contribution by Griatch, 2017_
A simple mirror object that A simple mirror object to experiment with. It will respond to being looked at.
[Read the documentation](./Contrib-Mirror.md) [Read the documentation](./Contrib-Mirror.md) - [Browse the Code](evennia.contrib.tutorials.mirror)
### Contrib: `red_button` ### Contrib: `red_button`
Griatch - 2011 _Contribution by Griatch, 2011_
This is a more advanced example object with its own functionality (commands) A red button that you can press to have an effect. This is a more advanced example
on it. object with its own functionality and state tracking.
[Read the documentation](./Contrib-Red-Button.md) [Read the documentation](./Contrib-Red-Button.md) - [Browse the Code](evennia.contrib.tutorials.red_button)
### Contrib: `talking_npc` ### Contrib: `talking_npc`
Contribution - Griatch 2011, grungies1138, 2016 _Contribution by Griatch 2011. Updated by grungies1138, 2016_
This is a static NPC object capable of holding a simple menu-driven This is an example of a static NPC object capable of holding a simple menu-driven
conversation. It's just meant as an example. conversation. Suitable for example as a quest giver or merchant.
[Read the documentation](./Contrib-Talking-Npc.md) [Read the documentation](./Contrib-Talking-Npc.md) - [Browse the Code](evennia.contrib.tutorials.talking_npc)
### Contrib: `tutorial_world` ### Contrib: `tutorial_world`
Griatch 2011, 2015 _Contribution by Griatch 2011, 2015_
This is a stand-alone tutorial area for an unmodified Evennia install. A stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a Think of it as a sort of single-player adventure rather than a
full-fledged multi-player game world. The various rooms and objects full-fledged multi-player game world. The various rooms and objects
herein are designed to show off features of the engine, not to be a are designed to show off features of Evennia, not to be a
very challenging (nor long) gaming experience. As such it's of course very challenging (nor long) gaming experience. As such it's of course
only skimming the surface of what is possible. only skimming the surface of what is possible. Taking this apart
is a great way to start learning the system.
[Read the documentation](./Contrib-Tutorial-World.md) [Read the documentation](./Contrib-Tutorial-World.md) - [Browse the Code](evennia.contrib.tutorials.tutorial_world)
@ -519,54 +550,53 @@ and more._
### Contrib: `auditing` ### Contrib: `auditing`
Contrib - Johnny 2017 _Contribution by Johnny, 2017_
This is a tap that optionally intercepts all data sent to/from clients and the Utility that taps and intercepts all data sent to/from clients and the
server and passes it to a callback of your choosing. server and passes it to a callback of your choosing. This is intended for
quality assurance, post-incident investigations and debugging.
[Read the documentation](./Contrib-Auditing.md) [Read the documentation](./Contrib-Auditing.md) - [Browse the Code](evennia.contrib.utils.auditing)
### Contrib: `fieldfill` ### Contrib: `fieldfill`
Contrib - Tim Ashley Jenkins 2018 _Contribution by Tim Ashley Jenkins, 2018_
This module contains a function that calls an easily customizable EvMenu - this This module contains a function that generates an `EvMenu` for you - this
menu presents the player with a fillable form, with fields that can be filled menu presents the player with a form of fields that can be filled
out in any order. Each field's value can be verified, with the function out in any order (e.g. for character generation or building). Each field's value can
allowing easy checks for text and integer input, minimum and maximum values / be verified, with the function allowing easy checks for text and integer input,
character lengths, or can even be verified by a custom function. Once the form minimum and maximum values / character lengths, or can even be verified by a custom
is submitted, the form's data is submitted as a dictionary to any callable of function. Once the form is submitted, the form's data is submitted as a dictionary
your choice. to any callable of your choice.
[Read the documentation](./Contrib-Fieldfill.md) [Read the documentation](./Contrib-Fieldfill.md) - [Browse the Code](evennia.contrib.utils.fieldfill)
### Contrib: `random_string_generator` ### Contrib: `random_string_generator`
Contribution - Vincent Le Goff 2017 _Contribution by Vincent Le Goff (vlgeoff), 2017_
This contrib can be used to generate pseudo-random strings of information This utility can be used to generate pseudo-random strings of information
with specific criteria. You could, for instance, use it to generate with specific criteria. You could, for instance, use it to generate
phone numbers, license plate numbers, validation codes, non-sensivite phone numbers, license plate numbers, validation codes, in-game security
passwords and so on. The strings generated by the generator will be passwords and so on. The strings generated will be stored and won't be repeated.
stored and won't be available again in order to avoid repetition.
Here's a very simple example:
[Read the documentation](./Contrib-Random-String-Generator.md) [Read the documentation](./Contrib-Random-String-Generator.md) - [Browse the Code](evennia.contrib.utils.random_string_generator)
### Contrib: `tree_select` ### Contrib: `tree_select`
Contrib - Tim Ashley Jenkins 2017 _Contribution by Tim Ashley Jenkins, 2017_
This module allows you to create and initialize an entire branching EvMenu This utility allows you to create and initialize an entire branching EvMenu
instance with nothing but a multi-line string passed to one function. instance from a multi-line string passed to one function.
[Read the documentation](./Contrib-Tree-Select.md) [Read the documentation](./Contrib-Tree-Select.md) - [Browse the Code](evennia.contrib.utils.tree_select)
@ -574,52 +604,52 @@ instance with nothing but a multi-line string passed to one function.
```{toctree} ```{toctree}
:depth: 2
Contribs/Contrib-AWSStorage.md Contribs/Contrib-AWSStorage.md
Contribs/Contrib-Building-Menu.md Contribs/Contrib-Building-Menu.md
Contribs/Contrib-Color-Markups.md Contribs/Contrib-Color-Markups.md
Contribs/Contrib-Custom-Gametime.md Contribs/Contrib-Custom-Gametime.md
Contribs/Contrib-Email-Login.md Contribs/Contrib-Email-Login.md
Contribs/Contrib-Ingame-Python.md Contribs/Contrib-Ingame-Python.md
Contribs/Contrib-Menu-Login.md Contribs/Contrib-Menu-Login.md
Contribs/Contrib-Mux-Comms-Cmds.md Contribs/Contrib-Mux-Comms-Cmds.md
Contribs/Contrib-Unixcommand.md Contribs/Contrib-Unixcommand.md
Contribs/Contrib-Evscaperoom.md Contribs/Contrib-Evscaperoom.md
Contribs/Contrib-Barter.md Contribs/Contrib-Barter.md
Contribs/Contrib-Clothing.md Contribs/Contrib-Clothing.md
Contribs/Contrib-Cooldowns.md Contribs/Contrib-Cooldowns.md
Contribs/Contrib-Crafting.md Contribs/Contrib-Crafting.md
Contribs/Contrib-Gendersub.md Contribs/Contrib-Gendersub.md
Contribs/Contrib-Mail.md Contribs/Contrib-Mail.md
Contribs/Contrib-Multidescer.md Contribs/Contrib-Multidescer.md
Contribs/Contrib-Puzzles.md Contribs/Contrib-Puzzles.md
Contribs/Contrib-Turnbattle.md Contribs/Contrib-Turnbattle.md
Contribs/Contrib-Extended-Room.md Contribs/Contrib-Extended-Room.md
Contribs/Contrib-Mapbuilder.md Contribs/Contrib-Mapbuilder.md
Contribs/Contrib-Simpledoor.md Contribs/Contrib-Simpledoor.md
Contribs/Contrib-Slow-Exit.md Contribs/Contrib-Slow-Exit.md
Contribs/Contrib-Wilderness.md Contribs/Contrib-Wilderness.md
Contribs/Contrib-XYZGrid.md Contribs/Contrib-XYZGrid.md
Contribs/Contrib-Dice.md Contribs/Contrib-Dice.md
Contribs/Contrib-Health-Bar.md Contribs/Contrib-Health-Bar.md
Contribs/Contrib-RPSystem.md Contribs/Contrib-RPSystem.md
Contribs/Contrib-Traits.md Contribs/Contrib-Traits.md
Contribs/Contrib-Batchprocessor.md Contribs/Contrib-Batchprocessor.md
Contribs/Contrib-Bodyfunctions.md Contribs/Contrib-Bodyfunctions.md
Contribs/Contrib-Mirror.md Contribs/Contrib-Mirror.md
Contribs/Contrib-Red-Button.md Contribs/Contrib-Red-Button.md
Contribs/Contrib-Talking-Npc.md Contribs/Contrib-Talking-Npc.md
Contribs/Contrib-Tutorial-World.md Contribs/Contrib-Tutorial-World.md
Contribs/Contrib-Auditing.md Contribs/Contrib-Auditing.md
Contribs/Contrib-Fieldfill.md Contribs/Contrib-Fieldfill.md
Contribs/Contrib-Random-String-Generator.md Contribs/Contrib-Random-String-Generator.md
Contribs/Contrib-Tree-Select.md Contribs/Contrib-Tree-Select.md
```
---- ----
<small>This document page is auto-generated from the sources. Manual changes <small>This document page is auto-generated. Manual changes
will be overwritten.</small> will be overwritten.</small>

View file

@ -1,18 +1,21 @@
# Puzzles System # Puzzles System
Evennia contribution - Henddher 2018 Contribution by Henddher 2018
Provides a typeclass and commands for objects that can be combined (i.e. 'use'd) Intended for adventure-game style combination puzzles, such as combining fruits
to produce new objects. and a blender to create a smoothie. Provides a typeclass and commands for objects
that can be combined (i.e. used together). Unlike the `crafting` contrib, each
puzzle is built from unique objects rather than using tags and a builder can create
the puzzle entirely from in-game.
A Puzzle is a recipe of what objects (aka parts) must be combined by a player so A `Puzzle` is a recipe of what objects (aka parts) must be combined by a player so
a new set of objects (aka results) are automatically created. a new set of objects (aka results) are automatically created.
## Installation ## Installation
Add the PuzzleSystemCmdSet to all players (e.g. in their Character typeclass). Add the `PuzzleSystemCmdSet` to all players (e.g. in their Character typeclass).
Alternatively: Alternatively (for quick testing):
py self.cmdset.add('evennia.contrib.game_systems.puzzles.PuzzleSystemCmdSet') py self.cmdset.add('evennia.contrib.game_systems.puzzles.PuzzleSystemCmdSet')

View file

@ -1,7 +1,17 @@
# Roleplaying base system for Evennia # Roleplaying base system for Evennia
Roleplaying emotes/sdescs - Griatch, 2015 Contribution by Griatch, 2015
Language/whisper emotes - Griatch, 2015
A full roleplaying emote system. Short-descriptions and recognition (only
know people by their looks until you assign a name to them). Room poses. Masks/disguises
(hide your description). Speak directly in emote, with optional language obscuration
(words get garbled if you don't know the language, you can also have different languages
with different 'sounding' garbling). Whispers can be partly overheard from a distance. A
very powerful in-emote reference system, for referencing and differentiate targets
(including objects).
The system contains of two main modules - the roleplaying emote system and the language
obscuration module.
## Roleplaying emotes ## Roleplaying emotes

View file

@ -1,12 +1,14 @@
# Pseudo-random generator and registry # Pseudo-random generator and registry
Contribution - Vincent Le Goff 2017 Contribution by Vincent Le Goff (vlgeoff), 2017
This contrib can be used to generate pseudo-random strings of information This utility can be used to generate pseudo-random strings of information
with specific criteria. You could, for instance, use it to generate with specific criteria. You could, for instance, use it to generate
phone numbers, license plate numbers, validation codes, non-sensivite phone numbers, license plate numbers, validation codes, in-game security
passwords and so on. The strings generated by the generator will be passwords and so on. The strings generated will be stored and won't be repeated.
stored and won't be available again in order to avoid repetition.
## Usage Example
Here's a very simple example: Here's a very simple example:
```python ```python

View file

@ -1,9 +1,9 @@
# Red Button example # Red Button example
Griatch - 2011 Contribution by Griatch, 2011
This is a more advanced example object with its own functionality (commands) A red button that you can press to have an effect. This is a more advanced example
on it. object with its own functionality and state tracking.
Create the button with Create the button with

View file

@ -1,13 +1,15 @@
# SimpleDoor # SimpleDoor
Contribution - Griatch 2016 Contribution by Griatch, 2016
A simple two-way exit that represents a door that can be opened and A simple two-way exit that represents a door that can be opened and
closed. Can easily be expanded from to make it lockable, destroyable closed from both sides. Can easily be expanded to make it lockable,
etc. Note that the simpledoor is based on Evennia locks, so it will destroyable etc.
not work for a superuser (which bypasses all locks) - the superuser
Note that the simpledoor is based on Evennia locks, so it will
not work for a superuser (which bypasses all locks). The superuser
will always appear to be able to close/open the door over and over will always appear to be able to close/open the door over and over
without the locks stopping you. To use the door, use `@quell` or a without the locks stopping you. To use the door, use `quell` or a
non-superuser account. non-superuser account.
## Installation: ## Installation:

View file

@ -1,10 +1,10 @@
# Slow Exit # Slow Exit
Contribution - Griatch 2014 Contribution by Griatch 2014
This is an example of an Exit-type that delays its traversal. This simulates An example of an Exit-type that delays its traversal. This simulates
slow movement, common in many different types of games. The contrib also slow movement, common in many games. The contrib also
contains two commands, `CmdSetSpeed` and CmdStop for changing the movement speed contains two commands, `setspeed` and `stop` for changing the movement speed
and abort an ongoing traversal, respectively. and abort an ongoing traversal, respectively.
## Installation: ## Installation:

View file

@ -1,9 +1,9 @@
# Talkative NPC example # Talkative NPC example
Contribution - Griatch 2011, grungies1138, 2016 Contribution by Griatch 2011. Updated by grungies1138, 2016
This is a static NPC object capable of holding a simple menu-driven This is an example of a static NPC object capable of holding a simple menu-driven
conversation. It's just meant as an example. conversation. Suitable for example as a quest giver or merchant.
## Installation ## Installation

View file

@ -1,12 +1,10 @@
# Traits # Traits
Whitenoise 2014, Ainneve contributors, Contribution by Griatch 2020, based on code by Whitenoise and Ainneve contribs, 2014
Griatch 2020
A `Trait` represents a modifiable property on (usually) a Character. They can A `Trait` represents a modifiable property on (usually) a Character. They can
be used to represent everything from attributes (str, agi etc) to skills be used to represent everything from attributes (str, agi etc) to skills
(hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc. (hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc.
Traits differ from normal Attributes in that they track their changes and limit Traits differ from normal Attributes in that they track their changes and limit
themselves to particular value-ranges. One can add/subtract from them easily and themselves to particular value-ranges. One can add/subtract from them easily and
they can even change dynamically at a particular rate (like you being poisoned or they can even change dynamically at a particular rate (like you being poisoned or

View file

@ -1,14 +1,16 @@
# Easy menu selection tree # Easy menu selection tree
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
This module allows you to create and initialize an entire branching EvMenu This utility allows you to create and initialize an entire branching EvMenu
instance with nothing but a multi-line string passed to one function. instance from a multi-line string passed to one function.
EvMenu is incredibly powerful and flexible, but using it for simple menus > Note: Since the time this contrib was created, EvMenu itself got its own templating
can often be fairly cumbersome - a simple menu that can branch into five > language that has more features and is not compatible with the style used in
categories would require six nodes, each with options represented as a list > this contrib. Both can still be used in parallel.
of dictionaries.
`EvMenu` is incredibly powerful and flexible but it can be a little overwhelming
and offers a lot of power that may not be needed for a simple multiple-choice menu.
This module provides a function, `init_tree_selection`, which acts as a frontend This module provides a function, `init_tree_selection`, which acts as a frontend
for EvMenu, dynamically sourcing the options from a multi-line string you for EvMenu, dynamically sourcing the options from a multi-line string you

View file

@ -1,6 +1,6 @@
# Turn based battle system framework # Turn based battle system framework
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
This is a framework for a simple turn-based combat system, similar This is a framework for a simple turn-based combat system, similar
to those used in D&D-style tabletop role playing games. It allows to those used in D&D-style tabletop role playing games. It allows

View file

@ -1,13 +1,14 @@
# Evennia Tutorial World # Evennia Tutorial World
Griatch 2011, 2015 Contribution by Griatch 2011, 2015
This is a stand-alone tutorial area for an unmodified Evennia install. A stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a Think of it as a sort of single-player adventure rather than a
full-fledged multi-player game world. The various rooms and objects full-fledged multi-player game world. The various rooms and objects
herein are designed to show off features of the engine, not to be a are designed to show off features of Evennia, not to be a
very challenging (nor long) gaming experience. As such it's of course very challenging (nor long) gaming experience. As such it's of course
only skimming the surface of what is possible. only skimming the surface of what is possible. Taking this apart
is a great way to start learning the system.
The tutorial world also includes a game tutor menu example, exemplifying The tutorial world also includes a game tutor menu example, exemplifying
Evmenu. Evmenu.

View file

@ -1,12 +1,12 @@
# Unix-like Command style parent # Unix-like Command style parent
Evennia contribution, Vincent Le Geoff 2017 Contribution by Vincent Le Geoff (vlgeoff), 2017
This module contains a command class that allows for unix-style command syntax This module contains a command class with an alternate syntax parser implementing
in-game, using --options, positional arguments and stuff like -n 10 etc Unix-style command syntax in-game. This means `--options`, positional arguments
similarly to a unix command. It might not the best syntax for the average player and stuff like `-n 10`. It might not the best syntax for the average player
but can be really useful for builders when they need to have a single command do but can be really useful for builders when they need to have a single command do
many things with many options. It uses the ArgumentParser from Python's standard many things with many options. It uses the `ArgumentParser` from Python's standard
library under the hood. library under the hood.
## Installation ## Installation

View file

@ -1,10 +1,10 @@
# Wilderness system # Wilderness system
Evennia contrib - titeuf87 2017 Contribution by titeuf87, 2017
This contrib provides a wilderness map without actually creating a large number This contrib provides a wilderness map without actually creating a large number
of rooms - as you move, your room is instead updated with different of rooms - as you move, you instead end up back in the same room but its description
descriptions. This means you can make huge areas with little database use as changes. This means you can make huge areas with little database use as
long as the rooms are relatively similar (name/desc changing). long as the rooms are relatively similar (name/desc changing).
## Installation ## Installation

File diff suppressed because it is too large Load diff

View file

@ -1,222 +0,0 @@
# Crafting system contrib
_Contrib by Griatch 2020_
```{versionadded} 1.0
```
This contrib implements a full Crafting system that can be expanded and modified to fit your game.
- See the [evennia/contrib/crafting/crafting.py API](evennia.contrib.crafting.crafting) for installation
instructrions.
- See the [sword example](evennia.contrib.crafting.example_recipes) for an example of how to design
a crafting tree for crafting a sword from base elements.
From in-game it uses the new `craft` command:
```bash
> craft bread from flour, eggs, salt, water, yeast using oven, roller
> craft bandage from cloth using scissors
```
The syntax is `craft <recipe> [from <ingredient>,...][ using <tool>,...]`.
The above example uses the `bread` *recipe* and requires `flour`, `eggs`, `salt`, `water` and `yeast` objects
to be in your inventory. These will be consumed as part of crafting (baking) the bread.
The `oven` and `roller` are "tools" that can be either in your inventory or in your current location (you are not carrying an oven
around with you after all). Tools are *not* consumed in the crafting. If the added ingredients/tools matches
the requirements of the recipe, a new `bread` object will appear in the crafter's inventory.
If you wanted, you could also picture recipes without any consumables:
```
> craft fireball using wand, spellbook
```
With a little creativity, the 'recipe' concept could be adopted to all sorts of things, like puzzles or
magic systems.
In code, you can craft using the `evennia.contrib.crafting.crafting.craft` function:
```python
from evennia.contrib.crafting.crafting import craft
result = craft(caller, "recipename", *inputs)
```
Here, `caller` is the one doing the crafting and `*inputs` is any combination of consumables and/or tool
Objects. The system will identify which is which by the [Tags](../Components/Tags.md) on them (see below)
The `result` is always a list.
## Adding new recipes
A *recipe* is a class inheriting from `evennia.contrib.crafting.crafting.CraftingRecipe`. This class
implements the most common form of crafting - that using in-game objects. Each recipe is a separate class
which gets initialized with the consumables/tools you provide.
For the `craft` command to find your custom recipes, you need to tell Evennia where they are. Add a new
line to your `mygame/server/conf/settings.py` file, with a list to any new modules with recipe classes.
```python
CRAFT_RECIPE_MODULES = ["world.myrecipes"]
```
(You need to reload after adding this). All global-level classes in these modules (whose names don't start
with underscore) are considered by the system as viable recipes.
Here we assume you created `mygame/world/myrecipes.py` to match the above example setting:
```python
# in mygame/world/myrecipes.py
from evennia.contrib.crafting.crafting import CraftingRecipe
class WoodenPuppetRecipe(CraftingRecipe):
"""A puppet""""
name = "wooden puppet" # name to refer to this recipe as
tool_tags = ["knife"]
consumable_tags = ["wood"]
output_prototypes = [
{"key": "A carved wooden doll",
"typeclass": "typeclasses.objects.decorations.Toys",
"desc": "A small carved doll"}
]
```
This specifies which tags to look for in the inputs. It defines a [Prototype](../Components/Prototypes.md)
for the recipe to use to spawn the result on the fly (a recipe could spawn more than one result if needed).
Instead of specifying the full prototype-dict, you could also just provide a list of `prototype_key`s to
existing prototypes you have.
After reloading the server, this recipe would now be available to use. To try it we should
create materials and tools to insert into the recipe.
The recipe analyzes inputs, looking for [Tags](../Components/Tags.md) with specific tag-categories.
The tag-category used can be set per-recipe using the (`.consumable_tag_category` and
`.tool_tag_category` respectively). The defaults are `crafting_material` and `crafting_tool`. For
the puppet we need one object with the `wood` tag and another with the `knife` tag:
```python
from evennia import create_object
knife = create_object(key="Hobby knife", tags=[("knife", "crafting_tool")])
wood = create_object(key="Piece of wood", tags[("wood", "crafting_material")])
```
Note that the objects can have any name, all that matters is the tag/tag-category. This means if a
"bayonet" also had the "knife" crafting tag, it could also be used to carve a puppet. This is also
potentially interesting for use in puzzles and to allow users to experiment and find alternatives to
know ingredients.
By the way, there is also a simple shortcut for doing this:
```
tools, consumables = WoodenPuppetRecipe.seed()
```
The `seed` class-method will create simple dummy objects that fulfills the recipe's requirements. This
is great for testing.
Assuming these objects were put in our inventory, we could now craft using the in-game command:
```bash
> craft wooden puppet from wood using hobby knife
```
In code we would do
```python
from evennia.contrub.crafting.crafting import craft
puppet = craft(crafter, "wooden puppet", knife, wood)
```
In the call to `craft`, the order of `knife` and `wood` doesn't matter - the recipe will sort out which
is which based on their tags.
## Deeper customization of recipes
For customizing recipes further, it helps to understand how to use the recipe-class directly:
```python
class MyRecipe(CraftingRecipe):
# ...
tools, consumables = MyRecipe.seed()
recipe = MyRecipe(crafter, *(tools + consumables))
result = recipe.craft()
```
This is useful for testing and allows you to use the class directly without adding it to a module
in `settings.CRAFTING_RECIPE_MODULES`.
Even without modifying more than the class properties, there are a lot of options to set on
the `CraftingRecipe` class. Easiest is to refer to the
[CraftingRecipe api documentation](evennia.contrib.crafting.crafting.CraftingRecipe).
For example, you can customize the validation-error messages, decide if the ingredients have
to be exactly right, if a failure still consumes the ingredients or not, and much more.
For even more control you can override hooks in your own class:
- `pre_craft` - this should handle input validation and store its data in `.validated_consumables` and
`validated_tools` respectively. On error, this reports the error to the crafter and raises the
`CraftingValidationError`.
- `craft` - this will only be called if `pre_craft` finished without an exception. This should
return the result of the crafting, by spawnging the prototypes. Or the empty list if crafting
fails for some reason. This is the place to add skill-checks or random chance if you need it
for your game.
- `post_craft` - this receives the result from `craft` and handles error messages and also deletes
any consumables as needed. It may also modify the result before returning it.
- `msg` - this is a wrapper for `self.crafter.msg` and should be used to send messages to the
crafter. Centralizing this means you can also easily modify the sending style in one place later.
The class constructor (and the `craft` access function) takes optional `**kwargs`. These are passed
into each crafting hook. These are unused by default but could be used to customize things per-call.
### Skilled crafters
What the crafting system does not have out of the box is a 'skill' system - the notion of being able
to fail the craft if you are not skilled enough. Just how skills work is game-dependent, so to add
this you need to make your own recipe parent class and have your recipes inherit from this.
```python
from random import randint
from evennia.contrib.crafting.crafting import CraftingRecipe
class SkillRecipe(CraftingRecipe):
"""A recipe that considers skill"""
difficulty = 20
def craft(self, **kwargs):
"""The input is ok. Determine if crafting succeeds"""
# this is set at initialization
crafter = self.crafte
# let's assume the skill is stored directly on the crafter
# - the skill is 0..100.
crafting_skill = crafter.db.skill_crafting
# roll for success:
if randint(1, 100) <= (crafting_skill - self.difficulty):
# all is good, craft away
return super().craft()
else:
self.msg("You are not good enough to craft this. Better luck next time!")
return []
```
In this example we introduce a `.difficulty` for the recipe and makes a 'dice roll' to see
if we succed. We would of course make this a lot more immersive and detailed in a full game. In
principle you could customize each recipe just the way you want it, but you could also inherit from
a central parent like this to cut down on work.
The [sword recipe example module](evennia.contrib.crafting.example_recipes) also shows an example
of a random skill-check being implemented in a parent and then inherited for multiple use.
## Even more customization
If you want to build something even more custom (maybe using different input types of validation logic)
you could also look at the `CraftingRecipe` parent class `CraftingRecipeBase`.
It implements just the minimum needed to be a recipe and for big changes you may be better off starting
from this rather than the more opinionated `CraftingRecipe`.

File diff suppressed because it is too large Load diff

View file

@ -536,7 +536,7 @@ same as Markdown.
The source code docstrings will be parsed as Markdown. When writing a module docstring, you can use Markdown formatting, The source code docstrings will be parsed as Markdown. When writing a module docstring, you can use Markdown formatting,
including header levels down to 4th level (`#### SubSubSubHeader`). After the module documentation it's including header levels down to 4th level (`#### SubSubSubHeader`). After the module documentation it's
a good idea to end with four dashes `----`. This will create a visible line between the documentation and the a good idea to end with four dashes `----`. This will create a visible line between the documentation and the
class/function docs to follow. See for example [the Traits docs](evennia.contrib.traits). class/function docs to follow. See for example [the Traits docs](evennia.contrib.rpg.traits).
All non-private classes, methods and functions must have a Google-style docstring, as per the All non-private classes, methods and functions must have a Google-style docstring, as per the
[Evennia coding style guidelines][github:evennia/CODING_STYLE.md]. This will then be correctly formatted [Evennia coding style guidelines][github:evennia/CODING_STYLE.md]. This will then be correctly formatted

View file

@ -1,10 +1,9 @@
# Dynamic In Game Map # Dynamic In Game Map
## Introduction ## Introduction
An often desired feature in a MUD is to show an in-game map to help navigation. The [Static in-game An often desired feature in a MUD is to show an in-game map to help navigation. The [Static in-game
map](./Static-In-Game-Map.md) tutorial solves this by creating a *static* map, meaning the map is pre- map](../Contribs/Contrib-Mapbuilder.md) tutorial solves this by creating a *static* map, meaning the map is pre-
drawn once and for all - the rooms are then created to match that map. When walking around, parts of drawn once and for all - the rooms are then created to match that map. When walking around, parts of
the static map is then cut out and displayed next to the room description. the static map is then cut out and displayed next to the room description.
@ -166,7 +165,7 @@ go `4` spaces in either direction:
4 3 2 1 0 1 2 3 4 4 3 2 1 0 1 2 3 4
``` ```
The max_distance can be set dynamically based on the size of the display area. As your width/length The `max_distance` can be set dynamically based on the size of the display area. As your width/length
changes it becomes a simple algebraic linear relationship which is simply `max_distance = changes it becomes a simple algebraic linear relationship which is simply `max_distance =
(min(max_width, max_length) -1) / 2`. (min(max_width, max_length) -1) / 2`.
@ -184,8 +183,8 @@ n
self.curX/Y. .accordingly self.curX/Y. .accordingly
* `self.start_loc_on_grid(self)` - the very first initial draw on the grid representing your * `self.start_loc_on_grid(self)` - the very first initial draw on the grid representing your
location in the middle of the grid location in the middle of the grid
* 'self.show_map` - after everything is done convert the map into a readable string` * `self.show_map` - after everything is done convert the map into a readable string
* `self.draw_room_on_map(self, room, max_distance)` - the main method that ties it all together.` * `self.draw_room_on_map(self, room, max_distance)` - the main method that ties it all together.
Now that we know which methods we need, let's refine our initial `__init__(self)` to pass some Now that we know which methods we need, let's refine our initial `__init__(self)` to pass some
@ -369,11 +368,11 @@ to actually call it. Remember that to see different symbols for a location you a
`sector_type` Attribute on the room to one of the keys in the `SYMBOLS` dictionary. So in this `sector_type` Attribute on the room to one of the keys in the `SYMBOLS` dictionary. So in this
example, to make a room be mapped as `[.]` you would set the room's `sector_type` to example, to make a room be mapped as `[.]` you would set the room's `sector_type` to
`"SECT_INSIDE"`. Try it out with `@set here/sector_type = "SECT_INSIDE"`. If you wanted all new `"SECT_INSIDE"`. Try it out with `@set here/sector_type = "SECT_INSIDE"`. If you wanted all new
rooms to have a given sector symbol, you could change the default in the `SYMBOLS´ dictionary below, rooms to have a given sector symbol, you could change the default in the `SYMBOLS` dictionary below,
or you could add the Attribute in the Room's `at_object_creation` method. or you could add the Attribute in the Room's `at_object_creation` method.
```python ```python
#mygame/world/map.py # mygame/world/map.py
# These are keys set with the Attribute sector_type on the room. # These are keys set with the Attribute sector_type on the room.
# The keys None and "you" must always exist. # The keys None and "you" must always exist.

View file

@ -207,7 +207,7 @@ to use for creating the object. There you go - one red button.
The RedButton is an example object intended to show off a few of Evennia's features. You will find The RedButton is an example object intended to show off a few of Evennia's features. You will find
that the [Typeclass](../../../Components/Typeclasses.md) and [Commands](../../../Components/Commands.md) controlling it are that the [Typeclass](../../../Components/Typeclasses.md) and [Commands](../../../Components/Commands.md) controlling it are
inside [evennia/contrib/tutorial_examples](../../../api/evennia.contrib.tutorial_examples.md) inside [evennia/contrib/tutorials/red_button](evennia.contrib.tutorials.red_button)
If you wait for a while (make sure you dropped it!) the button will blink invitingly. If you wait for a while (make sure you dropped it!) the button will blink invitingly.

View file

@ -26,7 +26,7 @@ This is the things we know we need:
## Barter contrib ## Barter contrib
[source](../../../api/evennia.contrib.barter.md) [source](../../../api/evennia.contrib.game_systems.barter.md)
Reviewing this contrib suggests that it allows for safe trading between two parties. The basic principle Reviewing this contrib suggests that it allows for safe trading between two parties. The basic principle
is that the parties puts up the stuff they want to sell and the system will guarantee that these systems are is that the parties puts up the stuff they want to sell and the system will guarantee that these systems are
@ -55,17 +55,9 @@ We will use the barter contrib as an optional feature for player-player barterin
add it for NPC shopkeepers and expand it with a little AI, which allows them to potentially trade in other add it for NPC shopkeepers and expand it with a little AI, which allows them to potentially trade in other
things than boring gold coin. things than boring gold coin.
## Character generation contrib
[source](../../../api/evennia.contrib.chargen.md)
This contrib is an example module for creating characters. Since we will be using `MULTISESSION_MODE=3` we will
get a selection screen like this automatically. We also plan to use a proper menu to build our character, so
we will _not_ be using this contrib.
## Clothing contrib ## Clothing contrib
[source](../../../api/evennia.contrib.clothing.md) [source](../../../api/evennia.contrib.game_systems.clothing.md)
This contrib provides a full system primarily aimed at wearing clothes, but it could also work for armor. You wear This contrib provides a full system primarily aimed at wearing clothes, but it could also work for armor. You wear
an object in a particular location and this will then be reflected in your character's description. You can an object in a particular location and this will then be reflected in your character's description. You can
@ -80,7 +72,7 @@ for things like armor. It's a good contrib to build from though, so that's what
## Dice contrib ## Dice contrib
[source](../../../api/evennia.contrib.dice.md) [source](../../../api/evennia.contrib.rpg.dice.md)
The dice contrib presents a general dice roller to use in game. The dice contrib presents a general dice roller to use in game.
@ -102,7 +94,7 @@ or play a game, we will not need it for the core of our game.
## Extended room contrib ## Extended room contrib
[source](../../../api/evennia.contrib.extended_room.md) [source](../../../api/evennia.contrib.grid.extended_room.md)
This is a custom Room typeclass that changes its description based on time of day and season. This is a custom Room typeclass that changes its description based on time of day and season.
@ -122,7 +114,7 @@ game, why not!
## RP-System contrib ## RP-System contrib
[source](../../../api/evennia.contrib.rpsystem.md) [source](../../../api/evennia.contrib.rpg.rpsystem.md)
This contrib adds a full roleplaying subsystem to your game. It gives every character a "short-description" This contrib adds a full roleplaying subsystem to your game. It gives every character a "short-description"
(sdesc) that is what people will see when first meeting them. Let's say Tom has an sdesc "A tall man" and (sdesc) that is what people will see when first meeting them. Let's say Tom has an sdesc "A tall man" and
@ -159,20 +151,20 @@ You can also wear a mask to hide your identity; your sdesc will then be changed
like `a person with a mask`. like `a person with a mask`.
The RPSystem gives a lot of roleplaying power out of the box, so we will add it. There is also a separate The RPSystem gives a lot of roleplaying power out of the box, so we will add it. There is also a separate
[rplanguage](../../../api/evennia.contrib.rplanguage.md) module that integrates with the spoken words in your emotes and garbles them if you don't understand [rplanguage](../../../api/evennia.contrib.rpg.rpsystem.md) module that integrates with the spoken words in your emotes and garbles them if you don't understand
the language spoken. In order to restrict the scope we will not include languages for the tutorial game. the language spoken. In order to restrict the scope we will not include languages for the tutorial game.
## Talking NPC contrib ## Talking NPC contrib
[source](../../../api/evennia.contrib.talking_npc.md) [source](../../../api/evennia.contrib.tutorials.talking_npc.md)
This exemplifies an NPC with a menu-driven dialogue tree. We will not use this contrib explicitly, but it's This exemplifies an NPC with a menu-driven dialogue tree. We will not use this contrib explicitly, but it's
good as inspiration for how we'll do quest-givers later. good as inspiration for how we'll do quest-givers later.
## Traits contrib ## Traits contrib
[source](../../../api/evennia.contrib.traits.md) [source](../../../api/evennia.contrib.rpg.traits.md)
An issue with dealing with roleplaying attributes like strength, dexterity, or skills like hunting, sword etc An issue with dealing with roleplaying attributes like strength, dexterity, or skills like hunting, sword etc
is how to keep track of the values in the moment. Your strength may temporarily be buffed by a strength-potion. is how to keep track of the values in the moment. Your strength may temporarily be buffed by a strength-potion.
@ -226,7 +218,7 @@ Traits will be very practical to use for our character sheets.
## Turnbattle contrib ## Turnbattle contrib
[source](../../../api/evennia.contrib.turnbattle.md) [source](../../../api/evennia.contrib.game_systems.turnbattle.md)
This contrib consists of several implementations of a turn-based combat system, divivided into complexity: This contrib consists of several implementations of a turn-based combat system, divivided into complexity:

View file

@ -84,7 +84,7 @@ In this section we will try to create an actual "map" object that an account can
at. at.
Evennia offers a range of [default commands](../Components/Default-Commands.md) for Evennia offers a range of [default commands](../Components/Default-Commands.md) for
[creating objects and rooms in-game](../Howto/Starting/Part1/Building-Quickstart.md). While readily accessible, these commands are made to do very [creating objects and rooms in-game](Starting/Part1/Building-Quickstart.md). While readily accessible, these commands are made to do very
specific, restricted things and will thus not offer as much flexibility to experiment (for an specific, restricted things and will thus not offer as much flexibility to experiment (for an
advanced exception see [the FuncParser](../Components/FuncParser.md)). Additionally, entering long advanced exception see [the FuncParser](../Components/FuncParser.md)). Additionally, entering long
descriptions and properties over and over in the game client can become tedious; especially when descriptions and properties over and over in the game client can become tedious; especially when
@ -412,5 +412,5 @@ easily new game defining features can be added to Evennia.
You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why
not add more features to your game by trying other tutorials: [Add weather to your world](Weather- not add more features to your game by trying other tutorials: [Add weather to your world](Weather-
Tutorial), [fill your world with NPC's](../Howto/Tutorial-Aggressive-NPCs.md) or Tutorial), [fill your world with NPC's](./Tutorial-Aggressive-NPCs.md) or
[implement a combat system](../Howto/Starting/Part3/Turn-based-Combat-System.md). [implement a combat system](Starting/Part3/Turn-based-Combat-System.md).

View file

@ -75,7 +75,6 @@ Concepts/TextTags
Concepts/Using-MUX-as-a-Standard Concepts/Using-MUX-as-a-Standard
Concepts/Web-Features Concepts/Web-Features
Concepts/Zones Concepts/Zones
Contribs/A-voice-operated-elevator-using-events
Contribs/Arxcode-installing-help Contribs/Arxcode-installing-help
Contribs/Building-menus Contribs/Building-menus
Contribs/Contrib-AWSStorage Contribs/Contrib-AWSStorage
@ -97,6 +96,8 @@ Contribs/Contrib-Fieldfill
Contribs/Contrib-Gendersub Contribs/Contrib-Gendersub
Contribs/Contrib-Health-Bar Contribs/Contrib-Health-Bar
Contribs/Contrib-Ingame-Python Contribs/Contrib-Ingame-Python
Contribs/Contrib-Ingame-Python-Tutorial-Dialogue
Contribs/Contrib-Ingame-Python-Tutorial-Elevator
Contribs/Contrib-Mail Contribs/Contrib-Mail
Contribs/Contrib-Mapbuilder Contribs/Contrib-Mapbuilder
Contribs/Contrib-Menu-Login Contribs/Contrib-Menu-Login
@ -118,11 +119,6 @@ Contribs/Contrib-Tutorial-World
Contribs/Contrib-Unixcommand Contribs/Contrib-Unixcommand
Contribs/Contrib-Wilderness Contribs/Contrib-Wilderness
Contribs/Contrib-XYZGrid Contribs/Contrib-XYZGrid
Contribs/Crafting
Contribs/Dialogues-in-events
Contribs/Dynamic-In-Game-Map
Contribs/Static-In-Game-Map
Contribs/XYZGrid
Contributing Contributing
Contributing-Docs Contributing-Docs
Evennia-API Evennia-API
@ -137,6 +133,7 @@ Howto/Command-Duration
Howto/Command-Prompt Howto/Command-Prompt
Howto/Coordinates Howto/Coordinates
Howto/Default-Exit-Errors Howto/Default-Exit-Errors
Howto/Dynamic-In-Game-Map
Howto/Evennia-for-Diku-Users Howto/Evennia-for-Diku-Users
Howto/Evennia-for-MUSH-Users Howto/Evennia-for-MUSH-Users
Howto/Evennia-for-roleplaying-sessions Howto/Evennia-for-roleplaying-sessions
@ -174,6 +171,7 @@ Howto/Starting/Part4/Starting-Part4
Howto/Starting/Part5/Add-a-simple-new-web-page Howto/Starting/Part5/Add-a-simple-new-web-page
Howto/Starting/Part5/Starting-Part5 Howto/Starting/Part5/Starting-Part5
Howto/Starting/Part5/Web-Tutorial Howto/Starting/Part5/Web-Tutorial
Howto/Static-In-Game-Map
Howto/Tutorial-Aggressive-NPCs Howto/Tutorial-Aggressive-NPCs
Howto/Tutorial-NPCs-listening Howto/Tutorial-NPCs-listening
Howto/Tutorial-Tweeting-Game-Stats Howto/Tutorial-Tweeting-Game-Stats

View file

@ -1,12 +1,10 @@
# AWSstorage system # AWSstorage system
Contrib by The Right Honourable Reverend (trhr) 2020 Contrib by The Right Honourable Reverend (trhr), 2020
## What is this for?
This plugin migrates the Web-based portion of Evennia, namely images, This plugin migrates the Web-based portion of Evennia, namely images,
javascript, and other items located inside staticfiles into Amazon AWS (S3) for javascript, and other items located inside staticfiles into Amazon AWS (S3)
hosting. cloud hosting. Great for those serving media with the game.
Files hosted on S3 are "in the cloud," and while your personal Files hosted on S3 are "in the cloud," and while your personal
server may be sufficient for serving multimedia to a minimal number of users, server may be sufficient for serving multimedia to a minimal number of users,

View file

@ -1,15 +1,13 @@
# Building menu # Building menu
Module containing the building menu system. Contrib by vincent-lg, 2018
Evennia contributor: vincent-lg 2018
Building menus are in-game menus, not unlike `EvMenu` though using a Building menus are in-game menus, not unlike `EvMenu` though using a
different approach. Building menus have been specifically designed to edit different approach. Building menus have been specifically designed to edit
information as a builder. Creating a building menu in a command allows information as a builder. Creating a building menu in a command allows
builders quick-editing of a given object, like a room. If you follow the builders quick-editing of a given object, like a room. If you follow the
steps below to add the contrib, you will have access to an `@edit` command steps to add the contrib, you will have access to an `edit` command
that will edit any default object offering to change its key and description. that will edit any default object, offering to change its key and description.
## Install ## Install

View file

@ -1,9 +1,10 @@
# Color markups # Color markups
Contribution, Griatch 2017 Contrib by Griatch, 2017
Additional color markup styles for Evennia (extending or replacing the default Additional color markup styles for Evennia (extending or replacing the default
`|r`, `|234` etc). `|r`, `|234`). Adds support for MUSH-style (`%cr`, `%c123`) and/or legacy-Evennia
(`{r`, `{123`).
## Installation ## Installation

View file

@ -1,10 +1,11 @@
# Custom gameime # Custom gameime
Contrib - Griatch 2017, vlgeoff 2017 Contrib by vlgeoff, 2017 - based on Griatch's core original
This reimplements the `evennia.utils.gametime` module but supporting a custom This reimplements the `evennia.utils.gametime` module but with a _custom_
calendar for your game world. It allows for scheduling events to happen at given calendar (unusual number of days per week/month/year etc) for your game world.
in-game times, taking this custom calendar into account. Like the original, it allows for scheduling events to happen at given
in-game times, but now taking this custom calendar into account.
## Installation ## Installation

View file

@ -1,9 +1,10 @@
# Email-based login system # Email-based login system
Evennia contrib - Griatch 2012 Contrib by Griatch, 2012
This is a variant of the login system that requires an email-address This is a variant of the login system that asks for an email-address
instead of a username to login. instead of a username to login. Note that it does not verify the email,
it just uses it as the identifier rather than a username.
This used to be the default Evennia login before replacing it with a This used to be the default Evennia login before replacing it with a
more standard username + password system (having to supply an email more standard username + password system (having to supply an email

View file

@ -1,15 +1,15 @@
# Evennia in-game Python system # Evennia in-game Python system
Vincent Le Goff 2017 Contrib by Vincent Le Goff 2017
This contrib adds the system of in-game Python in Evennia, allowing immortals This contrib adds the ability to script with Python in-game. It allows trusted
(or other trusted builders) to dynamically add features to individual objects. staff/builders to dynamically add features and triggers to individual objects
Using custom Python set in-game, every immortal or privileged users could have a without needing to do it in external Python modules. Using custom Python in-game,
specific room, exit, character, object or something else behave differently from specific rooms, exits, characters, objects etc can be made to behave differently from
its "cousins". For these familiar with the use of softcode in MU`*`, like SMAUG its "cousins". This is similar to how softcode works for MU or MudProgs for DIKU.
MudProgs, the ability to add arbitrary behavior to individual objects is a step Keep in mind, however, that allowing Python in-game comes with _severe_
toward freedom. Keep in mind, however, the warning below, and read it carefully security concerns (you must trust your builders deeply), so read the warnings in
before the rest of the documentation. this module carefully before continuing.
## A WARNING REGARDING SECURITY ## A WARNING REGARDING SECURITY
@ -22,6 +22,17 @@ will have to keep in mind these points before deciding to install it:
2. You can do all of this in Python outside the game. The in-game Python system 2. You can do all of this in Python outside the game. The in-game Python system
is not to replace all your game feature. is not to replace all your game feature.
## Extra tutorials
These tutorials cover examples of using ingame python. Once you have the system
installed (see below) they may be an easier way to learn than reading the full
documentation from beginning to end.
- [Dialogue events](Contribs/Contrib-Ingame-Python-Tutorial-Dialogue.md), where
NPCs react to things said.
- [A voice operated elevator](Contribs/Contrib-Ingame-Python-Tutorial-Elevator.md)
using ingame-python events.
## Basic structure and vocabulary ## Basic structure and vocabulary
- At the basis of the in-game Python system are **events**. An **event** - At the basis of the in-game Python system are **events**. An **event**
@ -73,7 +84,9 @@ default. You need to do it manually, following these steps:
This is the quick summary. Scroll down for more detailed help on each step. This is the quick summary. Scroll down for more detailed help on each step.
1. Launch the main script (important!): 1. Launch the main script (important!):
```py evennia.create_script("evennia.contrib.base_systems.ingame_python.scripts.EventHandler")```
py evennia.create_script("evennia.contrib.base_systems.ingame_python.scripts.EventHandler")
2. Set the permissions (optional): 2. Set the permissions (optional):
- `EVENTS_WITH_VALIDATION`: a group that can edit callbacks, but will need approval (default to - `EVENTS_WITH_VALIDATION`: a group that can edit callbacks, but will need approval (default to
`None`). `None`).
@ -176,7 +189,7 @@ the `EVENTS_WITH_VALIDATION` setting will be able to call the command (with diff
### Adding the `call` command ### Adding the `call` command
You also have to add the `@call` command to your Character CmdSet. This command allows your users You also have to add the `@call` command to your Character CmdSet. This command allows your users
to add, edit and delete callbacks in-game. In your `commands/default_cmdsets, it might look like to add, edit and delete callbacks in-game. In your `commands/default_cmdsets`, it might look like
this: this:
```python ```python
@ -277,7 +290,7 @@ We'll see callbacks with parameters later. For the time being, let's try to pre
from going through the "north" exit of this room: from going through the "north" exit of this room:
``` ```
@call north call north
+------------------+---------+-----------------------------------------------+ +------------------+---------+-----------------------------------------------+
| Event name | Number | Description | | Event name | Number | Description |
+~~~~~~~~~~~~~~~~~~+~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ +~~~~~~~~~~~~~~~~~~+~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+

View file

@ -1,10 +1,10 @@
# Menu-based login system # Menu-based login system
Contribution - Vincent-lg 2016, Griatch 2019 (rework for modern EvMenu) Contribution by Vincent-lg 2016. Reworked for modern EvMenu by Griatch, 2019.
This changes the Evennia login to ask for the account name and password in This changes the Evennia login to ask for the account name and password as a series
sequence instead of requiring you to enter both at once. It uses EvMenu under of questions instead of requiring you to enter both at once. It uses Evennia's
the hood. menu system `EvMenu` under the hood.
## Installation ## Installation

View file

@ -1,22 +1,24 @@
# Legacy Comms-commands # Legacy Comms-commands
Contribution - Griatch 2021 Contribution by Griatch 2021
In Evennia 1.0, the old Channel commands (originally inspired by MUX) were In Evennia 1.0+, the old Channel commands (originally inspired by MUX) were
replaced by the single `channel` command that performs all these function. replaced by the single `channel` command that performs all these functions.
That command is still required to talk on channels. This contrib (extracted This contrib (extracted from Evennia 0.9.5) breaks out the functionality into
from Evennia 0.9.5) reuses the channel-management of the base Channel command separate Commands more familiar to MU* users. This is just for show though, the
but breaks out its functionality into separate Commands with MUX-familiar names. main `channel` command is still called under the hood.
- `allcom` - `channel/all` and `channel` | Contrib syntax | Default `channel` syntax |
- `addcom` - `channel/alias`, `channel/sub` and `channel/unmute` | -------------- | --------------------------------------------------------- |
- `delcom` - `channel/unalias`, `alias/unsub` and `channel/mute` | `allcom` | `channel/all` and `channel` |
- `cboot` - `channel/boot` (`channel/ban` and `/unban` not supported) | `addcom` | `channel/alias`, `channel/sub` and `channel/unmute` |
- `cwho` - `channel/who` | `delcom` | `channel/unalias`, `alias/unsub` and `channel/mute` |
- `ccreate` - `channel/create` | `cboot` | `channel/boot` (`channel/ban` and `/unban` not supported) |
- `cdestroy` - `channel/destroy` | `cwho` | `channel/who` |
- `clock` - `channel/lock` | `ccreate` | `channel/create` |
- `cdesc` - `channel/desc` | `cdestroy` | `channel/destroy` |
| `clock` | `channel/lock` |
| `cdesc` | `channel/desc` |
## Installation ## Installation

View file

@ -1,12 +1,12 @@
# Unix-like Command style parent # Unix-like Command style parent
Evennia contribution, Vincent Le Geoff 2017 Contribution by Vincent Le Geoff (vlgeoff), 2017
This module contains a command class that allows for unix-style command syntax This module contains a command class with an alternate syntax parser implementing
in-game, using --options, positional arguments and stuff like -n 10 etc Unix-style command syntax in-game. This means `--options`, positional arguments
similarly to a unix command. It might not the best syntax for the average player and stuff like `-n 10`. It might not the best syntax for the average player
but can be really useful for builders when they need to have a single command do but can be really useful for builders when they need to have a single command do
many things with many options. It uses the ArgumentParser from Python's standard many things with many options. It uses the `ArgumentParser` from Python's standard
library under the hood. library under the hood.
## Installation ## Installation

View file

@ -1,10 +1,12 @@
# EvscapeRoom # EvscapeRoom
Evennia contrib - Griatch 2019 Contribution by Griatch, 2019
This 'Evennia escaperoom game engine' was created for the MUD Coders Guild game A full engine for creating multiplayer escape-rooms in Evennia. Allows players to
Jam, April 14-May 15 2019. The theme for the jam was "One Room". This contains the spawn and join puzzle rooms that track their state independently. Any number of players
utilities and base classes and an empty example room. can join to solve a room together. This is the engine created for 'EvscapeRoom', which won
the MUD Coders Guild "One Room" Game Jam in April-May, 2019. The contrib has no game
content but contains the utilities and base classes and an empty example room.
The original code for the contest is found at The original code for the contest is found at
https://github.com/Griatch/evscaperoom but the version on the public Evennia https://github.com/Griatch/evscaperoom but the version on the public Evennia

View file

@ -1,18 +1,14 @@
# Barter system # Barter system
Evennia contribution - Griatch 2012 Contribution by Griatch, 2012
This implements a full barter system - a way for players to safely This implements a full barter system - a way for players to safely
trade items between each other using code rather than simple free-form trade items between each other in code rather than simple `give/get`
talking. The advantage of this is increased buy/sell safety but it commands. This increases both safety (at no time will one player have
also streamlines the process and makes it faster when doing many both goods and payment in-hand) and speed, since agreed goods will
transactions (since goods are automatically exchanged once both be moved automatically). By just replacing one side with coin objects,
agree). (or a mix of coins and goods), this also works fine for regular money
transactions.
This system is primarily intended for a barter economy, but can easily
be used in a monetary economy as well -- just let the "goods" on one
side be coin objects (this is more flexible than a simple "buy"
command since you can mix coins and goods in your trade).
## Installation ## Installation

View file

@ -1,9 +1,9 @@
# Clothing # Clothing
Evennia contribution - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
Provides a typeclass and commands for wearable clothing, Provides a typeclass and commands for wearable clothing. These
which is appended to a character's description when worn. look of these clothes are appended to the character's description when worn.
Clothing items, when worn, are added to the character's description Clothing items, when worn, are added to the character's description
in a list. For example, if wearing the following clothing items: in a list. For example, if wearing the following clothing items:
@ -13,6 +13,11 @@ in a list. For example, if wearing the following clothing items:
one nice hat one nice hat
a very pretty dress a very pretty dress
Would result in this added description:
Tim is wearing one nice hat, a thin and delicate necklace,
a very pretty dress and a pair of regular ol' shoes.
## Installation ## Installation
To install, import this module and have your default character To install, import this module and have your default character

View file

@ -1,13 +1,12 @@
# Cooldown contrib module. # Cooldowns
Evennia contrib - owllex, 2021 Contribution by owllex, 2021
This contrib provides a simple cooldown handler that can be attached to any Cooldowns are used modelling rate-limited actions, like how often a
typeclassed Object or Account. A cooldown is a lightweight persistent character can perform a given action; until a certain time has passed their
asynchronous timer that you can query to see if it is ready. command can not be used again. This contrib provides a simple cooldown
handler that can be attached to any typeclass. A cooldown is a lightweight persistent
Cooldowns are good for modelling rate-limited actions, like how often a asynchronous timer that you can query to see if a certain time has yet passed.
character can perform a given command.
Cooldowns are completely asynchronous and must be queried to know their Cooldowns are completely asynchronous and must be queried to know their
state. They do not fire callbacks, so are not a good fit for use cases state. They do not fire callbacks, so are not a good fit for use cases

View file

@ -1,25 +1,46 @@
# Crafting system # Crafting system
Contrib - Griatch 2020 Contribution by Griatch 2020
This implements a full crafting system. The principle is that of a 'recipe': This implements a full crafting system. The principle is that of a 'recipe',
where you combine items (tagged as ingredients) create something new. The recipe can also
require certain (non-consumed) tools. An example would be to use the 'bread recipe' to
combine 'flour', 'water' and 'yeast' with an 'oven' to bake a 'loaf of bread'.
ingredient1 + ingredient2 + ... + tool1 + tool2 + ... + craft_recipe -> objectA, objectB, ... The recipe process can be understood like this:
ingredient(s) + tool(s) + recipe -> object(s)
Here, 'ingredients' are consumed by the crafting process, whereas 'tools' are Here, 'ingredients' are consumed by the crafting process, whereas 'tools' are
necessary for the process by will not be destroyed by it. necessary for the process but will not be destroyed by it.
An example would be to use the tools 'bowl' and 'oven' to use the ingredients The included `craft` command works like this:
'flour', 'salt', 'yeast' and 'water' to create 'bread' using the 'bread recipe'.
A recipe does not have to use tools, like 'snow' + 'snowball-recipe' becomes craft <recipe> [from <ingredient>,...] [using <tool>, ...]
'snowball'. Conversely one could also imagine using tools without consumables,
like using 'spell book' and 'wand' to produce 'fireball' by having the recipe
check some magic skill on the character.
The system is generic enough to be used also for adventure-like puzzles, like ## Examples
combining 'stick', 'string' and 'hook' to get a 'makeshift fishing rod' that
you can use with 'storm drain' (treated as a tool) to get 'key' ... Using the `craft` command:
craft toy car from plank, wooden wheels, nails using saw, hammer
A recipe does not have to use tools or even multiple ingredients:
snow + snowball_recipe -> snowball
Conversely one could also imagine using tools without consumables, like
spell_book + wand + fireball_recipe -> fireball
The system is generic enough to be used also for adventure-like puzzles (but
one would need to change the command and determine the recipe on based on what
is being combined instead):
stick + string + hook -> makeshift_fishing_rod
makeshift_fishing_rod + storm_drain -> key
See the [sword example](evennia.contrib.game_systems.crafting.example_recipes) for an example
of how to design a recipe tree for crafting a sword from base elements.
## Intallation and Usage ## Intallation and Usage
@ -29,18 +50,30 @@ available to you:
craft <recipe> [from <ingredient>,...] [using <tool>, ...] craft <recipe> [from <ingredient>,...] [using <tool>, ...]
For example In code, you can craft using the
`evennia.contrib.game_systems.crafting.craft` function:
craft toy car from plank, wooden wheels, nails using saw, hammer ```python
from evennia.contrib.game_systems.crafting import craft
To use crafting you need recipes. Add a new variable to `mygame/server/conf/settings.py`: result = craft(caller, "recipename", *inputs)
```
Here, `caller` is the one doing the crafting and `*inputs` is any combination of
consumables and/or tool Objects. The system will identify which is which by the
[Tags](../Components/Tags.md) on them (see below) The `result` is always a list.
To use crafting you need recipes. Add a new variable to
`mygame/server/conf/settings.py`:
CRAFT_RECIPE_MODULES = ['world.recipes'] CRAFT_RECIPE_MODULES = ['world.recipes']
All top-level classes in these modules (whose name does not start with `_`) All top-level classes in these modules (whose name does not start with `_`) will
will be parsed by Evennia as recipes to make available to the crafting system. be parsed by Evennia as recipes to make available to the crafting system. Using
Using the above example, create `mygame/world/recipes.py` and add your recipies the above example, create `mygame/world/recipes.py` and add your recipies in
in there: there:
A quick example (read on for more details):
```python ```python
@ -69,34 +102,199 @@ class RecipeBread(CraftingRecipe):
def pre_craft(self, **kwargs): def pre_craft(self, **kwargs):
# validates inputs etc. Raise `CraftingValidationError` if fails # validates inputs etc. Raise `CraftingValidationError` if fails
def craft(self, **kwargs): def do_craft(self, **kwargs):
# performs the craft - but it can still fail (check skills etc here) # performs the craft - report errors directly to user and return None (if
# failed) and the created object(s) if successful.
def craft(self, result, **kwargs): def post_craft(self, result, **kwargs):
# any post-crafting effects. Always called, even if crafting failed (be # any post-crafting effects. Always called, even if do_craft failed (the
# result would be None then) # result would be None then)
``` ```
## Technical ## Adding new recipes
The Recipe is a class that specifies the consumables, tools and output along A *recipe* is a class inheriting from
with various methods (that you can override) to do the the validation of inputs `evennia.contrib.crafting.crafting.CraftingRecipe`. This class implements the
and perform the crafting itself. most common form of crafting - that using in-game objects. Each recipe is a
separate class which gets initialized with the consumables/tools you provide.
By default the input is a list of object-tags (using the "crafting_material" For the `craft` command to find your custom recipes, you need to tell Evennia
and "crafting_tool" tag-categories respectively). Providing a set of objects where they are. Add a new line to your `mygame/server/conf/settings.py` file,
matching these tags are required for the crafting to be done. The use of tags with a list to any new modules with recipe classes.
means that multiple different objects could all work for the same recipe, as
long as they have the right tag. This can be very useful for allowing players
to experiment and explore alternative ways to create things!
The output is given by a set of prototype-dicts. If the input is correct and ```python
other checks are passed (such as crafting skill, for example), these prototypes CRAFT_RECIPE_MODULES = ["world.myrecipes"]
will be used to generate the new object(s) being crafted. ```
(You need to reload after adding this). All global-level classes in these
modules (whose names don't start with underscore) are considered by the system
as viable recipes.
Here we assume you created `mygame/world/myrecipes.py` to match the above
example setting:
```python
# in mygame/world/myrecipes.py
from evennia.contrib.crafting.crafting import CraftingRecipe
class WoodenPuppetRecipe(CraftingRecipe):
"""A puppet""""
name = "wooden puppet" # name to refer to this recipe as
tool_tags = ["knife"]
consumable_tags = ["wood"]
output_prototypes = [
{"key": "A carved wooden doll",
"typeclass": "typeclasses.objects.decorations.Toys",
"desc": "A small carved doll"}
]
```
This specifies which tags to look for in the inputs. It defines a
[Prototype](../Components/Prototypes.md) for the recipe to use to spawn the
result on the fly (a recipe could spawn more than one result if needed).
Instead of specifying the full prototype-dict, you could also just provide a
list of `prototype_key`s to existing prototypes you have.
After reloading the server, this recipe would now be available to use. To try it
we should create materials and tools to insert into the recipe.
The recipe analyzes inputs, looking for [Tags](../Components/Tags.md) with
specific tag-categories. The tag-category used can be set per-recipe using the
(`.consumable_tag_category` and `.tool_tag_category` respectively). The defaults
are `crafting_material` and `crafting_tool`. For
the puppet we need one object with the `wood` tag and another with the `knife`
tag:
```python
from evennia import create_object
knife = create_object(key="Hobby knife", tags=[("knife", "crafting_tool")])
wood = create_object(key="Piece of wood", tags[("wood", "crafting_material")])
```
Note that the objects can have any name, all that matters is the
tag/tag-category. This means if a "bayonet" also had the "knife" crafting tag,
it could also be used to carve a puppet. This is also potentially interesting
for use in puzzles and to allow users to experiment and find alternatives to
know ingredients.
By the way, there is also a simple shortcut for doing this:
```
tools, consumables = WoodenPuppetRecipe.seed()
```
The `seed` class-method will create simple dummy objects that fulfills the
recipe's requirements. This is great for testing.
Assuming these objects were put in our inventory, we could now craft using the
in-game command:
```bash
> craft wooden puppet from wood using hobby knife
```
In code we would do
```python
from evennia.contrub.crafting.crafting import craft
puppet = craft(crafter, "wooden puppet", knife, wood)
```
In the call to `craft`, the order of `knife` and `wood` doesn't matter - the
recipe will sort out which is which based on their tags.
## Deeper customization of recipes
For customizing recipes further, it helps to understand how to use the
recipe-class directly:
```python
class MyRecipe(CraftingRecipe):
# ...
tools, consumables = MyRecipe.seed()
recipe = MyRecipe(crafter, *(tools + consumables))
result = recipe.craft()
```
This is useful for testing and allows you to use the class directly without
adding it to a module in `settings.CRAFTING_RECIPE_MODULES`.
Even without modifying more than the class properties, there are a lot of
options to set on the `CraftingRecipe` class. Easiest is to refer to the
[CraftingRecipe api
documentation](evennia.contrib.game_systems.crafting.crafting.CraftingRecipe). For example,
you can customize the validation-error messages, decide if the ingredients have
to be exactly right, if a failure still consumes the ingredients or not, and
much more.
For even more control you can override hooks in your own class:
- `pre_craft` - this should handle input validation and store its data in `.validated_consumables` and
`validated_tools` respectively. On error, this reports the error to the crafter and raises the
`CraftingValidationError`.
- `craft` - this will only be called if `pre_craft` finished without an exception. This should
return the result of the crafting, by spawnging the prototypes. Or the empty list if crafting
fails for some reason. This is the place to add skill-checks or random chance if you need it
for your game.
- `post_craft` - this receives the result from `craft` and handles error messages and also deletes
any consumables as needed. It may also modify the result before returning it.
- `msg` - this is a wrapper for `self.crafter.msg` and should be used to send messages to the
crafter. Centralizing this means you can also easily modify the sending style in one place later.
The class constructor (and the `craft` access function) takes optional `**kwargs`. These are passed
into each crafting hook. These are unused by default but could be used to customize things per-call.
### Skilled crafters
What the crafting system does not have out of the box is a 'skill' system - the
notion of being able to fail the craft if you are not skilled enough. Just how
skills work is game-dependent, so to add this you need to make your own recipe
parent class and have your recipes inherit from this.
```python
from random import randint
from evennia.contrib.crafting.crafting import CraftingRecipe
class SkillRecipe(CraftingRecipe):
"""A recipe that considers skill"""
difficulty = 20
def craft(self, **kwargs):
"""The input is ok. Determine if crafting succeeds"""
# this is set at initialization
crafter = self.crafte
# let's assume the skill is stored directly on the crafter
# - the skill is 0..100.
crafting_skill = crafter.db.skill_crafting
# roll for success:
if randint(1, 100) <= (crafting_skill - self.difficulty):
# all is good, craft away
return super().craft()
else:
self.msg("You are not good enough to craft this. Better luck next time!")
return []
```
In this example we introduce a `.difficulty` for the recipe and makes a 'dice roll' to see
if we succed. We would of course make this a lot more immersive and detailed in a full game. In
principle you could customize each recipe just the way you want it, but you could also inherit from
a central parent like this to cut down on work.
The [sword recipe example module](evennia.contrib.game_systems.crafting.example_recipes) also shows an example
of a random skill-check being implemented in a parent and then inherited for multiple use.
## Even more customization
If you want to build something even more custom (maybe using different input types of validation logic)
you could also look at the `CraftingRecipe` parent class `CraftingRecipeBase`.
It implements just the minimum needed to be a recipe and for big changes you may be better off starting
from this rather than the more opinionated `CraftingRecipe`.
Each recipe is a stand-alone entity which allows for very advanced
customization for every recipe - for example one could have a recipe that
checks other properties of the inputs (like quality, color etc) and have that
affect the result. Your recipes could also (and likely would) tie into your
game's skill system to determine the success or outcome of the crafting.

View file

@ -3,5 +3,7 @@ Crafting - Griatch 2020
""" """
from .crafting import craft # noqa
from .crafting import CraftingRecipe # noqa from .crafting import CraftingRecipe # noqa
from .crafting import CraftingValidationError # noqa from .crafting import CraftingRecipeBase # noqa
from .crafting import CraftingError, CraftingValidationError # noqa

View file

@ -1,6 +1,6 @@
# Gendersub # Gendersub
Contrib - Griatch 2015 Contribution by Griatch 2015
This is a simple gender-aware Character class for allowing users to This is a simple gender-aware Character class for allowing users to
insert custom markers in their text to indicate gender-aware insert custom markers in their text to indicate gender-aware

View file

@ -1,13 +1,15 @@
# In-Game Mail system # In-Game Mail system
Evennia Contribution - grungies1138 2016 Contribution by grungies1138 2016
A simple Brandymail style mail system that uses the Msg class from Evennia A simple Brandymail style mail system that uses the `Msg` class from Evennia
Core. It has two Commands, both of which can be used on their own: Core. It has two Commands for either sending mails between Accounts (out of game)
or between Characters (in-game). The two types of mails can be used together or
on their own.
- CmdMail - this should sit on the Account cmdset and makes the `mail` command - `CmdMail` - this should sit on the Account cmdset and makes the `mail` command
available both IC and OOC. Mails will always go to Accounts (other players). available both IC and OOC. Mails will always go to Accounts (other players).
- CmdMailCharacter - this should sit on the Character cmdset and makes the `mail` - `CmdMailCharacter` - this should sit on the Character cmdset and makes the `mail`
command ONLY available when puppeting a character. Mails will be sent to other command ONLY available when puppeting a character. Mails will be sent to other
Characters only and will not be available when OOC. Characters only and will not be available when OOC.
- If adding *both* commands to their respective cmdsets, you'll get two separate - If adding *both* commands to their respective cmdsets, you'll get two separate

View file

@ -1,15 +1,16 @@
# Evennia Multidescer # Evennia Multidescer
Contrib - Griatch 2016 Contribution by Griatch 2016
A "multidescer" is a concept from the MUSH world. It allows for A "multidescer" is a concept from the MUSH world. It allows for
creating, managing and switching between multiple character creating, managing and switching between multiple character
descriptions. This multidescer will not require any changes to the descriptions and is a way for quickly managing your look (such as when
Character class, rather it will use the `multidescs` Attribute (a changing clothes) in more free-form roleplaying systems. This will also
list) and create it if it does not exist. work well together with the `rpsystem` contrib.
This contrib also works well together with the rpsystem contrib (which This multidescer will not
also adds the short descriptions and the `sdesc` command). require any changes to the Character class, rather it will use the `multidescs`
Attribute (a list) and create it if it does not exist.
## Installation ## Installation

View file

@ -1,18 +1,21 @@
# Puzzles System # Puzzles System
Evennia contribution - Henddher 2018 Contribution by Henddher 2018
Provides a typeclass and commands for objects that can be combined (i.e. 'use'd) Intended for adventure-game style combination puzzles, such as combining fruits
to produce new objects. and a blender to create a smoothie. Provides a typeclass and commands for objects
that can be combined (i.e. used together). Unlike the `crafting` contrib, each
puzzle is built from unique objects rather than using tags and a builder can create
the puzzle entirely from in-game.
A Puzzle is a recipe of what objects (aka parts) must be combined by a player so A `Puzzle` is a recipe of what objects (aka parts) must be combined by a player so
a new set of objects (aka results) are automatically created. a new set of objects (aka results) are automatically created.
## Installation ## Installation
Add the PuzzleSystemCmdSet to all players (e.g. in their Character typeclass). Add the `PuzzleSystemCmdSet` to all players (e.g. in their Character typeclass).
Alternatively: Alternatively (for quick testing):
py self.cmdset.add('evennia.contrib.game_systems.puzzles.PuzzleSystemCmdSet') py self.cmdset.add('evennia.contrib.game_systems.puzzles.PuzzleSystemCmdSet')

View file

@ -1,6 +1,6 @@
# Turn based battle system framework # Turn based battle system framework
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
This is a framework for a simple turn-based combat system, similar This is a framework for a simple turn-based combat system, similar
to those used in D&D-style tabletop role playing games. It allows to those used in D&D-style tabletop role playing games. It allows

View file

@ -1,10 +1,11 @@
# Extended Room # Extended Room
Evennia Contribution - Griatch 2012, vincent-lg 2019 Contribution - Griatch 2012, vincent-lg 2019
This is an extended Room typeclass for Evennia. It is supported This extends the normal `Room` typeclass to allow its description to change
by an extended `Look` command and an extended `desc` command, also with time-of-day and/or season. It also adds 'details' for the player to look at
in this module. in the room (without having to create a new in-game object for each). The room is
supported by new `look` and `desc` commands.
## Installation/testing: ## Installation/testing:

View file

@ -1,8 +1,8 @@
# Map Builder # Map Builder
Contribution - Cloud_Keeper 2016 Contribution by Cloud_Keeper 2016
Build a map from a 2D ASCII map. Build a game map from the drawing of a 2D ASCII map.
This is a command which takes two inputs: This is a command which takes two inputs:

View file

@ -1,13 +1,15 @@
# SimpleDoor # SimpleDoor
Contribution - Griatch 2016 Contribution by Griatch, 2016
A simple two-way exit that represents a door that can be opened and A simple two-way exit that represents a door that can be opened and
closed. Can easily be expanded from to make it lockable, destroyable closed from both sides. Can easily be expanded to make it lockable,
etc. Note that the simpledoor is based on Evennia locks, so it will destroyable etc.
not work for a superuser (which bypasses all locks) - the superuser
Note that the simpledoor is based on Evennia locks, so it will
not work for a superuser (which bypasses all locks). The superuser
will always appear to be able to close/open the door over and over will always appear to be able to close/open the door over and over
without the locks stopping you. To use the door, use `@quell` or a without the locks stopping you. To use the door, use `quell` or a
non-superuser account. non-superuser account.
## Installation: ## Installation:

View file

@ -1,10 +1,10 @@
# Slow Exit # Slow Exit
Contribution - Griatch 2014 Contribution by Griatch 2014
This is an example of an Exit-type that delays its traversal. This simulates An example of an Exit-type that delays its traversal. This simulates
slow movement, common in many different types of games. The contrib also slow movement, common in many games. The contrib also
contains two commands, `CmdSetSpeed` and CmdStop for changing the movement speed contains two commands, `setspeed` and `stop` for changing the movement speed
and abort an ongoing traversal, respectively. and abort an ongoing traversal, respectively.
## Installation: ## Installation:

View file

@ -1,10 +1,10 @@
# Wilderness system # Wilderness system
Evennia contrib - titeuf87 2017 Contribution by titeuf87, 2017
This contrib provides a wilderness map without actually creating a large number This contrib provides a wilderness map without actually creating a large number
of rooms - as you move, your room is instead updated with different of rooms - as you move, you instead end up back in the same room but its description
descriptions. This means you can make huge areas with little database use as changes. This means you can make huge areas with little database use as
long as the rooms are relatively similar (name/desc changing). long as the rooms are relatively similar (name/desc changing).
## Installation ## Installation

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,12 @@
# Dice # Dice
Rolls dice for roleplaying, in-game gambling or GM:ing Contribution by Griatch, 2012
A dice roller for any number and side of dice. Adds in-game dice rolling
(`roll 2d10 + 1`) as well as conditionals (roll under/over/equal to a target)
and functions for rolling dice in code. Command also supports hidden or secret
rolls for use by a human game master.
Evennia contribution - Griatch 2012
# Installation: # Installation:

View file

@ -1,11 +1,11 @@
# Health Bar # Health Bar
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
The function provided in this module lets you easily display visual The function provided in this module lets you easily display visual
bars or meters - "health bar" is merely the most obvious use for this, bars or meters as a colorful bar instead of just a number. A "health bar"
though these bars are highly customizable and can be used for any sort is merely the most obvious use for this, but the bar is highly customizable
of appropriate data besides player health. and can be used for any sort of appropriate data besides player health.
Today's players may be more used to seeing statistics like health, Today's players may be more used to seeing statistics like health,
stamina, magic, and etc. displayed as bars rather than bare numerical stamina, magic, and etc. displayed as bars rather than bare numerical

View file

@ -1,7 +1,17 @@
# Roleplaying base system for Evennia # Roleplaying base system for Evennia
Roleplaying emotes/sdescs - Griatch, 2015 Contribution by Griatch, 2015
Language/whisper emotes - Griatch, 2015
A full roleplaying emote system. Short-descriptions and recognition (only
know people by their looks until you assign a name to them). Room poses. Masks/disguises
(hide your description). Speak directly in emote, with optional language obscuration
(words get garbled if you don't know the language, you can also have different languages
with different 'sounding' garbling). Whispers can be partly overheard from a distance. A
very powerful in-emote reference system, for referencing and differentiate targets
(including objects).
The system contains of two main modules - the roleplaying emote system and the language
obscuration module.
## Roleplaying emotes ## Roleplaying emotes

View file

@ -1,12 +1,10 @@
# Traits # Traits
Whitenoise 2014, Ainneve contributors, Contribution by Griatch 2020, based on code by Whitenoise and Ainneve contribs, 2014
Griatch 2020
A `Trait` represents a modifiable property on (usually) a Character. They can A `Trait` represents a modifiable property on (usually) a Character. They can
be used to represent everything from attributes (str, agi etc) to skills be used to represent everything from attributes (str, agi etc) to skills
(hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc. (hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc.
Traits differ from normal Attributes in that they track their changes and limit Traits differ from normal Attributes in that they track their changes and limit
themselves to particular value-ranges. One can add/subtract from them easily and themselves to particular value-ranges. One can add/subtract from them easily and
they can even change dynamically at a particular rate (like you being poisoned or they can even change dynamically at a particular rate (like you being poisoned or

View file

@ -1,10 +1,10 @@
# Batch processor examples # Batch processor examples
Contibution - Griatch 2012 Contibution by Griatch, 2012
The batch processor is used for generating in-game content from one or more Simple examples for the batch-processor. The batch processor is used for generating
static files. Files can be stored with version control and then 'applied' in-game content from one or more static files. Files can be stored with version
to the game to create content. control and then 'applied' to the game to create content.
There are two batch processor types: There are two batch processor types:

View file

@ -1,9 +1,9 @@
# Script example # Script example
Griatch - 2012 Contribution by Griatch, 2012
Example script for testing. This adds a simple timer that has your Example script for testing. This adds a simple timer that has your
character make observations and notices at irregular intervals. character make small verbal observations at irregular intervals.
To test, use (in game) To test, use (in game)

View file

@ -1,8 +1,8 @@
# TutorialMirror # TutorialMirror
A simple mirror object to experiment with. Contribution by Griatch, 2017
A simple mirror object that A simple mirror object to experiment with. It will respond to being looked at.
- echoes back the description of the object looking at it - echoes back the description of the object looking at it
- echoes back whatever is being sent to its .msg - to the - echoes back whatever is being sent to its .msg - to the

View file

@ -1,9 +1,9 @@
# Red Button example # Red Button example
Griatch - 2011 Contribution by Griatch, 2011
This is a more advanced example object with its own functionality (commands) A red button that you can press to have an effect. This is a more advanced example
on it. object with its own functionality and state tracking.
Create the button with Create the button with

View file

@ -1,9 +1,9 @@
# Talkative NPC example # Talkative NPC example
Contribution - Griatch 2011, grungies1138, 2016 Contribution by Griatch 2011. Updated by grungies1138, 2016
This is a static NPC object capable of holding a simple menu-driven This is an example of a static NPC object capable of holding a simple menu-driven
conversation. It's just meant as an example. conversation. Suitable for example as a quest giver or merchant.
## Installation ## Installation

View file

@ -1,13 +1,14 @@
# Evennia Tutorial World # Evennia Tutorial World
Griatch 2011, 2015 Contribution by Griatch 2011, 2015
This is a stand-alone tutorial area for an unmodified Evennia install. A stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a Think of it as a sort of single-player adventure rather than a
full-fledged multi-player game world. The various rooms and objects full-fledged multi-player game world. The various rooms and objects
herein are designed to show off features of the engine, not to be a are designed to show off features of Evennia, not to be a
very challenging (nor long) gaming experience. As such it's of course very challenging (nor long) gaming experience. As such it's of course
only skimming the surface of what is possible. only skimming the surface of what is possible. Taking this apart
is a great way to start learning the system.
The tutorial world also includes a game tutor menu example, exemplifying The tutorial world also includes a game tutor menu example, exemplifying
Evmenu. Evmenu.

View file

@ -1,15 +1,15 @@
# Input/Output Auditing # Input/Output Auditing
Contrib - Johnny 2017 Contribution by Johnny, 2017
This is a tap that optionally intercepts all data sent to/from clients and the Utility that taps and intercepts all data sent to/from clients and the
server and passes it to a callback of your choosing. server and passes it to a callback of your choosing. This is intended for
quality assurance, post-incident investigations and debugging.
It is intended for quality assurance, post-incident investigations and debugging Note that this should be used with care since it can obviously be abused. All
but obviously can be abused. All data is recorded in cleartext. Please data is recorded in cleartext. Please be ethical, and if you are unwilling to
be ethical, and if you are unwilling to properly deal with the implications of properly deal with the implications of recording user passwords or private
recording user passwords or private communications, please do not enable communications, please do not enable this module.
this module.
Some checks have been implemented to protect the privacy of users. Some checks have been implemented to protect the privacy of users.

View file

@ -1,14 +1,16 @@
# Easy fillable form # Easy fillable form
Contrib - Tim Ashley Jenkins 2018 Contribution by Tim Ashley Jenkins, 2018
This module contains a function that calls an easily customizable EvMenu - this This module contains a function that generates an `EvMenu` for you - this
menu presents the player with a fillable form, with fields that can be filled menu presents the player with a form of fields that can be filled
out in any order. Each field's value can be verified, with the function out in any order (e.g. for character generation or building). Each field's value can
allowing easy checks for text and integer input, minimum and maximum values / be verified, with the function allowing easy checks for text and integer input,
character lengths, or can even be verified by a custom function. Once the form minimum and maximum values / character lengths, or can even be verified by a custom
is submitted, the form's data is submitted as a dictionary to any callable of function. Once the form is submitted, the form's data is submitted as a dictionary
your choice. to any callable of your choice.
## Usage
The function that initializes the fillable form menu is fairly simple, and The function that initializes the fillable form menu is fairly simple, and
includes the caller, the template for the form, and the callback(caller, result) includes the caller, the template for the form, and the callback(caller, result)

View file

@ -1,12 +1,14 @@
# Pseudo-random generator and registry # Pseudo-random generator and registry
Contribution - Vincent Le Goff 2017 Contribution by Vincent Le Goff (vlgeoff), 2017
This contrib can be used to generate pseudo-random strings of information This utility can be used to generate pseudo-random strings of information
with specific criteria. You could, for instance, use it to generate with specific criteria. You could, for instance, use it to generate
phone numbers, license plate numbers, validation codes, non-sensivite phone numbers, license plate numbers, validation codes, in-game security
passwords and so on. The strings generated by the generator will be passwords and so on. The strings generated will be stored and won't be repeated.
stored and won't be available again in order to avoid repetition.
## Usage Example
Here's a very simple example: Here's a very simple example:
```python ```python

View file

@ -1,14 +1,16 @@
# Easy menu selection tree # Easy menu selection tree
Contrib - Tim Ashley Jenkins 2017 Contribution by Tim Ashley Jenkins, 2017
This module allows you to create and initialize an entire branching EvMenu This utility allows you to create and initialize an entire branching EvMenu
instance with nothing but a multi-line string passed to one function. instance from a multi-line string passed to one function.
EvMenu is incredibly powerful and flexible, but using it for simple menus > Note: Since the time this contrib was created, EvMenu itself got its own templating
can often be fairly cumbersome - a simple menu that can branch into five > language that has more features and is not compatible with the style used in
categories would require six nodes, each with options represented as a list > this contrib. Both can still be used in parallel.
of dictionaries.
`EvMenu` is incredibly powerful and flexible but it can be a little overwhelming
and offers a lot of power that may not be needed for a simple multiple-choice menu.
This module provides a function, `init_tree_selection`, which acts as a frontend This module provides a function, `init_tree_selection`, which acts as a frontend
for EvMenu, dynamically sourcing the options from a multi-line string you for EvMenu, dynamically sourcing the options from a multi-line string you

View file

@ -242,7 +242,7 @@ def schedule(
to store in Attributes on the generated scheduling Script. to store in Attributes on the generated scheduling Script.
Returns: Returns:
script (Script): The created Script handling the sceduling. Script: The created Script handling the scheduling.
Examples: Examples:
:: ::