Fixed all errors in doc building

This commit is contained in:
Griatch 2020-07-11 00:14:13 +02:00
parent 9fbfc8f8d0
commit 76761825d0
80 changed files with 766 additions and 767 deletions

View file

@ -101,6 +101,10 @@ def create_toctree():
targetname = targetpath.name.rsplit(".", 1)[0] targetname = targetpath.name.rsplit(".", 1)[0]
targetpath = targetpath.as_posix() targetpath = targetpath.as_posix()
url = relpath(targetpath, dirname(sourcepath)) url = relpath(targetpath, dirname(sourcepath))
if not "/" in url:
# need to be explicit or there will be link ref collisions between
# e.g. TickerHandler page and TickerHandle api node
url = "./" + url
docref_map[sourcepath][targetname] = url.rsplit(".", 1)[0] docref_map[sourcepath][targetname] = url.rsplit(".", 1)[0]

View file

@ -8,21 +8,21 @@ to you, but some things may still be useful.
## Find your way ## Find your way
- [Directory-Overview](../Howto/Starting/Part1/Gamedir-Overview) - [Directory-Overview](../Howto/Starting/Part1/Gamedir-Overview)
- [Quirks of Evennia](Quirks) - [Quirks of Evennia](./Quirks)
## Setting up a workflow ## Setting up a workflow
- [Setting up PyCharm](Setting-up-PyCharm) - [Setting up PyCharm](./Setting-up-PyCharm)
- [Using Version-Control](Version-Control) - [Using Version-Control](./Version-Control)
- [Updating Evennia sources](Updating-Your-Game) - [Updating Evennia sources](./Updating-Your-Game)
## Coding away ## Coding away
- [Ways to Debug](Debugging) - [Ways to Debug](./Debugging)
- [Adding unit-tests](Unit-Testing) - [Adding unit-tests](./Unit-Testing)
## Advanced concepts ## Advanced concepts
- [Continuous Integration](Continuous-Integration) - [Continuous Integration](./Continuous-Integration)
- [Using Travis](Using-Travis) - [Using Travis](./Using-Travis)
- [Profiling](Profiling) - [Profiling](./Profiling)

View file

@ -27,7 +27,7 @@ Among those you will need:
* A Continuous Integration Environment. * A Continuous Integration Environment.
* I recommend [TeamCity](https://www.jetbrains.com/teamcity/) which has an in-depth [Setup * I recommend [TeamCity](https://www.jetbrains.com/teamcity/) which has an in-depth [Setup
Guide](https://confluence.jetbrains.com/display/TCD8/Installing+and+Configuring+the+TeamCity+Server) Guide](https://confluence.jetbrains.com/display/TCD8/Installing+and+Configuring+the+TeamCity+Server)
* [Source Control](Version-Control) * [Source Control](./Version-Control)
* This could be Git or SVN or any other available SC. * This could be Git or SVN or any other available SC.
## Linux TeamCity Setup ## Linux TeamCity Setup

View file

@ -324,7 +324,7 @@ developer mailing list or IRC chat to see beforehand if your feature is deemed s
as a core feature in the engine. When it comes to bug-fixes, other developers may also have good as a core feature in the engine. When it comes to bug-fixes, other developers may also have good
input on how to go about resolving the issue. input on how to go about resolving the issue.
To contribute you need to have [forked Evennia](Version-Control#forking-evennia) first. As described To contribute you need to have [forked Evennia](./Version-Control#forking-evennia) first. As described
above you should do your modification in a separate local branch (not in the master branch). This above you should do your modification in a separate local branch (not in the master branch). This
branch is what you then present to us (as a *Pull request*, PR, see below). We can then merge your branch is what you then present to us (as a *Pull request*, PR, see below). We can then merge your
change into the upstream master and you then do `git pull` to update master usual. Now that the change into the upstream master and you then do `git pull` to update master usual. Now that the

View file

@ -1,27 +1,27 @@
# Accounts # Accounts
All *users* (real people) that starts a game [Session](Sessions) on Evennia are doing so through an All *users* (real people) that starts a game [Session](./Sessions) on Evennia are doing so through an
object called *Account*. The Account object has no in-game representation, it represents a unique object called *Account*. The Account object has no in-game representation, it represents a unique
game account. In order to actually get on the game the Account must *puppet* an [Object](Objects) game account. In order to actually get on the game the Account must *puppet* an [Object](./Objects)
(normally a [Character](Objects#Character)). (normally a [Character](./Objects#Character)).
Exactly how many Sessions can interact with an Account and its Puppets at once is determined by Exactly how many Sessions can interact with an Account and its Puppets at once is determined by
Evennia's [MULTISESSION_MODE](Sessions#Multisession-mode) setting. Evennia's [MULTISESSION_MODE](./Sessions#Multisession-mode) setting.
Apart from storing login information and other account-specific data, the Account object is what is Apart from storing login information and other account-specific data, the Account object is what is
chatting on [Channels](Communications). It is also a good place to store [Permissions](Locks) to be chatting on [Channels](./Communications). It is also a good place to store [Permissions](./Locks) to be
consistent between different in-game characters as well as configuration options. The Account consistent between different in-game characters as well as configuration options. The Account
object also has its own [CmdSet](Command-Sets), the `AccountCmdSet`. object also has its own [CmdSet](./Command-Sets), the `AccountCmdSet`.
Logged into default evennia, you can use the `ooc` command to leave your current Logged into default evennia, you can use the `ooc` command to leave your current
[character](Objects) and go into OOC mode. You are quite limited in this mode, basically it works [character](./Objects) and go into OOC mode. You are quite limited in this mode, basically it works
like a simple chat program. It acts as a staging area for switching between Characters (if your like a simple chat program. It acts as a staging area for switching between Characters (if your
game supports that) or as a safety mode if your Character gets deleted. Use `ic` to attempt to game supports that) or as a safety mode if your Character gets deleted. Use `ic` to attempt to
(re)puppet a Character. (re)puppet a Character.
Note that the Account object can have, and often does have, a different set of Note that the Account object can have, and often does have, a different set of
[Permissions](Locks#Permissions) from the Character they control. Normally you should put your [Permissions](./Locks#Permissions) from the Character they control. Normally you should put your
permissions on the Account level - this will overrule permissions set on the Character level. For permissions on the Account level - this will overrule permissions set on the Character level. For
the permissions of the Character to come into play the default `quell` command can be used. This the permissions of the Character to come into play the default `quell` command can be used. This
allows for exploring the game using a different permission set (but you can't escalate your allows for exploring the game using a different permission set (but you can't escalate your
@ -76,7 +76,7 @@ You should now see the Attributes on yourself.
## Properties on Accounts ## Properties on Accounts
Beyond those properties assigned to all typeclassed objects (see [Typeclasses](Typeclasses)), the Beyond those properties assigned to all typeclassed objects (see [Typeclasses](./Typeclasses)), the
Account also has the following custom properties: Account also has the following custom properties:
- `user` - a unique link to a `User` Django object, representing the logged-in user. - `user` - a unique link to a `User` Django object, representing the logged-in user.
@ -91,11 +91,11 @@ as
- `is_superuser` (bool: True/False) - if this account is a superuser. - `is_superuser` (bool: True/False) - if this account is a superuser.
Special handlers: Special handlers:
- `cmdset` - This holds all the current [Commands](Commands) of this Account. By default these are - `cmdset` - This holds all the current [Commands](./Commands) of this Account. By default these are
the commands found in the cmdset defined by `settings.CMDSET_ACCOUNT`. the commands found in the cmdset defined by `settings.CMDSET_ACCOUNT`.
- `nicks` - This stores and handles [Nicks](Nicks), in the same way as nicks it works on Objects. - `nicks` - This stores and handles [Nicks](./Nicks), in the same way as nicks it works on Objects.
For Accounts, nicks are primarily used to store custom aliases for For Accounts, nicks are primarily used to store custom aliases for
[Channels](Communications#Channels). [Channels](./Communications#Channels).
Selection of special methods (see `evennia.DefaultAccount` for details): Selection of special methods (see `evennia.DefaultAccount` for details):
- `get_puppet` - get a currently puppeted object connected to the Account and a given session id, if - `get_puppet` - get a currently puppeted object connected to the Account and a given session id, if

View file

@ -7,8 +7,8 @@ can give correct subsequent commands. If you are writing a combat system, you mi
combattant's next roll get easier dependent on if their opponent failed. Your characters will combattant's next roll get easier dependent on if their opponent failed. Your characters will
probably need to store roleplaying-attributes like strength and agility. And so on. probably need to store roleplaying-attributes like strength and agility. And so on.
[Typeclassed](Typeclasses) game entities ([Accounts](Accounts), [Objects](Objects), [Typeclassed](./Typeclasses) game entities ([Accounts](./Accounts), [Objects](./Objects),
[Scripts](Scripts) and [Channels](Communications)) always have *Attributes* associated with them. [Scripts](./Scripts) and [Channels](./Communications)) always have *Attributes* associated with them.
Attributes are used to store any type of data 'on' such entities. This is different from storing Attributes are used to store any type of data 'on' such entities. This is different from storing
data in properties already defined on entities (such as `key` or `location`) - these have very data in properties already defined on entities (such as `key` or `location`) - these have very
specific names and require very specific types of data (for example you couldn't assign a python specific names and require very specific types of data (for example you couldn't assign a python
@ -16,12 +16,12 @@ specific names and require very specific types of data (for example you couldn't
want to assign arbitrary data to arbitrary names. want to assign arbitrary data to arbitrary names.
**Attributes are _not_ secure by default and any player may be able to change them unless you **Attributes are _not_ secure by default and any player may be able to change them unless you
[prevent this behavior](Attributes#locking-and-checking-attributes).** [prevent this behavior](./Attributes#locking-and-checking-attributes).**
## The .db and .ndb shortcuts ## The .db and .ndb shortcuts
To save persistent data on a Typeclassed object you normally use the `db` (DataBase) operator. Let's To save persistent data on a Typeclassed object you normally use the `db` (DataBase) operator. Let's
try to save some data to a *Rose* (an [Object](Objects)): try to save some data to a *Rose* (an [Object](./Objects)):
```python ```python
# saving # saving
@ -87,13 +87,13 @@ The handlers have normal access methods that allow you to manage and retrieve `A
returned, but the method takes keywords for returning the Attribute object itself. By supplying an returned, but the method takes keywords for returning the Attribute object itself. By supplying an
`accessing_object` to the call one can also make sure to check permissions before modifying `accessing_object` to the call one can also make sure to check permissions before modifying
anything. anything.
- `add(...)` - this adds a new Attribute to the object. An optional [lockstring](Locks) can be - `add(...)` - this adds a new Attribute to the object. An optional [lockstring](./Locks) can be
supplied here to restrict future access and also the call itself may be checked against locks. supplied here to restrict future access and also the call itself may be checked against locks.
- `remove(...)` - Remove the given Attribute. This can optionally be made to check for permission - `remove(...)` - Remove the given Attribute. This can optionally be made to check for permission
before performing the deletion. - `clear(...)` - removes all Attributes from object. before performing the deletion. - `clear(...)` - removes all Attributes from object.
- `all(...)` - returns all Attributes (of the given category) attached to this object. - `all(...)` - returns all Attributes (of the given category) attached to this object.
See [this section](Attributes#locking-and-checking-attributes) for more about locking down Attribute See [this section](./Attributes#locking-and-checking-attributes) for more about locking down Attribute
access and editing. The `Nattribute` offers no concept of access control. access and editing. The `Nattribute` offers no concept of access control.
Some examples: Some examples:
@ -118,23 +118,23 @@ An Attribute object is stored in the database. It has the following properties:
to `attrname`. to `attrname`.
- `value` - this is the value of the Attribute. This value can be anything which can be pickled - - `value` - this is the value of the Attribute. This value can be anything which can be pickled -
objects, lists, numbers or what have you (see objects, lists, numbers or what have you (see
[this section](Attributes#What_types_of_data_can_I_save_in_an_Attribute) for more info). In the [this section](./Attributes#What_types_of_data_can_I_save_in_an_Attribute) for more info). In the
example example
`obj.db.attrname = value`, the `value` is stored here. `obj.db.attrname = value`, the `value` is stored here.
- `category` - this is an optional property that is set to None for most Attributes. Setting this - `category` - this is an optional property that is set to None for most Attributes. Setting this
allows to use Attributes for different functionality. This is usually not needed unless you want allows to use Attributes for different functionality. This is usually not needed unless you want
to use Attributes for very different functionality ([Nicks](Nicks) is an example of using to use Attributes for very different functionality ([Nicks](./Nicks) is an example of using
Attributes Attributes
in this way). To modify this property you need to use the [Attribute in this way). To modify this property you need to use the [Attribute
Handler](Attributes#The_Attribute_Handler). Handler](Attributes#The_Attribute_Handler).
- `strvalue` - this is a separate value field that only accepts strings. This severely limits the - `strvalue` - this is a separate value field that only accepts strings. This severely limits the
data possible to store, but allows for easier database lookups. This property is usually not used data possible to store, but allows for easier database lookups. This property is usually not used
except when re-using Attributes for some other purpose ([Nicks](Nicks) use it). It is only except when re-using Attributes for some other purpose ([Nicks](./Nicks) use it). It is only
accessible via the [Attribute Handler](Attributes#The_Attribute_Handler). accessible via the [Attribute Handler](./Attributes#The_Attribute_Handler).
There are also two special properties: There are also two special properties:
- `attrtype` - this is used internally by Evennia to separate [Nicks](Nicks), from Attributes (Nicks - `attrtype` - this is used internally by Evennia to separate [Nicks](./Nicks), from Attributes (Nicks
use Attributes behind the scenes). use Attributes behind the scenes).
- `model` - this is a *natural-key* describing the model this Attribute is attached to. This is on - `model` - this is a *natural-key* describing the model this Attribute is attached to. This is on
the form *appname.modelclass*, like `objects.objectdb`. It is used by the Attribute and the form *appname.modelclass*, like `objects.objectdb`. It is used by the Attribute and
@ -162,7 +162,7 @@ default
during heavy loads. during heavy loads.
- A more valid reason for using non-persistent data is if you *want* to lose your state when logging - A more valid reason for using non-persistent data is if you *want* to lose your state when logging
off. Maybe you are storing throw-away data that are re-initialized at server startup. Maybe you off. Maybe you are storing throw-away data that are re-initialized at server startup. Maybe you
are implementing some caching of your own. Or maybe you are testing a buggy [Script](Scripts) that are implementing some caching of your own. Or maybe you are testing a buggy [Script](./Scripts) that
does potentially harmful stuff to your character object. With non-persistent storage you can be does potentially harmful stuff to your character object. With non-persistent storage you can be
sure sure
that whatever is messed up, it's nothing a server reboot can't clear up. that whatever is messed up, it's nothing a server reboot can't clear up.
@ -192,7 +192,7 @@ not a big deal. But if you are accessing the Attribute as part of some big loop
amount of reads/writes you should first extract it to a temporary variable, operate on *that* and amount of reads/writes you should first extract it to a temporary variable, operate on *that* and
then save the result back to the Attribute. If you are storing a more complex structure like a then save the result back to the Attribute. If you are storing a more complex structure like a
`dict` or a `list` you should make sure to "disconnect" it from the database before looping over it, `dict` or a `list` you should make sure to "disconnect" it from the database before looping over it,
as mentioned in the [Retrieving Mutable Objects](Attributes#retrieving-mutable-objects) section as mentioned in the [Retrieving Mutable Objects](./Attributes#retrieving-mutable-objects) section
below. below.
### Storing single objects ### Storing single objects
@ -248,7 +248,7 @@ containing dicts, etc.
Since you can use any combination of the above iterables, this is generally not much of a Since you can use any combination of the above iterables, this is generally not much of a
limitation. limitation.
Any entity listed in the [Single object](Attributes#Storing-Single-Objects) section above can be Any entity listed in the [Single object](./Attributes#Storing-Single-Objects) section above can be
stored in the iterable. stored in the iterable.
> As mentioned in the previous section, database entities (aka typeclasses) are not possible to > As mentioned in the previous section, database entities (aka typeclasses) are not possible to
@ -355,7 +355,7 @@ already disconnected from the database from the onset.
Attributes are normally not locked down by default, but you can easily change that for individual Attributes are normally not locked down by default, but you can easily change that for individual
Attributes (like those that may be game-sensitive in games with user-level building). Attributes (like those that may be game-sensitive in games with user-level building).
First you need to set a *lock string* on your Attribute. Lock strings are specified [Locks](Locks). First you need to set a *lock string* on your Attribute. Lock strings are specified [Locks](./Locks).
The relevant lock types are The relevant lock types are
- `attrread` - limits who may read the value of the Attribute - `attrread` - limits who may read the value of the Attribute

View file

@ -1,7 +1,7 @@
# Batch Code Processor # Batch Code Processor
For an introduction and motivation to using batch processors, see [here](Batch-Processors). This For an introduction and motivation to using batch processors, see [here](./Batch-Processors). This
page describes the Batch-*code* processor. The Batch-*command* one is covered [here](Batch-Command- page describes the Batch-*code* processor. The Batch-*command* one is covered [here](Batch-Command-
Processor). Processor).
@ -192,7 +192,7 @@ connect that room with a room you built in the current block. There are two ways
- Perform a database search for the name of the room you created (since you cannot know in advance - Perform a database search for the name of the room you created (since you cannot know in advance
which dbref it got assigned). The problem is that a name may not be unique (you may have a lot of "A which dbref it got assigned). The problem is that a name may not be unique (you may have a lot of "A
dark forest" rooms). There is an easy way to handle this though - use [Tags](Tags) or *Aliases*. You dark forest" rooms). There is an easy way to handle this though - use [Tags](./Tags) or *Aliases*. You
can assign any number of tags and/or aliases to any object. Make sure that one of those tags or can assign any number of tags and/or aliases to any object. Make sure that one of those tags or
aliases is unique to the room (like "room56") and you will henceforth be able to always uniquely aliases is unique to the room (like "room56") and you will henceforth be able to always uniquely
search and find it later. search and find it later.

View file

@ -1,7 +1,7 @@
# Batch Command Processor # Batch Command Processor
For an introduction and motivation to using batch processors, see [here](Batch-Processors). This For an introduction and motivation to using batch processors, see [here](./Batch-Processors). This
page describes the Batch-*command* processor. The Batch-*code* one is covered [here](Batch-Code- page describes the Batch-*command* processor. The Batch-*code* one is covered [here](Batch-Code-
Processor). Processor).
@ -152,7 +152,7 @@ when creating the file, so that you can 'walk' (or teleport) to the right places
This also means there are several pitfalls when designing and adding certain types of objects. Here This also means there are several pitfalls when designing and adding certain types of objects. Here
are some examples: are some examples:
- *Rooms that change your [Command Set](Command-Sets)*: Imagine that you build a 'dark' room, which - *Rooms that change your [Command Set](./Command-Sets)*: Imagine that you build a 'dark' room, which
severely limits the cmdsets of those entering it (maybe you have to find the light switch to severely limits the cmdsets of those entering it (maybe you have to find the light switch to
proceed). In your batch script you would create this room, then teleport to it - and promptly be proceed). In your batch script you would create this room, then teleport to it - and promptly be
shifted into the dark state where none of your normal build commands work ... shifted into the dark state where none of your normal build commands work ...

View file

@ -35,8 +35,8 @@ just list in-game commands in a text file. The code-processor on the other hand
powerful but also more complex - it lets you use Evennia's API to code your world in full-fledged powerful but also more complex - it lets you use Evennia's API to code your world in full-fledged
Python code. Python code.
- The [Batch Command Processor](Batch-Command-Processor) - The [Batch Command Processor](./Batch-Command-Processor)
- The [Batch Code Processor](Batch-Code-Processor) - The [Batch Code Processor](./Batch-Code-Processor)
If you plan to use international characters in your batchfiles you are wise to read about *file If you plan to use international characters in your batchfiles you are wise to read about *file
encodings* below. encodings* below.

View file

@ -1,3 +1,3 @@
# Channels # Channels
TODO: Channels are covered in [Communications](Communications) right now. TODO: Channels are covered in [Communications](./Communications) right now.

View file

@ -181,13 +181,13 @@ number of seconds. This is a very light wrapper over a Twisted
non-persistently, which means that if the server is `@reload`ed before the delay is over, the non-persistently, which means that if the server is `@reload`ed before the delay is over, the
callback will never run (the server forgets it). If setting `persistent` to True, the delay will be callback will never run (the server forgets it). If setting `persistent` to True, the delay will be
stored in the database and survive a `@reload` - but for this to work it is susceptible to the same stored in the database and survive a `@reload` - but for this to work it is susceptible to the same
limitations incurred when saving to an [Attribute](Attributes). limitations incurred when saving to an [Attribute](./Attributes).
The `deferred` return object can usually be ignored, but calling its `.cancel()` method will abort The `deferred` return object can usually be ignored, but calling its `.cancel()` method will abort
the delay prematurely. the delay prematurely.
`utils.delay` is the lightest form of delayed call in Evennia. For other way to create time-bound `utils.delay` is the lightest form of delayed call in Evennia. For other way to create time-bound
tasks, see the [TickerHandler](TickerHandler) and [Scripts](Scripts). tasks, see the [TickerHandler](./TickerHandler) and [Scripts](./Scripts).
> Note that many delayed effects can be achieved without any need for an active timer. For example > Note that many delayed effects can be achieved without any need for an active timer. For example
if you have a trait that should recover a point every 5 seconds you might just need its value when if you have a trait that should recover a point every 5 seconds you might just need its value when
@ -203,7 +203,7 @@ classes, instances or python-paths-to-classes.
Note that Python code should usually work with [duck Note that Python code should usually work with [duck
typing](http://en.wikipedia.org/wiki/Duck_typing). But in Evennia's case it can sometimes be useful typing](http://en.wikipedia.org/wiki/Duck_typing). But in Evennia's case it can sometimes be useful
to check if an object inherits from a given [Typeclass](Typeclasses) as a way of identification. Say to check if an object inherits from a given [Typeclass](./Typeclasses) as a way of identification. Say
for example that we have a typeclass *Animal*. This has a subclass *Felines* which in turn has a for example that we have a typeclass *Animal*. This has a subclass *Felines* which in turn has a
subclass *HouseCat*. Maybe there are a bunch of other animal types too, like horses and dogs. Using subclass *HouseCat*. Maybe there are a bunch of other animal types too, like horses and dogs. Using
`inherits_from` will allow you to check for all animals in one go: `inherits_from` will allow you to check for all animals in one go:

View file

@ -1,7 +1,7 @@
# Command Sets # Command Sets
Command Sets are intimately linked with [Commands](Commands) and you should be familiar with Command Sets are intimately linked with [Commands](./Commands) and you should be familiar with
Commands before reading this page. The two pages were split for ease of reading. Commands before reading this page. The two pages were split for ease of reading.
A *Command Set* (often referred to as a CmdSet or cmdset) is the basic unit for storing one or more A *Command Set* (often referred to as a CmdSet or cmdset) is the basic unit for storing one or more
@ -11,7 +11,7 @@ classes in a command set is the way to make commands available to use in your ga
When storing a CmdSet on an object, you will make the commands in that command set available to the When storing a CmdSet on an object, you will make the commands in that command set available to the
object. An example is the default command set stored on new Characters. This command set contains object. An example is the default command set stored on new Characters. This command set contains
all the useful commands, from `look` and `inventory` to `@dig` and `@reload` all the useful commands, from `look` and `inventory` to `@dig` and `@reload`
([permissions](Locks#Permissions) then limit which players may use them, but that's a separate ([permissions](./Locks#Permissions) then limit which players may use them, but that's a separate
topic). topic).
When an account enters a command, cmdsets from the Account, Character, its location, and elsewhere When an account enters a command, cmdsets from the Account, Character, its location, and elsewhere
@ -116,7 +116,7 @@ adding commands, read the [Step by step tutorial](../Howto/Starting/Part1/Adding
customize which command sets are added to your objects by using `self.cmdset.add()` or customize which command sets are added to your objects by using `self.cmdset.add()` or
`self.cmdset.add_default()`. `self.cmdset.add_default()`.
> Important: Commands are identified uniquely by key *or* alias (see [Commands](Commands)). If any > Important: Commands are identified uniquely by key *or* alias (see [Commands](./Commands)). If any
overlap exists, two commands are considered identical. Adding a Command to a command set that overlap exists, two commands are considered identical. Adding a Command to a command set that
already has an identical command will *replace* the previous command. This is very important. You already has an identical command will *replace* the previous command. This is very important. You
must take this behavior into account when attempting to overload any default Evennia commands with must take this behavior into account when attempting to overload any default Evennia commands with
@ -127,7 +127,7 @@ new one that has a matching alias.
There are several extra flags that you can set on CmdSets in order to modify how they work. All are There are several extra flags that you can set on CmdSets in order to modify how they work. All are
optional and will be set to defaults otherwise. Since many of these relate to *merging* cmdsets, optional and will be set to defaults otherwise. Since many of these relate to *merging* cmdsets,
you might want to read the [Adding and Merging Command Sets](Command-Sets#adding-and-merging- you might want to read the [Adding and Merging Command Sets](./Command-Sets#adding-and-merging-
command-sets) section for some of these to make sense. command-sets) section for some of these to make sense.
- `key` (string) - an identifier for the cmdset. This is optional, but should be unique. It is used - `key` (string) - an identifier for the cmdset. This is optional, but should be unique. It is used
@ -195,15 +195,15 @@ priority determines what is used.
## Command Sets Searched ## Command Sets Searched
When a user issues a command, it is matched against the [merged](Command-Sets#adding-and-merging- When a user issues a command, it is matched against the [merged](./Command-Sets#adding-and-merging-
command-sets) command sets available to the player at the moment. Which those are may change at any command-sets) command sets available to the player at the moment. Which those are may change at any
time (such as when the player walks into the room with the `Window` object described earlier). time (such as when the player walks into the room with the `Window` object described earlier).
The currently valid command sets are collected from the following sources: The currently valid command sets are collected from the following sources:
- The cmdsets stored on the currently active [Session](Sessions). Default is the empty - The cmdsets stored on the currently active [Session](./Sessions). Default is the empty
`SessionCmdSet` with merge priority `-20`. `SessionCmdSet` with merge priority `-20`.
- The cmdsets defined on the [Account](Accounts). Default is the AccountCmdSet with merge priority - The cmdsets defined on the [Account](./Accounts). Default is the AccountCmdSet with merge priority
`-10`. `-10`.
- All cmdsets on the Character/Object (assuming the Account is currently puppeting such a - All cmdsets on the Character/Object (assuming the Account is currently puppeting such a
Character/Object). Merge priority `0`. Character/Object). Merge priority `0`.
@ -215,14 +215,14 @@ included if `no_objs` option is active in the merge stack.
`no_objs` option is active in the merge stack. `no_objs` option is active in the merge stack.
- The cmdsets of Exits in the location. Merge priority `+101`. Will not be included if `no_exits` - The cmdsets of Exits in the location. Merge priority `+101`. Will not be included if `no_exits`
*or* `no_objs` option is active in the merge stack. *or* `no_objs` option is active in the merge stack.
- The [channel](Communications) cmdset containing commands for posting to all channels the account - The [channel](./Communications) cmdset containing commands for posting to all channels the account
or character is currently connected to. Merge priority `+101`. Will not be included if `no_channels` or character is currently connected to. Merge priority `+101`. Will not be included if `no_channels`
option is active in the merge stack. option is active in the merge stack.
Note that an object does not *have* to share its commands with its surroundings. A Character's Note that an object does not *have* to share its commands with its surroundings. A Character's
cmdsets should not be shared for example, or all other Characters would get multi-match errors just cmdsets should not be shared for example, or all other Characters would get multi-match errors just
by being in the same room. The ability of an object to share its cmdsets is managed by its `call` by being in the same room. The ability of an object to share its cmdsets is managed by its `call`
[lock](Locks). For example, [Character objects](Objects) defaults to `call:false()` so that any [lock](./Locks). For example, [Character objects](./Objects) defaults to `call:false()` so that any
cmdsets on them can only be accessed by themselves, not by other objects around them. Another cmdsets on them can only be accessed by themselves, not by other objects around them. Another
example might be to lock an object with `call:inside()` to only make their commands available to example might be to lock an object with `call:inside()` to only make their commands available to
objects inside them, or `cmd:holds()` to make their commands available only if they are held. objects inside them, or `cmd:holds()` to make their commands available only if they are held.

View file

@ -1,14 +1,14 @@
# Commands # Commands
Commands are intimately linked to [Command Sets](Command-Sets) and you need to read that page too to Commands are intimately linked to [Command Sets](./Command-Sets) and you need to read that page too to
be familiar with how the command system works. The two pages were split for easy reading. be familiar with how the command system works. The two pages were split for easy reading.
The basic way for users to communicate with the game is through *Commands*. These can be commands The basic way for users to communicate with the game is through *Commands*. These can be commands
directly related to the game world such as *look*, *get*, *drop* and so on, or administrative directly related to the game world such as *look*, *get*, *drop* and so on, or administrative
commands such as *examine* or *@dig*. commands such as *examine* or *@dig*.
The [default commands](Default-Command-Help) coming with Evennia are 'MUX-like' in that they use @ The [default commands](./Default-Command-Help) coming with Evennia are 'MUX-like' in that they use @
for admin commands, support things like switches, syntax with the '=' symbol etc, but there is for admin commands, support things like switches, syntax with the '=' symbol etc, but there is
nothing that prevents you from implementing a completely different command scheme for your game. You nothing that prevents you from implementing a completely different command scheme for your game. You
can find the default commands in `evennia/commands/default`. You should not edit these directly - can find the default commands in `evennia/commands/default`. You should not edit these directly -
@ -16,7 +16,7 @@ they will be updated by the Evennia team as new features are added. Rather you s
for inspiration and inherit your own designs from them. for inspiration and inherit your own designs from them.
There are two components to having a command running - the *Command* class and the There are two components to having a command running - the *Command* class and the
[Command Set](Command-Sets) (command sets were split into a separate wiki page for ease of reading). [Command Set](./Command-Sets) (command sets were split into a separate wiki page for ease of reading).
1. A *Command* is a python class containing all the functioning code for what a command does - for 1. A *Command* is a python class containing all the functioning code for what a command does - for
example, a *get* command would contain code for picking up objects. example, a *get* command would contain code for picking up objects.
@ -28,7 +28,7 @@ object in various ways. Consider a "Tree" object with a cmdset defining the comm
*chop down*. Or a "Clock" with a cmdset containing the single command *check time*. *chop down*. Or a "Clock" with a cmdset containing the single command *check time*.
This page goes into full detail about how to use Commands. To fully use them you must also read the This page goes into full detail about how to use Commands. To fully use them you must also read the
page detailing [Command Sets](Command-Sets). There is also a step-by-step page detailing [Command Sets](./Command-Sets). There is also a step-by-step
[Adding Command Tutorial](../Howto/Starting/Part1/Adding-Commands) that will get you started quickly without the [Adding Command Tutorial](../Howto/Starting/Part1/Adding-Commands) that will get you started quickly without the
extra explanations. extra explanations.
@ -81,15 +81,15 @@ In Evennia there are three types of objects that may call the command. It is im
of this since this will also assign appropriate `caller`, `session`, `sessid` and `account` of this since this will also assign appropriate `caller`, `session`, `sessid` and `account`
properties on the command body at runtime. Most often the calling type is `Session`. properties on the command body at runtime. Most often the calling type is `Session`.
* A [Session](Sessions). This is by far the most common case when a user is entering a command in * A [Session](./Sessions). This is by far the most common case when a user is entering a command in
their client. their client.
* `caller` - this is set to the puppeted [Object](Objects) if such an object exists. If no * `caller` - this is set to the puppeted [Object](./Objects) if such an object exists. If no
puppet is found, `caller` is set equal to `account`. Only if an Account is not found either (such as puppet is found, `caller` is set equal to `account`. Only if an Account is not found either (such as
before being logged in) will this be set to the Session object itself. before being logged in) will this be set to the Session object itself.
* `session` - a reference to the [Session](Sessions) object itself. * `session` - a reference to the [Session](./Sessions) object itself.
* `sessid` - `sessid.id`, a unique integer identifier of the session. * `sessid` - `sessid.id`, a unique integer identifier of the session.
* `account` - the [Account](Accounts) object connected to this Session. None if not logged in. * `account` - the [Account](./Accounts) object connected to this Session. None if not logged in.
* An [Account](Accounts). This only happens if `account.execute_cmd()` was used. No Session * An [Account](./Accounts). This only happens if `account.execute_cmd()` was used. No Session
information can be obtained in this case. information can be obtained in this case.
* `caller` - this is set to the puppeted Object if such an object can be determined (without * `caller` - this is set to the puppeted Object if such an object can be determined (without
Session info this can only be determined in `MULTISESSION_MODE=0` or `1`). If no puppet is found, Session info this can only be determined in `MULTISESSION_MODE=0` or `1`). If no puppet is found,
@ -97,7 +97,7 @@ this is equal to `account`.
* `session` - `None*` * `session` - `None*`
* `sessid` - `None*` * `sessid` - `None*`
* `account` - Set to the Account object. * `account` - Set to the Account object.
* An [Object](Objects). This only happens if `object.execute_cmd()` was used (for example by an * An [Object](./Objects). This only happens if `object.execute_cmd()` was used (for example by an
NPC). NPC).
* `caller` - This is set to the calling Object in question. * `caller` - This is set to the calling Object in question.
* `session` - `None*` * `session` - `None*`
@ -120,10 +120,10 @@ it the following properties:
- `caller` - The character BigGuy, in this example. This is a reference to the object executing the - `caller` - The character BigGuy, in this example. This is a reference to the object executing the
command. The value of this depends on what type of object is calling the command; see the previous command. The value of this depends on what type of object is calling the command; see the previous
section. section.
- `session` - the [Session](Sessions) Bob uses to connect to the game and control BigGuy (see also - `session` - the [Session](./Sessions) Bob uses to connect to the game and control BigGuy (see also
previous section). previous section).
- `sessid` - the unique id of `self.session`, for quick lookup. - `sessid` - the unique id of `self.session`, for quick lookup.
- `account` - the [Account](Accounts) Bob (see previous section). - `account` - the [Account](./Accounts) Bob (see previous section).
- `cmdstring` - the matched key for the command. This would be *look* in our example. - `cmdstring` - the matched key for the command. This would be *look* in our example.
- `args` - this is the rest of the string, except the command name. So if the string entered was - `args` - this is the rest of the string, except the command name. So if the string entered was
*look at sword*, `args` would be " *at sword*". Note the space kept - Evennia would correctly *look at sword*, `args` would be " *at sword*". Note the space kept - Evennia would correctly
@ -131,7 +131,7 @@ interpret `lookat sword` too. This is useful for things like `/switches` that sh
In the `MuxCommand` class used for default commands, this space is stripped. Also see the In the `MuxCommand` class used for default commands, this space is stripped. Also see the
`arg_regex` property if you want to enforce a space to make `lookat sword` give a command-not-found `arg_regex` property if you want to enforce a space to make `lookat sword` give a command-not-found
error. error.
- `obj` - the game [Object](Objects) on which this command is defined. This need not be the caller, - `obj` - the game [Object](./Objects) on which this command is defined. This need not be the caller,
but since `look` is a common (default) command, this is probably defined directly on *BigGuy* - so but since `look` is a common (default) command, this is probably defined directly on *BigGuy* - so
`obj` will point to BigGuy. Otherwise `obj` could be an Account or any interactive object with `obj` will point to BigGuy. Otherwise `obj` could be an Account or any interactive object with
commands defined on it, like in the example of the "check time" command defined on a "Clock" object. commands defined on it, like in the example of the "check time" command defined on a "Clock" object.
@ -169,7 +169,7 @@ key can consist of more than one word, like "press button" or "pull left lever".
either matches. This is important for merging cmdsets described below. either matches. This is important for merging cmdsets described below.
- `aliases` (optional list) - a list of alternate names for the command (`["glance", "see", "l"]`). - `aliases` (optional list) - a list of alternate names for the command (`["glance", "see", "l"]`).
Same name rules as for `key` applies. Same name rules as for `key` applies.
- `locks` (string) - a [lock definition](Locks), usually on the form `cmd:<lockfuncs>`. Locks is a - `locks` (string) - a [lock definition](./Locks), usually on the form `cmd:<lockfuncs>`. Locks is a
rather big topic, so until you learn more about locks, stick to giving the lockstring `"cmd:all()"` rather big topic, so until you learn more about locks, stick to giving the lockstring `"cmd:all()"`
to make the command available to everyone (if you don't provide a lock string, this will be assigned to make the command available to everyone (if you don't provide a lock string, this will be assigned
for you). for you).
@ -181,9 +181,9 @@ by the next command by retrieving `self.caller.ndb.last_cmd`. The next run comma
or replace the storage. or replace the storage.
- `arg_regex` (optional raw string): Used to force the parser to limit itself and tell it when the - `arg_regex` (optional raw string): Used to force the parser to limit itself and tell it when the
command-name ends and arguments begin (such as requiring this to be a space or a /switch). This is command-name ends and arguments begin (such as requiring this to be a space or a /switch). This is
done with a regular expression. [See the arg_regex section](Commands#on-arg_regex) for the details. done with a regular expression. [See the arg_regex section](./Commands#on-arg_regex) for the details.
- `auto_help` (optional boolean). Defaults to `True`. This allows for turning off the - `auto_help` (optional boolean). Defaults to `True`. This allows for turning off the
[auto-help system](Help-System#command-auto-help-system) on a per-command basis. This could be useful if you [auto-help system](./Help-System#command-auto-help-system) on a per-command basis. This could be useful if you
either want to write your help entries manually or hide the existence of a command from `help`'s either want to write your help entries manually or hide the existence of a command from `help`'s
generated list. generated list.
- `is_exit` (bool) - this marks the command as being used for an in-game exit. This is, by default, - `is_exit` (bool) - this marks the command as being used for an in-game exit. This is, by default,
@ -219,7 +219,7 @@ from this method will be returned from the execution as a Twisted Deferred.
Finally, you should always make an informative [doc Finally, you should always make an informative [doc
string](http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring) (`__doc__`) at the top of your string](http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring) (`__doc__`) at the top of your
class. This string is dynamically read by the [Help System](Help-System) to create the help entry class. This string is dynamically read by the [Help System](./Help-System) to create the help entry
for this command. You should decide on a way to format your help and stick to that. for this command. You should decide on a way to format your help and stick to that.
Below is how you define a simple alternative "`smile`" command: Below is how you define a simple alternative "`smile`" command:
@ -277,7 +277,7 @@ default commands thus need to implement `parse()` at all, but can assume the
incoming string is already split up and parsed in suitable ways by its parent. incoming string is already split up and parsed in suitable ways by its parent.
Before you can actually use the command in your game, you must now store it Before you can actually use the command in your game, you must now store it
within a *command set*. See the [Command Sets](Command-Sets) page. within a *command set*. See the [Command Sets](./Command-Sets) page.
### On arg_regex ### On arg_regex
@ -428,7 +428,7 @@ will show.
> Note again that the `yield` keyword does not store state. If the game reloads while waiting for > Note again that the `yield` keyword does not store state. If the game reloads while waiting for
the user to answer, the user will have to start over. It is not a good idea to use `yield` for the user to answer, the user will have to start over. It is not a good idea to use `yield` for
important or complex choices, a persistent [EvMenu](EvMenu) might be more appropriate in this case. important or complex choices, a persistent [EvMenu](./EvMenu) might be more appropriate in this case.
## System commands ## System commands
@ -458,7 +458,7 @@ display the "Huh?" error message.
matches. matches.
- User is not allowed to execute the command (`syscmdkeys.CMD_NOPERM`) - Default is to display the - User is not allowed to execute the command (`syscmdkeys.CMD_NOPERM`) - Default is to display the
"Huh?" error message. "Huh?" error message.
- Channel (`syscmdkeys.CMD_CHANNEL`) - This is a [Channel](Communications) name of a channel you are - Channel (`syscmdkeys.CMD_CHANNEL`) - This is a [Channel](./Communications) name of a channel you are
subscribing to - Default is to relay the command's argument to that channel. Such commands are subscribing to - Default is to relay the command's argument to that channel. Such commands are
created by the Comm system on the fly depending on your subscriptions. created by the Comm system on the fly depending on your subscriptions.
- New session connection (`syscmdkeys.CMD_LOGINSTART`). This command name should be put in the - New session connection (`syscmdkeys.CMD_LOGINSTART`). This command name should be put in the
@ -485,7 +485,7 @@ work.
Normally Commands are created as fixed classes and used without modification. There are however Normally Commands are created as fixed classes and used without modification. There are however
situations when the exact key, alias or other properties is not possible (or impractical) to pre- situations when the exact key, alias or other properties is not possible (or impractical) to pre-
code ([Exits](Commands#Exits) is an example of this). code ([Exits](./Commands#Exits) is an example of this).
To create a command with a dynamic call signature, first define the command body normally in a class To create a command with a dynamic call signature, first define the command body normally in a class
(set your `key`, `aliases` to default values), then use the following call (assuming the command (set your `key`, `aliases` to default values), then use the following call (assuming the command
@ -509,10 +509,10 @@ make your command completely customized at run-time.
*Note: This is an advanced topic.* *Note: This is an advanced topic.*
Exits are examples of the use of a [Dynamic Command](Commands#Dynamic_Commands). Exits are examples of the use of a [Dynamic Command](./Commands#Dynamic_Commands).
The functionality of [Exit](Objects) objects in Evennia is not hard-coded in the engine. Instead The functionality of [Exit](./Objects) objects in Evennia is not hard-coded in the engine. Instead
Exits are normal [typeclassed](Typeclasses) objects that auto-create a [CmdSet](Commands#CmdSets) on Exits are normal [typeclassed](./Typeclasses) objects that auto-create a [CmdSet](./Commands#CmdSets) on
themselves when they load. This cmdset has a single dynamically created Command with the same themselves when they load. This cmdset has a single dynamically created Command with the same
properties (key, aliases and locks) as the Exit object itself. When entering the name of the exit, properties (key, aliases and locks) as the Exit object itself. When entering the name of the exit,
this dynamic exit-command is triggered and (after access checks) moves the Character to the exit's this dynamic exit-command is triggered and (after access checks) moves the Character to the exit's
@ -610,9 +610,9 @@ cmdset, ignore.
- CmdSets defined on the current account, if caller is a puppeted object. - CmdSets defined on the current account, if caller is a puppeted object.
- CmdSets defined on the Session itself. - CmdSets defined on the Session itself.
- The active CmdSets of eventual objects in the same location (if any). This includes commands - The active CmdSets of eventual objects in the same location (if any). This includes commands
on [Exits](Objects#Exits). on [Exits](./Objects#Exits).
- Sets of dynamically created *System commands* representing available - Sets of dynamically created *System commands* representing available
[Communications](Communications#Channels). [Communications](./Communications#Channels).
7. All CmdSets *of the same priority* are merged together in groups. Grouping avoids order- 7. All CmdSets *of the same priority* are merged together in groups. Grouping avoids order-
dependent issues of merging multiple same-prio sets onto lower ones. dependent issues of merging multiple same-prio sets onto lower ones.
8. All the grouped CmdSets are *merged* in reverse priority into one combined CmdSet according to 8. All the grouped CmdSets are *merged* in reverse priority into one combined CmdSet according to

View file

@ -12,7 +12,7 @@ mimics the API of a `Msg` but has no connection to the database.
## Msg ## Msg
The `Msg` object is the basic unit of communication in Evennia. A message works a little like an The `Msg` object is the basic unit of communication in Evennia. A message works a little like an
e-mail; it always has a sender (a [Account](Accounts)) and one or more recipients. The recipients e-mail; it always has a sender (a [Account](./Accounts)) and one or more recipients. The recipients
may be either other Accounts, or a *Channel* (see below). You can mix recipients to send the message may be either other Accounts, or a *Channel* (see below). You can mix recipients to send the message
to both Channels and Accounts if you like. to both Channels and Accounts if you like.
@ -22,16 +22,16 @@ have 'mailboxes' with the messages they want to keep.
### Properties defined on `Msg` ### Properties defined on `Msg`
- `senders` - this is a reference to one or many [Account](Accounts) or [Objects](Objects) (normally - `senders` - this is a reference to one or many [Account](./Accounts) or [Objects](./Objects) (normally
*Characters*) sending the message. This could also be an *External Connection* such as a message *Characters*) sending the message. This could also be an *External Connection* such as a message
coming in over IRC/IMC2 (see below). There is usually only one sender, but the types can also be coming in over IRC/IMC2 (see below). There is usually only one sender, but the types can also be
mixed in any combination. mixed in any combination.
- `receivers` - a list of target [Accounts](Accounts), [Objects](Objects) (usually *Characters*) or - `receivers` - a list of target [Accounts](./Accounts), [Objects](./Objects) (usually *Characters*) or
*Channels* to send the message to. The types of receivers can be mixed in any combination. *Channels* to send the message to. The types of receivers can be mixed in any combination.
- `header` - this is a text field for storing a title or header for the message. - `header` - this is a text field for storing a title or header for the message.
- `message` - the actual text being sent. - `message` - the actual text being sent.
- `date_sent` - when message was sent (auto-created). - `date_sent` - when message was sent (auto-created).
- `locks` - a [lock definition](Locks). - `locks` - a [lock definition](./Locks).
- `hide_from` - this can optionally hold a list of objects, accounts or channels to hide this `Msg` - `hide_from` - this can optionally hold a list of objects, accounts or channels to hide this `Msg`
from. This relationship is stored in the database primarily for optimization reasons, allowing for from. This relationship is stored in the database primarily for optimization reasons, allowing for
quickly post-filter out messages not intended for a given target. There is no in-game methods for quickly post-filter out messages not intended for a given target. There is no in-game methods for
@ -48,16 +48,16 @@ system expecting a `Msg` but when you don't actually want to save anything.
## Channels ## Channels
Channels are [Typeclassed](Typeclasses) entities, which mean they can be easily extended and their Channels are [Typeclassed](./Typeclasses) entities, which mean they can be easily extended and their
functionality modified. To change which channel typeclass Evennia uses, change functionality modified. To change which channel typeclass Evennia uses, change
settings.BASE_CHANNEL_TYPECLASS. settings.BASE_CHANNEL_TYPECLASS.
Channels act as generic distributors of messages. Think of them as "switch boards" redistributing Channels act as generic distributors of messages. Think of them as "switch boards" redistributing
`Msg` or `TempMsg` objects. Internally they hold a list of "listening" objects and any `Msg` (or `Msg` or `TempMsg` objects. Internally they hold a list of "listening" objects and any `Msg` (or
`TempMsg`) sent to the channel will be distributed out to all channel listeners. Channels have `TempMsg`) sent to the channel will be distributed out to all channel listeners. Channels have
[Locks](Locks) to limit who may listen and/or send messages through them. [Locks](./Locks) to limit who may listen and/or send messages through them.
The *sending* of text to a channel is handled by a dynamically created [Command](Commands) that The *sending* of text to a channel is handled by a dynamically created [Command](./Commands) that
always have the same name as the channel. This is created for each channel by the global always have the same name as the channel. This is created for each channel by the global
`ChannelHandler`. The Channel command is added to the Account's cmdset and normal command locks are `ChannelHandler`. The Channel command is added to the Account's cmdset and normal command locks are
used to determine which channels are possible to write to. When subscribing to a channel, you can used to determine which channels are possible to write to. When subscribing to a channel, you can
@ -109,5 +109,5 @@ for channel communication (since the default ChannelCommand instead logs to a fi
- `aliases` - alternative native names for channels - `aliases` - alternative native names for channels
- `desc` - optional description of channel (seen in listings) - `desc` - optional description of channel (seen in listings)
- `keep_log` (bool) - if the channel should store messages (default) - `keep_log` (bool) - if the channel should store messages (default)
- `locks` - A [lock definition](Locks). Channels normally use the access_types `send, control` and - `locks` - A [lock definition](./Locks). Channels normally use the access_types `send, control` and
`listen`. `listen`.

View file

@ -5,49 +5,49 @@ than, the doc-strings of each component in the [API](../Evennia-API).
## Database entites ## Database entites
- [Typeclasses](Typeclasses) - [Typeclasses](./Typeclasses)
- [Sessions](Sessions) - [Sessions](./Sessions)
- [Acccounts](Accounts) - [Acccounts](./Accounts)
- [Guests](../Concept/Guest-Logins) - [Guests](../Concept/Guest-Logins)
- [Objects](Objects) - [Objects](./Objects)
- [Scripts](Scripts) - [Scripts](./Scripts)
- [Channels and Messages](Communications) - [Channels and Messages](./Communications)
- [Attributes](Attributes) - [Attributes](./Attributes)
- [Nicks](Nicks) - [Nicks](./Nicks)
- [Tags](Tags) - [Tags](./Tags)
- [Help system](Help-System) - [Help system](./Help-System)
- [Spawner and prototypes](Spawner-and-Prototypes) - [Spawner and prototypes](./Spawner-and-Prototypes)
## Commands ## Commands
- [Command-System](Command system) - [Command-System](Command system)
- [Command-Sets](Command-Sets) - [Command-Sets](./Command-Sets)
- [Commands](Commands) - [Commands](./Commands)
- [The Connection Screen](Connection-Screen) - [The Connection Screen](./Connection-Screen)
- [Available default Commands](Default-Command-Help) - [Available default Commands](./Default-Command-Help)
- [Batch-Processors](Batch-Processors) - [Batch-Processors](./Batch-Processors)
- [Batch-Code-Processor](Batch-Code-Processor) - [Batch-Code-Processor](./Batch-Code-Processor)
- [Batch-Command-Processor](Batch-Command-Processor) - [Batch-Command-Processor](./Batch-Command-Processor)
## Utils ## Utils
- [Coding-Utils](Coding-Utils) - [Coding-Utils](./Coding-Utils)
- [EvEditor](EvEditor) - [EvEditor](./EvEditor)
- [EvMenu](EvMenu) - [EvMenu](./EvMenu)
- [EvMore](EvMore) - [EvMore](./EvMore)
- [MonitorHandler](MonitorHandler) - [MonitorHandler](./MonitorHandler)
- [TickerHandler](TickerHandler) - [TickerHandler](./TickerHandler)
- [Lock system](Locks) - [Lock system](./Locks)
## Server and network ## Server and network
- [Signals](Signals) - [Signals](./Signals)
- [Portal](Portal-And-Server) - [Portal](./Portal-And-Server)
- [Inputfuncs](Inputfuncs) - [Inputfuncs](./Inputfuncs)
- [Outputfuncs](Outputfuncs) - [Outputfuncs](./Outputfuncs)
- [Protocols](../Concept/Custom-Protocols) - [Protocols](../Concept/Custom-Protocols)
- [Server](Server) - [Server](./Server)
- [Server conf object](Server-Conf) - [Server conf object](./Server-Conf)
- [Webserver](Webserver) - [Webserver](./Webserver)
- [Webclient](Webclient) - [Webclient](./Webclient)
- [Bootstrap](Bootstrap-Components-and-Utilities) - [Bootstrap](./Bootstrap-Components-and-Utilities)

View file

@ -29,8 +29,8 @@ available.
### Commands available at the Connection Screen ### Commands available at the Connection Screen
You can also customize the [Commands](Commands) available to use while the connection screen is You can also customize the [Commands](./Commands) available to use while the connection screen is
shown (`connect`, `create` etc). These commands are a bit special since when the screen is running shown (`connect`, `create` etc). These commands are a bit special since when the screen is running
the account is not yet logged in. A command is made available at the login screen by adding them to the account is not yet logged in. A command is made available at the login screen by adding them to
`UnloggedinCmdSet` in `mygame/commands/default_cmdset.py`. See [Commands](Commands) and the `UnloggedinCmdSet` in `mygame/commands/default_cmdset.py`. See [Commands](./Commands) and the
tutorial section on how to add new commands to a default command set. tutorial section on how to add new commands to a default command set.

File diff suppressed because it is too large Load diff

View file

@ -33,7 +33,7 @@ said functions, like `{"nodename": <function>, ...}`
## Launching the menu ## Launching the menu
Initializing the menu is done using a call to the `evennia.utils.evmenu.EvMenu` class. This is the Initializing the menu is done using a call to the `evennia.utils.evmenu.EvMenu` class. This is the
most common way to do so - from inside a [Command](Commands): most common way to do so - from inside a [Command](./Commands):
```python ```python
# in, for example gamedir/commands/command.py # in, for example gamedir/commands/command.py
@ -70,7 +70,7 @@ EvMenu(caller, menu_data,
``` ```
- `caller` (Object or Account): is a reference to the object using the menu. This object will get a - `caller` (Object or Account): is a reference to the object using the menu. This object will get a
new [CmdSet](Command-Sets) assigned to it, for handling the menu. new [CmdSet](./Command-Sets) assigned to it, for handling the menu.
- `menu_data` (str, module or dict): is a module or python path to a module where the global-level - `menu_data` (str, module or dict): is a module or python path to a module where the global-level
functions will each be considered to be a menu node. Their names in the module will be the names functions will each be considered to be a menu node. Their names in the module will be the names
by which they are referred to in the module. Importantly, function names starting with an by which they are referred to in the module. Importantly, function names starting with an
@ -107,7 +107,7 @@ after
- `startnode_input` (str or (str, dict) tuple): Pass an input text or a input text + kwargs to the - `startnode_input` (str or (str, dict) tuple): Pass an input text or a input text + kwargs to the
start node as if it was entered on a fictional previous node. This can be very useful in order to start node as if it was entered on a fictional previous node. This can be very useful in order to
start a menu differently depending on the Command's arguments in which it was initialized. start a menu differently depending on the Command's arguments in which it was initialized.
- `session` (Session): Useful when calling the menu from an [Account](Accounts) in - `session` (Session): Useful when calling the menu from an [Account](./Accounts) in
`MULTISESSION_MODDE` higher than 2, to make sure only the right Session sees the menu output. `MULTISESSION_MODDE` higher than 2, to make sure only the right Session sees the menu output.
- `debug` (bool): If set, the `menudebug` command will be made available in the menu. Use it to - `debug` (bool): If set, the `menudebug` command will be made available in the menu. Use it to
list the current state of the menu and use `menudebug <variable>` to inspect a specific state list the current state of the menu and use `menudebug <variable>` to inspect a specific state
@ -428,16 +428,16 @@ See `evennia/utils/evmenu.py` for the details of their default implementations.
## Examples: ## Examples:
- **[Simple branching menu](EvMenu#example-simple-branching-menu)** - choose from options - **[Simple branching menu](./EvMenu#example-simple-branching-menu)** - choose from options
- **[Dynamic goto](EvMenu#example-dynamic-goto)** - jumping to different nodes based on response - **[Dynamic goto](./EvMenu#example-dynamic-goto)** - jumping to different nodes based on response
- **[Set caller properties](EvMenu#example-set-caller-properties)** - a menu that changes things - **[Set caller properties](./EvMenu#example-set-caller-properties)** - a menu that changes things
- **[Getting arbitrary input](EvMenu#example-get-arbitrary-input)** - entering text - **[Getting arbitrary input](./EvMenu#example-get-arbitrary-input)** - entering text
- **[Storing data between nodes](EvMenu#example-storing-data-between-nodes)** - keeping states and - **[Storing data between nodes](./EvMenu#example-storing-data-between-nodes)** - keeping states and
information while in the menu information while in the menu
- **[Repeating the same node](EvMenu#example-repeating-the-same-node)** - validating within the node - **[Repeating the same node](./EvMenu#example-repeating-the-same-node)** - validating within the node
before moving to the next before moving to the next
- **[Full Menu](EvMenu#example-full-menu):** a complete example - **[Full Menu](./EvMenu#example-full-menu):** a complete example
- **[Yes/No prompt](EvMenu#example-yesno-prompt)** - entering text with limited possible responses - **[Yes/No prompt](./EvMenu#example-yesno-prompt)** - entering text with limited possible responses
(this is *not* using EvMenu but the conceptually similar yet technically unrelated `get_input` (this is *not* using EvMenu but the conceptually similar yet technically unrelated `get_input`
helper function accessed as `evennia.utils.evmenu.get_input`). helper function accessed as `evennia.utils.evmenu.get_input`).
@ -507,7 +507,7 @@ def enter_guild:
This simple callable goto will analyse what happens depending on who the `caller` is. The This simple callable goto will analyse what happens depending on who the `caller` is. The
`enter_guild` node will give you a choice of what to say to the guard. If you try to enter, you will `enter_guild` node will give you a choice of what to say to the guard. If you try to enter, you will
end up in different nodes depending on (in this example) if you have the right [Tag](Tags) set on end up in different nodes depending on (in this example) if you have the right [Tag](./Tags) set on
yourself or not. Note that since we don't include any 'key's in the option dictionary, you will just yourself or not. Note that since we don't include any 'key's in the option dictionary, you will just
get to pick between numbers. get to pick between numbers.
@ -993,8 +993,8 @@ auto-created by the `list_node` decorator.
## Assorted notes ## Assorted notes
The EvMenu is implemented using [Commands](Commands). When you start a new EvMenu, the user of the The EvMenu is implemented using [Commands](./Commands). When you start a new EvMenu, the user of the
menu will be assigned a [CmdSet](Command-Sets) with the commands they need to navigate the menu. menu will be assigned a [CmdSet](./Command-Sets) with the commands they need to navigate the menu.
This means that if you were to, from inside the menu, assign a new command set to the caller, *you This means that if you were to, from inside the menu, assign a new command set to the caller, *you
may override the Menu Cmdset and kill the menu*. If you want to assign cmdsets to the caller as part may override the Menu Cmdset and kill the menu*. If you want to assign cmdsets to the caller as part
of the menu, you should store the cmdset on `caller.ndb._menutree` and wait to actually assign it of the menu, you should store the cmdset on `caller.ndb._menutree` and wait to actually assign it

View file

@ -16,7 +16,7 @@ from evennia.utils import evmore
evmore.msg(receiver, long_text) evmore.msg(receiver, long_text)
``` ```
Where receiver is an [Object](Objects) or a [Account](Accounts). If the text is longer than the Where receiver is an [Object](./Objects) or a [Account](./Accounts). If the text is longer than the
client's screen height (as determined by the NAWS handshake or by `settings.CLIENT_DEFAULT_HEIGHT`) client's screen height (as determined by the NAWS handshake or by `settings.CLIENT_DEFAULT_HEIGHT`)
the pager will show up, something like this: the pager will show up, something like this:

View file

@ -67,7 +67,7 @@ entries together for people to more easily find them. See the `help` command in-
default categories. If you don't specify the category, "General" is assumed. default categories. If you don't specify the category, "General" is assumed.
If you don't want your command to be picked up by the auto-help system at all (like if you want to If you don't want your command to be picked up by the auto-help system at all (like if you want to
write its docs manually using the info in the next section or you use a [cmdset](Command-Sets) that write its docs manually using the info in the next section or you use a [cmdset](./Command-Sets) that
has its own help functionality) you can explicitly set `auto_help` class property to `False` in your has its own help functionality) you can explicitly set `auto_help` class property to `False` in your
command definition. command definition.
@ -89,7 +89,7 @@ looking for help. The topic can contain spaces and also partial matches will be
- The *help category*. Examples are *Administration*, *Building*, *Comms* or *General*. This is an - The *help category*. Examples are *Administration*, *Building*, *Comms* or *General*. This is an
overall grouping of similar help topics, used by the engine to give a better overview. overall grouping of similar help topics, used by the engine to give a better overview.
- The *text* - the help text itself, of any length. - The *text* - the help text itself, of any length.
- locks - a [lock definition](Locks). This can be used to limit access to this help entry, maybe - locks - a [lock definition](./Locks). This can be used to limit access to this help entry, maybe
because it's staff-only or otherwise meant to be restricted. Help commands check for `access_type`s because it's staff-only or otherwise meant to be restricted. Help commands check for `access_type`s
`view` and `edit`. An example of a lock string would be `view:perm(Builders)`. `view` and `edit`. An example of a lock string would be `view:perm(Builders)`.

View file

@ -42,7 +42,7 @@ Evennia defines a few default inputfuncs to handle the common cases. These are d
This is the most common of inputcommands, and the only one supported by every traditional mud. The This is the most common of inputcommands, and the only one supported by every traditional mud. The
argument is usually what the user sent from their command line. Since all text input from the user argument is usually what the user sent from their command line. Since all text input from the user
like this is considered a [Command](Commands), this inputfunc will do things like nick-replacement like this is considered a [Command](./Commands), this inputfunc will do things like nick-replacement
and then pass on the input to the central Commandhandler. and then pass on the input to the central Commandhandler.
### echo ### echo
@ -134,7 +134,7 @@ to expand. By default the following values can be retrieved:
accepted names if given an unfamiliar callback name. accepted names if given an unfamiliar callback name.
This will tell evennia to repeatedly call a named function at a given interval. Behind the scenes This will tell evennia to repeatedly call a named function at a given interval. Behind the scenes
this will set up a [Ticker](TickerHandler). Only previously acceptable functions are possible to this will set up a [Ticker](./TickerHandler). Only previously acceptable functions are possible to
repeat-call in this way, you'll need to overload this inputfunc to add the ones you want to offer. repeat-call in this way, you'll need to overload this inputfunc to add the ones you want to offer.
By default only two example functions are allowed, "test1" and "test2", which will just echo a text By default only two example functions are allowed, "test1" and "test2", which will just echo a text
back at the given interval. Stop the repeat by sending `"stop": True` (note that you must include back at the given interval. Stop the repeat by sending `"stop": True` (note that you must include
@ -155,7 +155,7 @@ This is a convenience wrapper for sending "stop" to the `repeat` inputfunc.
This sets up on-object monitoring of Attributes or database fields. Whenever the field or Attribute This sets up on-object monitoring of Attributes or database fields. Whenever the field or Attribute
changes in any way, the outputcommand will be sent. This is using the changes in any way, the outputcommand will be sent. This is using the
[MonitorHandler](MonitorHandler) behind the scenes. Pass the "stop" key to stop monitoring. Note [MonitorHandler](./MonitorHandler) behind the scenes. Pass the "stop" key to stop monitoring. Note
that you must supply the name also when stopping to let the system know which monitor should be that you must supply the name also when stopping to let the system know which monitor should be
cancelled. cancelled.

View file

@ -2,9 +2,9 @@
For most games it is a good idea to restrict what people can do. In Evennia such restrictions are For most games it is a good idea to restrict what people can do. In Evennia such restrictions are
applied and checked by something called *locks*. All Evennia entities ([Commands](Commands), applied and checked by something called *locks*. All Evennia entities ([Commands](./Commands),
[Objects](Objects), [Scripts](Scripts), [Accounts](Accounts), [Help System](Help-System), [Objects](./Objects), [Scripts](./Scripts), [Accounts](./Accounts), [Help System](./Help-System),
[messages](Communications#Msg) and [channels](Communications#Channels)) are accessed through locks. [messages](./Communications#Msg) and [channels](./Communications#Channels)) are accessed through locks.
A lock can be thought of as an "access rule" restricting a particular use of an Evennia entity. A lock can be thought of as an "access rule" restricting a particular use of an Evennia entity.
Whenever another entity wants that kind of access the lock will analyze that entity in different Whenever another entity wants that kind of access the lock will analyze that entity in different
@ -92,9 +92,9 @@ the default command set) actually checks for, as in the example of `delete` abov
Below are the access_types checked by the default commandset. Below are the access_types checked by the default commandset.
- [Commands](Commands) - [Commands](./Commands)
- `cmd` - this defines who may call this command at all. - `cmd` - this defines who may call this command at all.
- [Objects](Objects): - [Objects](./Objects):
- `control` - who is the "owner" of the object. Can set locks, delete it etc. Defaults to the - `control` - who is the "owner" of the object. Can set locks, delete it etc. Defaults to the
creator of the object. creator of the object.
- `call` - who may call Object-commands stored on this Object except for the Object itself. By - `call` - who may call Object-commands stored on this Object except for the Object itself. By
@ -109,26 +109,26 @@ something like `call:false()`.
- `get`- who may pick up the object and carry it around. - `get`- who may pick up the object and carry it around.
- `puppet` - who may "become" this object and control it as their "character". - `puppet` - who may "become" this object and control it as their "character".
- `attrcreate` - who may create new attributes on the object (default True) - `attrcreate` - who may create new attributes on the object (default True)
- [Characters](Objects#Characters): - [Characters](./Objects#Characters):
- Same as for Objects - Same as for Objects
- [Exits](Objects#Exits): - [Exits](./Objects#Exits):
- Same as for Objects - Same as for Objects
- `traverse` - who may pass the exit. - `traverse` - who may pass the exit.
- [Accounts](Accounts): - [Accounts](./Accounts):
- `examine` - who may examine the account's properties. - `examine` - who may examine the account's properties.
- `delete` - who may delete the account. - `delete` - who may delete the account.
- `edit` - who may edit the account's attributes and properties. - `edit` - who may edit the account's attributes and properties.
- `msg` - who may send messages to the account. - `msg` - who may send messages to the account.
- `boot` - who may boot the account. - `boot` - who may boot the account.
- [Attributes](Attributes): (only checked by `obj.secure_attr`) - [Attributes](./Attributes): (only checked by `obj.secure_attr`)
- `attrread` - see/access attribute - `attrread` - see/access attribute
- `attredit` - change/delete attribute - `attredit` - change/delete attribute
- [Channels](Communications#Channels): - [Channels](./Communications#Channels):
- `control` - who is administrating the channel. This means the ability to delete the channel, - `control` - who is administrating the channel. This means the ability to delete the channel,
boot listeners etc. boot listeners etc.
- `send` - who may send to the channel. - `send` - who may send to the channel.
- `listen` - who may subscribe and listen to the channel. - `listen` - who may subscribe and listen to the channel.
- [HelpEntry](Help-System): - [HelpEntry](./Help-System):
- `examine` - who may view this help entry (usually everyone) - `examine` - who may view this help entry (usually everyone)
- `edit` - who may edit this help entry. - `edit` - who may edit this help entry.
@ -214,10 +214,10 @@ Some useful default lockfuncs (see `src/locks/lockfuncs.py` for more):
- `false()/none()/superuser()` - give access to none. Superusers bypass the check entirely and are - `false()/none()/superuser()` - give access to none. Superusers bypass the check entirely and are
thus the only ones who will pass this check. thus the only ones who will pass this check.
- `perm(perm)` - this tries to match a given `permission` property, on an Account firsthand, on a - `perm(perm)` - this tries to match a given `permission` property, on an Account firsthand, on a
Character second. See [below](Locks#permissions). Character second. See [below](./Locks#permissions).
- `perm_above(perm)` - like `perm` but requires a "higher" permission level than the one given. - `perm_above(perm)` - like `perm` but requires a "higher" permission level than the one given.
- `id(num)/dbref(num)` - checks so the access_object has a certain dbref/id. - `id(num)/dbref(num)` - checks so the access_object has a certain dbref/id.
- `attr(attrname)` - checks if a certain [Attribute](Attributes) exists on accessing_object. - `attr(attrname)` - checks if a certain [Attribute](./Attributes) exists on accessing_object.
- `attr(attrname, value)` - checks so an attribute exists on accessing_object *and* has the given - `attr(attrname, value)` - checks so an attribute exists on accessing_object *and* has the given
value. value.
- `attr_gt(attrname, value)` - checks so accessing_object has a value larger (`>`) than the given - `attr_gt(attrname, value)` - checks so accessing_object has a value larger (`>`) than the given
@ -250,7 +250,7 @@ a Lock lookup.
## Default locks ## Default locks
Evennia sets up a few basic locks on all new objects and accounts (if we didn't, noone would have Evennia sets up a few basic locks on all new objects and accounts (if we didn't, noone would have
any access to anything from the start). This is all defined in the root [Typeclasses](Typeclasses) any access to anything from the start). This is all defined in the root [Typeclasses](./Typeclasses)
of the respective entity, in the hook method `basetype_setup()` (which you usually don't want to of the respective entity, in the hook method `basetype_setup()` (which you usually don't want to
edit unless you want to change how basic stuff like rooms and exits store their internal variables). edit unless you want to change how basic stuff like rooms and exits store their internal variables).
This is called once, before `at_object_creation`, so just put them in the latter method on your This is called once, before `at_object_creation`, so just put them in the latter method on your
@ -316,7 +316,7 @@ a particular permission in the hierarchy will *also* grant access to those with
access. So if you have the permission "Admin" you will also pass a lock defined as `perm(Builder)` access. So if you have the permission "Admin" you will also pass a lock defined as `perm(Builder)`
or any of those levels below "Admin". or any of those levels below "Admin".
When doing an access check from an [Object](Objects) or Character, the `perm()` lock function will When doing an access check from an [Object](./Objects) or Character, the `perm()` lock function will
always first use the permissions of any Account connected to that Object before checking for always first use the permissions of any Account connected to that Object before checking for
permissions on the Object. In the case of hierarchical permissions (Admins, Builders etc), the permissions on the Object. In the case of hierarchical permissions (Admins, Builders etc), the
Account permission will always be used (this stops an Account from escalating their permission by Account permission will always be used (this stops an Account from escalating their permission by
@ -330,14 +330,14 @@ Here is how you use `perm` to give an account more permissions:
perm/account/del Tommy = Builders # remove it again perm/account/del Tommy = Builders # remove it again
Note the use of the `/account` switch. It means you assign the permission to the Note the use of the `/account` switch. It means you assign the permission to the
[Accounts](Accounts) Tommy instead of any [Character](Objects) that also happens to be named [Accounts](./Accounts) Tommy instead of any [Character](./Objects) that also happens to be named
"Tommy". "Tommy".
Putting permissions on the *Account* guarantees that they are kept, *regardless* of which Character Putting permissions on the *Account* guarantees that they are kept, *regardless* of which Character
they are currently puppeting. This is especially important to remember when assigning permissions they are currently puppeting. This is especially important to remember when assigning permissions
from the *hierarchy tree* - as mentioned above, an Account's permissions will overrule that of its from the *hierarchy tree* - as mentioned above, an Account's permissions will overrule that of its
character. So to be sure to avoid confusion you should generally put hierarchy permissions on the character. So to be sure to avoid confusion you should generally put hierarchy permissions on the
Account, not on their Characters (but see also [quelling](Locks#Quelling)). Account, not on their Characters (but see also [quelling](./Locks#Quelling)).
Below is an example of an object without any connected account Below is an example of an object without any connected account
@ -417,7 +417,7 @@ whereas only Admins and the creator may delete it. Everyone can pick it up.
## A complete example of setting locks on an object ## A complete example of setting locks on an object
Assume we have two objects - one is ourselves (not superuser) and the other is an [Object](Objects) Assume we have two objects - one is ourselves (not superuser) and the other is an [Object](./Objects)
called `box`. called `box`.
> create/drop box > create/drop box
@ -443,7 +443,7 @@ This is defined in `evennia/commands/default/general.py`. In its code we find th
``` ```
So the `get` command looks for a lock with the type *get* (not so surprising). It also looks for an So the `get` command looks for a lock with the type *get* (not so surprising). It also looks for an
[Attribute](Attributes) on the checked object called _get_err_msg_ in order to return a customized [Attribute](./Attributes) on the checked object called _get_err_msg_ in order to return a customized
error message. Sounds good! Let's start by setting that on the box: error message. Sounds good! Let's start by setting that on the box:
> set box/get_err_msg = You are not strong enough to lift this box. > set box/get_err_msg = You are not strong enough to lift this box.

View file

@ -23,10 +23,10 @@ MONITOR_HANDLER.add(obj, fieldname, callback,
``` ```
- `obj` ([Typeclassed](Typeclasses) entity) - the object to monitor. Since this must be - `obj` ([Typeclassed](./Typeclasses) entity) - the object to monitor. Since this must be
typeclassed, it means you can't monitor changes on [Sessions](Sessions) with the monitorhandler, for typeclassed, it means you can't monitor changes on [Sessions](./Sessions) with the monitorhandler, for
example. example.
- `fieldname` (str) - the name of a field or [Attribute](Attributes) on `obj`. If you want to - `fieldname` (str) - the name of a field or [Attribute](./Attributes) on `obj`. If you want to
monitor a database field you must specify its full name, including the starting `db_` (like monitor a database field you must specify its full name, including the starting `db_` (like
`db_key`, `db_location` etc). Any names not starting with `db_` are instead assumed to be the names `db_key`, `db_location` etc). Any names not starting with `db_` are instead assumed to be the names
of Attributes. This difference matters, since the MonitorHandler will automatically know to watch of Attributes. This difference matters, since the MonitorHandler will automatically know to watch

View file

@ -1,7 +1,7 @@
# Nicks # Nicks
*Nicks*, short for *Nicknames* is a system allowing an object (usually a [Account](Accounts)) to *Nicks*, short for *Nicknames* is a system allowing an object (usually a [Account](./Accounts)) to
assign custom replacement names for other game entities. assign custom replacement names for other game entities.
Nicks are not to be confused with *Aliases*. Setting an Alias on a game entity actually changes an Nicks are not to be confused with *Aliases*. Setting an Alias on a game entity actually changes an
@ -75,7 +75,7 @@ You can also use [shell-type wildcards](http://www.linfo.org/wildcard.html):
## Coding with nicks ## Coding with nicks
Nicks are stored as the `Nick` database model and are referred from the normal Evennia Nicks are stored as the `Nick` database model and are referred from the normal Evennia
[object](Objects) through the `nicks` property - this is known as the *NickHandler*. The NickHandler [object](./Objects) through the `nicks` property - this is known as the *NickHandler*. The NickHandler
offers effective error checking, searches and conversion. offers effective error checking, searches and conversion.
```python ```python
@ -101,12 +101,12 @@ offers effective error checking, searches and conversion.
In a command definition you can reach the nick handler through `self.caller.nicks`. See the `nick` In a command definition you can reach the nick handler through `self.caller.nicks`. See the `nick`
command in `evennia/commands/default/general.py` for more examples. command in `evennia/commands/default/general.py` for more examples.
As a last note, The Evennia [channel](Communications) alias systems are using nicks with the As a last note, The Evennia [channel](./Communications) alias systems are using nicks with the
`nick_type="channel"` in order to allow users to create their own custom aliases to channels. `nick_type="channel"` in order to allow users to create their own custom aliases to channels.
# Advanced note # Advanced note
Internally, nicks are [Attributes](Attributes) saved with the `db_attrype` set to "nick" (normal Internally, nicks are [Attributes](./Attributes) saved with the `db_attrype` set to "nick" (normal
Attributes has this set to `None`). Attributes has this set to `None`).
The nick stores the replacement data in the Attribute.db_value field as a tuple with four fields The nick stores the replacement data in the Attribute.db_value field as a tuple with four fields

View file

@ -3,7 +3,7 @@
All in-game objects in Evennia, be it characters, chairs, monsters, rooms or hand grenades are All in-game objects in Evennia, be it characters, chairs, monsters, rooms or hand grenades are
represented by an Evennia *Object*. Objects form the core of Evennia and is probably what you'll represented by an Evennia *Object*. Objects form the core of Evennia and is probably what you'll
spend most time working with. Objects are [Typeclassed](Typeclasses) entities. spend most time working with. Objects are [Typeclassed](./Typeclasses) entities.
## How to create your own object types ## How to create your own object types
@ -48,17 +48,17 @@ thing yourself in code:
call manually you have to give the full path to the class. The `create.create_object` function is call manually you have to give the full path to the class. The `create.create_object` function is
powerful and should be used for all coded object creating (so this is what you use when defining powerful and should be used for all coded object creating (so this is what you use when defining
your own building commands). Check out the `ev.create_*` functions for how to build other entities your own building commands). Check out the `ev.create_*` functions for how to build other entities
like [Scripts](Scripts)). like [Scripts](./Scripts)).
This particular Rose class doesn't really do much, all it does it make sure the attribute This particular Rose class doesn't really do much, all it does it make sure the attribute
`desc`(which is what the `look` command looks for) is pre-set, which is pretty pointless since you `desc`(which is what the `look` command looks for) is pre-set, which is pretty pointless since you
will usually want to change this at build time (using the `@desc` command or using the will usually want to change this at build time (using the `@desc` command or using the
[Spawner](Spawner-and-Prototypes)). The `Object` typeclass offers many more hooks that is available [Spawner](./Spawner-and-Prototypes)). The `Object` typeclass offers many more hooks that is available
to use though - see next section. to use though - see next section.
## Properties and functions on Objects ## Properties and functions on Objects
Beyond the properties assigned to all [typeclassed](Typeclasses) objects (see that page for a list Beyond the properties assigned to all [typeclassed](./Typeclasses) objects (see that page for a list
of those), the Object also has the following custom properties: of those), the Object also has the following custom properties:
- `aliases` - a handler that allows you to add and remove aliases from this object. Use - `aliases` - a handler that allows you to add and remove aliases from this object. Use
@ -67,12 +67,12 @@ of those), the Object also has the following custom properties:
- `home` is a backup location. The main motivation is to have a safe place to move the object to if - `home` is a backup location. The main motivation is to have a safe place to move the object to if
its `location` is destroyed. All objects should usually have a home location for safety. its `location` is destroyed. All objects should usually have a home location for safety.
- `destination` - this holds a reference to another object this object links to in some way. Its - `destination` - this holds a reference to another object this object links to in some way. Its
main use is for [Exits](Objects#Exits), it's otherwise usually unset. main use is for [Exits](./Objects#Exits), it's otherwise usually unset.
- `nicks` - as opposed to aliases, a [Nick](Nicks) holds a convenient nickname replacement for a - `nicks` - as opposed to aliases, a [Nick](./Nicks) holds a convenient nickname replacement for a
real name, word or sequence, only valid for this object. This mainly makes sense if the Object is real name, word or sequence, only valid for this object. This mainly makes sense if the Object is
used as a game character - it can then store briefer shorts, example so as to quickly reference game used as a game character - it can then store briefer shorts, example so as to quickly reference game
commands or other characters. Use nicks.add(alias, realname) to add a new one. commands or other characters. Use nicks.add(alias, realname) to add a new one.
- `account` - this holds a reference to a connected [Account](Accounts) controlling this object (if - `account` - this holds a reference to a connected [Account](./Accounts) controlling this object (if
any). Note that this is set also if the controlling account is *not* currently online - to test if any). Note that this is set also if the controlling account is *not* currently online - to test if
an account is online, use the `has_account` property instead. an account is online, use the `has_account` property instead.
- `sessions` - if `account` field is set *and the account is online*, this is a list of all active - `sessions` - if `account` field is set *and the account is online*, this is a list of all active
@ -87,9 +87,9 @@ object set as their `location`).
The last two properties are special: The last two properties are special:
- `cmdset` - this is a handler that stores all [command sets](Commands#Command_Sets) defined on the - `cmdset` - this is a handler that stores all [command sets](./Commands#Command_Sets) defined on the
object (if any). object (if any).
- `scripts` - this is a handler that manages [Scripts](Scripts) attached to the object (if any). - `scripts` - this is a handler that manages [Scripts](./Scripts) attached to the object (if any).
The Object also has a host of useful utility functions. See the function headers in The Object also has a host of useful utility functions. See the function headers in
`src/objects/objects.py` for their arguments and more details. `src/objects/objects.py` for their arguments and more details.
@ -104,7 +104,7 @@ on).
- `execute_cmd()` - Lets the object execute the given string as if it was given on the command line. - `execute_cmd()` - Lets the object execute the given string as if it was given on the command line.
- `move_to` - perform a full move of this object to a new location. This is the main move method - `move_to` - perform a full move of this object to a new location. This is the main move method
and will call all relevant hooks, do all checks etc. and will call all relevant hooks, do all checks etc.
- `clear_exits()` - will delete all [Exits](Objects#Exits) to *and* from this object. - `clear_exits()` - will delete all [Exits](./Objects#Exits) to *and* from this object.
- `clear_contents()` - this will not delete anything, but rather move all contents (except Exits) to - `clear_contents()` - this will not delete anything, but rather move all contents (except Exits) to
their designated `Home` locations. their designated `Home` locations.
- `delete()` - deletes this object, first calling `clear_exits()` and - `delete()` - deletes this object, first calling `clear_exits()` and
@ -126,10 +126,10 @@ practice they are all pretty similar to the base Object.
### Characters ### Characters
Characters are objects controlled by [Accounts](Accounts). When a new Account Characters are objects controlled by [Accounts](./Accounts). When a new Account
logs in to Evennia for the first time, a new `Character` object is created and logs in to Evennia for the first time, a new `Character` object is created and
the Account object is assigned to the `account` attribute. A `Character` object the Account object is assigned to the `account` attribute. A `Character` object
must have a [Default Commandset](Commands#Command_Sets) set on itself at must have a [Default Commandset](./Commands#Command_Sets) set on itself at
creation, or the account will not be able to issue any commands! If you just creation, or the account will not be able to issue any commands! If you just
inherit your own class from `evennia.DefaultCharacter` and make sure to use inherit your own class from `evennia.DefaultCharacter` and make sure to use
`super()` to call the parent methods you should be fine. In `super()` to call the parent methods you should be fine. In
@ -150,21 +150,21 @@ you to modify.
*in* might be an exit, as well as *door*, *portal* or *jump out the window*. An exit has two things *in* might be an exit, as well as *door*, *portal* or *jump out the window*. An exit has two things
that separate them from other objects. Firstly, their *destination* property is set and points to a that separate them from other objects. Firstly, their *destination* property is set and points to a
valid object. This fact makes it easy and fast to locate exits in the database. Secondly, exits valid object. This fact makes it easy and fast to locate exits in the database. Secondly, exits
define a special [Transit Command](Commands) on themselves when they are created. This command is define a special [Transit Command](./Commands) on themselves when they are created. This command is
named the same as the exit object and will, when called, handle the practicalities of moving the named the same as the exit object and will, when called, handle the practicalities of moving the
character to the Exits's *destination* - this allows you to just enter the name of the exit on its character to the Exits's *destination* - this allows you to just enter the name of the exit on its
own to move around, just as you would expect. own to move around, just as you would expect.
The exit functionality is all defined on the Exit typeclass, so you could in principle completely The exit functionality is all defined on the Exit typeclass, so you could in principle completely
change how exits work in your game (it's not recommended though, unless you really know what you are change how exits work in your game (it's not recommended though, unless you really know what you are
doing). Exits are [locked](Locks) using an access_type called *traverse* and also make use of a few doing). Exits are [locked](./Locks) using an access_type called *traverse* and also make use of a few
hook methods for giving feedback if the traversal fails. See `evennia.DefaultExit` for more info. hook methods for giving feedback if the traversal fails. See `evennia.DefaultExit` for more info.
In `mygame/typeclasses/exits.py` there is an empty `Exit` class for you to modify. In `mygame/typeclasses/exits.py` there is an empty `Exit` class for you to modify.
The process of traversing an exit is as follows: The process of traversing an exit is as follows:
1. The traversing `obj` sends a command that matches the Exit-command name on the Exit object. The 1. The traversing `obj` sends a command that matches the Exit-command name on the Exit object. The
[cmdhandler](Commands) detects this and triggers the command defined on the Exit. Traversal always [cmdhandler](./Commands) detects this and triggers the command defined on the Exit. Traversal always
involves the "source" (the current location) and the `destination` (this is stored on the Exit involves the "source" (the current location) and the `destination` (this is stored on the Exit
object). object).
1. The Exit command checks the `traverse` lock on the Exit object 1. The Exit command checks the `traverse` lock on the Exit object

View file

@ -2,7 +2,7 @@
*Scripts* are the out-of-character siblings to the in-character *Scripts* are the out-of-character siblings to the in-character
[Objects](Objects). Scripts are so flexible that the "Script" is a bit limiting [Objects](./Objects). Scripts are so flexible that the "Script" is a bit limiting
- we had to pick something to name them after all. Other possible names - we had to pick something to name them after all. Other possible names
(depending on what you'd use them for) would be `OOBObjects`, (depending on what you'd use them for) would be `OOBObjects`,
`StorageContainers` or `TimerObjects`. `StorageContainers` or `TimerObjects`.
@ -14,7 +14,7 @@ Scripts can be used for many different things in Evennia:
- They can work as timers and tickers - anything that may change with Time. But - They can work as timers and tickers - anything that may change with Time. But
they can also have no time dependence at all. Note though that if all you want they can also have no time dependence at all. Note though that if all you want
is just to have an object method called repeatedly, you should consider using is just to have an object method called repeatedly, you should consider using
the [TickerHandler](TickerHandler) which is more limited but is specialized on the [TickerHandler](./TickerHandler) which is more limited but is specialized on
just this task. just this task.
- They can describe State changes. A Script is an excellent platform for - They can describe State changes. A Script is an excellent platform for
hosting a persistent, but unique system handler. For example, a Script could be hosting a persistent, but unique system handler. For example, a Script could be
@ -22,11 +22,11 @@ used as the base to track the state of a turn-based combat system. Since
Scripts can also operate on a timer they can also update themselves regularly Scripts can also operate on a timer they can also update themselves regularly
to perform various actions. to perform various actions.
- They can act as data stores for storing game data persistently in the database - They can act as data stores for storing game data persistently in the database
(thanks to its ability to have [Attributes](Attributes)). (thanks to its ability to have [Attributes](./Attributes)).
- They can be used as OOC stores for sharing data between groups of objects, for - They can be used as OOC stores for sharing data between groups of objects, for
example for tracking the turns in a turn-based combat system or barter exchange. example for tracking the turns in a turn-based combat system or barter exchange.
Scripts are [Typeclassed](Typeclasses) entities and are manipulated in a similar Scripts are [Typeclassed](./Typeclasses) entities and are manipulated in a similar
way to how it works for other such Evennia entities: way to how it works for other such Evennia entities:
```python ```python
@ -41,7 +41,7 @@ list_of_myscript = evennia.search_script("myscript")
## Defining new Scripts ## Defining new Scripts
A Script is defined as a class and is created in the same way as other A Script is defined as a class and is created in the same way as other
[typeclassed](Typeclasses) entities. The class has several properties [typeclassed](./Typeclasses) entities. The class has several properties
to control the timer-component of the scripts. These are all _optional_ - to control the timer-component of the scripts. These are all _optional_ -
leaving them out will just create a Script with no timer components (useful to act as leaving them out will just create a Script with no timer components (useful to act as
a database store or to hold a persistent game system, for example). a database store or to hold a persistent game system, for example).
@ -104,7 +104,7 @@ If we put this script on a room, it will randomly report some weather
to everyone in the room every 5 minutes. to everyone in the room every 5 minutes.
To activate it, just add it to the script handler (`scripts`) on an To activate it, just add it to the script handler (`scripts`) on an
[Room](Objects). That object becomes `self.obj` in the example above. Here we [Room](./Objects). That object becomes `self.obj` in the example above. Here we
put it on a room called `myroom`: put it on a room called `myroom`:
``` ```
@ -144,7 +144,7 @@ command in-game.
## Properties and functions defined on Scripts ## Properties and functions defined on Scripts
A Script has all the properties of a typeclassed object, such as `db` and `ndb`(see A Script has all the properties of a typeclassed object, such as `db` and `ndb`(see
[Typeclasses](Typeclasses)). Setting `key` is useful in order to manage scripts (delete them by name [Typeclasses](./Typeclasses)). Setting `key` is useful in order to manage scripts (delete them by name
etc). These are usually set up in the Script's typeclass, but can also be assigned on the fly as etc). These are usually set up in the Script's typeclass, but can also be assigned on the fly as
keyword arguments to `evennia.create_script`. keyword arguments to `evennia.create_script`.
@ -164,7 +164,7 @@ after the reload is complete).
There is one special property: There is one special property:
- `obj` - the [Object](Objects) this script is attached to (if any). You should not need to set - `obj` - the [Object](./Objects) this script is attached to (if any). You should not need to set
this manually. If you add the script to the Object with `myobj.scripts.add(myscriptpath)` or give this manually. If you add the script to the Object with `myobj.scripts.add(myscriptpath)` or give
`myobj` as an argument to the `utils.create.create_script` function, the `obj` property will be set `myobj` as an argument to the `utils.create.create_script` function, the `obj` property will be set
to `myobj` for you. to `myobj` for you.

View file

@ -67,10 +67,10 @@ other things that must run in your game but which has no database persistence.
a greeting screen to show when an Account first connects. If more than one string variable is a greeting screen to show when an Account first connects. If more than one string variable is
present in the module a random one will be picked. present in the module a random one will be picked.
- `inlinefuncs.py` - this is where you can define custom [Inline functions](../Concept/TextTags#inlinefuncs). - `inlinefuncs.py` - this is where you can define custom [Inline functions](../Concept/TextTags#inlinefuncs).
- `inputfuncs.py` - this is where you define custom [Input functions](Inputfuncs) to handle data - `inputfuncs.py` - this is where you define custom [Input functions](./Inputfuncs) to handle data
from the client. from the client.
- `lockfuncs.py` - this is one of many possible modules to hold your own "safe" *lock functions* to - `lockfuncs.py` - this is one of many possible modules to hold your own "safe" *lock functions* to
make available to Evennia's [Locks](Locks). make available to Evennia's [Locks](./Locks).
- `mssp.py` - this holds meta information about your game. It is used by MUD search engines (which - `mssp.py` - this holds meta information about your game. It is used by MUD search engines (which
you often have to register with) in order to display what kind of game you are running along with you often have to register with) in order to display what kind of game you are running along with
statistics such as number of online accounts and online status. statistics such as number of online accounts and online status.

View file

@ -1,3 +1,3 @@
# Server component # Server component
TODO: This is currently in [Portal-and-Server](Portal-And-Server). TODO: This is currently in [Portal-and-Server](./Portal-And-Server).

View file

@ -5,14 +5,14 @@ An Evennia *Session* represents one single established connection to the server.
Evennia session, it is possible for a person to connect multiple times, for example using different Evennia session, it is possible for a person to connect multiple times, for example using different
clients in multiple windows. Each such connection is represented by a session object. clients in multiple windows. Each such connection is represented by a session object.
A session object has its own [cmdset](Command-Sets), usually the "unloggedin" cmdset. This is what A session object has its own [cmdset](./Command-Sets), usually the "unloggedin" cmdset. This is what
is used to show the login screen and to handle commands to create a new account (or is used to show the login screen and to handle commands to create a new account (or
[Account](Accounts) in evennia lingo) read initial help and to log into the game with an existing [Account](./Accounts) in evennia lingo) read initial help and to log into the game with an existing
account. A session object can either be "logged in" or not. Logged in means that the user has account. A session object can either be "logged in" or not. Logged in means that the user has
authenticated. When this happens the session is associated with an Account object (which is what authenticated. When this happens the session is associated with an Account object (which is what
holds account-centric stuff). The account can then in turn puppet any number of objects/characters. holds account-centric stuff). The account can then in turn puppet any number of objects/characters.
> Warning: A Session is not *persistent* - it is not a [Typeclass](Typeclasses) and has no > Warning: A Session is not *persistent* - it is not a [Typeclass](./Typeclasses) and has no
connection to the database. The Session will go away when a user disconnects and you will lose any connection to the database. The Session will go away when a user disconnects and you will lose any
custom data on it if the server reloads. The `.db` handler on Sessions is there to present a uniform custom data on it if the server reloads. The `.db` handler on Sessions is there to present a uniform
API (so you can assume `.db` exists even if you don't know if you receive an Object or a Session), API (so you can assume `.db` exists even if you don't know if you receive an Object or a Session),
@ -26,13 +26,13 @@ Here are some important properties available on (Server-)Sessions
- `sessid` - The unique session-id. This is an integer starting from 1. - `sessid` - The unique session-id. This is an integer starting from 1.
- `address` - The connected client's address. Different protocols give different information here. - `address` - The connected client's address. Different protocols give different information here.
- `logged_in` - `True` if the user authenticated to this session. - `logged_in` - `True` if the user authenticated to this session.
- `account` - The [Account](Accounts) this Session is attached to. If not logged in yet, this is - `account` - The [Account](./Accounts) this Session is attached to. If not logged in yet, this is
`None`. `None`.
- `puppet` - The [Character/Object](Objects) currently puppeted by this Account/Session combo. If - `puppet` - The [Character/Object](./Objects) currently puppeted by this Account/Session combo. If
not logged in or in OOC mode, this is `None`. not logged in or in OOC mode, this is `None`.
- `ndb` - The [Non-persistent Attribute](Attributes) handler. - `ndb` - The [Non-persistent Attribute](./Attributes) handler.
- `db` - As noted above, Sessions don't have regular Attributes. This is an alias to `ndb`. - `db` - As noted above, Sessions don't have regular Attributes. This is an alias to `ndb`.
- `cmdset` - The Session's [CmdSetHandler](Command-Sets) - `cmdset` - The Session's [CmdSetHandler](./Command-Sets)
Session statistics are mainly used internally by Evennia. Session statistics are mainly used internally by Evennia.
@ -99,7 +99,7 @@ transparently detect which session was triggering the command (if any) and redir
`command.msg()` is often the safest bet. `command.msg()` is often the safest bet.
You can get the `session` in two main ways: You can get the `session` in two main ways:
* [Accounts](Accounts) and [Objects](Objects) (including Characters) have a `sessions` property. * [Accounts](./Accounts) and [Objects](./Objects) (including Characters) have a `sessions` property.
This is a *handler* that tracks all Sessions attached to or puppeting them. Use e.g. This is a *handler* that tracks all Sessions attached to or puppeting them. Use e.g.
`accounts.sessions.get()` to get a list of Sessions attached to that entity. `accounts.sessions.get()` to get a list of Sessions attached to that entity.
* A Command instance has a `session` property that always points back to the Session that triggered * A Command instance has a `session` property that always points back to the Session that triggered
@ -132,7 +132,7 @@ changes carefully.
*Note: This is considered an advanced topic. You don't need to know this on a first read-through.* *Note: This is considered an advanced topic. You don't need to know this on a first read-through.*
Evennia is split into two parts, the [Portal and the Server](Portal-And-Server). Each side tracks Evennia is split into two parts, the [Portal and the Server](./Portal-And-Server). Each side tracks
its own Sessions, syncing them to each other. its own Sessions, syncing them to each other.
The "Session" we normally refer to is actually the `ServerSession`. Its counter-part on the Portal The "Session" we normally refer to is actually the `ServerSession`. Its counter-part on the Portal

View file

@ -69,7 +69,7 @@ be extracted from the `**kwargs` dict in the signal handler.
used way for users to themselves create accounts during login. It passes and extra kwarg `ip` with used way for users to themselves create accounts during login. It passes and extra kwarg `ip` with
the client IP of the connecting account. the client IP of the connecting account.
- `SIGNAL_ACCOUNT_POST_LOGIN` - this will always fire when the account has authenticated. Sends - `SIGNAL_ACCOUNT_POST_LOGIN` - this will always fire when the account has authenticated. Sends
extra kwarg `session` with the new [Session](Sessions) object involved. extra kwarg `session` with the new [Session](./Sessions) object involved.
- `SIGNAL_ACCCOUNT_POST_FIRST_LOGIN` - this fires just before `SIGNAL_ACCOUNT_POST_LOGIN` but only - `SIGNAL_ACCCOUNT_POST_FIRST_LOGIN` - this fires just before `SIGNAL_ACCOUNT_POST_LOGIN` but only
if if
this is the *first* connection done (that is, if there are no previous sessions connected). Also this is the *first* connection done (that is, if there are no previous sessions connected). Also

View file

@ -2,10 +2,10 @@
The *spawner* is a system for defining and creating individual objects from a base template called a The *spawner* is a system for defining and creating individual objects from a base template called a
*prototype*. It is only designed for use with in-game [Objects](Objects), not any other type of *prototype*. It is only designed for use with in-game [Objects](./Objects), not any other type of
entity. entity.
The normal way to create a custom object in Evennia is to make a [Typeclass](Typeclasses). If you The normal way to create a custom object in Evennia is to make a [Typeclass](./Typeclasses). If you
haven't read up on Typeclasses yet, think of them as normal Python classes that save to the database haven't read up on Typeclasses yet, think of them as normal Python classes that save to the database
behind the scenes. Say you wanted to create a "Goblin" enemy. A common way to do this would be to behind the scenes. Say you wanted to create a "Goblin" enemy. A common way to do this would be to
first create a `Mobile` typeclass that holds everything common to mobiles in the game, like generic first create a `Mobile` typeclass that holds everything common to mobiles in the game, like generic
@ -105,12 +105,12 @@ instead.
exist. exist.
- `destination` - a valid `#dbref`. Only used by exits. - `destination` - a valid `#dbref`. Only used by exits.
- `permissions` - list of permission strings, like `["Accounts", "may_use_red_door"]` - `permissions` - list of permission strings, like `["Accounts", "may_use_red_door"]`
- `locks` - a [lock-string](Locks) like `"edit:all();control:perm(Builder)"` - `locks` - a [lock-string](./Locks) like `"edit:all();control:perm(Builder)"`
- `aliases` - list of strings for use as aliases - `aliases` - list of strings for use as aliases
- `tags` - list [Tags](Tags). These are given as tuples `(tag, category, data)`. - `tags` - list [Tags](./Tags). These are given as tuples `(tag, category, data)`.
- `attrs` - list of [Attributes](Attributes). These are given as tuples `(attrname, value, - `attrs` - list of [Attributes](./Attributes). These are given as tuples `(attrname, value,
category, lockstring)` category, lockstring)`
- Any other keywords are interpreted as non-category [Attributes](Attributes) and their values. - Any other keywords are interpreted as non-category [Attributes](./Attributes) and their values.
This is This is
convenient for simple Attributes - use `attrs` for full control of Attributes. convenient for simple Attributes - use `attrs` for full control of Attributes.
@ -119,7 +119,7 @@ Deprecated as of Evennia 0.8:
- `ndb_<name>` - sets the value of a non-persistent attribute (`"ndb_"` is stripped from the name). - `ndb_<name>` - sets the value of a non-persistent attribute (`"ndb_"` is stripped from the name).
This is simply not useful in a prototype and is deprecated. This is simply not useful in a prototype and is deprecated.
- `exec` - This accepts a code snippet or a list of code snippets to run. This should not be used - - `exec` - This accepts a code snippet or a list of code snippets to run. This should not be used -
use callables or [$protfuncs](Spawner-and-Prototypes#protfuncs) instead (see below). use callables or [$protfuncs](./Spawner-and-Prototypes#protfuncs) instead (see below).
### Prototype values ### Prototype values
@ -233,7 +233,7 @@ A prototype can be defined and stored in two ways, either in the database or as
### Database prototypes ### Database prototypes
Stored as [Scripts](Scripts) in the database. These are sometimes referred to as *database- Stored as [Scripts](./Scripts) in the database. These are sometimes referred to as *database-
prototypes* This is the only way for in-game builders to modify and add prototypes. They have the prototypes* This is the only way for in-game builders to modify and add prototypes. They have the
advantage of being easily modifiable and sharable between builders but you need to work with them advantage of being easily modifiable and sharable between builders but you need to work with them
using in-game tools. using in-game tools.

View file

@ -10,11 +10,11 @@ currently dead.
*Tags* are short text labels that you attach to objects so as to easily be able to retrieve and *Tags* are short text labels that you attach to objects so as to easily be able to retrieve and
group them. An Evennia entity can be tagged with any number of Tags. On the database side, Tag group them. An Evennia entity can be tagged with any number of Tags. On the database side, Tag
entities are *shared* between all objects with that tag. This makes them very efficient but also entities are *shared* between all objects with that tag. This makes them very efficient but also
fundamentally different from [Attributes](Attributes), each of which always belongs to one *single* fundamentally different from [Attributes](./Attributes), each of which always belongs to one *single*
object. object.
In Evennia, Tags are technically also used to implement `Aliases` (alternative names for objects) In Evennia, Tags are technically also used to implement `Aliases` (alternative names for objects)
and `Permissions` (simple strings for [Locks](Locks) to check for). and `Permissions` (simple strings for [Locks](./Locks) to check for).
## Properties of Tags (and Aliases and Permissions) ## Properties of Tags (and Aliases and Permissions)
@ -26,7 +26,7 @@ unique key + category combination.
When Tags are assigned to game entities, these entities are actually sharing the same Tag. This When Tags are assigned to game entities, these entities are actually sharing the same Tag. This
means that Tags are not suitable for storing information about a single object - use an means that Tags are not suitable for storing information about a single object - use an
[Attribute](Attributes) for this instead. Tags are a lot more limited than Attributes but this also [Attribute](./Attributes) for this instead. Tags are a lot more limited than Attributes but this also
makes them very quick to lookup in the database - this is the whole point. makes them very quick to lookup in the database - this is the whole point.
Tags have the following properties, stored in the database: Tags have the following properties, stored in the database:
@ -52,8 +52,8 @@ free up the *category* property for any use you desire.
## Adding/Removing Tags ## Adding/Removing Tags
You can tag any *typeclassed* object, namely [Objects](Objects), [Accounts](Accounts), You can tag any *typeclassed* object, namely [Objects](./Objects), [Accounts](./Accounts),
[Scripts](Scripts) and [Channels](Communications). General tags are added by the *Taghandler*. The [Scripts](./Scripts) and [Channels](./Communications). General tags are added by the *Taghandler*. The
tag handler is accessed as a property `tags` on the relevant entity: tag handler is accessed as a property `tags` on the relevant entity:
```python ```python
@ -135,7 +135,7 @@ objs = evennia.search_tag(category="bar")
There is also an in-game command that deals with assigning and using ([Object-](Objects)) tags: There is also an in-game command that deals with assigning and using ([Object-](./Objects)) tags:
@tag/search furniture @tag/search furniture

View file

@ -11,7 +11,7 @@ hard-coded to rely on the concept of the global 'tick'. Evennia has no such noti
use tickers is very much up to the need of your game and which requirements you have. The "ticker use tickers is very much up to the need of your game and which requirements you have. The "ticker
recipe" is just one way of cranking the wheels. recipe" is just one way of cranking the wheels.
The most fine-grained way to manage the flow of time is of course to use [Scripts](Scripts). Many The most fine-grained way to manage the flow of time is of course to use [Scripts](./Scripts). Many
types of operations (weather being the classic example) are however done on multiple objects in the types of operations (weather being the classic example) are however done on multiple objects in the
same way at regular intervals, and for this, storing separate Scripts on each object is inefficient. same way at regular intervals, and for this, storing separate Scripts on each object is inefficient.
The way to do this is to use a ticker with a "subscription model" - let objects sign up to be The way to do this is to use a ticker with a "subscription model" - let objects sign up to be
@ -98,7 +98,7 @@ The `callable` can be on any form as long as it accepts the arguments you give t
> Note that everything you supply to the TickerHandler will need to be pickled at some point to be > Note that everything you supply to the TickerHandler will need to be pickled at some point to be
saved into the database. Most of the time the handler will correctly store things like database saved into the database. Most of the time the handler will correctly store things like database
objects, but the same restrictions as for [Attributes](Attributes) apply to what the TickerHandler objects, but the same restrictions as for [Attributes](./Attributes) apply to what the TickerHandler
may store. may store.
When testing, you can stop all tickers in the entire game with `tickerhandler.clear()`. You can also When testing, you can stop all tickers in the entire game with `tickerhandler.clear()`. You can also

View file

@ -5,8 +5,8 @@
different game entities as Python classes, without having to modify the database schema for every different game entities as Python classes, without having to modify the database schema for every
new type. new type.
In Evennia the most important game entities, [Accounts](Accounts), [Objects](Objects), In Evennia the most important game entities, [Accounts](./Accounts), [Objects](./Objects),
[Scripts](Scripts) and [Channels](Communications#Channels) are all Python classes inheriting, at [Scripts](./Scripts) and [Channels](./Communications#Channels) are all Python classes inheriting, at
varying distance, from `evennia.typeclasses.models.TypedObject`. In the documentation we refer to varying distance, from `evennia.typeclasses.models.TypedObject`. In the documentation we refer to
these objects as being "typeclassed" or even "being a typeclass". these objects as being "typeclassed" or even "being a typeclass".
@ -55,7 +55,7 @@ important limitations. This is why we don't simply call them "classes" but "type
1. A typeclass can save itself to the database. This means that some properties (actually not that 1. A typeclass can save itself to the database. This means that some properties (actually not that
many) on the class actually represents database fields and can only hold very specific data types. many) on the class actually represents database fields and can only hold very specific data types.
This is detailed [below](Typeclasses#about-typeclass-properties). This is detailed [below](./Typeclasses#about-typeclass-properties).
1. Due to its connection to the database, the typeclass' name must be *unique* across the _entire_ 1. Due to its connection to the database, the typeclass' name must be *unique* across the _entire_
server namespace. That is, there must never be two same-named classes defined anywhere. So the below server namespace. That is, there must never be two same-named classes defined anywhere. So the below
code would give an error (since `DefaultObject` is now globally found both in this module and in the code would give an error (since `DefaultObject` is now globally found both in this module and in the
@ -129,8 +129,8 @@ argument; this can both be the actual class or the python path to the typeclass
game directory. So if your `Furniture` typeclass sits in `mygame/typeclasses/furniture.py`, you game directory. So if your `Furniture` typeclass sits in `mygame/typeclasses/furniture.py`, you
could point to it as `typeclasses.furniture.Furniture`. Since Evennia will itself look in could point to it as `typeclasses.furniture.Furniture`. Since Evennia will itself look in
`mygame/typeclasses`, you can shorten this even further to just `furniture.Furniture`. The create- `mygame/typeclasses`, you can shorten this even further to just `furniture.Furniture`. The create-
functions take a lot of extra keywords allowing you to set things like [Attributes](Attributes) and functions take a lot of extra keywords allowing you to set things like [Attributes](./Attributes) and
[Tags](Tags) all in one go. These keywords don't use the `db_*` prefix. This will also automatically [Tags](./Tags) all in one go. These keywords don't use the `db_*` prefix. This will also automatically
save the new instance to the database, so you don't need to call `save()` explicitly. save the new instance to the database, so you don't need to call `save()` explicitly.
### About typeclass properties ### About typeclass properties
@ -178,22 +178,22 @@ returns the string form "#id".
The typeclassed entity has several common handlers: The typeclassed entity has several common handlers:
- `tags` - the [TagHandler](Tags) that handles tagging. Use `tags.add()` , `tags.get()` etc. - `tags` - the [TagHandler](./Tags) that handles tagging. Use `tags.add()` , `tags.get()` etc.
- `locks` - the [LockHandler](Locks) that manages access restrictions. Use `locks.add()`, - `locks` - the [LockHandler](./Locks) that manages access restrictions. Use `locks.add()`,
`locks.get()` etc. `locks.get()` etc.
- `attributes` - the [AttributeHandler](Attributes) that manages Attributes on the object. Use - `attributes` - the [AttributeHandler](./Attributes) that manages Attributes on the object. Use
`attributes.add()` `attributes.add()`
etc. etc.
- `db` (DataBase) - a shortcut property to the AttributeHandler; allowing `obj.db.attrname = value` - `db` (DataBase) - a shortcut property to the AttributeHandler; allowing `obj.db.attrname = value`
- `nattributes` - the [Non-persistent AttributeHandler](Attributes) for attributes not saved in the - `nattributes` - the [Non-persistent AttributeHandler](./Attributes) for attributes not saved in the
database. database.
- `ndb` (NotDataBase) - a shortcut property to the Non-peristent AttributeHandler. Allows - `ndb` (NotDataBase) - a shortcut property to the Non-peristent AttributeHandler. Allows
`obj.ndb.attrname = value` `obj.ndb.attrname = value`
Each of the typeclassed entities then extend this list with their own properties. Go to the Each of the typeclassed entities then extend this list with their own properties. Go to the
respective pages for [Objects](Objects), [Scripts](Scripts), [Accounts](Accounts) and respective pages for [Objects](./Objects), [Scripts](./Scripts), [Accounts](./Accounts) and
[Channels](Communications) for more info. It's also recommended that you explore the available [Channels](./Communications) for more info. It's also recommended that you explore the available
entities using [Evennia's flat API](../Evennia-API) to explore which properties and methods they have entities using [Evennia's flat API](../Evennia-API) to explore which properties and methods they have
available. available.
@ -207,7 +207,7 @@ are the `at_login` hook of Accounts and the `at_repeat` hook of Scripts.
### Querying for typeclasses ### Querying for typeclasses
Most of the time you search for objects in the database by using convenience methods like the Most of the time you search for objects in the database by using convenience methods like the
`caller.search()` of [Commands](Commands) or the search functions like `evennia.search_objects`. `caller.search()` of [Commands](./Commands) or the search functions like `evennia.search_objects`.
You can however also query for them directly using [Django's query You can however also query for them directly using [Django's query
language](https://docs.djangoproject.com/en/1.7/topics/db/queries/). This makes use of a _database language](https://docs.djangoproject.com/en/1.7/topics/db/queries/). This makes use of a _database
@ -251,7 +251,7 @@ If you already have created instances of Typeclasses, you can modify the *Python
due to how Python inheritance works your changes will automatically be applied to all children once due to how Python inheritance works your changes will automatically be applied to all children once
you have reloaded the server. you have reloaded the server.
However, database-saved data, like `db_*` fields, [Attributes](Attributes), [Tags](Tags) etc, are However, database-saved data, like `db_*` fields, [Attributes](./Attributes), [Tags](./Tags) etc, are
not themselves embedded into the class and will *not* be updated automatically. This you need to not themselves embedded into the class and will *not* be updated automatically. This you need to
manage yourself, by searching for all relevant objects and updating or adding the data: manage yourself, by searching for all relevant objects and updating or adding the data:
@ -325,7 +325,7 @@ Technically, typeclasses are [Django proxy
models](https://docs.djangoproject.com/en/1.7/topics/db/models/#proxy-models). The only database models](https://docs.djangoproject.com/en/1.7/topics/db/models/#proxy-models). The only database
models that are "real" in the typeclass system (that is, are represented by actual tables in the models that are "real" in the typeclass system (that is, are represented by actual tables in the
database) are `AccountDB`, `ObjectDB`, `ScriptDB` and `ChannelDB` (there are also database) are `AccountDB`, `ObjectDB`, `ScriptDB` and `ChannelDB` (there are also
[Attributes](Attributes) and [Tags](Tags) but they are not typeclasses themselves). All the [Attributes](./Attributes) and [Tags](./Tags) but they are not typeclasses themselves). All the
subclasses of them are "proxies", extending them with Python code without actually modifying the subclasses of them are "proxies", extending them with Python code without actually modifying the
database layout. database layout.

View file

@ -4,26 +4,26 @@ This documentation cover more over-arching concepts of Evennia, often involving
## General concepts ## General concepts
- [Asynchronous processing](Async-Process) - [Asynchronous processing](./Async-Process)
- [On Soft-Code](Soft-Code) - [On Soft-Code](./Soft-Code)
- [Using MUX as standard for default commands](Using-MUX-as-a-Standard) - [Using MUX as standard for default commands](./Using-MUX-as-a-Standard)
## Access ## Access
- [Permissions](Building-Permissions) - [Permissions](./Building-Permissions)
- [Banning](Banning) - [Banning](./Banning)
## Extending the Server ## Extending the Server
- [Custom Protocols](Custom-Protocols) - [Custom Protocols](./Custom-Protocols)
- [Bootstrap](Bootstrap-&-Evennia) - [Bootstrap](./Bootstrap-&-Evennia)
- [Creating new models](New-Models) - [Creating new models](./New-Models)
## Text processing ## Text processing
- [Change the language of the server](Internationalization) - [Change the language of the server](./Internationalization)
- [Server text-encoding](Text-Encodings) - [Server text-encoding](./Text-Encodings)
- [Text tags](TextTags) - [Text tags](./TextTags)
## Web features ## Web features
- [Web features](Web-Features) - [Web features](./Web-Features)

View file

@ -27,7 +27,7 @@ You <->
InputFunc InputFunc
``` ```
(See the [Message Path](Messagepath) for the bigger picture of how data flows through Evennia). The (See the [Message Path](./Messagepath) for the bigger picture of how data flows through Evennia). The
parts that needs to be customized to make your own custom protocol is the `Protocol + PortalSession` parts that needs to be customized to make your own custom protocol is the `Protocol + PortalSession`
(which translates between data coming in/out over the wire to/from Evennia internal representation) (which translates between data coming in/out over the wire to/from Evennia internal representation)
as well as the `InputFunc` (which handles incoming data). as well as the `InputFunc` (which handles incoming data).

View file

@ -34,7 +34,7 @@ The client sends data to Evennia in two ways.
the client may send commands based on a timer or some trigger. the client may send commands based on a timer or some trigger.
Exactly how the inputcommand looks when it travels from the client to Evennia Exactly how the inputcommand looks when it travels from the client to Evennia
depends on the [Protocol](Custom-Protocols) used: depends on the [Protocol](./Custom-Protocols) used:
- Telnet: A string. If GMCP or MSDP OOB protocols are used, this string will - Telnet: A string. If GMCP or MSDP OOB protocols are used, this string will
be formatted in a special way, but it's still a raw string. If Telnet SSL is be formatted in a special way, but it's still a raw string. If Telnet SSL is
active, the string will be encrypted. active, the string will be encrypted.
@ -175,7 +175,7 @@ In the *ServerSessionhandler*, the keywords from the `msg` method are collated i
This will intelligently convert different input to the same form. So `msg("Hello")` will end up as This will intelligently convert different input to the same form. So `msg("Hello")` will end up as
an outputcommand `("text", ("Hello",), {})`. an outputcommand `("text", ("Hello",), {})`.
This is also the point where [Inlinefuncs](TextTags#inline-functions) are parsed, depending on the This is also the point where [Inlinefuncs](./TextTags#inline-functions) are parsed, depending on the
session to receive the data. Said data is pickled together with the Session id then sent over the session to receive the data. Said data is pickled together with the Session id then sent over the
AMP bridge. AMP bridge.

View file

@ -8,7 +8,7 @@ window pane.
## Briefly on input/outputcommands ## Briefly on input/outputcommands
Inside Evennia, all server-client communication happens in the same way (so plain text is also an Inside Evennia, all server-client communication happens in the same way (so plain text is also an
'OOB message' as far as Evennia is concerned). The message follows the [Message Path](Messagepath). 'OOB message' as far as Evennia is concerned). The message follows the [Message Path](./Messagepath).
You should read up on that if you are unfamiliar with it. As the message travels along the path it You should read up on that if you are unfamiliar with it. As the message travels along the path it
has a standardized internal form: a tuple with a string, a tuple and a dict: has a standardized internal form: a tuple with a string, a tuple and a dict:
@ -26,7 +26,7 @@ a matching *Outputfunc*. This is responsible for converting the internal Evennia
form suitable to send over the wire to the Client. Outputfuncs are hard-coded. Which is chosen and form suitable to send over the wire to the Client. Outputfuncs are hard-coded. Which is chosen and
how it processes the outgoing data depends on the nature of the client it's connected to. The only how it processes the outgoing data depends on the nature of the client it's connected to. The only
time one would want to add new outputfuncs is as part of developing support for a new Evennia time one would want to add new outputfuncs is as part of developing support for a new Evennia
[Protocol](Custom-Protocols). [Protocol](./Custom-Protocols).
## Sending and receiving an OOB message ## Sending and receiving an OOB message

View file

@ -37,7 +37,7 @@ available in all but the most ancient mud clients. The ANSI colours are **r**ed,
first letter except for black which is abbreviated with the letter **x**. In ANSI there are "bright" first letter except for black which is abbreviated with the letter **x**. In ANSI there are "bright"
and "normal" (darker) versions of each color, adding up to a total of 16 colours to use for and "normal" (darker) versions of each color, adding up to a total of 16 colours to use for
foreground text. There are also 8 "background" colours. These have no bright alternative in ANSI foreground text. There are also 8 "background" colours. These have no bright alternative in ANSI
(but Evennia uses the [Xterm256](TextTags#xterm256-colours) extension behind the scenes to offer (but Evennia uses the [Xterm256](./TextTags#xterm256-colours) extension behind the scenes to offer
them anyway). them anyway).
To colour your text you put special tags in it. Evennia will parse these and convert them to the To colour your text you put special tags in it. Evennia will parse these and convert them to the
@ -76,7 +76,7 @@ set bright/normal explicitly. Technically, `|h|!G` is identical to `|g`.
> Note: The ANSI standard does not actually support bright backgrounds like `|[r` - the standard > Note: The ANSI standard does not actually support bright backgrounds like `|[r` - the standard
only supports "normal" intensity backgrounds. To get around this Evennia instead implements these only supports "normal" intensity backgrounds. To get around this Evennia instead implements these
as [Xterm256 colours](TextTags#xterm256-colours) behind the scenes. If the client does not support as [Xterm256 colours](./TextTags#xterm256-colours) behind the scenes. If the client does not support
Xterm256 the ANSI colors will be used instead and there will be no visible difference between using Xterm256 the ANSI colors will be used instead and there will be no visible difference between using
upper- and lower-case background tags. upper- and lower-case background tags.

View file

@ -1,7 +1,7 @@
# A voice operated elevator using events # A voice operated elevator using events
- Previous tutorial: [Adding dialogues in events](Dialogues-in-events) - Previous tutorial: [Adding dialogues in events](./Dialogues-in-events)
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
@ -97,7 +97,7 @@ 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), you If you have read [the previous tutorial about adding dialogues in events](./Dialogues-in-events), 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
@ -433,4 +433,4 @@ to consider adding the code in the source itself. Another possibility is to cal
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) - Previous tutorial: [Adding dialogues in events](./Dialogues-in-events)

View file

@ -5,13 +5,13 @@ longer-form documentation associated with particular contribs.
## In-Game-Python ## In-Game-Python
- [A voice-operated elevator using events](A-voice-operated-elevator-using-events) - [A voice-operated elevator using events](./A-voice-operated-elevator-using-events)
- [Dialogues using events](Dialogues-in-events) - [Dialogues using events](./Dialogues-in-events)
## Maps ## Maps
- [Dynamic in-game map](Dynamic-In-Game-Map) - [Dynamic in-game map](./Dynamic-In-Game-Map)
- [Static in-game map](Static-In-Game-Map) - [Static in-game map](./Static-In-Game-Map)
## The tutorial-world ## The tutorial-world
@ -19,4 +19,4 @@ longer-form documentation associated with particular contribs.
## Menu-builder ## Menu-builder
- [Building Menus](Building-menus) - [Building Menus](./Building-menus)

View file

@ -5,7 +5,7 @@
This tutorial describes the creation of an in-game map display based on a pre-drawn map. It also This tutorial describes the creation of an in-game map display based on a pre-drawn map. It also
details how to use the [Batch code processor](../Component/Batch-Code-Processor) for advanced building. There is details how to use the [Batch code processor](../Component/Batch-Code-Processor) for advanced building. There is
also the [Dynamic in-game map tutorial](Dynamic-In-Game-Map) that works in the opposite direction, also the [Dynamic in-game map tutorial](./Dynamic-In-Game-Map) that works in the opposite direction,
by generating a map from an existing grid of rooms. by generating a map from an existing grid of rooms.
Evennia does not require its rooms to be positioned in a "logical" way. Your exits could be named Evennia does not require its rooms to be positioned in a "logical" way. Your exits could be named

View file

@ -669,7 +669,7 @@ to understand our friendly Google-style docstrings used in classes and functions
[sphinx-autodoc](http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc) [sphinx-autodoc](http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc)
[sphinx-napoleon](http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html) [sphinx-napoleon](http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html)
[getting-started]: Setup/Setup-Quickstart [getting-started]: Setup/Setup-Quickstart
[contributing]: Contributing [contributing]: ./Contributing
[ReST](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) [ReST](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
[ReST-tables](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#tables) [ReST-tables](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#tables)
[ReST-directives](https://www.sphinx-doc.org/en/master/usage/restruturedtext/directives.html) [ReST-directives](https://www.sphinx-doc.org/en/master/usage/restruturedtext/directives.html)

View file

@ -90,7 +90,7 @@ a new `README.md` file within that directory.
amount of game-style-specific code. Assume your code will be applied to a very different game than amount of game-style-specific code. Assume your code will be applied to a very different game than
you had in mind when creating it. you had in mind when creating it.
* To make the licensing situation clear we assume all contributions are released with the same * To make the licensing situation clear we assume all contributions are released with the same
[license as Evennia](Licensing). If this is not possible for some reason, talk to us and we'll [license as Evennia](./Licensing). If this is not possible for some reason, talk to us and we'll
handle it on a case-by-case basis. handle it on a case-by-case basis.
* Your contribution must be covered by [unit tests](Coding/Unit-Testing). Having unit tests will both help * Your contribution must be covered by [unit tests](Coding/Unit-Testing). Having unit tests will both help
make your code more stable and make sure small changes does not break it without it being noticed, make your code more stable and make sure small changes does not break it without it being noticed,

View file

@ -159,7 +159,7 @@ presence (a website and a mud web client) to play around with ...
### Where to from here? ### Where to from here?
From here you can continue browsing the [online documentation]([online documentation](index)) to From here you can continue browsing the [online documentation]([online documentation](index:Evennia-documentation)) to
find more info about Evennia. Or you can jump into the [Tutorials](Howto/Howto-Overview) and get your hands find more info about Evennia. Or you can jump into the [Tutorials](Howto/Howto-Overview) and get your hands
dirty with code right away. You can also read the developer's [dev dirty with code right away. You can also read the developer's [dev
blog](https://evennia.blogspot.com/) for many tidbits and snippets about Evennia's development and blog](https://evennia.blogspot.com/) for many tidbits and snippets about Evennia's development and

View file

@ -3,50 +3,50 @@
This explains common recurring terms used in the Evennia docs. It will be expanded as needed. This explains common recurring terms used in the Evennia docs. It will be expanded as needed.
- _[account](Glossary#account)_ - the player's account on the game - _[account](./Glossary#account)_ - the player's account on the game
- _[admin-site](Glossary#admin-site)_ - the Django web page for manipulating the database - _[admin-site](./Glossary#admin-site)_ - the Django web page for manipulating the database
- _[attribute](Glossary#attribute)_ - persistent, custom data stored on typeclasses - _[attribute](./Glossary#attribute)_ - persistent, custom data stored on typeclasses
- _[channel](Glossary#channel)_ - game communication channels - _[channel](./Glossary#channel)_ - game communication channels
- _[character](Glossary#character)_ - the player's avatar in the game, controlled from - _[character](./Glossary#character)_ - the player's avatar in the game, controlled from
_[account](Glossary#account)_ _[account](./Glossary#account)_
- _[core](Glossary#core)_ - a term used for the code distributed with Evennia proper - _[core](./Glossary#core)_ - a term used for the code distributed with Evennia proper
- _[django](Glossary#django)_ - web framework Evennia uses for database access and web integration - _[django](./Glossary#django)_ - web framework Evennia uses for database access and web integration
- _[field](Glossary#field)_ - a _[typeclass](Glossary#typeclass)_ property representing a database - _[field](./Glossary#field)_ - a _[typeclass](./Glossary#typeclass)_ property representing a database
column column
- _[git](Glossary#git)_ - the version-control system we use - _[git](./Glossary#git)_ - the version-control system we use
- _[github](Glossary#github)_ - the online hosting of our source code - _[github](./Glossary#github)_ - the online hosting of our source code
- _[migrate](Glossary#migrate)_ - updating the database schema - _[migrate](./Glossary#migrate)_ - updating the database schema
- _[multisession mode`](#multisession-mode)_ - a setting defining how users connect to Evennia - _[multisession mode`](#multisession-mode)_ - a setting defining how users connect to Evennia
- _[object](Glossary#object)_ - Python instance, general term or in-game - _[object](./Glossary#object)_ - Python instance, general term or in-game
_[typeclass](Glossary#typeclass)_ _[typeclass](./Glossary#typeclass)_
- _[pip](Glossary#pip)_ - the Python installer - _[pip](./Glossary#pip)_ - the Python installer
- _player_ - the human connecting to the game with their client - _player_ - the human connecting to the game with their client
- _[puppet](Glossary#puppet)_ - when an [account](Glossary#account) controls an in-game - _[puppet](./Glossary#puppet)_ - when an [account](./Glossary#account) controls an in-game
[object](Glossary#object) [object](./Glossary#object)
- _[property](Glossary#property)_ - a python property - _[property](./Glossary#property)_ - a python property
- _evenv_ - see _[virtualenv](Glossary#virtualenv)_ - _evenv_ - see _[virtualenv](./Glossary#virtualenv)_
- _[repository](Glossary#repository)_ - a store of source code + source history - _[repository](./Glossary#repository)_ - a store of source code + source history
- _[script](Glossary#script)_ - a building block for custom storage, systems and time-keepint - _[script](./Glossary#script)_ - a building block for custom storage, systems and time-keepint
- _[session](Glossary#session)_ - represents one client connection - _[session](./Glossary#session)_ - represents one client connection
- _[ticker](Glossary#ticker)_ - Allows to run events on a steady 'tick' - _[ticker](./Glossary#ticker)_ - Allows to run events on a steady 'tick'
- _[twisted](Glossary#twisted)_ - networking engine responsible for Evennia's event loop and - _[twisted](./Glossary#twisted)_ - networking engine responsible for Evennia's event loop and
communications communications
- _[typeclass](Glossary#typeclass)_ - Evennia's database-connected Python class - _[typeclass](./Glossary#typeclass)_ - Evennia's database-connected Python class
- _upstream_ - see _[github](Glossary#github)_ - _upstream_ - see _[github](./Glossary#github)_
- _[virtualenv](Glossary#virtualenv)_ - a Python program and way to make an isolated Python install - _[virtualenv](./Glossary#virtualenv)_ - a Python program and way to make an isolated Python install
--- ---
### _account_ ### _account_
The term 'account' refers to the [player's](Glossary#player) unique account on the game. It is The term 'account' refers to the [player's](./Glossary#player) unique account on the game. It is
represented by the `Account` [typeclass](Glossary#typeclass) and holds things like email, password, represented by the `Account` [typeclass](./Glossary#typeclass) and holds things like email, password,
configuration etc. configuration etc.
When a player connects to the game, they connect to their account. The account has *no* When a player connects to the game, they connect to their account. The account has *no*
representation in the game world. Through their Account they can instead choose to representation in the game world. Through their Account they can instead choose to
[puppet](Glossary#puppet) one (or more, depending on game mode) [Characters](Glossary#character) in [puppet](./Glossary#puppet) one (or more, depending on game mode) [Characters](./Glossary#character) in
the game. the game.
In the default [multisession mode](Component/Sessions#multisession-mode) of Evennia, you immediately start In the default [multisession mode](Component/Sessions#multisession-mode) of Evennia, you immediately start
@ -55,16 +55,16 @@ servers used to work.
### _admin-site_ ### _admin-site_
This usually refers to [Django's](Glossary#django) *Admin site* or database-administration web page This usually refers to [Django's](./Glossary#django) *Admin site* or database-administration web page
([link to Django docs](https://docs.djangoproject.com/en/2.1/ref/contrib/admin/)). The admin site is ([link to Django docs](https://docs.djangoproject.com/en/2.1/ref/contrib/admin/)). The admin site is
an automatically generated web interface to the database (it can be customized extensively). It's an automatically generated web interface to the database (it can be customized extensively). It's
reachable from the `admin` link on the default Evennia website you get with your server. reachable from the `admin` link on the default Evennia website you get with your server.
### _attribute_ ### _attribute_
The term _Attribute_ should not be confused with ([properties](Glossary#property) or The term _Attribute_ should not be confused with ([properties](./Glossary#property) or
[fields](Glossary#field). The `Attribute` represents arbitrary pieces of data that can be attached [fields](./Glossary#field). The `Attribute` represents arbitrary pieces of data that can be attached
to any [typeclassed](Glossary#typeclass) entity in Evennia. Attributes allows storing new persistent to any [typeclassed](./Glossary#typeclass) entity in Evennia. Attributes allows storing new persistent
data on typeclasses without changing their underlying database schemas. data on typeclasses without changing their underlying database schemas.
[Read more about Attributes here](Component/Attributes). [Read more about Attributes here](Component/Attributes).
@ -72,23 +72,23 @@ data on typeclasses without changing their underlying database schemas.
A _Channel_ refers to an in-game communication channel. It's an entity that people subscribe to and A _Channel_ refers to an in-game communication channel. It's an entity that people subscribe to and
which re-distributes messages between all subscribers. Such subscribers default to being which re-distributes messages between all subscribers. Such subscribers default to being
[Accounts](Glossary#account), for out-of-game communication but could also be [Objects (usually [Accounts](./Glossary#account), for out-of-game communication but could also be [Objects (usually
Characters)](Glossary#character) if one wanted to adopt Channels for things like in-game walkie- Characters)](Glossary#character) if one wanted to adopt Channels for things like in-game walkie-
talkies or phone systems. It is represented by the `Channel` typeclass. [You can read more about the talkies or phone systems. It is represented by the `Channel` typeclass. [You can read more about the
comm system here](Communications#channels). comm system here](Communications#channels).
### _character_ ### _character_
The _Character_ is the term we use for the default avatar being [puppeted](Glossary#puppet) by the The _Character_ is the term we use for the default avatar being [puppeted](./Glossary#puppet) by the
[account](Glossary#account) in the game world. It is represented by the `Character` typeclass (which [account](./Glossary#account) in the game world. It is represented by the `Character` typeclass (which
is a child of [Object](Glossary#object)). Many developers use children of this class to represent is a child of [Object](./Glossary#object)). Many developers use children of this class to represent
monsters and other NPCs. You can [read more about it here](Component/Objects#subclasses-of-object). monsters and other NPCs. You can [read more about it here](Component/Objects#subclasses-of-object).
### _django_ ### _django_
[Django](https://www.djangoproject.com/) is a professional and very popular Python web framework, [Django](https://www.djangoproject.com/) is a professional and very popular Python web framework,
similar to Rails for the Ruby language. It is one of Evennia's central library dependencies (the similar to Rails for the Ruby language. It is one of Evennia's central library dependencies (the
other one is [Twisted](Glossary#twisted)). Evennia uses Django for two main things - to map all other one is [Twisted](./Glossary#twisted)). Evennia uses Django for two main things - to map all
database operations to Python and for structuring our web site. database operations to Python and for structuring our web site.
Through Django, we can work with any supported database (SQlite3, Postgres, MySQL ...) using generic Through Django, we can work with any supported database (SQlite3, Postgres, MySQL ...) using generic
@ -97,7 +97,7 @@ Python instead of database-specific SQL: A database table is represented in Djan
There is usually no need to know the details of Django's database handling in order to use Evennia - There is usually no need to know the details of Django's database handling in order to use Evennia -
it will handle most of the complexity for you under the hood using what we call it will handle most of the complexity for you under the hood using what we call
[typeclasses](Glossary#typeclass). But should you need the power of Django you can always get it. [typeclasses](./Glossary#typeclass). But should you need the power of Django you can always get it.
Most commonly people want to use "raw" Django when doing more advanced/custom database queries than Most commonly people want to use "raw" Django when doing more advanced/custom database queries than
offered by Evennia's [default search functions](Howto/Starting/Part1/Searching-Things). One will then need offered by Evennia's [default search functions](Howto/Starting/Part1/Searching-Things). One will then need
to read about Django's _querysets_. Querysets are Python method calls on a special form that lets to read about Django's _querysets_. Querysets are Python method calls on a special form that lets
@ -115,24 +115,24 @@ when a user goes that URL in their browser, enters data into a form etc. The ret
to show. Django also offers templating with features such as being able to add special markers in to show. Django also offers templating with features such as being able to add special markers in
HTML where it will insert the values of Python variables on the fly (like showing the current player HTML where it will insert the values of Python variables on the fly (like showing the current player
count on the web page). [Here is one of our tutorials on wiring up such a web page](Add-a-simple- count on the web page). [Here is one of our tutorials on wiring up such a web page](Add-a-simple-
new-web-page). Django also comes with the [admin site](Glossary#admin-site), which automatically new-web-page). Django also comes with the [admin site](./Glossary#admin-site), which automatically
maps the database into a form accessible from a web browser. maps the database into a form accessible from a web browser.
### _core_ ### _core_
This term is sometimes used to represent the main Evennia library code suite, *excluding* its This term is sometimes used to represent the main Evennia library code suite, *excluding* its
[contrib](Glossary#contrib) directory. It can sometimes come up in code reviews, such as [contrib](./Glossary#contrib) directory. It can sometimes come up in code reviews, such as
> Evennia is game-agnostic but this feature is for a particular game genre. So it does not belong in > Evennia is game-agnostic but this feature is for a particular game genre. So it does not belong in
core. Better make it a contrib. core. Better make it a contrib.
### _field_ ### _field_
A _field_ or _database field_ in Evennia refers to a [property](Glossary#property) on a A _field_ or _database field_ in Evennia refers to a [property](./Glossary#property) on a
[typeclass](Glossary#typeclass) directly linked to an underlying database column. Only a few fixed [typeclass](./Glossary#typeclass) directly linked to an underlying database column. Only a few fixed
properties per typeclass are database fields but they are often tied to the core functionality of properties per typeclass are database fields but they are often tied to the core functionality of
that base typeclass (for example [Objects](Glossary#object) store its location as a field). In all that base typeclass (for example [Objects](./Glossary#object) store its location as a field). In all
other cases, [attributes](Glossary#attribute) are used to add new persistent data to the typeclass. other cases, [attributes](./Glossary#attribute) are used to add new persistent data to the typeclass.
[Read more about typeclass properties here](Component/Typeclasses#about-typeclass-properties). [Read more about typeclass properties here](Component/Typeclasses#about-typeclass-properties).
### _git_ ### _git_
@ -143,12 +143,12 @@ tool. It allows us to track the development of the Evennia code by dividing it i
come back to it later if later changes caused problems. By tracking commits we know what 'version' come back to it later if later changes caused problems. By tracking commits we know what 'version'
of the code we are currently using. of the code we are currently using.
Evennia's source code + its source history is jointly called a [repository](Glossary#repository). Evennia's source code + its source history is jointly called a [repository](./Glossary#repository).
This is centrally stored at our online home on [GitHub](Glossary#github). Everyone using or This is centrally stored at our online home on [GitHub](./Glossary#github). Everyone using or
developing Evennia makes a 'clone' of this repository to their own computer - everyone developing Evennia makes a 'clone' of this repository to their own computer - everyone
automatically gets everything that is online, including all the code history. automatically gets everything that is online, including all the code history.
> Don't confuse Git and [GitHub](Glossary#github). The former is the version control system. The > Don't confuse Git and [GitHub](./Glossary#github). The former is the version control system. The
latter is a website (run by a company) that allows you to upload source code controlled by Git for latter is a website (run by a company) that allows you to upload source code controlled by Git for
others to see (among other things). others to see (among other things).
@ -172,13 +172,13 @@ you 'download' Evennia. You only need to do this once.
### _migrate_ ### _migrate_
This term is used for upgrading the database structure (it's _schema_ )to a new version. Most often This term is used for upgrading the database structure (it's _schema_ )to a new version. Most often
this is due to Evennia's [upstream](Glossary#github) schema changing. When that happens you need to this is due to Evennia's [upstream](./Glossary#github) schema changing. When that happens you need to
migrate that schema to the new version as well. Once you have used [git](Glossary#git) to pull the migrate that schema to the new version as well. Once you have used [git](./Glossary#git) to pull the
latest changes, just `cd` into your game dir and run latest changes, just `cd` into your game dir and run
evennia migrate evennia migrate
That should be it (see [virtualenv](Glossary#virtualenv) if you get a warning that the `evennia` That should be it (see [virtualenv](./Glossary#virtualenv) if you get a warning that the `evennia`
command is not available). See also [Updating your game](Coding/Updating-Your-Game) for more details. command is not available). See also [Updating your game](Coding/Updating-Your-Game) for more details.
> Technically, migrations are shipped as little Python snippets of code that explains which database > Technically, migrations are shipped as little Python snippets of code that explains which database
@ -195,23 +195,23 @@ here](Sessions#multisession-mode).
### _github_ ### _github_
[Github](https://github.com/evennia) is where Evennia's source code and documentation is hosted. [Github](https://github.com/evennia) is where Evennia's source code and documentation is hosted.
This online [repository](Glossary#repository) of code we also sometimes refer to as _upstream_. This online [repository](./Glossary#repository) of code we also sometimes refer to as _upstream_.
GitHub is a business, offering free hosting to Open-source projects like Evennia. Despite the GitHub is a business, offering free hosting to Open-source projects like Evennia. Despite the
similarity in name, don't confuse GitHub the website with [Git](Glossary#git), the versioning similarity in name, don't confuse GitHub the website with [Git](./Glossary#git), the versioning
system. Github hosts Git [repositories](Glossary#repository) online and helps with collaboration and system. Github hosts Git [repositories](./Glossary#repository) online and helps with collaboration and
infrastructure. Git itself is a separate project. infrastructure. Git itself is a separate project.
### _object_ ### _object_
In general Python (and other [object-oriented languages](https://en.wikipedia.org/wiki/Object- In general Python (and other [object-oriented languages](https://en.wikipedia.org/wiki/Object-
oriented_programming)), an `object` is what we call the instance of a *class*. But one of Evennia's oriented_programming)), an `object` is what we call the instance of a *class*. But one of Evennia's
core [typeclasses](Glossary#typeclasss) is also called "Object". To separate these in the docs we core [typeclasses](./Glossary#typeclasss) is also called "Object". To separate these in the docs we
try to use `object` to refer to the general term and capitalized `Object` when we refer to the try to use `object` to refer to the general term and capitalized `Object` when we refer to the
typeclass. typeclass.
The `Object` is a typeclass that represents all *in-game* entities, including The `Object` is a typeclass that represents all *in-game* entities, including
[Characters](Glossary#character), rooms, trees, weapons etc. [Read more about Objects here](Component/Objects). [Characters](./Glossary#character), rooms, trees, weapons etc. [Read more about Objects here](Component/Objects).
### _pip_ ### _pip_
@ -232,14 +232,14 @@ means that if the code in `<folder>` changes, the installed Python package is im
If not using `-e`, one would need to run `pip install --upgrade <folder>` every time to make the If not using `-e`, one would need to run `pip install --upgrade <folder>` every time to make the
changes available when you import this package into your code. Evennia is installed this way. changes available when you import this package into your code. Evennia is installed this way.
For development, `pip` is usually used together with a [virtualenv](Glossary#virtualenv) to install For development, `pip` is usually used together with a [virtualenv](./Glossary#virtualenv) to install
all packages and dependencies needed for a project in one, isolated location on the hard drive. all packages and dependencies needed for a project in one, isolated location on the hard drive.
### _puppet_ ### _puppet_
An [account](Glossary#account) can take control and "play as" any [Object](Glossary#object). When An [account](./Glossary#account) can take control and "play as" any [Object](./Glossary#object). When
doing so, we call this _puppeting_, (like [puppeteering](https://en.wikipedia.org/wiki/Puppeteer)). doing so, we call this _puppeting_, (like [puppeteering](https://en.wikipedia.org/wiki/Puppeteer)).
Normally the entity being puppeted is of the [Character](Glossary#character) subclass but it does Normally the entity being puppeted is of the [Character](./Glossary#character) subclass but it does
not have to be. not have to be.
### _property_ ### _property_
@ -247,25 +247,25 @@ not have to be.
A _property_ is a general term used for properties on any Python object. The term also sometimes A _property_ is a general term used for properties on any Python object. The term also sometimes
refers to the `property` built-in function of Python ([read more here](https://www.python- refers to the `property` built-in function of Python ([read more here](https://www.python-
course.eu/python3_properties.php)). Note the distinction between properties, course.eu/python3_properties.php)). Note the distinction between properties,
[fields](Glossary#field) and [Attributes](Glossary#attribute). [fields](./Glossary#field) and [Attributes](./Glossary#attribute).
### _repository_ ### _repository_
A _repository_ is a version control/[git](Glossary#git) term. It represents a folder containing A _repository_ is a version control/[git](./Glossary#git) term. It represents a folder containing
source code plus its versioning history. source code plus its versioning history.
> In Git's case, that history is stored in a hidden folder `.git`. If you ever feel the need to look > In Git's case, that history is stored in a hidden folder `.git`. If you ever feel the need to look
into this folder you probably already know enough Git to know why. into this folder you probably already know enough Git to know why.
The `evennia` folder you download from us with `git clone` is a repository. The code on The `evennia` folder you download from us with `git clone` is a repository. The code on
[GitHub](Glossary#github) is often referred to as the 'online repository' (or the _upstream_ [GitHub](./Glossary#github) is often referred to as the 'online repository' (or the _upstream_
repository). If you put your game dir under version control, that of course becomes a repository as repository). If you put your game dir under version control, that of course becomes a repository as
well. well.
### _script_ ### _script_
When we refer to _Scripts_, we generally refer to the `Script` [typeclass](Component/Typeclasses). Scripts are When we refer to _Scripts_, we generally refer to the `Script` [typeclass](Component/Typeclasses). Scripts are
the mavericks of Evennia - they are like [Objects](Glossary#object) but without any in-game the mavericks of Evennia - they are like [Objects](./Glossary#object) but without any in-game
existence. They are useful as custom places to store data but also as building blocks in persistent existence. They are useful as custom places to store data but also as building blocks in persistent
game systems. Since the can be initialized with timing capabilities they can also be used for long- game systems. Since the can be initialized with timing capabilities they can also be used for long-
time persistent time keeping (for fast updates other types of timers may be better though). time persistent time keeping (for fast updates other types of timers may be better though).
@ -276,9 +276,9 @@ time persistent time keeping (for fast updates other types of timers may be bett
A [Session](Component/Sessions) is a Python object representing a single client connection to the server. A A [Session](Component/Sessions) is a Python object representing a single client connection to the server. A
given human player could connect to the game from different clients and each would get a Session given human player could connect to the game from different clients and each would get a Session
(even if you did not allow them to actually log in and get access to an (even if you did not allow them to actually log in and get access to an
[account](Glossary#account)). [account](./Glossary#account)).
Sessions are _not_ [typeclassed](Glossary#typeclass) and has no database persistence. But since they Sessions are _not_ [typeclassed](./Glossary#typeclass) and has no database persistence. But since they
always exist (also when not logged in), they share some common functionality with typeclasses that always exist (also when not logged in), they share some common functionality with typeclasses that
can be useful for certain game states. can be useful for certain game states.
@ -295,25 +295,25 @@ to be called when those ticks come around.
The [typeclass](Component/Typeclasses) is an Evennia-specific term. A typeclass allows developers to work with The [typeclass](Component/Typeclasses) is an Evennia-specific term. A typeclass allows developers to work with
database-persistent objects as if they were normal Python objects. It makes use of specific database-persistent objects as if they were normal Python objects. It makes use of specific
[Django](Glossary#django) features to link a Python class to a database table. Sometimes we refer to [Django](./Glossary#django) features to link a Python class to a database table. Sometimes we refer to
such code entities as _being typeclassed_. such code entities as _being typeclassed_.
Evennia's main typeclasses are [Account](Glossary#account), [Object](Glossary#object), Evennia's main typeclasses are [Account](./Glossary#account), [Object](./Glossary#object),
[Script](Glossary#script) and [Channel](Glossary#channel). Children of the base class (such as [Script](./Glossary#script) and [Channel](./Glossary#channel). Children of the base class (such as
[Character](Glossary#character)) will use the same database table as the parent, but can have vastly [Character](./Glossary#character)) will use the same database table as the parent, but can have vastly
different Python capabilities (and persistent features through [Attributes](Glossary#attributes) and different Python capabilities (and persistent features through [Attributes](./Glossary#attributes) and
[Tags](Glossary#tags). A typeclass can be coded and treated pretty much like any other Python class [Tags](./Glossary#tags). A typeclass can be coded and treated pretty much like any other Python class
except it must inherit (at any distance) from one of the base typeclasses. Also, creating a new except it must inherit (at any distance) from one of the base typeclasses. Also, creating a new
instance of a typeclass will add a new row to the database table to which it is linked. instance of a typeclass will add a new row to the database table to which it is linked.
The [core](Glossary#core) typeclasses in the Evennia library are all named `DefaultAccount`, The [core](./Glossary#core) typeclasses in the Evennia library are all named `DefaultAccount`,
`DefaultObject` etc. When you initialize your [game dir] you automatically get empty children of `DefaultObject` etc. When you initialize your [game dir] you automatically get empty children of
these, called `Account`, `Object` etc that you can start working with. these, called `Account`, `Object` etc that you can start working with.
### _twisted_ ### _twisted_
[Twisted](https://twistedmatrix.com/trac/) is a heavy-duty asynchronous networking engine. It is one [Twisted](https://twistedmatrix.com/trac/) is a heavy-duty asynchronous networking engine. It is one
of Evennia's two major library dependencies (the other one is [Django](Glossary#django)). Twisted is of Evennia's two major library dependencies (the other one is [Django](./Glossary#django)). Twisted is
what "runs" Evennia - it handles Evennia's event loop. Twisted also has the building blocks we need what "runs" Evennia - it handles Evennia's event loop. Twisted also has the building blocks we need
to construct network protocols and communicate with the outside world; such as our MUD-custom to construct network protocols and communicate with the outside world; such as our MUD-custom
version of Telnet, Telnet+SSL, SSH, webclient-websockets etc. Twisted also runs our integrated web version of Telnet, Telnet+SSL, SSH, webclient-websockets etc. Twisted also runs our integrated web
@ -339,7 +339,7 @@ Python version than default.
A virtualenv is 'activated' only for the console/terminal it was started in, but it's safe to A virtualenv is 'activated' only for the console/terminal it was started in, but it's safe to
activate the same virtualenv many times in different windows if you want. Once activated, all Python activate the same virtualenv many times in different windows if you want. Once activated, all Python
packages now installed with [pip](Glossary#pip) will install to `evenv` rather than to a global packages now installed with [pip](./Glossary#pip) will install to `evenv` rather than to a global
location like `/usr/local/bin` or `C:\Program Files`. location like `/usr/local/bin` or `C:\Program Files`.
> Note that if you have root/admin access you *could* install Evennia globally just fine, without > Note that if you have root/admin access you *could* install Evennia globally just fine, without

View file

@ -3,8 +3,7 @@
### How to *get* Help ### How to *get* Help
If you cannot find what you are looking for in the If you cannot find what you are looking for in the documentation, here's what to do:
[online documentation](index), here's what to do:
- If you think the documentation is not clear enough, create a [documentation ticket](github:issue). - If you think the documentation is not clear enough, create a [documentation ticket](github:issue).
- If you have trouble with a missing feature or a problem you think is a bug, look through the - If you have trouble with a missing feature or a problem you think is a bug, look through the
@ -31,20 +30,20 @@ Evennia is open-source and non-commercial. It relies on the time donated by its
- Report problems you find or features you'd like to our [issue tracker](github:issue). - Report problems you find or features you'd like to our [issue tracker](github:issue).
```important:: ```important::
Just the simple act of letting developers know you are out there using their program helps a lot. Just the simple act of us know you are out there using Evennia helps a lot!
``` ```
If you'd like to help develop Evennia more hands-on, here are some ways to get going: If you'd like to help develop Evennia more hands-on, here are some ways to get going:
- Look through this [online documentation](index) and see if you can help improve or expand the - Look through this [online documentation](./index#Evennia-documentation) and see if you can help improve or expand the
documentation (even small things like fixing typos!). [See here](Contributing-Docs) on how you documentation (even small things like fixing typos!). [See here](./Contributing-Docs) on how you
contribute to the docs. contribute to the docs.
- Send a message to our [discussion group][group] and/or our [IRC chat][chat] asking about what - Send a message to our [discussion group][group] and/or our [IRC chat][chat] asking about what
needs doing, along with what your interests and skills are. needs doing, along with what your interests and skills are.
- Take a look at our [issue tracker][issues] and see if there's something you feel like taking on. - Take a look at our [issue tracker][issues] and see if there's something you feel like taking on.
[here are bugs][issues-master] that need fixes. At any given time there may also be some [here are bugs][issues-master] that need fixes. At any given time there may also be some
[bounties][issues-bounties] open. [bounties][issues-bounties] open.
- Check out the [Contributing](Contributing) page on how to practically contribute with code using - Check out the [Contributing](./Contributing) page on how to practically contribute with code using
github. github.
... And finally, if you want to help motivate and support development you can also drop some coins ... And finally, if you want to help motivate and support development you can also drop some coins

View file

@ -7,20 +7,20 @@ exists before answering - maybe you can clarify that answer rather than to make
## Table of Contents ## Table of Contents
- [Removing default commands](Coding-FAQ#removing-default-commands) - [Removing default commands](./Coding-FAQ#removing-default-commands)
- [Preventing character from moving based on a condition](Coding-FAQ#preventing-character-from- - [Preventing character from moving based on a condition](./Coding-FAQ#preventing-character-from-
moving-based-on-a-condition) moving-based-on-a-condition)
- [Reference initiating object in an EvMenu command](Coding-FAQ#reference-initiating-object-in-an- - [Reference initiating object in an EvMenu command](./Coding-FAQ#reference-initiating-object-in-an-
evmenu-command) evmenu-command)
- [Adding color to default Evennia Channels](Coding-FAQ#adding-color-to-default-evennia-channels) - [Adding color to default Evennia Channels](./Coding-FAQ#adding-color-to-default-evennia-channels)
- [Selectively turn off commands in a room](Coding-FAQ#selectively-turn-off-commands-in-a-room) - [Selectively turn off commands in a room](./Coding-FAQ#selectively-turn-off-commands-in-a-room)
- [Select Command based on a condition](Coding-FAQ#select-command-based-on-a-condition) - [Select Command based on a condition](./Coding-FAQ#select-command-based-on-a-condition)
- [Automatically updating code when reloading](Coding-FAQ#automatically-updating-code-when- - [Automatically updating code when reloading](./Coding-FAQ#automatically-updating-code-when-
reloading) reloading)
- [Changing all exit messages](Coding-FAQ#changing-all-exit-messages) - [Changing all exit messages](./Coding-FAQ#changing-all-exit-messages)
- [Add parsing with the "to" delimiter](Coding-FAQ#add-parsing-with-the-to-delimiter) - [Add parsing with the "to" delimiter](./Coding-FAQ#add-parsing-with-the-to-delimiter)
- [Store last used session IP address](Coding-FAQ#store-last-used-session-ip-address) - [Store last used session IP address](./Coding-FAQ#store-last-used-session-ip-address)
- [Use wide characters with EvTable](Coding-FAQ#non-latin-characters-in-evtable) - [Use wide characters with EvTable](./Coding-FAQ#non-latin-characters-in-evtable)
## Removing default commands ## Removing default commands
**Q:** How does one *remove* (not replace) e.g. the default `get` [Command](../Component/Commands) from the **Q:** How does one *remove* (not replace) e.g. the default `get` [Command](../Component/Commands) from the

View file

@ -212,7 +212,7 @@ An important aspect of making things more familiar for *Players* is adding new a
commands. How this is done is covered by the [Tutorial on adding new commands](Adding-Command- commands. How this is done is covered by the [Tutorial on adding new commands](Adding-Command-
Tutorial). You may also find it useful to shop through the `evennia/contrib/` folder. The Tutorial). You may also find it useful to shop through the `evennia/contrib/` folder. The
[Tutorial world](Starting/Part1/Tutorial-World-Introduction) is a small single-player quest you can try (its not very MUSH- [Tutorial world](Starting/Part1/Tutorial-World-Introduction) is a small single-player quest you can try (its not very MUSH-
like but it does show many Evennia concepts in action). Beyond that there are [many more tutorials](Howto-Overview) like but it does show many Evennia concepts in action). Beyond that there are [many more tutorials](./Howto-Overview)
to try out. If you feel you want a more visual overview you can also look at to try out. If you feel you want a more visual overview you can also look at
[Evennia in pictures](https://evennia.blogspot.se/2016/05/evennia-in-pictures.html). [Evennia in pictures](https://evennia.blogspot.se/2016/05/evennia-in-pictures.html).

View file

@ -59,44 +59,44 @@ in mind for your own game, this will give you a good start.
## FAQs ## FAQs
- [Coding FAQ](Coding-FAQ) - [Coding FAQ](./Coding-FAQ)
## Howto's ## Howto's
- [Giving Exits a default error](Default-Exit-Errors) - [Giving Exits a default error](./Default-Exit-Errors)
- [Customize Channel output](Customize-channels) - [Customize Channel output](./Customize-channels)
- [Add a command prompt](Command-Prompt) - [Add a command prompt](./Command-Prompt)
- [Don't allow spamming commands](Command-Cooldown) - [Don't allow spamming commands](./Command-Cooldown)
- [Commands that take time](Command-Duration) - [Commands that take time](./Command-Duration)
- [Configuring color](Manually-Configuring-Color) - [Configuring color](./Manually-Configuring-Color)
- [Tweet game stats](Tutorial-Tweeting-Game-Stats) - [Tweet game stats](./Tutorial-Tweeting-Game-Stats)
## Mobs and NPCs ## Mobs and NPCs
- [NPCs that listen to you](Tutorial-NPCs-listening) - [NPCs that listen to you](./Tutorial-NPCs-listening)
- [Mobs that attack you](Tutorial-Aggressive-NPCs) - [Mobs that attack you](./Tutorial-Aggressive-NPCs)
- [Shopkeepers](NPC-shop-Tutorial) - [Shopkeepers](./NPC-shop-Tutorial)
## Vehicles ## Vehicles
- [Building a mech](Building-a-mech-tutorial) - [Building a mech](./Building-a-mech-tutorial)
- [Building a train](Tutorial-Vehicles) - [Building a train](./Tutorial-Vehicles)
## Systems ## Systems
- [Understanding In-game time](Gametime-Tutorial) - [Understanding In-game time](./Gametime-Tutorial)
- [Understanding the Help system](Help-System-Tutorial) - [Understanding the Help system](./Help-System-Tutorial)
- [Adding mass to objects](Mass-and-weight-for-objects) - [Adding mass to objects](./Mass-and-weight-for-objects)
- [Add weather](Weather-Tutorial) - [Add weather](./Weather-Tutorial)
## Web-related tutorials ## Web-related tutorials
- [Add a wiki](Add-a-wiki-on-your-website) - [Add a wiki](./Add-a-wiki-on-your-website)
- [A web-based character generation](Web-Character-Generation) - [A web-based character generation](./Web-Character-Generation)
- [View Character on website](Web-Character-View-Tutorial) - [View Character on website](./Web-Character-View-Tutorial)
## Deep-dives ## Deep-dives
- [Understanding color-tags](Understanding-Color-Tags) - [Understanding color-tags](./Understanding-Color-Tags)
- [Play paper&pen RPGs online with Evennia](Evennia-for-roleplaying-sessions) - [Play paper&pen RPGs online with Evennia](./Evennia-for-roleplaying-sessions)
- [Evennia for Diku Users](Evennia-for-Diku-Users) - [Evennia for Diku Users](./Evennia-for-Diku-Users)
- [Evennia for MUSH-Users](Evennia-for-MUSH-Users) - [Evennia for MUSH-Users](./Evennia-for-MUSH-Users)

View file

@ -1,6 +1,6 @@
# Our own commands # Our own commands
[prev lesson](Searching-Things) | [next lesson](More-on-Commands) [prev lesson](./Searching-Things) | [next lesson](./More-on-Commands)
In this lesson we'll learn how to create our own Evennia _Commands_. If you are new to Python you'll In this lesson we'll learn how to create our own Evennia _Commands_. If you are new to Python you'll
also learn some more basics about how to manipulate strings and get information out of Evennia. also learn some more basics about how to manipulate strings and get information out of Evennia.
@ -183,7 +183,7 @@ class CmdEcho(Command):
First we added a docstring. This is always a good thing to do in general, but for a Command class, it will also First we added a docstring. This is always a good thing to do in general, but for a Command class, it will also
automatically become the in-game help entry! Next we add the `func` method. It has one active line where it automatically become the in-game help entry! Next we add the `func` method. It has one active line where it
makes use of some of those variables we found the Command offers to us. If you did the makes use of some of those variables we found the Command offers to us. If you did the
[basic Python tutorial](Python-basic-introduction), you will recognize `.msg` - this will send a message [basic Python tutorial](./Python-basic-introduction), you will recognize `.msg` - this will send a message
to the object it is attached to us - in this case `self.caller`, that is, us. We grab `self.args` and includes to the object it is attached to us - in this case `self.caller`, that is, us. We grab `self.args` and includes
that in the message. that in the message.
@ -393,4 +393,4 @@ We also upset a dragon.
In the next lesson we'll learn how to hit Smaug with different weapons. We'll also In the next lesson we'll learn how to hit Smaug with different weapons. We'll also
get into how we replace and extend Evennia's default Commands. get into how we replace and extend Evennia's default Commands.
[prev lesson](Searching-Things) | [next lesson](More-on-Commands) [prev lesson](./Searching-Things) | [next lesson](./More-on-Commands)

View file

@ -1,6 +1,6 @@
# Using the game and building stuff # Using the game and building stuff
[prev lesson](../Starting-Part1) | [next lesson](Tutorial-World-Introduction) [prev lesson](../Starting-Part1) | [next lesson](./Tutorial-World-Introduction)
In this lesson we will test out what we can do in-game out-of-the-box. Evennia ships with In this lesson we will test out what we can do in-game out-of-the-box. Evennia ships with
[around 90 default commands](../../../Component/Default-Command-Help), and while you can override those as you please, [around 90 default commands](../../../Component/Default-Command-Help), and while you can override those as you please,
@ -152,7 +152,7 @@ the raw description of your current room (including color codes), so that you ca
set its description to something else. set its description to something else.
You create new Commands (or modify existing ones) in Python outside the game. We will get to that You create new Commands (or modify existing ones) in Python outside the game. We will get to that
later, in the [Commands tutorial](Adding-Commands). later, in the [Commands tutorial](./Adding-Commands).
## Get a Personality ## Get a Personality
@ -313,4 +313,4 @@ You will now find your new `History` entry in the `help` list and read your help
After this brief introduction to building and using in-game commands you may be ready to see a more fleshed-out After this brief introduction to building and using in-game commands you may be ready to see a more fleshed-out
example. Evennia comes with a tutorial world for you to explore. We will try that out in the next section. example. Evennia comes with a tutorial world for you to explore. We will try that out in the next section.
[prev lesson](../Starting-Part1) | [next lesson](Tutorial-World-Introduction) [prev lesson](../Starting-Part1) | [next lesson](./Tutorial-World-Introduction)

View file

@ -1,6 +1,6 @@
# Creating things # Creating things
[prev lesson](Learning-Typeclasses) | [next lesson](Searching-Things) [prev lesson](./Learning-Typeclasses) | [next lesson](./Searching-Things)
We have already created some things - dragons for example. There are many different things to create We have already created some things - dragons for example. There are many different things to create
in Evennia though. In the last lesson we learned about typeclasses, the way to make objects persistent in the database. in Evennia though. In the last lesson we learned about typeclasses, the way to make objects persistent in the database.
@ -49,5 +49,5 @@ You can find the parent class for Accounts in `typeclasses/accounts.py`.
_TODO_ _TODO_
[prev lesson](Learning-Typeclasses) | [next lesson](Searching-Things) [prev lesson](./Learning-Typeclasses) | [next lesson](./Searching-Things)

View file

@ -1,6 +1,6 @@
## Django Database queries ## Django Database queries
[prev lesson](Searching-Things) | [next lesson](../Starting-Part2) [prev lesson](./Searching-Things) | [next lesson](../Starting-Part2)
```important:: More advanced lesson! ```important:: More advanced lesson!
@ -398,4 +398,4 @@ query using Django is a powerful skill to have.
This concludes the first part of the Evennia starting tutorial - "What we have". Now we have a good foundation This concludes the first part of the Evennia starting tutorial - "What we have". Now we have a good foundation
to understand how to plan what our tutorial game will be about. to understand how to plan what our tutorial game will be about.
[prev lesson](Searching-Things) | [next lesson](../Starting-Part2) [prev lesson](./Searching-Things) | [next lesson](../Starting-Part2)

View file

@ -1,6 +1,6 @@
# Overview of the Evennia library # Overview of the Evennia library
[prev lesson](Python-classes-and-objects) | [next lesson](Learning-Typeclasses) [prev lesson](./Python-classes-and-objects) | [next lesson](./Learning-Typeclasses)
```sidebar:: API ```sidebar:: API
@ -125,5 +125,5 @@ to look it up in the docs:
5. You can now read what this does and what methods are on it. If you want to see the full source, click the 5. You can now read what this does and what methods are on it. If you want to see the full source, click the
\[[source](src:evennia.objects.objects#DefaultObject)\] link. \[[source](src:evennia.objects.objects#DefaultObject)\] link.
[prev lesson](Python-classes-and-objects) | [next lesson](Learning-Typeclasses) [prev lesson](./Python-classes-and-objects) | [next lesson](./Learning-Typeclasses)

View file

@ -1,6 +1,6 @@
# Overview of your new Game Dir # Overview of your new Game Dir
[prev lesson](Python-basic-introduction) | [next lesson](Python-classes-and-objects) [prev lesson](./Python-basic-introduction) | [next lesson](./Python-classes-and-objects)
Next we will take a little detour to look at the _Tutorial World_. This is a little solo adventure Next we will take a little detour to look at the _Tutorial World_. This is a little solo adventure
that comes with Evennia, a showcase for some of the things that are possible. that comes with Evennia, a showcase for some of the things that are possible.
@ -202,10 +202,10 @@ people change and re-structure this in various ways to better fit their ideas.
- [batch_cmds.ev](github:evennia/game_template/world/batch_cmds.ev) - This is an `.ev` file, which is essentially - [batch_cmds.ev](github:evennia/game_template/world/batch_cmds.ev) - This is an `.ev` file, which is essentially
just a list of Evennia commands to execute in sequence. This one is empty and ready to expand on. The just a list of Evennia commands to execute in sequence. This one is empty and ready to expand on. The
[Tutorial World](Tutorial-World-Introduction) was built with such a batch-file. [Tutorial World](./Tutorial-World-Introduction) was built with such a batch-file.
- [prototypes.py](github:evennia/game_template/world/prototypes.py) - A [prototype](../../../Component/Spawner-and-Prototypes) is a way - [prototypes.py](github:evennia/game_template/world/prototypes.py) - A [prototype](../../../Component/Spawner-and-Prototypes) is a way
to easily vary objects without changing their base typeclass. For example, one could use prototypes to to easily vary objects without changing their base typeclass. For example, one could use prototypes to
tell that Two goblins, while both of the class 'Goblin' (so they follow the same code logic), should have different tell that Two goblins, while both of the class 'Goblin' (so they follow the same code logic), should have different
equipment, stats and looks. equipment, stats and looks.
[prev lesson](Python-basic-introduction) | [next lesson](Python-classes-and-objects) [prev lesson](./Python-basic-introduction) | [next lesson](./Python-classes-and-objects)

View file

@ -1,10 +1,10 @@
# Persistent objects and typeclasses # Persistent objects and typeclasses
[prev lesson](Evennia-Library-Overview) | [next lesson](Creating-Things) [prev lesson](./Evennia-Library-Overview) | [next lesson](./Creating-Things)
Now that we have learned a little about how to find things in the Evennia library, let's use it. Now that we have learned a little about how to find things in the Evennia library, let's use it.
In the [Python classes and objects](Python-classes-and-objects) lesson we created the dragons Fluffy, Cuddly In the [Python classes and objects](./Python-classes-and-objects) lesson we created the dragons Fluffy, Cuddly
and Smaug and made them fly and breathe fire. So far our dragons are short-lived - whenever we `restart` and Smaug and made them fly and breathe fire. So far our dragons are short-lived - whenever we `restart`
the server or `quit()` out of python mode they are gone. the server or `quit()` out of python mode they are gone.
@ -253,7 +253,7 @@ You are specifying exactly which typeclass you want to use to build the Giantess
desc = You see nothing special. desc = You see nothing special.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
We used the `examine` command briefly in the [lesson about building in-game](Building-Quickstart). Now these lines We used the `examine` command briefly in the [lesson about building in-game](./Building-Quickstart). Now these lines
may be more useful to us: may be more useful to us:
- **Name/key** - The name of this thing. The value `(#14)` is probably different for you. This is the - **Name/key** - The name of this thing. The value `(#14)` is probably different for you. This is the
unique 'primary key' or _dbref_ for this entity in the database. unique 'primary key' or _dbref_ for this entity in the database.
@ -359,7 +359,7 @@ You got a lot longer output this time. You have a lot more going on than a simpl
- **Session id(s)**: This identifies the _Session_ (that is, the individual connection to a player's game client). - **Session id(s)**: This identifies the _Session_ (that is, the individual connection to a player's game client).
- **Account** shows, well the `Account` object associated with this Character and Session. - **Account** shows, well the `Account` object associated with this Character and Session.
- **Stored/Merged Cmdsets** and **Commands available** is related to which _Commands_ are stored on you. We will - **Stored/Merged Cmdsets** and **Commands available** is related to which _Commands_ are stored on you. We will
get to them in the [next lesson](Adding-Commands). For now it's enough to know these consitute all the get to them in the [next lesson](./Adding-Commands). For now it's enough to know these consitute all the
commands available to you at a given moment. commands available to you at a given moment.
- **Non-Persistent attributes** are Attributes that are only stored temporarily and will go away on next reload. - **Non-Persistent attributes** are Attributes that are only stored temporarily and will go away on next reload.
@ -621,4 +621,4 @@ Typeclasses are a fundamental part of Evennia and we will see a lot of more uses
this tutorial. But that's enough of them for now. It's time to take some action. Let's learn about _Commands_. this tutorial. But that's enough of them for now. It's time to take some action. Let's learn about _Commands_.
[prev lesson](Evennia-Library-Overview) | [next lesson](Creating-Things) [prev lesson](./Evennia-Library-Overview) | [next lesson](./Creating-Things)

View file

@ -1,6 +1,6 @@
# More about Commands # More about Commands
[prev lesson](Adding-Commands) | [next lesson](Creating-Things) [prev lesson](./Adding-Commands) | [next lesson](./Creating-Things)
In this lesson we learn some basics about parsing the input of Commands. We will In this lesson we learn some basics about parsing the input of Commands. We will
also learn how to add, modify and extend Evennia's default commands. also learn how to add, modify and extend Evennia's default commands.
@ -145,8 +145,8 @@ change (no code changed, only stuff in the database).
## Adding a Command to an object ## Adding a Command to an object
The commands of a cmdset attached to an object with `obj.cmdset.add()` will by default be made available to that object The commands of a cmdset attached to an object with `obj.cmdset.add()` will by default be made available to that object
but _also to those in the same location as that object_. If you did the [Building introduction](Building-Quickstart) but _also to those in the same location as that object_. If you did the [Building introduction](./Building-Quickstart)
you've seen an example of this with the "Red Button" object. The [Tutorial world](Tutorial-World-Introduction) you've seen an example of this with the "Red Button" object. The [Tutorial world](./Tutorial-World-Introduction)
also has many examples of objects with commands on them. also has many examples of objects with commands on them.
To show how this could work, let's put our 'hit' Command on our simple `sword` object from the previous section. To show how this could work, let's put our 'hit' Command on our simple `sword` object from the previous section.
@ -497,4 +497,4 @@ In this lesson we got into some more advanced string formatting - many of those
the future! We also made a functional sword. Finally we got into how to add to, extend and replace a default the future! We also made a functional sword. Finally we got into how to add to, extend and replace a default
command on ourselves. command on ourselves.
[prev lesson](Adding-Commands) | [next lesson](Creating-Things) [prev lesson](./Adding-Commands) | [next lesson](./Creating-Things)

View file

@ -1,6 +1,6 @@
# Starting to code Evennia # Starting to code Evennia
[prev lesson](Tutorial-World-Introduction) | [next lesson](Gamedir-Overview) [prev lesson](./Tutorial-World-Introduction) | [next lesson](./Gamedir-Overview)
Time to dip our toe into some coding! Evennia is written and extended in [Python](http://python.org), which Time to dip our toe into some coding! Evennia is written and extended in [Python](http://python.org), which
is a mature and professional programming language that is very fast to work with. is a mature and professional programming language that is very fast to work with.
@ -71,6 +71,9 @@ While combining different strings is useful, even more powerful is the ability t
of the string in-place. There are several ways to do this in Python and we'll show two of them here. The first of the string in-place. There are several ways to do this in Python and we'll show two of them here. The first
is to use the `.format` _method_ of the string: is to use the `.format` _method_ of the string:
> py print("This is a {} idea!".format("good"))
This is a good idea!
```sidebar:: Functions and Methods ```sidebar:: Functions and Methods
Function: Function:
@ -85,8 +88,6 @@ sits and can thus affect it in various ways. You access it with the period `.`.
string has a resource `format(...)` that modifies it. More specifically, it replaced the `{}` marker string has a resource `format(...)` that modifies it. More specifically, it replaced the `{}` marker
inside the string with the value passed to the format. You can do so many times: inside the string with the value passed to the format. You can do so many times:
> py print("This is a {} idea!".format("bad")) > py print("This is a {} idea!".format("bad"))
This is a bad idea! This is a bad idea!
@ -649,4 +650,4 @@ practice you will be writing most your code in Python modules.
To that end we also created a first new Python module in the `mygame/` game dir, then imported and used it. To that end we also created a first new Python module in the `mygame/` game dir, then imported and used it.
Now let's look at the rest of the stuff you've got going on inside that `mygame/` folder ... Now let's look at the rest of the stuff you've got going on inside that `mygame/` folder ...
[prev lesson](Tutorial-World-Introduction) | [next lesson](Gamedir-Overview) [prev lesson](./Tutorial-World-Introduction) | [next lesson](./Gamedir-Overview)

View file

@ -1,6 +1,6 @@
# Python Classes and objects # Python Classes and objects
[prev lesson](Gamedir-Overview) | [next lesson](Evennia-Library-Overview) [prev lesson](./Gamedir-Overview) | [next lesson](./Evennia-Library-Overview)
We have now learned how to run some simple Python code from inside (and outside) your game server. We have now learned how to run some simple Python code from inside (and outside) your game server.
We have also taken a look at what our game dir looks and what is where. Now we'll start to use it. We have also taken a look at what our game dir looks and what is where. Now we'll start to use it.
@ -93,7 +93,7 @@ The form `from ... import ... as ...` renames the import.
> Avoid renaming unless it's to avoid a name-collistion like above - you want to make things as > Avoid renaming unless it's to avoid a name-collistion like above - you want to make things as
> easy to read as possible, and renaming adds another layer of potential confusion. > easy to read as possible, and renaming adds another layer of potential confusion.
In [the basic intro to Python](Python-basic-introduction) we learned how to open the in-game In [the basic intro to Python](./Python-basic-introduction) we learned how to open the in-game
multi-line interpreter. multi-line interpreter.
> py > py
@ -153,7 +153,7 @@ Next we have a `class` named `Object`, which _inherits_ from `DefaultObject`. Th
actually do anything on its own, its only code (except the docstring) is `pass` which means, actually do anything on its own, its only code (except the docstring) is `pass` which means,
well, to pass and don't do anything. well, to pass and don't do anything.
We will get back to this module in the [next lesson](Learning-Typeclasses). First we need to do a We will get back to this module in the [next lesson](./Learning-Typeclasses). First we need to do a
little detour to understand what a 'class', an 'object' or 'instance' is. These are fundamental little detour to understand what a 'class', an 'object' or 'instance' is. These are fundamental
things to understand before you can use Evennia efficiently. things to understand before you can use Evennia efficiently.
```sidebar:: OOP ```sidebar:: OOP
@ -412,4 +412,4 @@ with one in the child class. We also used `super()` to good effect.
We have used pretty much raw Python so far. In the coming lessons we'll start to look at the extra bits that Evennia We have used pretty much raw Python so far. In the coming lessons we'll start to look at the extra bits that Evennia
provides. But first we need to learn just where to find everything. provides. But first we need to learn just where to find everything.
[prev lesson](Gamedir-Overview) | [next lesson](Evennia-Library-Overview) [prev lesson](./Gamedir-Overview) | [next lesson](./Evennia-Library-Overview)

View file

@ -1,6 +1,6 @@
# Searching for things # Searching for things
[prev lesson](Creating-Things) | [next lesson](Django-queries) [prev lesson](./Creating-Things) | [next lesson](./Django-queries)
We have gone through how to create the various entities in Evennia. But creating something is of little use We have gone through how to create the various entities in Evennia. But creating something is of little use
if we cannot find and use it afterwards. if we cannot find and use it afterwards.
@ -261,5 +261,5 @@ these tools will be all you need ...
... but not always. In the next lesson we will dive further into more complex searching when we look at ... but not always. In the next lesson we will dive further into more complex searching when we look at
Django queries and querysets in earnest. Django queries and querysets in earnest.
[prev lesson](Creating-Things) | [next lesson](Django-queries) [prev lesson](./Creating-Things) | [next lesson](./Django-queries)

View file

@ -1,6 +1,6 @@
# The Tutorial World # The Tutorial World
[prev lesson](Building-Quickstart) | [next lesson](Python-basic-introduction) [prev lesson](./Building-Quickstart) | [next lesson](./Python-basic-introduction)
The *Tutorial World* is a small and functioning MUD-style game world shipped with Evennia. The *Tutorial World* is a small and functioning MUD-style game world shipped with Evennia.
It's a small showcase of what is possible. It can also be useful for those who have an easier It's a small showcase of what is possible. It can also be useful for those who have an easier
@ -115,5 +115,5 @@ should hopefully have given you a little taste of some of the possibilities of
move on with how to access this power through code. move on with how to access this power through code.
[prev lesson](Building-Quickstart) | [next lesson](Python-basic-introduction) [prev lesson](./Building-Quickstart) | [next lesson](./Python-basic-introduction)

View file

@ -7,7 +7,7 @@ focused on free form storytelling. Even if you are not interested in MUSH:es, th
first game-type to try since it's not so code heavy. You will be able to use the same principles for first game-type to try since it's not so code heavy. You will be able to use the same principles for
building other types of games. building other types of games.
The tutorial starts from scratch. If you did the [First Steps Coding](Starting-Part1) tutorial The tutorial starts from scratch. If you did the [First Steps Coding](./Starting-Part1) tutorial
already you should have some ideas about how to do some of the steps already. already you should have some ideas about how to do some of the steps already.
The following are the (very simplistic and cut-down) features we will implement (this was taken from The following are the (very simplistic and cut-down) features we will implement (this was taken from

View file

@ -172,10 +172,4 @@ economic system.
- [Language Reference](http://docs.python.org/ref/ref.html) - [Language Reference](http://docs.python.org/ref/ref.html)
- [Python tips and tricks](http://www.siafoo.net/article/52) - [Python tips and tricks](http://www.siafoo.net/article/52)
- [Jetbrains Python academy](https://hyperskill.org/onboarding?track=python) - free online - [Jetbrains Python academy](https://hyperskill.org/onboarding?track=python) - free online
programming curriculum for different skill levels programming curriculum for different skill levels
### Credits
- Wiki [Home](index) Icons made by [Freepik](http://www.freepik.com"-title="Freepik">Freepik) from
[flaticon.com](http://www.flaticon.com), licensed under [Creative Commons BY
3.0](http://creativecommons.org/licenses/by/3.0).

View file

@ -12,7 +12,7 @@ This will help you download, install and start Evennia for the first time.
- [Linux Install](Getting-Started#linux-install) - [Linux Install](Getting-Started#linux-install)
- [Mac Install](Getting-Started#mac-install) - [Mac Install](Getting-Started#mac-install)
- [Windows Install](Getting-Started#windows-install) - [Windows Install](Getting-Started#windows-install)
- [Running in Docker](Running-Evennia-in-Docker) - [Running in Docker](./Running-Evennia-in-Docker)
- [Where to Go Next](Getting-Started#where-to-go-next) - [Where to Go Next](Getting-Started#where-to-go-next)
- [Troubleshooting](Getting-Started#troubleshooting) - [Troubleshooting](Getting-Started#troubleshooting)
- [Glossary of terms](../Glossary) - [Glossary of terms](../Glossary)
@ -37,7 +37,7 @@ Evennia should now be running and you can connect to it by pointing a web browse
`http://localhost:4001` or a MUD telnet client to `localhost:4000` (use `127.0.0.1` if your OS does `http://localhost:4001` or a MUD telnet client to `localhost:4000` (use `127.0.0.1` if your OS does
not recognize `localhost`). not recognize `localhost`).
We also release [Docker images](Running-Evennia-in-Docker) We also release [Docker images](./Running-Evennia-in-Docker)
based on `master` and `develop` branches. based on `master` and `develop` branches.
## Requirements ## Requirements
@ -161,7 +161,7 @@ Your final folder structure should look like this:
``` ```
You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example
to use a [different database](Choosing-An-SQL-Server). For now we'll just stick to use a [different database](./Choosing-An-SQL-Server). For now we'll just stick
to the defaults though. to the defaults though.
``` ```
@ -273,7 +273,7 @@ Your final folder structure should look like this:
``` ```
You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example
to use a [different database](Choosing-An-SQL-Server). We'll go with the to use a [different database](./Choosing-An-SQL-Server). We'll go with the
defaults here. defaults here.
``` ```
@ -414,7 +414,7 @@ path\to\muddev
``` ```
You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example You can [configure Evennia](../Component/Server-Conf#settings-file) extensively, for example
to use a [different database](Choosing-An-SQL-Server). We'll go with the to use a [different database](./Choosing-An-SQL-Server). We'll go with the
defaults here. defaults here.
``` ```

View file

@ -80,7 +80,7 @@ Install the latest Evennia in a way that lets you edit the source
This step will possibly take quite a while - we are downloading Evennia and are then installing it, This step will possibly take quite a while - we are downloading Evennia and are then installing it,
building all of the requirements for Evennia to run. If you run into trouble on this step, please building all of the requirements for Evennia to run. If you run into trouble on this step, please
see [Troubleshooting](Installing-on-Android#troubleshooting). see [Troubleshooting](./Installing-on-Android#troubleshooting).
You can go to the dir where Evennia is installed with `cd $VIRTUAL_ENV/src/evennia`. `git grep You can go to the dir where Evennia is installed with `cd $VIRTUAL_ENV/src/evennia`. `git grep
(something)` can be handy, as can `git diff` (something)` can be handy, as can `git diff`
@ -88,7 +88,7 @@ You can go to the dir where Evennia is installed with `cd $VIRTUAL_ENV/src/evenn
### Final steps ### Final steps
At this point, Evennia is installed on your phone! You can now continue with the original At this point, Evennia is installed on your phone! You can now continue with the original
[Setup Quickstart](Setup-Quickstart) instruction, we repeat them here for clarity. [Setup Quickstart](./Setup-Quickstart) instruction, we repeat them here for clarity.
To start a new game: To start a new game:

View file

@ -202,7 +202,7 @@ To register, stand in your game dir, run
evennia connections evennia connections
and follow the instructions. See the [Game index page](Evennia-Game-Index) for more details. and follow the instructions. See the [Game index page](./Evennia-Game-Index) for more details.
## SSL ## SSL
@ -249,8 +249,8 @@ also be based on your hosting choice. In a controlled/cPanel environment, you wi
to use DNS verification. to use DNS verification.
## Relevant SSL Proxy Setup Information ## Relevant SSL Proxy Setup Information
- [Apache webserver configuration](Apache-Config) (optional) - [Apache webserver configuration](./Apache-Config) (optional)
- [HAProxy Config](HAProxy-Config) - [HAProxy Config](./HAProxy-Config)
## Hosting locally or remotely? ## Hosting locally or remotely?
@ -283,7 +283,7 @@ main internet connection terminated as a consequence.
#### Setting up your own machine as a server #### Setting up your own machine as a server
[The first section](Online-Setup#connecting-from-the-outside) of this page describes how to do this [The first section](./Online-Setup#connecting-from-the-outside) of this page describes how to do this
and allow users to connect to the IP address of your machine/router. and allow users to connect to the IP address of your machine/router.
A complication with using a specific IP address like this is that your home IP might not remain the A complication with using a specific IP address like this is that your home IP might not remain the
@ -344,7 +344,7 @@ game stays online. Many services guarantee a certain level of up-time and also d
for you. Make sure to check, some offer lower rates in exchange for you yourself being fully for you. Make sure to check, some offer lower rates in exchange for you yourself being fully
responsible for your data/backups. responsible for your data/backups.
- Usually offers a fixed domain name, so no need to mess with IP addresses. - Usually offers a fixed domain name, so no need to mess with IP addresses.
- May have the ability to easily deploy [docker](Running-Evennia-in-Docker) versions of evennia - May have the ability to easily deploy [docker](./Running-Evennia-in-Docker) versions of evennia
and/or your game. and/or your game.
**Disadvantages** **Disadvantages**
@ -362,7 +362,7 @@ Docker) to deploy your game to the remote server; it will likely ease installati
Docker images may be a little confusing if you are completely new to them though. Docker images may be a little confusing if you are completely new to them though.
If not using docker, and assuming you know how to connect to your account over ssh/PuTTy, you should If not using docker, and assuming you know how to connect to your account over ssh/PuTTy, you should
be able to follow the [Setup Quickstart](Setup-Quickstart) instructions normally. You only need Python be able to follow the [Setup Quickstart](./Setup-Quickstart) instructions normally. You only need Python
and GIT pre-installed; these should both be available on any servers (if not you should be able to and GIT pre-installed; these should both be available on any servers (if not you should be able to
easily ask for them to be installed). On a VPS or Cloud service you can install them yourself as easily ask for them to be installed). On a VPS or Cloud service you can install them yourself as
needed. needed.

View file

@ -44,4 +44,4 @@ switch:
@rss2chan/delete rss = https://github.com/evennia/evennia/commits/master.atom @rss2chan/delete rss = https://github.com/evennia/evennia/commits/master.atom
You can connect any number of RSS feeds to a channel this way. You could also connect them to the You can connect any number of RSS feeds to a channel this way. You could also connect them to the
same channels as [IRC](IRC) to have the feed echo to external chat channels as well. same channels as [IRC](./IRC) to have the feed echo to external chat channels as well.

View file

@ -34,7 +34,7 @@ evennia|docker /usr/src/game $
This is a normal shell prompt. We are in the `/usr/src/game` location inside the docker container. This is a normal shell prompt. We are in the `/usr/src/game` location inside the docker container.
If you had anything in the folder you started from, you should see it here (with `ls`) since we If you had anything in the folder you started from, you should see it here (with `ls`) since we
mounted the current directory to `usr/src/game` (with `-v` above). You have the `evennia` command mounted the current directory to `usr/src/game` (with `-v` above). You have the `evennia` command
available and can now proceed to create a new game as per the [Setup Quickstart](Setup-Quickstart) available and can now proceed to create a new game as per the [Setup Quickstart](./Setup-Quickstart)
instructions (you can skip the virtualenv and install 'globally' in the container though). instructions (you can skip the virtualenv and install 'globally' in the container though).
You can run Evennia from inside this container if you want to, it's like you are root in a little You can run Evennia from inside this container if you want to, it's like you are root in a little

View file

@ -131,7 +131,7 @@ Now the only ports open will be your administrative ssh port (whichever you chos
4000-4001. 4000-4001.
### Use an external webserver ### Use an external webserver
Though not officially supported, there are some benefits to [deploying a webserver](Apache-Config) Though not officially supported, there are some benefits to [deploying a webserver](./Apache-Config)
to handle/proxy traffic to your Evennia instance. to handle/proxy traffic to your Evennia instance.
For example, Evennia's game engine and webservice are tightly integrated. If you bring your game For example, Evennia's game engine and webservice are tightly integrated. If you bring your game

View file

@ -4,11 +4,11 @@ This documentation covers how to setup and maintain the server, from first insta
## Installation & running ## Installation & running
- [Installation & Setup quick-start](Setup-Quickstart) - one page to quickly get you going - [Installation & Setup quick-start](./Setup-Quickstart) - one page to quickly get you going
- [Extended Install instructions](Extended-Installation) - if you have trouble or want to contribute to Evennia itself - [Extended Install instructions](./Extended-Installation) - if you have trouble or want to contribute to Evennia itself
- [Running through Docker](Running-Evennia-in-Docker) - alternative install method, useful for quick deployment on remote servers - [Running through Docker](./Running-Evennia-in-Docker) - alternative install method, useful for quick deployment on remote servers
- [Installing Evennia on Android](Installing-on-Android) - for those craving a mobile life - [Installing Evennia on Android](./Installing-on-Android) - for those craving a mobile life
- [Controlling the server](Start-Stop-Reload) - an extended view on how to start/stop/update the server - [Controlling the server](./Start-Stop-Reload) - an extended view on how to start/stop/update the server
## Installing custom game dirs ## Installing custom game dirs
@ -16,20 +16,20 @@ This documentation covers how to setup and maintain the server, from first insta
## Configuring ## Configuring
- [The settings file](Settings-File) - how and where to change the main settings of the server - [The settings file](./Settings-File) - how and where to change the main settings of the server
- [Change database engine](Choosing-An-SQL-Server) - if you want to use something other than SQLite3 - [Change database engine](./Choosing-An-SQL-Server) - if you want to use something other than SQLite3
- [Evennia game index](Evennia-Game-Index) - register your upcoming game with the index to start the hype going - [Evennia game index](./Evennia-Game-Index) - register your upcoming game with the index to start the hype going
- [Chat on IRC](IRC) - how to link your game's channels to an external [IRC](https://en.wikipedia.org/wiki/Internet_Relay_Chat) channel - [Chat on IRC](./IRC) - how to link your game's channels to an external [IRC](https://en.wikipedia.org/wiki/Internet_Relay_Chat) channel
- [Chat on Grapevine](Grapevine) - how to link your game's channels the [Grapevine](https://grapevine.haus/) mud network/chat - [Chat on Grapevine](./Grapevine) - how to link your game's channels the [Grapevine](https://grapevine.haus/) mud network/chat
- [Messages to RSS](RSS) - have your game notify people through RSS - [Messages to RSS](./RSS) - have your game notify people through RSS
- [Messages to Twitter](How-to-connect-Evennia-to-Twitter) - have Evennia send messages to [Twitter](https://twitter.com/) (requires some coding) - [Messages to Twitter](./How-to-connect-Evennia-to-Twitter) - have Evennia send messages to [Twitter](https://twitter.com/) (requires some coding)
## Going public ## Going public
- [Notes about security](Security) - some things to think about to stay safe(r) - [Notes about security](./Security) - some things to think about to stay safe(r)
- [Using HAProxy](HAProxy-Config) - putting a proxy in front of the game server for security - [Using HAProxy](./HAProxy-Config) - putting a proxy in front of the game server for security
- [Using Apache as a webserver](Apache-Config) - use Apache instead of Evennia's webserver (limited support) - [Using Apache as a webserver](./Apache-Config) - use Apache instead of Evennia's webserver (limited support)
- [Taking your server online](Online-Setup) - decide on where to host and configure your game for production - [Taking your server online](./Online-Setup) - decide on where to host and configure your game for production
- [Client support grid](Client-Support-Grid) - clients known to work (or not) with Evennia - [Client support grid](./Client-Support-Grid) - clients known to work (or not) with Evennia

View file

@ -16,8 +16,8 @@ to install Evennia as superuser.
Make sure the `evennia` command works. Use `evennia -h` for usage help (or read on). Make sure the `evennia` command works. Use `evennia -h` for usage help (or read on).
If you are having trouble, want to install in some other way (like with Docker) or want to contribute to If you are having trouble, want to install in some other way (like with Docker) or want to contribute to
Evennia itself, check out the [Extended Installation instructions](Extended-Installation). Evennia itself, check out the [Extended Installation instructions](./Extended-Installation).
It also has a [troubleshooting section](Extended-Installation#Troubleshooting) for different operating It also has a [troubleshooting section](./Extended-Installation#Troubleshooting) for different operating
systems. systems.

View file

@ -3,7 +3,7 @@
You control Evennia from your game folder (we refer to it as `mygame/` here), using the `evennia` You control Evennia from your game folder (we refer to it as `mygame/` here), using the `evennia`
program. If the `evennia` program is not available on the command line you must first install program. If the `evennia` program is not available on the command line you must first install
Evennia as described in the [Setup Quickstart](Setup-Quickstart) page. Evennia as described in the [Setup Quickstart](./Setup-Quickstart) page.
> Hint: If you ever try the `evennia` command and get an error complaining that the command is not > Hint: If you ever try the `evennia` command and get an error complaining that the command is not
available, make sure your [virtualenv](../Glossary#virtualenv) is active. available, make sure your [virtualenv](../Glossary#virtualenv) is active.

View file

@ -3,4 +3,4 @@
```warning:: This page has not been written yet. ```warning:: This page has not been written yet.
``` ```
Return to the [front page](index). Return to the [front page](./index#Evennia-documentation).

View file

@ -16,10 +16,10 @@
This is the manual of [Evennia](http://www.evennia.com), the open source Python This is the manual of [Evennia](http://www.evennia.com), the open source Python
`MU*` creation system. `MU*` creation system.
- [Evennia Introduction](Evennia-Introduction) - [Evennia Introduction](./Evennia-Introduction)
- [Install & Setup Quickstart](Setup/Setup-Quickstart) - [Install & Setup Quickstart](Setup/Setup-Quickstart)
- [Begin the starting tutorial](Howto/Starting/Starting-Part1) - [Begin the starting tutorial](Howto/Starting/Starting-Part1)
- [How to get (and give) help](How-To-Get-And-Give-Help) - [How to get (and give) help](./How-To-Get-And-Give-Help)
## Main sections ## Main sections
@ -29,7 +29,7 @@ This is the manual of [Evennia](http://www.evennia.com), the open source Python
- [Concepts](Concept/Concept-Overview) - larger-scale concepts and features - [Concepts](Concept/Concept-Overview) - larger-scale concepts and features
- [Coding](Coding/Coding-Overview) - coding and development hints and resources - [Coding](Coding/Coding-Overview) - coding and development hints and resources
- [Contributions](Contrib/Contrib-Overview) - game-specific tools and code added by the community - [Contributions](Contrib/Contrib-Overview) - game-specific tools and code added by the community
- [API](Evennia-API) - the full API-reference, generated from source - [API](./Evennia-API) - the full API-reference, generated from source
- [Table of Contents](toc) - an alphabetical listing of all regular documentation pages - [Table of Contents](./toc) - an alphabetical listing of all regular documentation pages
Want to help improve the docs? See the page on [Contributing to the docs](Contributing-Docs)! Want to help improve the docs? See the page on [Contributing to the docs](./Contributing-Docs)!

View file

@ -283,7 +283,8 @@ def parse_language(speaker, emote):
the markers and a tuple (langname, saytext), where the markers and a tuple (langname, saytext), where
langname can be None. langname can be None.
Raises: Raises:
LanguageError: If an invalid language was specified. evennia.contrib.rpsystem.LanguageError: If an invalid language was
specified.
Notes: Notes:
Note that no errors are raised if the wrong language identifier Note that no errors are raised if the wrong language identifier

View file

@ -449,9 +449,9 @@ class PortalSessionHandler(SessionHandler):
Keyword args: Keyword args:
kwargs (any): Each key is a command instruction to the kwargs (any): Each key is a command instruction to the
protocol on the form key = [[args],{kwargs}]. This will protocol on the form key = [[args],{kwargs}]. This will
call a method send_<key> on the protocol. If no such call a method send_<key> on the protocol. If no such
method exixts, it sends the data to a method send_default. method exixts, it sends the data to a method send_default.
""" """
# from evennia.server.profiling.timetrace import timetrace # DEBUG # from evennia.server.profiling.timetrace import timetrace # DEBUG

View file

@ -230,7 +230,7 @@ class ServerSession(Session):
Update the protocol_flags and sync them with Portal. Update the protocol_flags and sync them with Portal.
Keyword args: Keyword args:
key, value - A key:value pair to set in the protocol_flag (any): A key and value to set in the
protocol_flags dictionary. protocol_flags dictionary.
Notes: Notes:

View file

@ -1313,8 +1313,8 @@ def initialize_nick_templates(in_template, out_template):
replacement using the standard .format method. replacement using the standard .format method.
Raises: Raises:
NickTemplateInvalid: If the in/out template does not have a matching evennia.typecalasses.attributes.NickTemplateInvalid: If the in/out
number of `$args`. template does not have a matching number of `$args`.
""" """

View file

@ -524,8 +524,8 @@ def initialize_nick_templates(in_template, out_template):
replacement using the standard .format method. replacement using the standard .format method.
Raises: Raises:
NickTemplateInvalid: If the in/out template does not have a matching evennia.utils.inlinefuncs.NickTemplateInvalid: If the in/out template
number of $args. does not have a matching number of $args.
""" """
# create the regex for in_template # create the regex for in_template