Make entire wiki compile; still with many errors

This commit is contained in:
Griatch 2020-06-06 19:38:34 +02:00
parent 17dfb93b32
commit 13df0adebf
74 changed files with 395 additions and 317 deletions

View file

@ -16,14 +16,14 @@ We also need to build the toc-tree and should do so automatically for now.
import glob
import re
_RE_MD_LINK = re.compile(r"\[(?P<txt>[\w -]+)\]\((?P<url>\w+?)\)", re.I + re.S + re.U)
_RE_MD_LINK = re.compile(r"\[(?P<txt>[\w -]+)\]\((?P<url>.+?)\)", re.I + re.S + re.U)
_IGNORE_FILES = (
"_Sidebar.md",
"Evennia-for-MUSH-Users.md",
"Installing-on-Android.md",
"Nicks.md",
"Spawner-and-Prototypes.md"
# "Evennia-for-MUSH-Users.md",
# "Installing-on-Android.md",
# "Nicks.md",
# "Spawner-and-Prototypes.md"
)
_WIKI_DIR = "../../../evennia.wiki/"
@ -33,6 +33,9 @@ _FILENAMES = [path.rsplit("/", 1)[-1] for path in _INFILES]
_FILENAMES = [path.split(".", 1)[0] for path in _FILENAMES]
_FILENAMESLOW = [path.lower() for path in _FILENAMES]
_OUTDIR = "../source/"
_OLD_WIKI_URL = "https://github.com/evennia/evennia/wiki/"
_OLD_WIKI_URL_LEN = len(_OLD_WIKI_URL)
_CODE_PREFIX = "code:"
_CUSTOM_LINK_REMAP = {
"CmdSets": "Command-Sets",
@ -44,14 +47,25 @@ _CUSTOM_LINK_REMAP = {
"batch-command-processor": "Batch-Command-Processor",
"Batch-command-processor": "Batch-Command-Processor",
"evennia-API": "Evennia-API",
"Channels": "Communications.md#Channels",
"Channels": "Communications#Channels",
"Comms": "Communications",
"typeclass": "Typeclasses",
"Home": "index",
"Help-system": "Help-System",
"Using-Mux-as-a-Standard": "Using-MUX-as-a-Standard",
"Building-quickstart": "Building-Quickstart",
"Adding-Object-Typeclass-tutorial": "Adding-Object-Typeclass-Tutorial",
}
_LINK_SKIP = (
# absolute links (mainly github links) that should not be converted. This
# should be given without any #anchor.
_ABSOLUTE_LINK_SKIP = (
"https://github.com/evennia/evennia/wiki/feature-request"
)
# specific references tokens that should be ignored. Should be given
# without any #anchor.
_REF_SKIP = (
"[5](Win)", "[6](Win)", "[7](Win)", "[10](Win)", "[11](Mac)", "[13](Win)",
"[14](IOS)", "[15](IOS)", "[16](Andr)", "[17](Andr)", "[18](Unix)",
"[21](Chrome)",
@ -67,14 +81,18 @@ _LINK_SKIP = (
"[Session](Session)",
"[Inputfuncs](Inputfunc)",
"[Nicks](Nicks)",
"[Nick](Nicks)",
# "[Nicks](Nicks)",
# "[Nick](Nicks)",
)
_CURRENT_TITLE = ""
def _sub_link(match):
mdict = match.groupdict()
txt, url = mdict['txt'], mdict['url']
txt, url_orig = mdict['txt'], mdict['url']
url = url_orig
# if not txt:
# # the 'comment' is not supported by Mkdocs
# return ""
@ -82,32 +100,63 @@ def _sub_link(match):
url = _CUSTOM_LINK_REMAP.get(url, url)
if url not in _FILENAMES and not url.startswith("http") and "#" not in url:
url, *anchor = url.rsplit("#", 1)
if url in _ABSOLUTE_LINK_SKIP:
url += (("#" + anchor[0]) if anchor else "")
return f"[{txt}]({url})"
if url.startswith(_OLD_WIKI_URL):
# old wiki is an url on the form https://<wikiurl>/wiki/TextTags#header
# we don't refer to the old wiki but use internal mapping.
url_conv = url[_OLD_WIKI_URL_LEN:]
url_conv = re.sub(r"%20", "-", url_conv)
if url_conv.endswith("/_edit"):
# this is actually a bug in the wiki format
url_conv = url_conv[:-6]
if url_conv.startswith("evennia"):
# this is an api link
url_conv = _CODE_PREFIX + url_conv
print(f" Converting wiki-url: {url} -> {url_conv}")
url = url_conv
if not url and anchor:
# this happens on same-file #labels in wiki
url = _CURRENT_TITLE
if (url not in _FILENAMES and
not url.startswith("http") and not url.startswith(_CODE_PREFIX)):
url_cap = url.capitalize()
url_plur = url[:-3] + 's' + ".md"
url_cap_plur = url_plur.capitalize()
link = f"[{txt}]({url})"
if link in _LINK_SKIP:
return link
if url_cap in _FILENAMES:
if link in _REF_SKIP:
url = link
elif url_cap in _FILENAMES:
print(f" Replacing (capitalized): {url.capitalize()}")
return url_cap
if url_plur in _FILENAMES:
url = url_cap
elif url_plur in _FILENAMES:
print(f" Replacing (pluralized): {url + 's'}")
return url_plur
if url_cap_plur in _FILENAMES:
url = url_plur
elif url_cap_plur in _FILENAMES:
print(f" Replacing (capitalized, pluralized): {url.capitalize() + 's'}")
return url_cap_plur
if url.lower() in _FILENAMESLOW:
url = url_cap_plur
elif url.lower() in _FILENAMESLOW:
ind = _FILENAMESLOW.index(url.lower())
alt = _FILENAMES[ind]
print(f" Possible match (different cap): {alt}")
print(f"\nlink {link} found no file match")
inp = input("Enter alternate url (return to keep old): ")
if inp.strip():
url = inp.strip()
print(f" Replacing {url} with different cap: {alt}")
url = alt
# print(f"\nlink {link} (orig: [{txt}]({url_orig})) found no file match")
# inp = input("Enter alternate url (return to keep old): ")
# if inp.strip():
# url = inp.strip()
if anchor:
url += "#" + anchor[0]
return f"[{txt}]({url})"
@ -124,29 +173,30 @@ def create_toctree(files):
fil.write(f"\n* [{linkname}]({ref}.md)")
def convert_links(files, outdir):
global _CURRENT_TITLE
print(_INFILES)
for inpath in files:
title = inpath.rsplit("/", 1)[-1].split(".", 1)[0].replace("-", " ")
print(f"Converting links in {inpath} ->", end=" ")
with open(inpath) as fil:
text = fil.read()
text = _RE_MD_LINK.sub(_sub_link, text)
text = text.split('\n')[1:] if text.split('\n')[0].strip().startswith('[]') else text.split('\n')
text = f"# {title}\n\n" + '\n'.join(text)
outfile = inpath.rsplit('/', 1)[-1]
if outfile == "Home.md":
outfile = "index.md"
outfile = _OUTDIR + outfile
title = inpath.rsplit("/", 1)[-1].split(".", 1)[0].replace("-", " ")
print(f"Converting links in {inpath} -> {outfile} ...")
with open(inpath) as fil:
text = fil.read()
_CURRENT_TITLE = title.replace(" ", "-")
text = _RE_MD_LINK.sub(_sub_link, text)
text = text.split('\n')[1:] if text.split('\n')[0].strip().startswith('[]') else text.split('\n')
text = f"# {title}\n\n" + '\n'.join(text)
with open(outfile, 'w') as fil:
fil.write(text)
print(f"{outfile}.")
if __name__ == "__main__":
create_toctree(_INFILES)

View file

@ -12,7 +12,7 @@ This is how to enter an opinion. Use any markdown needed but stay within your se
### Griatch (Sept 2, 2019)
I don't agree with removing explicit keywords as suggested by [Johnny on Aug 29 below](https://github.com/evennia/evennia/wiki/API-refactoring/_edit#reduce-usage-of-optionalpositional-arguments-aug-29-2019). Overriding such a method can still be done by `get(self, **kwargs)` if so desired, making the kwargs explicit helps IMO readability of the API. If just giving a generic `**kwargs`, one must read the docstring or even the code to see which keywords are valid.
I don't agree with removing explicit keywords as suggested by [Johnny on Aug 29 below](API-refactoring#reduce-usage-of-optionalpositional-arguments-aug-29-2019). Overriding such a method can still be done by `get(self, **kwargs)` if so desired, making the kwargs explicit helps IMO readability of the API. If just giving a generic `**kwargs`, one must read the docstring or even the code to see which keywords are valid.
On the other hand, I think it makes sense to as a standard offer an extra `**kwargs` at the end of arg-lists for common methods that are expected to be over-ridden. This make the API more flexible by hinting to the dev that they could expand their own over-ridden implementation with their own keyword arguments if so desired.

View file

@ -15,7 +15,7 @@ consistent between different in-game characters as well as configuration options
object also has its own [CmdSet](Command-Sets), the `AccountCmdSet`.
Logged into default evennia, you can use the `ooc` command to leave your current
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
game supports that) or as a safety mode if your Character gets deleted. Use `ic` to attempt to
(re)puppet a Character.
@ -83,7 +83,7 @@ Account also has the following custom properties:
- `obj` - an alias for `character`.
- `name` - an alias for `user.username`
- `sessions` - an instance of
[ObjectSessionHandler](https://github.com/evennia/evennia/wiki/evennia.objects.objects#objectsessionhandler)
[ObjectSessionHandler](code:evennia.objects.objects#objectsessionhandler)
managing all connected Sessions (physical connections) this object listens to (Note: In older
versions of Evennia, this was a list). The so-called `session-id` (used in many places) is found as
a property `sessid` on each Session instance.

View file

@ -62,7 +62,7 @@ up.
you will find the traceback. The most common error is that you have some sort of syntax error in
your class.
Note that the Locks and [Attribute](Attributes) which are set in the typeclass could just
Note that the [Locks](Locks) and [Attribute](Attributes) which are set in the typeclass could just
as well have been set using commands in-game, so this is a *very* simple example.
## Storing data on initialization

View file

@ -9,9 +9,9 @@ The following pages are aimed at game administrators -- the higher-ups that poss
- [Running Evennia in Docker Containers](Running-Evennia-in-Docker)
- [Starting, stopping, reloading and resetting Evennia](Start-Stop-Reload)
- [Keeping your game up to date](Updating-Your-Game)
- [Resetting your database](https://github.com/evennia/evennia/wiki/Updating%20Your%20Game#resetting-your-database)
- [Resetting your database](Updating-Your-Game#resetting-your-database)
- [Making your game available online](Online-Setup)
- [Hosting options](https://github.com/evennia/evennia/wiki/Online-Setup#hosting-options)
- [Hosting options](Online-Setup#hosting-options)
- [Securing your server with SSL/Let's Encrypt](https://github.com/evennia/evennia/wiki/Online-Setup#ssl)
- [Listing your game](Evennia-Game-Index) at the online [Evennia game index](http://games.evennia.com)
@ -27,14 +27,14 @@ The following pages are aimed at game administrators -- the higher-ups that poss
- [How to connect Evennia to IRC channels](IRC)
- [How to connect Evennia to RSS feeds](RSS)
- [How to connect Evennia to Grapevine](Grapevine)
- [How to connect Evennia to Twitter](https://github.com/evennia/evennia/wiki/How-to-connect-Evennia-to-Twitter)
- [How to connect Evennia to Twitter](How-to-connect-Evennia-to-Twitter)
### Administrating the running game
- [Supported clients](Client-Support-Grid) (grid of known client issues)
- [Changing Permissions](Building-Permissions) of users
- [Banning](Banning) and deleting users
- [Summary of abuse-handling tools](https://github.com/evennia/evennia/wiki/Banning#summary-of-abuse-handling-tools) in the default cmdset
- [Summary of abuse-handling tools](Banning#summary-of-abuse-handling-tools) in the default cmdset
### Working with Evennia

View file

@ -11,7 +11,7 @@ to pick ideas or even get a starting game to build on. These instructions are ba
released as of *Aug 12, 2018*.
If you are not familiar with what Evennia is, you can read
[an introduction here](https://github.com/evennia/evennia/wiki/Evennia-Introduction).
[an introduction here](Evennia-Introduction).
It's not too hard to run Arx from the sources (of course you'll start with an empty database) but
since part of Arx has grown organically, it doesn't follow standard Evennia paradigms everywhere.
@ -28,7 +28,7 @@ Instructions](Getting-Started) for your OS. The difference is that you need to `
If you are new to Evennia it's *highly* recommended that you run through the
instructions in full - including initializing and starting a new empty game and connecting to it.
That way you can be sure Evennia works correctly as a base line. If you have trouble, make sure to
read the [Troubleshooting instructions](https://github.com/evennia/evennia/wiki/Getting-Started#troubleshooting) for your
read the [Troubleshooting instructions](Getting-Started#troubleshooting) for your
operating system. You can also drop into our
[forums](https://groups.google.com/forum/#%21forum/evennia), join `#evennia` on `irc.freenode.net`
or chat from the linked [Discord Server](https://discord.gg/NecFePw).

View file

@ -15,7 +15,7 @@ specific names and require very specific types of data (for example you couldn't
*list* to the `key` property no matter how hard you tried). `Attributes` come into play when you
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 [prevent this behavior](#locking-and-checking-attributes).**
**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).**
## The .db and .ndb shortcuts
@ -58,12 +58,12 @@ You can also `del` properties on `db` and `ndb` as normal. This will for example
del rose.db.has_thorns
```
Both `db` and `ndb` defaults to offering an `all()` method on themselves. This returns all
Both `db` and `ndb` defaults to offering an `all` property on themselves. This returns all
associated attributes or non-persistent properties.
```python
list_of_all_rose_attributes = rose.db.all()
list_of_all_rose_ndb_attrs = rose.ndb.all()
list_of_all_rose_attributes = rose.db.all
list_of_all_rose_ndb_attrs = rose.ndb.all
```
If you use `all` as the name of an attribute, this will be used instead. Later deleting your custom
@ -91,7 +91,7 @@ The handlers have normal access methods that allow you to manage and retrieve `A
before performing the deletion. - `clear(...)` - removes all Attributes from object.
- `all(...)` - returns all Attributes (of the given category) attached to this object.
See [this section](https://github.com/evennia/evennia/wiki/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.
Some examples:
@ -185,7 +185,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
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,
as mentioned in the [Retrieving Mutable Objects](#retrieving-mutable-objects) section below.
as mentioned in the [Retrieving Mutable Objects](Attributes#retrieving-mutable-objects) section below.
### Storing single objects

View file

@ -91,10 +91,10 @@ Below are other useful commands for dealing with annoying players.
- **unban 34** -- Remove ban with id #34
- **cboot mychannel = thomas** -- Boot a subscriber from a channel you control
- **clock mychannel = control:perm(Admin);listen:all();send:all()** -- Fine control of access to your channel using [lock definitions](https://github.com/evennia/evennia/wiki/Locks).
- **clock mychannel = control:perm(Admin);listen:all();send:all()** -- Fine control of access to your channel using [lock definitions](Locks).
Locking a specific command (like `page`) is accomplished like so:
1. Examine the source of the command. [The default `page` command class]( https://github.com/evennia/evennia/blob/master/evennia/commands/default/comms.py#L686) has the lock string **"cmd:not pperm(page_banned)"**. This means that unless the player has the 'permission' "page_banned" they can use this command. You can assign any lock string to allow finer customization in your commands. You might look for the value of an [Attribute](https://github.com/evennia/evennia/wiki/Attributes) or [Tag](https://github.com/evennia/evennia/wiki/Tags), your current location etc.
1. Examine the source of the command. [The default `page` command class]( https://github.com/evennia/evennia/blob/master/evennia/commands/default/comms.py#L686) has the lock string **"cmd:not pperm(page_banned)"**. This means that unless the player has the 'permission' "page_banned" they can use this command. You can assign any lock string to allow finer customization in your commands. You might look for the value of an [Attribute](Attributes) or [Tag](Tags), your current location etc.
2. **perm/account thomas = page_banned** -- Give the account the 'permission' which causes (in this case) the lock to fail.
- **perm/del/account thomas = page_banned** -- Remove the given permission

View file

@ -115,7 +115,7 @@ The solution to all these is to plan ahead. Make sure that superusers are never
## Assorted notes
The fact that you build as 'yourself' can also be considered an advantage however, should you ever decide to change the default command to allow others than superusers to call the processor. Since normal access-checks are still performed, a malevolent builder with access to the processor should not be able to do all that much damage (this is the main drawback of the [Batch Code Processor](batch-code-processor))
The fact that you build as 'yourself' can also be considered an advantage however, should you ever decide to change the default command to allow others than superusers to call the processor. Since normal access-checks are still performed, a malevolent builder with access to the processor should not be able to do all that much damage (this is the main drawback of the [Batch Code Processor](Batch-Code-Processor))
- [GNU Emacs](https://www.gnu.org/software/emacs/) users might find it interesting to use emacs' *evennia mode*. This is an Emacs major mode found in `evennia/utils/evennia-mode.el`. It offers correct syntax highlighting and indentation with `<tab>` when editing `.ev` files in Emacs. See the header of that file for installation instructions.
- [VIM](http://www.vim.org/) users can use amfl's [vim-evennia](https://github.com/amfl/vim-evennia) mode instead, see its readme for install instructions.

View file

@ -15,8 +15,8 @@ You can of course still build completely online should you want to - this is cer
There are two batch processors, the Batch-*command* processor and the Batch-*code* processor. The first one is the simpler of the two. It doesn't require any programming knowledge - you basically just list in-game commands in a text file. The code-processor on the other hand is much more powerful but also more complex - it lets you use Evennia's API to code your world in full-fledged Python code.
- The [Batch Command Processor](Batch-command-processor)
- The [Batch Code Processor](Batch-code-processor)
- The [Batch Command Processor](Batch-Command-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 encodings* below.

View file

@ -1,7 +1,7 @@
# Bootstrap Components and Utilities
Bootstrap provides many utilities and components you can use when customizing Evennia's web presence. We'll go over a few examples here that you might find useful.
> Please take a look at either [the basic web tutorial](https://github.com/evennia/evennia/wiki/Add-a-simple-new-web-page) or [the web character view tutorial](https://github.com/evennia/evennia/wiki/Web-Character-View-Tutorial)
> Please take a look at either [the basic web tutorial](Add-a-simple-new-web-page) or [the web character view tutorial](Web-Character-View-Tutorial)
> to get a feel for how to add pages to Evennia's website to test these examples.
## General Styling

View file

@ -8,9 +8,9 @@ This section contains information useful to world builders.
- [Building Quick-start](Building-Quickstart)
- [Giving build permissions to others](Building-Permissions)
- [Adding text tags](TextTags)
- [Colored text](https://github.com/evennia/evennia/wiki/TextTags#coloured-text)
- [Clickable links](https://github.com/evennia/evennia/wiki/TextTags#clickable-links)
- [Inline functions](https://github.com/evennia/evennia/wiki/TextTags#inline-functions)
- [Colored text](TextTags#coloured-text)
- [Clickable links](TextTags#clickable-links)
- [Inline functions](TextTags#inline-functions)
- [Customizing the connection screen](Connection-Screen)
### Advanced building and World building
@ -18,7 +18,7 @@ This section contains information useful to world builders.
- [Overview of batch processors](Batch-Processors)
- [Batch-command processor](Batch-Command-Processor)
- [Batch-code processor](Batch-Code-Processor)
- [Using the Spawner for individualizing objects](https://github.com/evennia/evennia/wiki/Spawner-and-Prototypes)
- [Using the Spawner for individualizing objects](Spawner-and-Prototypes)
- [Adding Zones](Zones)
### The Tutorial world

View file

@ -78,7 +78,7 @@ Try to get it now and you should see a nicer error message echoed back to you. T
Examine will return the value of attributes, including color codes. `examine here/desc` would return the raw description of your current room (including color codes), so that you can copy-and-paste to set its description to something else.
You create new Commands (or modify existing ones) in Python outside the game. See the [Adding Commands tutorial](https://github.com/evennia/evennia/wiki/Adding%20Command%20Tutorial) for help with creating your first own Command.
You create new Commands (or modify existing ones) in Python outside the game. See the [Adding Commands tutorial](Adding-Command-Tutorial) for help with creating your first own Command.
## Get a Personality

View file

@ -78,7 +78,7 @@ class CmdShoot(Command):
return
# we have an argument, search for target
target = caller.search(self.args)
target = caller.search(self.args.strip())
if target:
message = "BOOM! The mech fires its gun at %s" % target.key
location.msg_contents(message)

View file

@ -15,23 +15,23 @@ Name | Version | Comments
[Evennia webclient][1] | 0.6 | Uses WS/AJAX. [Current client issues][2]
[tintin++][3] | 2.0+ | No MXP support
[tinyfugue][4] | 5.0+ | No UTF-8 support
[MUSHclient][5](Win) | 4.94 | NAWS reports full text area
[Zmud][6](Win) | 7.21 | *UNTESTED*
[Cmud][7](Win) | v3 | *UNTESTED*
[MUSHclient][5] (Win) | 4.94 | NAWS reports full text area
[Zmud][6] (Win) | 7.21 | *UNTESTED*
[Cmud][7] (Win) | v3 | *UNTESTED*
[Potato][8] | 2.0.0b16 | No MXP, MCCP support. Win 32bit does not understand "localhost", must use `127.0.0.1`. [Newline issue](https://github.com/evennia/evennia/issues/1131). *Won't send a single blank line on Enter press.
[Mudlet][9] | 3.4+ | No known issues. Some older versions showed <> as html under MXP.
[SimpleMU][10](Win) | full | *UNTESTED*. Discontinued. NAWS reports pixel size.
[Atlantis][11](Mac) | 0.9.9.4 | No known issues.
[SimpleMU][10] (Win) | full | *UNTESTED*. Discontinued. NAWS reports pixel size.
[Atlantis][11] (Mac) | 0.9.9.4 | No known issues.
[GMUD][12] | 0.0.1 | Can't handle any telnet handshakes. Not recommended.
[BeipMU][13](Win) | 3.0.255 | No MXP support. Best to enable "MUD prompt handling", disable "Handle HTML tags".
[MudRammer][14](IOS) | 1.8.7 | Bad Telnet Protocol compliance: displays spurious characters.
[MUDMaster][15](IOS) | 1.3.1 | *UNTESTED*
[BlowTorch][16](Andr) | 1.1.3 | *Telnet NOP displays as spurious character.
[Mukluk][17](Andr) | 2015.11.20| *Telnet NOP displays as spurious character. Has UTF-8/Emoji support.
[Gnome-MUD][18](Unix) | 0.11.2 | Telnet handshake errors. First (only) attempt at logging in fails.
[BeipMU][13] (Win) | 3.0.255 | No MXP support. Best to enable "MUD prompt handling", disable "Handle HTML tags".
[MudRammer][14] (IOS) | 1.8.7 | Bad Telnet Protocol compliance: displays spurious characters.
[MUDMaster][15] (IOS) | 1.3.1 | *UNTESTED*
[BlowTorch][16] (Andr) | 1.1.3 | *Telnet NOP displays as spurious character.
[Mukluk][17] (Andr) | 2015.11.20| *Telnet NOP displays as spurious character. Has UTF-8/Emoji support.
[Gnome-MUD][18] (Unix) | 0.11.2 | Telnet handshake errors. First (only) attempt at logging in fails.
[Spyrit][19] | 0.4 | No MXP, OOB support.
[JamochaMUD][20] | 5.2 | Does not support ANSI within MXP text.
[DuckClient][21](Chrome)| 4.2 | No MXP support. Displays Telnet Go-Ahead and WILL SUPPRESS-GO-AHEAD as ù character. Also seems to run the `version` command on connection, which will not work in `MULTISESSION_MODES` above 1.
[DuckClient][21] (Chrome)| 4.2 | No MXP support. Displays Telnet Go-Ahead and WILL SUPPRESS-GO-AHEAD as ù character. Also seems to run the `version` command on connection, which will not work in `MULTISESSION_MODES` above 1.
[KildClient][22] | 2.11.1 | No known issues.
[1]: https://github.com/evennia/evennia/wiki/Web%20features#web-client
@ -62,8 +62,8 @@ Name | Version | Comments
### Issue: Telnet NOP displays as spurious character.
#### Known Clients
* [BlowTorch][16](Andr)
* [Mukluk][17](Andr)
* [BlowTorch][16]([16](Andr))
* [Mukluk][17]([17](Andr))
#### Workarounds
* Set the command in game to `@option NOPKEEPALIVE=off` for the session, or use the `/save` parameter to disable it for that Evennian account permanently.
@ -76,4 +76,4 @@ Name | Version | Comments
* [Potato][8]
#### Workaround
* Press Control Enter, then Enter key again to send blank line.
* Press Control Enter, then Enter key again to send blank line.

View file

@ -128,7 +128,7 @@ class CmdWerewolf(Command):
def func(self):
# ...
```
Add this to the [default cmdset as usual](Adding-Command-Tutorial). The `is_full_moon` [lock function](https://github.com/evennia/evennia/wiki/Locks#lock-functions) does not yet exist. We must create that:
Add this to the [default cmdset as usual](Adding-Command-Tutorial). The `is_full_moon` [lock function](Locks#lock-functions) does not yet exist. We must create that:
```python
# in mygame/server/conf/lockfuncs.py

View file

@ -7,7 +7,7 @@ Here are some pointers to get you going.
### Python
Evennia is developed using Python. Even if you are more of a designer than a coder, it is wise to learn how to read and understand basic Python code. If you are new to Python, or need a refresher, take a look at our two-part [Python introduction](https://github.com/evennia/evennia/wiki/Python-basic-introduction).
Evennia is developed using Python. Even if you are more of a designer than a coder, it is wise to learn how to read and understand basic Python code. If you are new to Python, or need a refresher, take a look at our two-part [Python introduction](Python-basic-introduction).
### Explore Evennia interactively
@ -24,7 +24,7 @@ This will open an Evennia-aware python shell (using ipython). From within this s
import evennia
evennia.<TAB>
That is, enter `evennia.` and press the `<TAB>` key. This will show you all the resources made available at the top level of Evennia's "flat API". See the [flat API](evennia-API) page for more info on how to explore it efficiently.
That is, enter `evennia.` and press the `<TAB>` key. This will show you all the resources made available at the top level of Evennia's "flat API". See the [flat API](Evennia-API) page for more info on how to explore it efficiently.
You can complement your exploration by peeking at the sections of the much more detailed [Developer Central](Developer-Central). The [Tutorials](Tutorials) section also contains a growing collection of system- or implementation-specific help.
@ -40,7 +40,7 @@ Before you start coding away at your dream game, take a look at our [Game Planni
As part of the Evennia setup you will create a game folder to host your game code. This is your home. You should *never* need to modify anything in the `evennia` library (anything you download from us, really). You import useful functionality from here and if you see code you like, copy&paste it out into your game folder and edit it there.
If you find that Evennia doesn't support some functionality you need, make a [Feature Request](feature-request) about it. Same goes for [bugs][bug]. If you add features or fix bugs yourself, please consider Contributing your changes upstream!
If you find that Evennia doesn't support some functionality you need, make a [Feature Request](feature-request) about it. Same goes for [bugs][bug]. If you add features or fix bugs yourself, please consider [Contributing](Contributing) your changes upstream!
### Learn to read tracebacks

View file

@ -228,9 +228,9 @@ never raise a traceback but instead echo errors through logging. See
## Display utilities
### Making ascii tables
The [EvTable](../wiki/evennia.utils.evtable#evtable) class (`evennia/utils/evtable.py`) can be used to create correctly formatted text tables. There is also [EvForm](../wiki/evennia.utils.evform#evform) (`evennia/utils/evform.py`). This reads a fixed-format text template from a file in order to create any level of sophisticated ascii layout. Both evtable and evform have lots of options and inputs so see the header of each module for help.
The [EvTable](code:evennia.utils.evtable#evtable) class (`evennia/utils/evtable.py`) can be used to create correctly formatted text tables. There is also [EvForm](code:evennia.utils.evform#evform) (`evennia/utils/evform.py`). This reads a fixed-format text template from a file in order to create any level of sophisticated ascii layout. Both evtable and evform have lots of options and inputs so see the header of each module for help.
The third-party [PrettyTable](https://code.google.com/p/prettytable/) module is also included in Evennia. PrettyTable is considered deprecated in favor of EvTable since PrettyTable cannot handle ANSI colour. PrettyTable can be found in `evennia/utils/prettytable/`. See its homepage above for instructions.
### Menus
- [evennia.EvMenu](../wiki/evennia.utils.evmenu#evmenu)
- [evennia.EvMenu](https://github.com/evennia/evennia/wiki/evennia.utils.evmenu#evmenu)

View file

@ -90,7 +90,7 @@ Command sets are often added to an object in its `at_object_creation` method. Fo
### Properties on Command Sets
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, you might want to read the [Adding and Merging Command Sets](https://github.com/evennia/evennia/wiki/Command-Sets#adding-and-merging-command-sets) section for some of these to make sense.
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, 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.
- `key` (string) - an identifier for the cmdset. This is optional, but should be unique. It is used for display in lists, but also to identify special merging behaviours using the `key_mergetype` dictionary below.
- `mergetype` (string) - allows for one of the following string values: "*Union*", "*Intersect*", "*Replace*", or "*Remove*".

View file

@ -91,9 +91,9 @@ Let's say account *Bob* with a character *BigGuy* enters the command *look at sw
used, but they could be used to implement alternate help-display systems.
- `.client_width()` - Shortcut for getting the client's screen-width. Note that not all clients will
truthfully report this value - that case the `settings.DEFAULT_SCREEN_WIDTH` will be returned.
- `.styled_table(*args, **kwargs)` - This returns an [EvTable](EvTable) [styled](OptionStyles) based on the
- `.styled_table(*args, **kwargs)` - This returns an [EvTable]([EvTable](EvTable)) [styled]([styled](OptionStyles)) based on the
session calling this command. The args/kwargs are the same as for EvTable, except styling defaults are set.
- `.styled_header`, `_footer`, `separator` - These will produce [styled](OptionStyles) decorations for
- `.styled_header`, `_footer`, `separator` - These will produce [styled]([styled](OptionStyles)) decorations for
display to the user. They are useful for creating listings and forms with colors adjustable per-user.
### Defining your own command classes
@ -118,7 +118,7 @@ You should also implement at least two methods, `parse()` and `func()` (You coul
- `func()` is called right after `parse()` and should make use of the pre-parsed input to actually do whatever the command is supposed to do. This is the main body of the command. The return value from this method will be returned from the execution as a Twisted Deferred.
- `at_post_cmd()` is called after `func()` to handle eventual cleanup.
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 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.
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 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.
Below is how you define a simple alternative "`smile`" command:
@ -286,7 +286,7 @@ class CmdConfirm(Command):
This time, when the user enters the 'confirm' command, she will be asked if she wants to go on. Entering 'yes' or "y" (regardless of case) will give the first reply, otherwise the second reply will show.
> 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 important or complex choices, a persistent [EvMenu](https://github.com/evennia/evennia/wiki/EvMenu) might be more appropriate in this case.
> 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 important or complex choices, a persistent [EvMenu](EvMenu) might be more appropriate in this case.
## System commands
@ -416,7 +416,7 @@ Any time the user sends text to Evennia, the server tries to figure out if the t
- CmdSets defined on the current account, if caller is a puppeted object.
- CmdSets defined on the Session itself.
- The active CmdSets of eventual objects in the same location (if any). This includes commands on [Exits](Objects#Exits).
- Sets of dynamically created *System commands* representing available [Communications](Communications.md#Channels).
- Sets of dynamically created *System commands* representing available [Communications](Communications#Channels).
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.
8. All the grouped CmdSets are *merged* in reverse priority into one combined CmdSet according to each set's merge rules.
9. Evennia's *command parser* takes the merged cmdset and matches each of its commands (using its key and aliases) against the beginning of the string entered by *caller*. This produces a set of candidates.

View file

@ -25,7 +25,7 @@ To prepare a CI environment for your `MU*`, it will be necessary to set up some
Among those you will need:
* A Continuous Integration Environment.
* 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)
* [Source Control](https://github.com/evennia/evennia/wiki/Version%20Control)
* [Source Control](Version-Control)
* This could be Git or SVN or any other available SC.
## Linux TeamCity Setup

View file

@ -37,7 +37,7 @@ We always need more eyes and hands on the code. Even if you don't feel confident
and reporting when stuff doesn't make sense helps us a lot.
The most elegant way to contribute code to Evennia is to use GitHub to create a *fork* of the
Evennia repository and make your changes to that. Refer to the [Forking Evennia](https://github.com/evennia/evennia/wiki/Version-Control#forking-evennia) version
Evennia repository and make your changes to that. Refer to the [Forking Evennia](Version-Control#forking-evennia) version
control instructions for detailed instructions.
Once you have a fork set up, you can not only work on your own game in a separate branch, you can

View file

@ -5,7 +5,7 @@
their own custom client protocol.*
A [PortalSession](Portal-and-Server-Sessions) is the basic data object representing an external
A [PortalSession](Sessions#Portal-and-Server-Sessions) is the basic data object representing an external
connection to the Evennia [Portal](Portal-And-Server) -- usually a human player running a mud client
of some kind. The way they connect (the language the player's client and Evennia use to talk to
each other) is called the connection *Protocol*. The most common such protocol for MUD:s is the
@ -206,7 +206,7 @@ The message will pass through the system such that the sessionhandler will dig o
### Receiving data
Just because the protocol is there, does not mean Evennia knows what to do with it. An [Inputfunc](Inputfunc) must exist to receive it. In the case of the `text` input exemplified above, Evennia alredy handles this input - it will parse it as a Command name followed by its inputs. So handle that you need to simply add a cmdset with commands on your receiving Session (and/or the Object/Character it is puppeting). If not you may need to add your own Inputfunc (see the [Inputfunc](Inputfunc) page for how to do this.
Just because the protocol is there, does not mean Evennia knows what to do with it. An [Inputfunc]([Inputfunc](Inputfunc)) must exist to receive it. In the case of the `text` input exemplified above, Evennia alredy handles this input - it will parse it as a Command name followed by its inputs. So handle that you need to simply add a cmdset with commands on your receiving Session (and/or the Object/Character it is puppeting). If not you may need to add your own Inputfunc (see the [Inputfunc]([Inputfunc](Inputfunc)) page for how to do this.
These might not be as clear-cut in all protocols, but the principle is there. These four basic
components - however they are accessed - links to the *Portal Session*, which is the actual common

View file

@ -100,7 +100,7 @@ Okay, let's review this code, but if you're used to Evennia commands, it shouldn
1. We import `search_channel`. This is a little helper function that we will use to search for channels by name and aliases, found in `evennia.utils.search`. It's just more convenient.
2. Our class `CmdConnect` contains the body of our command to join a channel.
3. Notice the key of this command is simply `"+"`. When you enter `+something` in the game, it will try to find a command key `+something`. Failing that, it will look at other potential matches. Evennia is smart enough to understand that when we type `+something`, `+` is the command key and `something` is the command argument. This will, of course, fail if you have a command beginning by `+` conflicting with the `CmdConnect` key.
4. We have altered some class attributes, like `auto_help`. If you want to know what they do and why they have changed here, you can check the [documentation on commands](https://github.com/evennia/evennia/wiki/Commands).
4. We have altered some class attributes, like `auto_help`. If you want to know what they do and why they have changed here, you can check the [documentation on commands](Commands).
5. In the command body, we begin by extracting the channel name. Remember that this name should be in the command arguments (that is, in `self.args`). Following the same example, if a player enters `+something`, `self.args` should contain `"something"`. We use `search_channel` to see if this channel exists.
6. We then check the access level of the channel, to see if the caller can listen to it (not necessarily use it to speak, mind you, just listen to others speak, as these are two different locks on Evennia).
7. Finally, we connect the caller if he's not already connected to the channel. We use the channel's `connect` method to do this. Pretty straightforward eh?

View file

@ -7,7 +7,7 @@
[issue tracker](https://github.com/evennia/evennia/issues).*
The full set of default Evennia commands currently contains 92 commands in 9 source
files. Our policy for adding default commands is outlined [here](Using-Mux-as-a-Standard). More
files. Our policy for adding default commands is outlined [here](Using-MUX-as-a-Standard). More
information about how commands work can be found in the documentation for [Commands](Commands).
@ -15,97 +15,97 @@ information about how commands work can be found in the documentation for [Comma
## A-Z
- [`__unloggedin_look_command`](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-`--unloggedin-look-command`-cmdunconnectedlook) - look when in unlogged-in state
- [about](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-about-cmdabout) - show Evennia info
- [access](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-access-cmdaccess) - show your current game access
- [addcom](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-addcom-cmdaddcom) - add a channel alias and/or subscribe to a channel
- [alias](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-alias-cmdsetobjalias) - adding permanent aliases for object
- [allcom](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-allcom-cmdallcom) - perform admin operations on all channels
- [ban](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-ban-cmdban) - ban an account from the server
- [batchcode](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-batchcode-cmdbatchcode) - build from batch-code file
- [batchcommands](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-batchcommands-cmdbatchcommands) - build from batch-command file
- [boot](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-boot-cmdboot) - kick an account from the server.
- [cboot](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cboot-cmdcboot) - kick an account from a channel you control
- [ccreate](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-ccreate-cmdchannelcreate) - create a new channel
- [cdesc](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cdesc-cmdcdesc) - describe a channel you control
- [cdestroy](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cdestroy-cmdcdestroy) - destroy a channel you created
- [cemit](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cemit-cmdcemit) - send an admin message to a channel you control
- [channels](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-channels-cmdchannels) - list all channels available to you
- [charcreate](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-charcreate-cmdcharcreate) - create a new character
- [chardelete](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-chardelete-cmdchardelete) - delete a character - this cannot be undone!
- [clock](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-clock-cmdclock) - change channel locks of a channel you control
- [cmdsets](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cmdsets-cmdlistcmdsets) - list command sets defined on an object
- [color](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-color-cmdcolortest) - testing which colors your client support
- [command](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-command-objmanipcommand) - This is a parent class for some of the defining objmanip commands
- [connect](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-connect-cmdunconnectedconnect) - connect to the game
- [copy](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-copy-cmdcopy) - copy an object and its properties
- [cpattr](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cpattr-cmdcpattr) - copy attributes between objects
- [create](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-create-cmdunconnectedcreate) - create a new account account
- [create](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-create-cmdcreate) - create new objects
- [cwho](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-cwho-cmdcwho) - show who is listening to a channel
- [delcom](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-delcom-cmddelcom) - remove a channel alias and/or unsubscribe from channel
- [desc](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-desc-cmddesc) - describe an object or the current room.
- [destroy](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-destroy-cmddestroy) - permanently delete objects
- [dig](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-dig-cmddig) - build new rooms and connect them to the current location
- [drop](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-drop-cmddrop) - drop something
- [emit](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-emit-cmdemit) - admin command for emitting message to multiple objects
- [examine](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-examine-cmdexamine) - get detailed information about an object
- [find](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-find-cmdfind) - search the database for objects
- [force](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-force-cmdforce) - forces an object to execute a command
- [get](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-get-cmdget) - pick up something
- [give](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-give-cmdgive) - give away something to someone
- [help](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-help-cmdunconnectedhelp) - get help when in unconnected-in state
- [help](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-help-cmdhelp) - View help or a list of topics
- [home](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-home-cmdhome) - move to your character's home location
- [ic](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-ic-cmdic) - control an object you have permission to puppet
- [inventory](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-inventory-cmdinventory) - view inventory
- [irc2chan](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-irc2chan-cmdirc2chan) - Link an evennia channel to an external IRC channel
- [link](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-link-cmdlink) - link existing rooms together with exits
- [lock](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-lock-cmdlock) - assign a lock definition to an object
- [look](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-look-cmdlook) - look at location or object
- [look](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-look-cmdooclook) - look while out-of-character
- [mvattr](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-mvattr-cmdmvattr) - move attributes between objects
- [name](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-name-cmdname) - change the name and/or aliases of an object
- [nick](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-nick-cmdnick) - define a personal alias/nick by defining a string to
- [objects](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-objects-cmdobjects) - statistics on objects in the database
- [ooc](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-ooc-cmdooc) - stop puppeting and go ooc
- [open](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-open-cmdopen) - open a new exit from the current room
- [option](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-option-cmdoption) - Set an account option
- [page](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-page-cmdpage) - send a private message to another account
- [password](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-password-cmdpassword) - change your password
- [perm](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-perm-cmdperm) - set the permissions of an account/object
- [pose](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-pose-cmdpose) - strike a pose
- [py](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-py-cmdpy) - execute a snippet of python code
- [quell](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-quell-cmdquell) - use character's permissions instead of account's
- [quit](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-quit-cmdunconnectedquit) - quit when in unlogged-in state
- [quit](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-quit-cmdquit) - quit the game
- [reload](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-reload-cmdreload) - reload the server
- [reset](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-reset-cmdreset) - reset and reboot the server
- [rss2chan](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-rss2chan-cmdrss2chan) - link an evennia channel to an external RSS feed
- [say](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-say-cmdsay) - speak as your character
- [script](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-script-cmdscript) - attach a script to an object
- [scripts](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-scripts-cmdscripts) - list and manage all running scripts
- [server](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-server-cmdserverload) - show server load and memory statistics
- [service](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-service-cmdservice) - manage system services
- [sessions](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-sessions-cmdsessions) - check your connected session(s)
- [set](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-set-cmdsetattribute) - set attribute on an object or account
- [setdesc](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-setdesc-cmdsetdesc) - describe yourself
- [sethelp](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-sethelp-cmdsethelp) - Edit the help database.
- [sethome](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-sethome-cmdsethome) - set an object's home location
- [shutdown](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-shutdown-cmdshutdown) - stop the server completely
- [spawn](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-spawn-cmdspawn) - spawn objects from prototype
- [style](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-style-cmdstyle) - In-game style options
- [tag](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-tag-cmdtag) - handles the tags of an object
- [tel](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-tel-cmdteleport) - teleport object to another location
- [time](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-time-cmdtime) - show server time statistics
- [tunnel](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-tunnel-cmdtunnel) - create new rooms in cardinal directions only
- [typeclass](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-typeclass-cmdtypeclass) - set or change an object's typeclass
- [unban](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-unban-cmdunban) - remove a ban from an account
- [unlink](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-unlink-cmdunlink) - remove exit-connections between rooms
- [userpassword](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-userpassword-cmdnewpassword) - change the password of an account
- [wall](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-wall-cmdwall) - make an announcement to all
- [whisper](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-whisper-cmdwhisper) - Speak privately as your character to another
- [who](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-who-cmdwho) - list who is currently online
- [wipe](https://github.com/evennia/evennia/wiki/Default-Command-Help#wiki-wipe-cmdwipe) - clear all attributes from an object
- [about](Default-Command-Help#wiki-about-cmdabout) - show Evennia info
- [access](Default-Command-Help#wiki-access-cmdaccess) - show your current game access
- [addcom](Default-Command-Help#wiki-addcom-cmdaddcom) - add a channel alias and/or subscribe to a channel
- [alias](Default-Command-Help#wiki-alias-cmdsetobjalias) - adding permanent aliases for object
- [allcom](Default-Command-Help#wiki-allcom-cmdallcom) - perform admin operations on all channels
- [ban](Default-Command-Help#wiki-ban-cmdban) - ban an account from the server
- [batchcode](Default-Command-Help#wiki-batchcode-cmdbatchcode) - build from batch-code file
- [batchcommands](Default-Command-Help#wiki-batchcommands-cmdbatchcommands) - build from batch-command file
- [boot](Default-Command-Help#wiki-boot-cmdboot) - kick an account from the server.
- [cboot](Default-Command-Help#wiki-cboot-cmdcboot) - kick an account from a channel you control
- [ccreate](Default-Command-Help#wiki-ccreate-cmdchannelcreate) - create a new channel
- [cdesc](Default-Command-Help#wiki-cdesc-cmdcdesc) - describe a channel you control
- [cdestroy](Default-Command-Help#wiki-cdestroy-cmdcdestroy) - destroy a channel you created
- [cemit](Default-Command-Help#wiki-cemit-cmdcemit) - send an admin message to a channel you control
- [channels](Default-Command-Help#wiki-channels-cmdchannels) - list all channels available to you
- [charcreate](Default-Command-Help#wiki-charcreate-cmdcharcreate) - create a new character
- [chardelete](Default-Command-Help#wiki-chardelete-cmdchardelete) - delete a character - this cannot be undone!
- [clock](Default-Command-Help#wiki-clock-cmdclock) - change channel locks of a channel you control
- [cmdsets](Default-Command-Help#wiki-cmdsets-cmdlistcmdsets) - list command sets defined on an object
- [color](Default-Command-Help#wiki-color-cmdcolortest) - testing which colors your client support
- [command](Default-Command-Help#wiki-command-objmanipcommand) - This is a parent class for some of the defining objmanip commands
- [connect](Default-Command-Help#wiki-connect-cmdunconnectedconnect) - connect to the game
- [copy](Default-Command-Help#wiki-copy-cmdcopy) - copy an object and its properties
- [cpattr](Default-Command-Help#wiki-cpattr-cmdcpattr) - copy attributes between objects
- [create](Default-Command-Help#wiki-create-cmdunconnectedcreate) - create a new account account
- [create](Default-Command-Help#wiki-create-cmdcreate) - create new objects
- [cwho](Default-Command-Help#wiki-cwho-cmdcwho) - show who is listening to a channel
- [delcom](Default-Command-Help#wiki-delcom-cmddelcom) - remove a channel alias and/or unsubscribe from channel
- [desc](Default-Command-Help#wiki-desc-cmddesc) - describe an object or the current room.
- [destroy](Default-Command-Help#wiki-destroy-cmddestroy) - permanently delete objects
- [dig](Default-Command-Help#wiki-dig-cmddig) - build new rooms and connect them to the current location
- [drop](Default-Command-Help#wiki-drop-cmddrop) - drop something
- [emit](Default-Command-Help#wiki-emit-cmdemit) - admin command for emitting message to multiple objects
- [examine](Default-Command-Help#wiki-examine-cmdexamine) - get detailed information about an object
- [find](Default-Command-Help#wiki-find-cmdfind) - search the database for objects
- [force](Default-Command-Help#wiki-force-cmdforce) - forces an object to execute a command
- [get](Default-Command-Help#wiki-get-cmdget) - pick up something
- [give](Default-Command-Help#wiki-give-cmdgive) - give away something to someone
- [help](Default-Command-Help#wiki-help-cmdunconnectedhelp) - get help when in unconnected-in state
- [help](Default-Command-Help#wiki-help-cmdhelp) - View help or a list of topics
- [home](Default-Command-Help#wiki-home-cmdhome) - move to your character's home location
- [ic](Default-Command-Help#wiki-ic-cmdic) - control an object you have permission to puppet
- [inventory](Default-Command-Help#wiki-inventory-cmdinventory) - view inventory
- [irc2chan](Default-Command-Help#wiki-irc2chan-cmdirc2chan) - Link an evennia channel to an external IRC channel
- [link](Default-Command-Help#wiki-link-cmdlink) - link existing rooms together with exits
- [lock](Default-Command-Help#wiki-lock-cmdlock) - assign a lock definition to an object
- [look](Default-Command-Help#wiki-look-cmdlook) - look at location or object
- [look](Default-Command-Help#wiki-look-cmdooclook) - look while out-of-character
- [mvattr](Default-Command-Help#wiki-mvattr-cmdmvattr) - move attributes between objects
- [name](Default-Command-Help#wiki-name-cmdname) - change the name and/or aliases of an object
- [nick](Default-Command-Help#wiki-nick-cmdnick) - define a personal alias/nick by defining a string to
- [objects](Default-Command-Help#wiki-objects-cmdobjects) - statistics on objects in the database
- [ooc](Default-Command-Help#wiki-ooc-cmdooc) - stop puppeting and go ooc
- [open](Default-Command-Help#wiki-open-cmdopen) - open a new exit from the current room
- [option](Default-Command-Help#wiki-option-cmdoption) - Set an account option
- [page](Default-Command-Help#wiki-page-cmdpage) - send a private message to another account
- [password](Default-Command-Help#wiki-password-cmdpassword) - change your password
- [perm](Default-Command-Help#wiki-perm-cmdperm) - set the permissions of an account/object
- [pose](Default-Command-Help#wiki-pose-cmdpose) - strike a pose
- [py](Default-Command-Help#wiki-py-cmdpy) - execute a snippet of python code
- [quell](Default-Command-Help#wiki-quell-cmdquell) - use character's permissions instead of account's
- [quit](Default-Command-Help#wiki-quit-cmdunconnectedquit) - quit when in unlogged-in state
- [quit](Default-Command-Help#wiki-quit-cmdquit) - quit the game
- [reload](Default-Command-Help#wiki-reload-cmdreload) - reload the server
- [reset](Default-Command-Help#wiki-reset-cmdreset) - reset and reboot the server
- [rss2chan](Default-Command-Help#wiki-rss2chan-cmdrss2chan) - link an evennia channel to an external RSS feed
- [say](Default-Command-Help#wiki-say-cmdsay) - speak as your character
- [script](Default-Command-Help#wiki-script-cmdscript) - attach a script to an object
- [scripts](Default-Command-Help#wiki-scripts-cmdscripts) - list and manage all running scripts
- [server](Default-Command-Help#wiki-server-cmdserverload) - show server load and memory statistics
- [service](Default-Command-Help#wiki-service-cmdservice) - manage system services
- [sessions](Default-Command-Help#wiki-sessions-cmdsessions) - check your connected session(s)
- [set](Default-Command-Help#wiki-set-cmdsetattribute) - set attribute on an object or account
- [setdesc](Default-Command-Help#wiki-setdesc-cmdsetdesc) - describe yourself
- [sethelp](Default-Command-Help#wiki-sethelp-cmdsethelp) - Edit the help database.
- [sethome](Default-Command-Help#wiki-sethome-cmdsethome) - set an object's home location
- [shutdown](Default-Command-Help#wiki-shutdown-cmdshutdown) - stop the server completely
- [spawn](Default-Command-Help#wiki-spawn-cmdspawn) - spawn objects from prototype
- [style](Default-Command-Help#wiki-style-cmdstyle) - In-game style options
- [tag](Default-Command-Help#wiki-tag-cmdtag) - handles the tags of an object
- [tel](Default-Command-Help#wiki-tel-cmdteleport) - teleport object to another location
- [time](Default-Command-Help#wiki-time-cmdtime) - show server time statistics
- [tunnel](Default-Command-Help#wiki-tunnel-cmdtunnel) - create new rooms in cardinal directions only
- [typeclass](Default-Command-Help#wiki-typeclass-cmdtypeclass) - set or change an object's typeclass
- [unban](Default-Command-Help#wiki-unban-cmdunban) - remove a ban from an account
- [unlink](Default-Command-Help#wiki-unlink-cmdunlink) - remove exit-connections between rooms
- [userpassword](Default-Command-Help#wiki-userpassword-cmdnewpassword) - change the password of an account
- [wall](Default-Command-Help#wiki-wall-cmdwall) - make an announcement to all
- [whisper](Default-Command-Help#wiki-whisper-cmdwhisper) - Speak privately as your character to another
- [who](Default-Command-Help#wiki-who-cmdwho) - list who is currently online
- [wipe](Default-Command-Help#wiki-wipe-cmdwipe) - clear all attributes from an object
## A-Z by source file

View file

@ -26,7 +26,7 @@ This page serves as a central nexus for information on using Evennia as well as
#### Core components and protocols
- [Server and Portal](Portal-and-Server)
- [Server and Portal](Portal-And-Server)
- [Sessions](Sessions)
- [Configuration and module plugins](Server-Conf)
- [The message path](Messagepath)
@ -67,9 +67,9 @@ This page serves as a central nexus for information on using Evennia as well as
#### Web
- [Web features overview](Web-features)
- [Web features overview](Web-Features)
- [The Webclient](Webclient)
- [Web tutorials](Web-tutorial)
- [Web tutorials](Web-Tutorial)
#### Other systems
@ -83,9 +83,9 @@ This page serves as a central nexus for information on using Evennia as well as
- [Game Menus](EvMenu) (EvMenu)
- [Text paging/scrolling](EvMore) (EvMore)
- [Text Line Editor](EvEditor) (EvEditor)
- [Text Tables](https://github.com/evennia/evennia/wiki/evennia.utils.evtable) (EvTable)
- [Text Form generation](https://github.com/evennia/evennia/wiki/evennia.utils.evform) (EvForm)
- [Spawner and Prototypes](https://github.com/evennia/evennia/wiki/Spawner-and-Prototypes)
- [Text Tables](code:evennia.utils.evtable) (EvTable)
- [Text Form generation](code:evennia.utils.evform) (EvForm)
- [Spawner and Prototypes](Spawner-and-Prototypes)
- [Inlinefuncs](TextTags#inline-functions)
- [Asynchronous execution](Async-Process)

View file

@ -13,7 +13,7 @@ The game directory is created with `evennia --init <name>`. In the Evennia docum
- [`conf/`](https://github.com/evennia/evennia/tree/master/evennia/game_template/server) - All server configuration files sits here. The most important file is `settings.py`.
- `logs/` - Portal log files are stored here (Server is logging to the terminal by default)
- `typeclasses/` - this folder contains empty templates for overloading default game entities of Evennia. Evennia will automatically use the changes in those templates for the game entities it creates.
- `web/` - This holds the [Web features](Web-features) of your game.
- `web/` - This holds the [Web features](Web-Features) of your game.
- `world/` - this is a "miscellaneous" folder holding everything related to the world you are building, such as build scripts and rules modules that don't fit with one of the other folders.
## Evennia library layout:
@ -45,4 +45,4 @@ The `bin/` directory holds OS-specific binaries that will be used when installin
All directories contain files ending in `.py`. These are Python *modules* and are the basic units of Python code. The roots of directories also have (usually empty) files named `__init__.py`. These are required by Python so as to be able to find and import modules in other directories. When you have run Evennia at least once you will find that there will also be `.pyc` files appearing, these are pre-compiled binary versions of the `.py` files to speed up execution.
The root of the `evennia` folder has an `__init__.py` file containing the "[flat API](evennia-API)". This holds shortcuts to various subfolders in the evennia library. It is provided to make it easier to find things; it allows you to just import `evennia` and access things from that rather than having to import from their actual locations inside the source tree.
The root of the `evennia` folder has an `__init__.py` file containing the "[flat API](Evennia-API)". This holds shortcuts to various subfolders in the evennia library. It is provided to make it easier to find things; it allows you to just import `evennia` and access things from that rather than having to import from their actual locations inside the source tree.

View file

@ -22,15 +22,15 @@ This would help in development to quickly refer to where a resource is located.
### Kovitikus (Sept. 11, 2019)
[Batch Code](https://github.com/evennia/evennia/wiki/Batch-code-processor) should have a link in the developer area. It is currently only listed in the tutorials section as an afterthought to a tutorial title.
[Batch Code](Batch-Code-Processor) should have a link in the developer area. It is currently only listed in the tutorials section as an afterthought to a tutorial title.
***
In regards to the general structure of each wiki page: I'd like to see a table of contents at the top of each one, so that it can be quickly navigated and is immediately apparent what sections are covered on the page. Similar to the current [Getting Started](https://github.com/evennia/evennia/wiki/Getting-Started) page.
In regards to the general structure of each wiki page: I'd like to see a table of contents at the top of each one, so that it can be quickly navigated and is immediately apparent what sections are covered on the page. Similar to the current [Getting Started](Getting-Started) page.
***
The structuring of the page should also include a quick reference cheatsheet for certain aspects. Such as [Tags](https://github.com/evennia/evennia/wiki/Tags) including a quick reference section at the top that lists an example of every available method you can use in a clear and consistent format, along with a comment. Readers shouldn't have to decipher the article to gather such basic information and it should instead be available at first glance.
The structuring of the page should also include a quick reference cheatsheet for certain aspects. Such as [Tags](Tags) including a quick reference section at the top that lists an example of every available method you can use in a clear and consistent format, along with a comment. Readers shouldn't have to decipher the article to gather such basic information and it should instead be available at first glance.
Example of a quick reference:
@ -92,4 +92,4 @@ If I want to find information on the correct syntax for is_typeclass(), here's w
* Ctrl+F in my IDE. Results.
* Fortunately, there's only one result for def is_typeclass. If this was at_look, there would be several results, and I'd have to go through each of those individually, and most of them would just call return_appearance
An important part of a refactor, in my opinion, is separating out the "Tutorials" from the "Reference" documentation.
An important part of a refactor, in my opinion, is separating out the "Tutorials" from the "Reference" documentation.

View file

@ -297,7 +297,7 @@ class Room(DefaultRoom):
Obviously this method of generating maps doesn't take into account of any doors or exits that are hidden.. etc.. but hopefully it serves as a good base to start with. Like previously mentioned, it is very important to have a solid foundation on rooms before implementing this. You can try this on vanilla evennia by using @tunnel and essentially you can just create a long straight/edgy non-looping rooms that will show on your in-game map.
The above example will display the map above the room description. You could also use an [EvTable](https://github.com/evennia/evennia/wiki/evennia.utils.evtable) to place description and map next to each other. Some other things you can do is to have a [Command](Commands) that displays with a larger radius, maybe with a legend and other features.
The above example will display the map above the room description. You could also use an [EvTable](code:evennia.utils.evtable) to place description and map next to each other. Some other things you can do is to have a [Command](Commands) that displays with a larger radius, maybe with a legend and other features.
Below is the whole `map.py` for your reference. You need to update your `Room` typeclass (see above) to actually call it. Remember that to see different symbols for a location you also need to set the `sector_type` Attribute on the room to one of the keys in the `SYMBOLS` dictionary. So in this example, to make a room be mapped as `[.]` you would set the room's `sector_type` to `"SECT_INSIDE"`. Try it out with `@set here/sector_type = "SECT_INSIDE"`. If you wanted all new rooms to have a given sector symbol, you could change the default in the `SYMBOLS´ dictionary below, or you could add the Attribute in the Room's `at_object_creation` method.

View file

@ -34,5 +34,5 @@ commands to jump to previous pages, to the top or bottom of the document as well
paging.
The pager takes several more keyword arguments for controlling the message output. See the
[evmore-API](https://github.com/evennia/evennia/wiki/evennia.utils.evmore) for more info.
[evmore-API](code:evennia.utils.evmore) for more info.

View file

@ -3,7 +3,7 @@
Evennia makes much of its programming tools available directly from the top-level `evennia` package. This is often referred to as Evennia's "flat" [Application Programming Interface](https://en.wikipedia.org/wiki/Application_programming_interface) (API). The flat API tries to collect and bring the most commonly used resources to the front in a way where everything is available at a glance (in a flat display), making it a good place to start to learn Evennia.
> Evennia's flat (and full) API can be perused through the auto-generated [API Library refence](https://github.com/evennia/evennia/wiki/evennia).
> Evennia's flat (and full) API can be perused through the auto-generated [API Library refence](code:evennia).
A good, interactive way to explore the flat API is to use [IPython](http://ipython.org/), a more flexible version of the default Python shell. Inside your virtual environment you can install IPython simply by

View file

@ -67,7 +67,7 @@ Evennia comes with a default set of commands for the Python newbies and for thos
### I know basic Python, or I am willing to learn
Evennia's source code is extensively documented and is [viewable online](https://github.com/evennia/evennia). We also have a comprehensive [online manual](https://github.com/evennia/evennia/wiki) with lots of examples. But while Python is considered a very easy programming language to get into, you do have a learning curve to climb if you are new to programming. You should probably sit down
with a Python beginner's [tutorial](http://docs.python.org/tutorial/) (there are plenty of them on the web if you look around) so you at least know what you are seeing. See also our [link page](https://github.com/evennia/evennia/wiki/Links#wiki-litterature) for some reading suggestions. To efficiently code your dream game in Evennia you don't need to be a Python guru, but you do need to be able to read example code containing at least these basic Python features:
with a Python beginner's [tutorial](http://docs.python.org/tutorial/) (there are plenty of them on the web if you look around) so you at least know what you are seeing. See also our [link page](Links#wiki-litterature) for some reading suggestions. To efficiently code your dream game in Evennia you don't need to be a Python guru, but you do need to be able to read example code containing at least these basic Python features:
- Importing and using python [modules](http://docs.python.org/3.7/tutorial/modules.html)
- Using [variables](http://www.tutorialspoint.com/python/python_variable_types.htm), [conditional statements](http://docs.python.org/tutorial/controlflow.html#if-statements), [loops](http://docs.python.org/tutorial/controlflow.html#for-statements) and [functions](http://docs.python.org/tutorial/controlflow.html#defining-functions)
@ -85,10 +85,10 @@ If you *also* happen to know some web programming (HTML, CSS, Javascript) there
### Where to from here?
From here you can continue browsing the [online documentation](index) to find more info about Evennia. Or you can jump into the [Tutorials](Tutorials) and get your hands 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 structure.
From here you can continue browsing the [online documentation]([online documentation](index)) to find more info about Evennia. Or you can jump into the [Tutorials](Tutorials) and get your hands 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 structure.
Some more hints:
1. Get engaged in the community. Make an introductory post to our [mailing list/forum](https://groups.google.com/forum/#!forum/evennia) and get to know people. It's also highly recommended you hop onto our [Developer chat](http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb) on IRC. This allows you to chat directly with other developers new and old as well as with the devs of Evennia itself. This chat is logged (you can find links on http://www.evennia.com) and can also be searched from the same place for discussion topics you are interested in.
2. Read the [Game Planning](https://github.com/evennia/evennia/wiki/Game%20Planning) wiki page. It gives some ideas for your work flow and the state of mind you should aim for - including cutting down the scope of your game for its first release.
3. Do the [Tutorial for basic MUSH-like game](https://github.com/evennia/evennia/wiki/Tutorial%20for%20basic%20MUSH%20like%20game) carefully from beginning to end and try to understand what does what. Even if you are not interested in a MUSH for your own game, you will end up with a small (very small) game that you can build or learn from.
2. Read the [Game Planning](Game-Planning) wiki page. It gives some ideas for your work flow and the state of mind you should aim for - including cutting down the scope of your game for its first release.
3. Do the [Tutorial for basic MUSH-like game](Tutorial-for-basic-MUSH-like-game) carefully from beginning to end and try to understand what does what. Even if you are not interested in a MUSH for your own game, you will end up with a small (very small) game that you can build or learn from.

View file

@ -1,3 +1,5 @@
# Evennia for MUSH Users
*This page is adopted from an article originally posted for the MUSH community [here on musoapbox.net](http://musoapbox.net/topic/1150/evennia-for-mushers).*
[MUSH](https://en.wikipedia.org/wiki/MUSH)es are text multiplayer games traditionally used for heavily roleplay-focused game styles. They are often (but not always) utilizing game masters and human oversight over code automation. MUSHes are traditionally built on the TinyMUSH-family of game servers, like PennMUSH, TinyMUSH, TinyMUX and RhostMUSH. Also their siblings [MUCK](https://en.wikipedia.org/wiki/TinyMUCK) and [MOO](https://en.wikipedia.org/wiki/MOO) are often mentioned together with MUSH since they all inherit from the same [TinyMUD](https://en.wikipedia.org/wiki/MUD_trees#TinyMUD_family_tree) base. A major feature is the ability to modify and program the game world from inside the game by using a custom scripting language. We will refer to this online scripting as *softcode* here.
@ -13,7 +15,7 @@ In MUSH, users tend to code and expand all aspects of the game from inside it us
## Collaborating on a game - Python vs Softcode
For a *Player*, collaborating on a game need not be too different between MUSH and Evennia. The building and description of the game world can still happen mostly in-game using build commands, using text tags and [inline functions](https://github.com/evennia/evennia/wiki/TextTags#inline-functions) to prettify and customize the experience. Evennia offers external ways to build a world but those are optional. There is also nothing *in principle* stopping a Developer from offering a softcode-like language to Players if that is deemed necessary.
For a *Player*, collaborating on a game need not be too different between MUSH and Evennia. The building and description of the game world can still happen mostly in-game using build commands, using text tags and [inline functions](TextTags#inline-functions) to prettify and customize the experience. Evennia offers external ways to build a world but those are optional. There is also nothing *in principle* stopping a Developer from offering a softcode-like language to Players if that is deemed necessary.
For *Developers* of the game, the difference is larger: Code is mainly written outside the game in Python modules rather than in-game on the command line. Python is a very popular and well-supported language with tons of documentation and help to be found. The Python standard library is also a great help for not having to reinvent the wheel. But that said, while Python is considered one of the easier languages to learn and use it is undoubtedly very different from MUSH softcode.
@ -117,8 +119,8 @@ With the `nick` functionality players can mitigate a lot of syntax dislikes even
## Next steps
If you are a *Developer* and are interested in making a more MUSH-like Evennia game, a good start is to look into the Evennia [Tutorial for a first MUSH-like game](https://github.com/evennia/evennia/wiki/Tutorial%20for%20basic%20MUSH%20like%20game). That steps through building a simple little game from scratch and helps to acquaint you with the various corners of Evennia. There is also the [Tutorial for running roleplaying sessions](https://github.com/evennia/evennia/wiki/Evennia%20for%20roleplaying%20sessions) that can be of interest.
If you are a *Developer* and are interested in making a more MUSH-like Evennia game, a good start is to look into the Evennia [Tutorial for a first MUSH-like game](Tutorial-for-basic-MUSH-like-game). That steps through building a simple little game from scratch and helps to acquaint you with the various corners of Evennia. There is also the [Tutorial for running roleplaying sessions](Evennia-for-roleplaying-sessions) that can be of interest.
An important aspect of making things more familiar for *Players* is adding new and tweaking existing commands. How this is done is covered by the [Tutorial on adding new commands](https://github.com/evennia/evennia/wiki/Adding%20Command%20Tutorial). You may also find it useful to shop through the `evennia/contrib/` folder. The [Tutorial world](https://github.com/evennia/evennia/wiki/Tutorial%20World%20Introduction) 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](https://github.com/evennia/evennia/wiki/Tutorials) 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).
An important aspect of making things more familiar for *Players* is adding new and tweaking existing 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 world](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](Tutorials) 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).
… And of course, if you need further help you can always drop into the [Evennia chatroom](http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb) or post a question in our [forum/mailing list](https://groups.google.com/forum/#%21forum/evennia)!

View file

@ -28,7 +28,7 @@ We will assume you start from scratch. You need Evennia installed, as per the [G
### The permission hierarchy
Evennia has the following [permission hierarchy](https://github.com/evennia/evennia/wiki/Building%20Permissions#assigning-permissions) out of the box: *Players, Helpers, Builders, Admins* and finally *Developers*. We could change these but then we'd need to update our Default commands to use the changes. We want to keep this simple, so instead we map our different roles on top of this permission ladder.
Evennia has the following [permission hierarchy](Building-Permissions#assigning-permissions) out of the box: *Players, Helpers, Builders, Admins* and finally *Developers*. We could change these but then we'd need to update our Default commands to use the changes. We want to keep this simple, so instead we map our different roles on top of this permission ladder.
1. `Players` is the permission set on normal players. This is the default for anyone creating a new account on the server.
2. `Helpers` are like `Players` except they also have the ability to create/edit new help entries. This could be granted to players who are willing to help with writing lore or custom logs for everyone.
@ -36,7 +36,7 @@ Evennia has the following [permission hierarchy](https://github.com/evennia/even
4. `Admins` is the permission level the GM should have. Admins can do everything builders can (create/describe rooms etc) but also kick accounts, rename them and things like that.
5. `Developers`-level permission are the server administrators, the ones with the ability to restart/shutdown the server as well as changing the permission levels.
> The [superuser](https://github.com/evennia/evennia/wiki/Building%20Permissions#the-super-user) is not part of the hierarchy and actually completely bypasses it. We'll assume server admin(s) will "just" be Developers.
> The [superuser](Building-Permissions#the-super-user) is not part of the hierarchy and actually completely bypasses it. We'll assume server admin(s) will "just" be Developers.
### How to grant permissions
@ -215,7 +215,7 @@ There are many ways to build a Character sheet in text, from manually pasting st
#### Making a sheet with EvTable
[EvTable](https://github.com/evennia/evennia/wiki/evennia.utils.evtable) is a text-table generator. It helps with displaying text in ordered rows and columns. This is an example of using it in code:
[EvTable](code:evennia.utils.evtable) is a text-table generator. It helps with displaying text in ordered rows and columns. This is an example of using it in code:
````python
# this can be tried out in a Python shell like iPython
@ -232,7 +232,7 @@ table = evtable.EvTable("Attr", "Value",
], align='r', border="incols")
````
Above, we create a two-column table by supplying the two columns directly. We also tell the table to be right-aligned and to use the "incols" border type (borders drawns only in between columns). The `EvTable` class takes a lot of arguments for customizing its look, you can see [some of the possible keyword arguments here](https://github.com/evennia/evennia/wiki/evennia.utils.evtable#evtable__init__). Once you have the `table` you could also retroactively add new columns and rows to it with `table.add_row()` and `table.add_column()`: if necessary the table will expand with empty rows/columns to always remain rectangular.
Above, we create a two-column table by supplying the two columns directly. We also tell the table to be right-aligned and to use the "incols" border type (borders drawns only in between columns). The `EvTable` class takes a lot of arguments for customizing its look, you can see [some of the possible keyword arguments here](code:evennia.utils.evtable#evtable__init__). Once you have the `table` you could also retroactively add new columns and rows to it with `table.add_row()` and `table.add_column()`: if necessary the table will expand with empty rows/columns to always remain rectangular.
The result from printing the above table will be
@ -255,7 +255,7 @@ This is a minimalistic but effective Character sheet. By combining the `table_st
#### Making a sheet with EvForm
[EvForm](https://github.com/evennia/evennia/wiki/evennia.utils.evform) allows the creation of a two-dimensional "graphic" made by text characters. On this surface, one marks and tags rectangular regions ("cells") to be filled with content. This content can be either normal strings or `EvTable` instances (see the previous section, one such instance would be the `table` variable in that example).
[EvForm](code:evennia.utils.evform) allows the creation of a two-dimensional "graphic" made by text characters. On this surface, one marks and tags rectangular regions ("cells") to be filled with content. This content can be either normal strings or `EvTable` instances (see the previous section, one such instance would be the `table` variable in that example).
In the case of a Character sheet, these cells would be comparable to a line or box where you could enter the name of your character or their strength score. EvMenu also easily allows to update the content of those fields in code (it use EvTables so you rebuild the table first before re-sending it to EvForm).
@ -581,7 +581,7 @@ Use `help dice` to see what syntax is supported or look at `evennia/contrib/dice
## Rooms
Evennia comes with rooms out of the box, so no extra work needed. A GM will automatically have all needed building commands available. A fuller go-through is found in the [Building tutorial](Building-quickstart). Here are some useful highlights:
Evennia comes with rooms out of the box, so no extra work needed. A GM will automatically have all needed building commands available. A fuller go-through is found in the [Building tutorial](Building-Quickstart). Here are some useful highlights:
* `@dig roomname;alias = exit_there;alias, exit_back;alias` - this is the basic command for digging a new room. You can specify any exit-names and just enter the name of that exit to go there.
* `@tunnel direction = roomname` - this is a specialized command that only accepts directions in the cardinal directions (n,ne,e,se,s,sw,w,nw) as well as in/out and up/down. It also automatically builds "matching" exits back in the opposite direction.
@ -594,7 +594,7 @@ Evennia comes with rooms out of the box, so no extra work needed. A GM will auto
## Channels
Evennia comes with [Channels](Communications.md#Channels) in-built and they are described fully in the documentation. For brevity, here are the relevant commands for normal use:
Evennia comes with [Channels](Communications#Channels) in-built and they are described fully in the documentation. For brevity, here are the relevant commands for normal use:
* `@ccreate new_channel;alias;alias = short description` - Creates a new channel.
* `addcom channel` - join an existing channel. Use `addcom alias = channel` to add a new alias you can use to talk to the channel, as many as desired.

View file

@ -13,9 +13,9 @@ A few local variables are made available when running `@py`. These offer entry i
- **self** / **me** - the calling object (i.e. you)
- **here** - the current caller's location
- **obj** - a dummy [Object](Objects) instance
- **evennia** - Evennia's [flat API](evennia-API) - through this you can access all of Evennia.
- **evennia** - Evennia's [flat API](Evennia-API) - through this you can access all of Evennia.
For accessing other objects in the same room you need to use `self.search(name)`. For objects in other locations, use one of the `evennia.search_*` methods. See [below](https://github.com/evennia/evennia/wiki/Execute%20Python%20Code#finding-objects).
For accessing other objects in the same room you need to use `self.search(name)`. For objects in other locations, use one of the `evennia.search_*` methods. See [below](Execute-Python-Code#finding-objects).
## Returning output
@ -30,7 +30,7 @@ Note that we didn't get any return value, all we where told is that the code fin
09:15
<<< Done.
> Warning: When using the `msg` function wrap our argument in `str()` to convert it into a string above. This is not strictly necessary for most types of data (Evennia will usually convert to a string behind the scenes for you). But for *lists* and *tuples* you will be confused by the output if you don't wrap them in `str()`: only the first item of the iterable will be returned. This is because doing `msg(text)` is actually just a convenience shortcut; the full argument that `msg` accepts is something called an *outputfunc* on the form `(cmdname, (args), {kwargs})` (see [the message path](https://github.com/evennia/evennia/wiki/Messagepath) for more info). Sending a list/tuple confuses Evennia to think you are sending such a structure. Converting it to a string however makes it clear it should just be displayed as-is.
> Warning: When using the `msg` function wrap our argument in `str()` to convert it into a string above. This is not strictly necessary for most types of data (Evennia will usually convert to a string behind the scenes for you). But for *lists* and *tuples* you will be confused by the output if you don't wrap them in `str()`: only the first item of the iterable will be returned. This is because doing `msg(text)` is actually just a convenience shortcut; the full argument that `msg` accepts is something called an *outputfunc* on the form `(cmdname, (args), {kwargs})` (see [the message path](Messagepath) for more info). Sending a list/tuple confuses Evennia to think you are sending such a structure. Converting it to a string however makes it clear it should just be displayed as-is.
If you were to use Python's standard `print`, you will see the result in your current `stdout` (your terminal by default, otherwise your log file).

View file

@ -84,7 +84,7 @@ Using `swap_typeclass` to the same typeclass we already have will re-run the cre
@py typeclasses.myclass import MyClass;[obj.swap_typeclass(MyClass) for obj in MyClass.objects.all()]
```
See the [Object Typeclass tutorial](Adding-Object-Typeclass-tutorial) for more help and the [Typeclasses](Typeclasses) and [Attributes](Attributes) page for detailed documentation about Typeclasses and Attributes.
See the [Object Typeclass tutorial](Adding-Object-Typeclass-Tutorial) for more help and the [Typeclasses](Typeclasses) and [Attributes](Attributes) page for detailed documentation about Typeclasses and Attributes.
#### Troubleshooting: Updating Yourself

View file

@ -17,6 +17,7 @@ Evennia's game time features assume a standard calendar (see the relevant sectio
All is done through the settings. Here are the settings you should use if you want a game time with a standard calendar:
```python
# in a file settings.py in mygame/server/conf
# The time factor dictates if the game world runs faster (timefactor>1)
# or slower (timefactor<1) than the real world.
TIME_FACTOR = 2.0
@ -44,6 +45,7 @@ time.mktime(start.timetuple())
This should return a huge number - the number of seconds since Jan 1 1970. Copy that directly into your settings (editing `server/conf/settings.py`):
```python
# in a file settings.py in mygame/server/conf
TIME_GAME_EPOCH = 1577865600
```
@ -127,6 +129,7 @@ In our first example of the Shire calendar, used by hobbits in books by Tolkien,
The custom calendar is defined by adding the `TIME_UNITS` setting to your settings file. It's a dictionary containing as keys the name of the units, and as value the number of seconds (the smallest unit for us) in this unit. Its keys must be picked among the following: "sec", "min", "hour", "day", "week", "month" and "year" but you don't have to include them all. Here is the configuration for the Shire calendar:
```python
# in a file settings.py in mygame/server/conf
TIME_UNITS = {"sec": 1,
"min": 60,
"hour": 60 * 60,
@ -142,6 +145,7 @@ In order for this setting to work properly, remember all units have to be multip
So for our example, our settings may look like this:
```python
# in a file settings.py in mygame/server/conf
# Time factor
TIME_FACTOR = 4
@ -200,7 +204,11 @@ class CmdTime(Command):
Don't forget to add it in your CharacterCmdSet to see this command:
```python
from commands.gametime import CmdTime
# in mygame/commands/default_cmdset.py
from commands.gametime import CmdTime # <-- Add
# ...
class CharacterCmdSet(default_cmds.CharacterCmdSet):
"""
@ -215,7 +223,8 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
Populates the cmdset
"""
super().at_cmdset_creation()
self.add(CmdTime())
# ...
self.add(CmdTime()) # <- Add
```
Reload your game with the `@reload` command. You should now see the `time` command. If you enter it, you might see something like:

View file

@ -12,7 +12,7 @@ This will help you download, install and start Evennia for the first time.
- [Linux Install](#linux-install)
- [Mac Install](#mac-install)
- [Windows Install](#windows-install)
- [Running in Docker](https://github.com/evennia/evennia/wiki/Running-Evennia-in-Docker)
- [Running in Docker](Running-Evennia-in-Docker)
- [Where to Go Next](#where-to-go-next)
- [Troubleshooting](#troubleshooting)
- [Glossary of terms](Glossary)
@ -35,7 +35,7 @@ more detailed instructions for your platform.
10. `evennia start` (make sure to make a superuser when asked)
Evennia should now be running and you can connect to it by pointing a web browser to `http://localhost:4001` or a MUD telnet client to `localhost:4000` (use `127.0.0.1` if your OS does not recognize `localhost`).
We also release [Docker images](https://github.com/evennia/evennia/wiki/Running-Evennia-in-Docker)
We also release [Docker images](Running-Evennia-in-Docker)
based on `master` and `develop` branches.
## Requirements
@ -425,14 +425,14 @@ logged in, stand in the `Limbo` room and run
to build [Evennia's tutorial world](Tutorial-World-Introduction) - it's a small solo quest to explore. Only run the instructed `@batchcommand` once. You'll get a lot of text scrolling by as the tutorial is built. Once done, the `tutorial` exit will have appeared out of Limbo - just write `tutorial` to enter it.
Once you get back to `Limbo` from the tutorial (if you get stuck in the tutorial quest you can do `@tel #2` to jump to Limbo), a good idea is to learn how to [start, stop and reload](Start-Stop-Reload) the Evennia server. You may also want to familiarize yourself with some [commonly used terms in our Glossary](Glossary). After that, why not experiment with [creating some new items and build some new rooms](https://github.com/evennia/evennia/wiki/Building-Quickstart) out from Limbo.
Once you get back to `Limbo` from the tutorial (if you get stuck in the tutorial quest you can do `@tel #2` to jump to Limbo), a good idea is to learn how to [start, stop and reload](Start-Stop-Reload) the Evennia server. You may also want to familiarize yourself with some [commonly used terms in our Glossary](Glossary). After that, why not experiment with [creating some new items and build some new rooms](Building-Quickstart) out from Limbo.
From here on, you could move on to do one of our [introductory tutorials](Tutorials) or simply dive headlong into Evennia's comprehensive [manual](https://github.com/evennia/evennia/wiki). While Evennia has no major game systems out of the box, we do supply a range of optional *contribs* that you can use or borrow from. They range from dice rolling and alternative color schemes to barter and combat systems. You can find the [growing list of contribs here](https://github.com/evennia/evennia/blob/master/evennia/contrib/README.md).
If you have any questions, you can always ask in [the developer chat](http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb) `#evennia` on `irc.freenode.net` or by posting to the [Evennia forums](https://groups.google.com/forum/#%21forum/evennia). You can also join the [Discord Server](https://discord.gg/NecFePw).
Finally, if you are itching to help out or support Evennia (awesome!) have an
issue to report or a feature to request, [see here](how-to-get-and-give-help).
issue to report or a feature to request, [see here](How-To-Get-And-Give-Help).
Enjoy your stay!

View file

@ -39,7 +39,7 @@ The term 'account' refers to the [player's](#player) unique account on the game.
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 [puppet](#puppet) one (or more, depending on game mode) [Characters](#character) in the game.
In the default [multisession mode](https://github.com/evennia/evennia/wiki/Sessions#multisession-mode) of Evennia, you immediately start puppeting a Character with the same name as your Account when you log in - mimicking how older servers used to work.
In the default [multisession mode](Sessions#multisession-mode) of Evennia, you immediately start puppeting a Character with the same name as your Account when you log in - mimicking how older servers used to work.
### _admin-site_
@ -55,7 +55,7 @@ A _Channel_ refers to an in-game communication channel. It's an entity that peop
### _character_
The _Character_ is the term we use for the default avatar being [puppeted](#puppet) by the [account](#account) in the game world. It is represented by the `Character` typeclass (which is a child of [Object](#object)). Many developers use children of this class to represent monsters and other NPCs. You can [read more about it here](https://github.com/evennia/evennia/wiki/Objects#subclasses-of-object).
The _Character_ is the term we use for the default avatar being [puppeted](#puppet) by the [account](#account) in the game world. It is represented by the `Character` typeclass (which is a child of [Object](#object)). Many developers use children of this class to represent monsters and other NPCs. You can [read more about it here](Objects#subclasses-of-object).
### _django_
@ -63,11 +63,11 @@ The _Character_ is the term we use for the default avatar being [puppeted](#pupp
Through Django, we can work with any supported database (SQlite3, Postgres, MySQL ...) using generic Python instead of database-specific SQL: A database table is represented in Django as a Python class (called a *model*). An Python instance of such a class represents a row in that table.
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 [typeclasses](#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 offered by Evennia's [default search functions](https://github.com/evennia/evennia/wiki/Tutorial-Searching-For-Objects). One will then need to read about Django's _querysets_. Querysets are Python method calls on a special form that lets you build complex queries. They get converted into optimized SQL queries under the hood, suitable for your current database. [Here is our tutorial/explanation of Django queries](https://github.com/evennia/evennia/wiki/Tutorial-Searching-For-Objects#queries-in-django).
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 [typeclasses](#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 offered by Evennia's [default search functions](Tutorial-Searching-For-Objects). One will then need to read about Django's _querysets_. Querysets are Python method calls on a special form that lets you build complex queries. They get converted into optimized SQL queries under the hood, suitable for your current database. [Here is our tutorial/explanation of Django queries](https://github.com/evennia/evennia/wiki/Tutorial-Searching-For-Objects#queries-in-django).
> By the way, Django (and Evennia) does allow you to fall through and send raw SQL if you really want to. It's highly unlikely to be needed though; the Django database abstraction is very, very powerful.
The other aspect where Evennia uses Django is for web integration. On one end Django gives an infrastructure for wiring Python functions (called *views*) to URLs: the view/function is called when a user goes that URL in their browser, enters data into a form etc. The return is the web page 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 count on the web page). [Here is one of our tutorials on wiring up such a web page](https://github.com/evennia/evennia/wiki/Add-a-simple-new-web-page). Django also comes with the [admin site](#admin-site), which automatically maps the database into a form accessible from a web browser.
The other aspect where Evennia uses Django is for web integration. On one end Django gives an infrastructure for wiring Python functions (called *views*) to URLs: the view/function is called when a user goes that URL in their browser, enters data into a form etc. The return is the web page 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 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](#admin-site), which automatically maps the database into a form accessible from a web browser.
### _core_
@ -77,7 +77,7 @@ This term is sometimes used to represent the main Evennia library code suite, *e
### _field_
A _field_ or _database field_ in Evennia refers to a [property](#property) on a [typeclass](#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 that base typeclass (for example [Objects](#object) store its location as a field). In all other cases, [attributes](#attribute) are used to add new persistent data to the typeclass. [Read more about typeclass properties here](https://github.com/evennia/evennia/wiki/Typeclasses#about-typeclass-properties).
A _field_ or _database field_ in Evennia refers to a [property](#property) on a [typeclass](#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 that base typeclass (for example [Objects](#object) store its location as a field). In all other cases, [attributes](#attribute) are used to add new persistent data to the typeclass. [Read more about typeclass properties here](Typeclasses#about-typeclass-properties).
### _git_
@ -121,7 +121,7 @@ GitHub is a business, offering free hosting to Open-source projects like Evennia
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 core [typeclasses](#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 typeclass.
The `Object` is a typeclass that represents all *in-game* entities, including [Characters](#character), rooms, trees, weapons etc. [Read more about Objects here](https://github.com/evennia/evennia/wiki/Objects).
The `Object` is a typeclass that represents all *in-game* entities, including [Characters](#character), rooms, trees, weapons etc. [Read more about Objects here](Objects).
### _pip_

View file

@ -3,7 +3,7 @@
### How to *get* Help
If you cannot find what you are looking for in the [online documentation](index), here's what to do:
If you cannot find what you are looking for in the [online documentation]([online documentation](index)), here's what to do:
- If you think the documentation is not clear enough and are short on time, fill in our quick little [online form][form] and let us know - no login required. Maybe the docs need to be improved or a new tutorial added! Note that while this form is useful as a suggestion box we cannot answer questions or reply to you. Use the discussion group or chat (linked below) if you want feedback.
- If you have trouble with a missing feature or a problem you think is a bug, go to the [issue tracker][issues] and search to see if has been reported/suggested already. If you can't find an existing entry create a new one.
@ -19,7 +19,7 @@ The first and easiest way you as a user can help us out is by taking part in [co
If you'd like to help develop Evennia more hands-on, here are some ways to get going:
- Look through our [online documentation wiki](index) and see if you can help improve or expand the documentation (even small things like fixing typos!). You don't need any particular permissions to edit the wiki.
- Look through our [online documentation wiki]([online documentation wiki](index)) and see if you can help improve or expand the documentation (even small things like fixing typos!). You don't need any particular permissions to edit the wiki.
- 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.
- 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 [bounties][issues-bounties] open - these are issues members of the community has put up money to see fixed (if you want to put up a bounty yourself you can do so via our page on [bountysource][bountysource]).
- Check out the [Contributing](Contributing) page on how to practically contribute with code using github.

View file

@ -21,7 +21,7 @@ pip install python-twitter
## A basic tweet command
Evennia doesn't have a `tweet` command out of the box so you need to write your own little [Command](Commands) in order to tweet. If you are unsure about how commands work and how to add them, it can be an idea to go through the [Adding a Command Tutorial](https://github.com/evennia/evennia/wiki/Adding%20Command%20Tutorial) before continuing.
Evennia doesn't have a `tweet` command out of the box so you need to write your own little [Command](Commands) in order to tweet. If you are unsure about how commands work and how to add them, it can be an idea to go through the [Adding a Command Tutorial](Adding-Command-Tutorial) before continuing.
You can create the command in a separate command module (something like `mygame/commands/tweet.py`) or together with your other custom commands, as you prefer.
@ -89,4 +89,4 @@ This shows only a basic tweet setup, other things to do could be:
* Changing locks to make tweeting open to more people
* Echo your tweets to an in-game channel
Rather than using an explicit command you can set up a Script to send automatic tweets, for example to post updated game stats. See the [Tweeting Game Stats tutorial](https://github.com/evennia/evennia/wiki/Tutorial-Tweeting-Game-Stats) for help.
Rather than using an explicit command you can set up a Script to send automatic tweets, for example to post updated game stats. See the [Tweeting Game Stats tutorial](Tutorial-Tweeting-Game-Stats) for help.

View file

@ -1,7 +1,7 @@
# Inputfuncs
An *inputfunc* is an Evennia function that handles a particular input (an [inputcommand](OOB)) from the client. The inputfunc is the last destination for the inputcommand along the [ingoing message path](messagepath#the-ingoing-message-path). The inputcommand always has the form `(commandname, (args), {kwargs})` and Evennia will use this to try to find and call an inputfunc on the form
An *inputfunc* is an Evennia function that handles a particular input (an [inputcommand](OOB)) from the client. The inputfunc is the last destination for the inputcommand along the [ingoing message path](Messagepath#the-ingoing-message-path). The inputcommand always has the form `(commandname, (args), {kwargs})` and Evennia will use this to try to find and call an inputfunc on the form
```python
def commandname(session, *args, **kwargs):

View file

@ -1,3 +1,5 @@
# Installing on Android
This page describes how to install and run the Evennia server on an Android phone. This will involve
installing a slew of third-party programs from the Google Play store, so make sure you are okay with
@ -101,7 +103,7 @@ $ cd ~ && source evenv/bin/activate
(evenv) $ evennia start
```
You may wish to look at the [Linux Instructions](https://github.com/evennia/evennia/wiki/Getting-Started#linux-install) for more.
You may wish to look at the [Linux Instructions](Getting-Started#linux-install) for more.
## Caveats

View file

@ -107,4 +107,4 @@
### 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).
- Wiki [Home]([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

@ -1,7 +1,7 @@
# Locks
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, Objects, Scripts, Accounts, [Help System](help-system), [messages](Communications#Msg) and [channels](Communications#Channels)) are accessed through locks.
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), [Objects](Objects), [Scripts](Scripts), [Accounts](Accounts), [Help System](Help-System), [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. Whenever another entity wants that kind of access the lock will analyze that entity in different ways to determine if access should be granted or not. Evennia implements a "lockdown" philosophy - all entities are inaccessible unless you explicitly define a lock that allows some or full access.
@ -240,7 +240,7 @@ Here is how you use `perm` to give an account more permissions:
perm/account Tommy = Builders
perm/account/del Tommy = Builders # remove it again
Note the use of the `/account` switch. It means you assign the permission to the [Accounts](Account) Tommy instead of any [Character](Objects) that also happens to be named "Tommy".
Note the use of the `/account` switch. It means you assign the permission to the [Accounts]([Accounts](Account)) Tommy instead of any [Character](Objects) that also happens to be named "Tommy".
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 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 Account, not on their Characters (but see also [quelling](Locks#Quelling)).

View file

@ -3,7 +3,7 @@
This is a small tutorial for customizing your character objects, using the example of letting users turn on and off ANSI color parsing as an example. `@options NOCOLOR=True` will now do what this tutorial shows, but the tutorial subject can be applied to other toggles you may want, as well.
In the Building guide's [Colors](https://github.com/evennia/evennia/wiki/TextTags#coloured-text) page you can learn how to add color to your game by using special markup. Colors enhance the gaming experience, but not all users want color. Examples would be users working from clients that don't support color, or people with various seeing disabilities that rely on screen readers to play your game. Also, whereas Evennia normally automatically detects if a client supports color, it may get it wrong. Being able to turn it on manually if you know it **should** work could be a nice feature.
In the Building guide's [Colors](TextTags#coloured-text) page you can learn how to add color to your game by using special markup. Colors enhance the gaming experience, but not all users want color. Examples would be users working from clients that don't support color, or people with various seeing disabilities that rely on screen readers to play your game. Also, whereas Evennia normally automatically detects if a client supports color, it may get it wrong. Being able to turn it on manually if you know it **should** work could be a nice feature.
So here's how to allow those users to remove color. It basically means you implementing a simple configuration system for your characters. This is the basic sequence:

View file

@ -22,7 +22,7 @@ The client sends data to Evennia in two ways.
- When first connecting, the client can send data to the server about its
capabilities. This is things like "I support xterm256 but not unicode" and is
mainly used when a Telnet client connects. This is called a "handshake" and
will generally set some flags on the [Portal Session](Portal-and-Server) that
will generally set some flags on the [Portal Session](Portal-And-Server) that
are later synced to the Server Session. Since this is not something the player
controls, we'll not explore this further here.
- The client can send an *inputcommand* to the server. Traditionally this only
@ -60,7 +60,7 @@ This inputcommand-structure is pickled together with the unique session-id of th
### ServerSessionHandler
On the Server side, the AMP unpickles the data and associates the session id with the server-side [Session](Session). Data and Session are passed to the server-side `SessionHandler.data_in`. This in turn calls `ServerSession.data_in()`
On the Server side, the AMP unpickles the data and associates the session id with the server-side [Session]([Session](Session)). Data and Session are passed to the server-side `SessionHandler.data_in`. This in turn calls `ServerSession.data_in()`
### ServerSession
@ -135,7 +135,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 an outputcommand `("text", ("Hello",), {})`.
This is also the point where [Inlinefuncs](https://github.com/evennia/evennia/wiki/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 AMP bridge.
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 AMP bridge.
### PortalSessionHandler

View file

@ -1,3 +1,5 @@
# Nicks
*Nicks*, short for *Nicknames* is a system allowing an object (usually a [Account](Accounts)) to assign custom replacement names for other game entities.

View file

@ -10,7 +10,7 @@ Inside Evennia, all server-client communication happens in the same way (so plai
This is often referred to as an *inputcommand* or *outputcommand*, depending on the direction it's traveling. The end point for an inputcommand, (the 'Evennia-end' of the message path) is a matching [Inputfunc](Inputfuncs). This function is called as `cmdname(session, *args, **kwargs)` where `session` is the Session-source of the command. Inputfuncs can easily be added by the developer to support/map client commands to actions inside Evennia (see the [inputfunc](Inputfuncs) page for more details).
When a message is outgoing (at the 'Client-end' of the message path) the outputcommand is handled by a matching *Outputfunc*. This is responsible for converting the internal Evennia representation to a 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 time one would want to add new outputfuncs is as part of developing support for a new Evennia [Protocol](https://github.com/evennia/evennia/wiki/Custom-Protocols).
When a message is outgoing (at the 'Client-end' of the message path) the outputcommand is handled by a matching *Outputfunc*. This is responsible for converting the internal Evennia representation to a 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 time one would want to add new outputfuncs is as part of developing support for a new Evennia [Protocol](Custom-Protocols).
## Sending and receiving an OOB message
@ -33,7 +33,7 @@ Which commands you can send depends on the client. If the client does not suppor
> Remember that a given message may go to multiple clients with different capabilities. So unless you turn off telnet completely and only rely on the webclient, you should never rely on non-`text` OOB messages always reaching all targets.
[Inputfuncs](Inputfunc) lists the default inputfuncs available to handle incoming OOB messages. To accept more you need to add more inputfuncs (see that page for more info).
[Inputfuncs]([Inputfuncs](Inputfunc)) lists the default inputfuncs available to handle incoming OOB messages. To accept more you need to add more inputfuncs (see that page for more info).
## Supported OOB protocols

View file

@ -36,7 +36,7 @@ What the `@create` command actually *does* is to use `evennia.create_object`. Yo
(The `@create` command will auto-append the most likely path to your typeclass, if you enter the 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 your own building commands). Check out the `ev.create_*` functions for how to build other entities like [Scripts](Scripts)).
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 will usually want to change this at build time (using the `@desc` command or using the [Spawner](https://github.com/evennia/evennia/wiki/Spawner-and-Prototypes)). The `Object` typeclass offers many more hooks that is available to use though - see next section.
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 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 to use though - see next section.
## Properties and functions on Objects
@ -56,7 +56,7 @@ Beyond the properties assigned to all [typeclassed](Typeclasses) objects (see th
The last two properties are special:
- `cmdset` - this is a handler that stores all [command sets](Commands#Command_Sets) defined on the object (if any).
- `scripts` - this is a handler that manages 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 `src/objects/objects.py` for their arguments and more details.

View file

@ -28,7 +28,7 @@ Evennia will by default accept incoming connections on all interfaces (`0.0.0.0`
### Settings example
You can connect Evennia to the Internet without any changes to your settings. The default settings are easy to use but are not necessarily the safest. You can customize your online presence in your [settings file](https://github.com/evennia/evennia/wiki/Server-Conf#settings-file). To have Evennia recognize changed port settings you have to do a full `evennia reboot` to also restart the Portal and not just the Server component.
You can connect Evennia to the Internet without any changes to your settings. The default settings are easy to use but are not necessarily the safest. You can customize your online presence in your [settings file](Server-Conf#settings-file). To have Evennia recognize changed port settings you have to do a full `evennia reboot` to also restart the Portal and not just the Server component.
Below is an example of a simple set of settings, mostly using the defaults. Evennia will require access to five computer ports, of which three (only) should be open to the outside world. Below we continue to assume that our server address is `203.0.113.0`.
@ -127,7 +127,7 @@ SSH_INTERFACES = ['0.0.0.0']
AMP_PORT = 4006
```
The `AMP_PORT` is required to work, since this is the internal port linking Evennia's [Server and Portal](Portal-and-Server) components together. The other ports are encrypted ports that may be useful for custom protocols but are otherwise not used.
The `AMP_PORT` is required to work, since this is the internal port linking Evennia's [Server and Portal](Portal-And-Server) components together. The other ports are encrypted ports that may be useful for custom protocols but are otherwise not used.
### Lockdown mode
@ -223,7 +223,7 @@ The options you probably need to look for are *shell account services*, *VPS:es*
- Usually runs a Linux flavor, making it easy to install Evennia.
- Support. You don't need to maintain the server hardware. If your house burns down, at least your game stays online. Many services guarantee a certain level of up-time and also do regular backups for you. Make sure to check, some offer lower rates in exchange for you yourself being fully responsible for your data/backups.
- Usually offers a fixed domain name, so no need to mess with IP addresses.
- May have the ability to easily deploy [docker](https://github.com/evennia/evennia/wiki/Running-Evennia-in-Docker) versions of evennia and/or your game.
- May have the ability to easily deploy [docker](Running-Evennia-in-Docker) versions of evennia and/or your game.
**Disadvantages**
- Might be pretty expensive (more so than a web hotel). Note that Evennia will normally need at least 100MB RAM and likely much more for a large production game.
@ -232,7 +232,7 @@ The options you probably need to look for are *shell account services*, *VPS:es*
#### Installing Evennia on a remote server
Firstly, if you are familiar with server infrastructure, consider using [Docker](https://github.com/evennia/evennia/wiki/Running-Evennia-in-Docker) to deploy your game to the remote server; it will likely ease installation and deployment. Docker images may be a little confusing if you are completely new to them though.
Firstly, if you are familiar with server infrastructure, consider using [Docker](Running-Evennia-in-Docker) to deploy your game to the remote server; it will likely ease installation and deployment. 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 be able to follow the [Getting Started](Getting-Started) 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 easily ask for them to be installed). On a VPS or Cloud service you can install them yourself as needed.

View file

@ -544,7 +544,7 @@ After this quick tour of some `str` methods, we'll take a look at some Evennia-s
One very common task is to convert a `str` into an Evennia object. Take the previous example: having `"book"` in a variable is great, but we would prefer to know what the user is talking about... what is this `"book"`?
To get an object from a string, we perform an Evennia search. Evennia provides a `search` method on all typeclassed objects (you will most likely use the one on characters or accounts). This method supports a very wide array of arguments and has [its own tutorial](https://github.com/evennia/evennia/wiki/Tutorial-Searching-For-Objects). Some examples of useful cases follow:
To get an object from a string, we perform an Evennia search. Evennia provides a `search` method on all typeclassed objects (you will most likely use the one on characters or accounts). This method supports a very wide array of arguments and has [its own tutorial](Tutorial-Searching-For-Objects). Some examples of useful cases follow:
### Local searches

View file

@ -1,6 +1,6 @@
# Python basic tutorial part two
[In the first part](https://github.com/evennia/evennia/wiki/Python-basic-introduction) of this Python-for-Evennia basic tutorial we learned how to run some simple Python code from inside the game. We also made our first new *module* containing a *function* that we called. Now we're going to start exploring the very important subject of *objects*.
[In the first part](Python-basic-introduction) of this Python-for-Evennia basic tutorial we learned how to run some simple Python code from inside the game. We also made our first new *module* containing a *function* that we called. Now we're going to start exploring the very important subject of *objects*.
**Contents:**
- [On the subject of objects](#on-the-subject-of-objects)
@ -119,7 +119,7 @@ evennia/
evennia/
...
```
There are lots of things in there. There are some docs but most of those have to do with the distribution of Evennia and does not concern us right now. The `evennia` subfolder is what we are looking for. *This* is what you are accessing when you do `from evennia import ...`. It's set up by Evennia as a good place to find modules when the server starts. The exact layout of the Evennia library [is covered by our directory overview](https://github.com/evennia/evennia/wiki/Directory-Overview#evennia-library-layout). You can also explore it [online on github](https://github.com/evennia/evennia/tree/master/evennia).
There are lots of things in there. There are some docs but most of those have to do with the distribution of Evennia and does not concern us right now. The `evennia` subfolder is what we are looking for. *This* is what you are accessing when you do `from evennia import ...`. It's set up by Evennia as a good place to find modules when the server starts. The exact layout of the Evennia library [is covered by our directory overview](Directory-Overview#evennia-library-layout). You can also explore it [online on github](https://github.com/evennia/evennia/tree/master/evennia).
The structure of the library directly reflects how you import from it.
@ -130,7 +130,7 @@ The structure of the library directly reflects how you import from it.
Now, remember that our `characters.py` module did `from evennia import DefaultCharacter`. But if we look at the contents of the `evennia` folder, there is no `DefaultCharacter` anywhere! This is because Evennia gives a large number of optional "shortcuts", known as [the "flat" API](https://github.com/evennia/evennia/wiki/Evennia-API). The intention is to make it easier to remember where to find stuff. The flat API is defined in that weirdly named `__init__.py` file. This file just basically imports useful things from all over Evennia so you can more easily find them in one place.
We could [just look at the documenation](https://github.com/evennia/evennia/wiki/evennia#typeclasses) to find out where we can look at our `DefaultCharacter` parent. But for practice, let's figure it out. Here is where `DefaultCharacter` [is imported from](https://github.com/evennia/evennia/blob/master/evennia/__init__.py#L188) inside `__init__.py`:
We could [just look at the documenation](code:evennia#typeclasses) to find out where we can look at our `DefaultCharacter` parent. But for practice, let's figure it out. Here is where `DefaultCharacter` [is imported from](https://github.com/evennia/evennia/blob/master/evennia/__init__.py#L188) inside `__init__.py`:
```python
from .objects.objects import DefaultCharacter
@ -150,7 +150,7 @@ from evennia import DefaultCharacter
is the same thing, just a little easier to remember.
> To access the shortcuts of the flat API you *must* use `from evennia import ...`. Using something like `import evennia.DefaultCharacter` will not work. See [more about the Flat API here](https://github.com/evennia/evennia/wiki/Evennia-API).
> To access the shortcuts of the flat API you *must* use `from evennia import ...`. Using something like `import evennia.DefaultCharacter` will not work. See [more about the Flat API here](Evennia-API).
### Tweaking our Character class
@ -194,7 +194,7 @@ class DefaultCharacter(DefaultObject):
... And so on (you can see the full [class online here](https://github.com/evennia/evennia/blob/master/evennia/objects/objects.py#L1915)). Here we have functional code! These methods may not be directly visible in `Character` back in our game dir, but they are still available since `Character` is a child of `DefaultCharacter` above. Here is a brief summary of the methods we find in `DefaultCharacter` (follow in the code to see if you can see roughly where things happen)::
- `basetype_setup` is called by Evennia only once, when a Character is first created. In the `DefaultCharacter` class it sets some particular [Locks](https://github.com/evennia/evennia/wiki/Locks) so that people can't pick up and puppet Characters just like that. It also adds the [Character Cmdset](https://github.com/evennia/evennia/wiki/Command-Sets) so that Characters always can accept command-input (this should usually not be modified - the normal hook to override is `at_object_creation`, which is called after `basetype_setup` (it's in the parent)).
- `basetype_setup` is called by Evennia only once, when a Character is first created. In the `DefaultCharacter` class it sets some particular [Locks](Locks) so that people can't pick up and puppet Characters just like that. It also adds the [Character Cmdset](Command-Sets) so that Characters always can accept command-input (this should usually not be modified - the normal hook to override is `at_object_creation`, which is called after `basetype_setup` (it's in the parent)).
- `at_after_move` makes it so that every time the Character moves, the `look` command is automatically fired (this would not make sense for just any regular Object).
- `at_pre_puppet` is called when an Account begins to puppet this Character. When not puppeted, the Character is hidden away to a `None` location. This brings it back to the location it was in before. Without this, "headless" Characters would remain in the game world just standing around.
- `at_post_puppet` is called when puppeting is complete. It echoes a message to the room that his Character has now connected.
@ -327,10 +327,10 @@ This will show us the changed code we just did. Having a window with IPython run
### Where to go from here
This should give you a running start using Python with Evennia. If you are completely new to programming or Python you might want to look at a more formal Python tutorial. You can find links and resources [on our link page](https://github.com/evennia/evennia/wiki/Links).
This should give you a running start using Python with Evennia. If you are completely new to programming or Python you might want to look at a more formal Python tutorial. You can find links and resources [on our link page](Links).
We have touched upon many of the concepts here but to use Evennia and to be able to follow along in the code, you will need basic understanding of Python [modules](http://docs.python.org/2/tutorial/modules.html), [variables](http://www.tutorialspoint.com/python/python_variable_types.htm), [conditional statements](http://docs.python.org/tutorial/controlflow.html#if-statements), [loops](http://docs.python.org/tutorial/controlflow.html#for-statements), [functions](http://docs.python.org/tutorial/controlflow.html#defining-functions), [lists, dictionaries, list comprehensions](http://docs.python.org/tutorial/datastructures.html) and [string formatting](http://docs.python.org/tutorial/introduction.html#strings). You should also have a basic understanding of [object-oriented programming](http://www.tutorialspoint.com/python/python_classes_objects.htm) and what Python [Classes](http://docs.python.org/tutorial/classes.html) are.
Once you have familiarized yourself, or if you prefer to pick Python up as you go, continue to one of the beginning-level [Evennia tutorials](https://github.com/evennia/evennia/wiki/Tutorials) to gradually build up your understanding.
Once you have familiarized yourself, or if you prefer to pick Python up as you go, continue to one of the beginning-level [Evennia tutorials](Tutorials) to gradually build up your understanding.
Good luck!

View file

@ -6,13 +6,17 @@ Evennia has an [official docker image](https://hub.docker.com/r/evennia/evennia/
First, install the `docker` program so you can run the Evennia container. You can get it freely from [docker.com](https://www.docker.com/). Linux users can likely also get it through their normal package manager.
To fetch the latest evennia docker image, run:
docker pull evennia/evennia
This is a good command to know. It will fetch the latest official docker image from docker hub and is how you upgrade to the latest in the future.
This is a good command to know, it is also how you update to the latest version when we make updates in the future. This tracks the `master` branch of Evennia.
`cd` to a place where your game dir is, or where you want to create it. Then run:
> Note: If you want to experiment with the (unstable) `develop` branch, use `docker pull evennia/evennia:develop`.
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game evennia/evennia
Next `cd` to a place where your game dir is, or where you want to create it. Then run:
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user $UID:$GID evennia/evennia
Having run this (see next section for a description of what's what), you will be at a prompt inside the docker container:
@ -20,7 +24,7 @@ Having run this (see next section for a description of what's what), you will be
evennia|docker /usr/src/game $
```
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 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 [Getting Started](Getting-Started) instructions.
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 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 [Getting Started](Getting-Started) 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 isolated Linux environment. To exit the container and all processes in there, press `Ctrl-D`. If you created a new game folder, you will find that it has appeared on-disk.
@ -188,4 +192,4 @@ docker-compose up
```
For more information about `docker-compose`, see [Getting Started with docker-compose](https://docs.docker.com/compose/gettingstarted/).
Note that with this setup you lose the `--user $UID` option. The problem is that the variable `UID` is not available inside the configuration file `docker-compose.yml`. A workaround is to hardcode your user and group id. In a terminal run `echo $UID:$GID` and if for example you get `1000:1000` you can add to `docker-compose.yml` a line `user: 1000:1000` just below the `image: ...` line.
> Note that with this setup you lose the `--user $UID` option. The problem is that the variable `UID` is not available inside the configuration file `docker-compose.yml`. A workaround is to hardcode your user and group id. In a terminal run `echo $UID:$GID` and if for example you get `1000:1000` you can add to `docker-compose.yml` a line `user: 1000:1000` just below the `image: ...` line.

View file

@ -86,7 +86,7 @@ Finally:
Now the only ports open will be your administrative ssh port (whichever you chose), and Evennia on 4000-4001.
### Use an external webserver
Though not officially supported, there are some benefits to [deploying a webserver](https://github.com/evennia/evennia/wiki/Apache-Config) to handle/proxy traffic to your Evennia instance.
Though not officially supported, there are some benefits to [deploying a webserver](Apache-Config) to handle/proxy traffic to your Evennia instance.
For example, Evennia's game engine and webservice are tightly integrated. If you bring your game down for maintenance (or if it simply crashes) your website will go down with it. In these cases a standalone webserver can still be used to display a maintenance page or otherwise communicate to your users the reason for the downtime, instead of disappearing off the face of the earth and returning opaque `SERVER NOT FOUND` error messages.

View file

@ -39,7 +39,7 @@ Apart from the main `settings.py` file,
- `at_server_startstop.py` - this module contains two functions that Evennia will call every time the Server starts and stops respectively - this includes stopping due to reloading and resetting as well as shutting down completely. It's a useful place to put custom startup code for handlers and other things that must run in your game but which has no database persistence.
- `connection_screens.py` - all global string variables in this module are interpreted by Evennia as 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.
- `inlinefuncs.py` - this is where you can define custom [Inline functions](TextTags#inlinefuncs).
- `inputfuncs.py` - this is where you define custom Inputfuncs to handle data from the client.
- `inputfuncs.py` - this is where you define custom [Input functions](Inputfuncs) to handle data from the client.
- `lockfuncs.py` - this is one of many possible modules to hold your own "safe" *lock functions* to make available to Evennia's [Locks](Locks).
- `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
statistics such as number of online accounts and online status.

View file

@ -3,7 +3,7 @@
An Evennia *Session* represents one single established connection to the server. Depending on the 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.
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 [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 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.
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 [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 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.
> 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 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), but this is just an alias to `.ndb`. So don't store any data on Sessions that you can't afford to lose in a reload. You have been warned.
@ -89,7 +89,7 @@ During certain situations, the portal- and server-side sessions are
## Sessionhandlers
Both the Portal and Server each have a *sessionhandler* to manage the connections. These handlers are global entities contain all methods for relaying data across the AMP bridge. All types of Sessions hold a reference to their respective Sessionhandler (the property is called `sessionhandler`) so they can relay data. See [protocols](https://github.com/evennia/evennia/wiki/Custom-Protocols) for more info
Both the Portal and Server each have a *sessionhandler* to manage the connections. These handlers are global entities contain all methods for relaying data across the AMP bridge. All types of Sessions hold a reference to their respective Sessionhandler (the property is called `sessionhandler`) so they can relay data. See [protocols](Custom-Protocols) for more info
on building new protocols.
To get all Sessions in the game (i.e. all currently connected clients), you access the server-side Session handler, which you get by

View file

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

View file

@ -1,3 +1,5 @@
# Spawner and Prototypes
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
@ -141,7 +143,7 @@ Finally, the value can be a *prototype function* (*Protfunc*). These look like s
"He has $randint(2,5) skulls in a chain around his neck."}
```
At execution time, the place of the protfunc will be replaced with the result of that protfunc being called (this is always a string). A protfunc works in much the same way as an
[InlineFunc](https://github.com/evennia/evennia/wiki/TextTags#inline-functions) - they are actually
[InlineFunc](TextTags#inline-functions) - they are actually
parsed using the same parser - except protfuncs are run every time the prototype is used to spawn a new object (whereas an inlinefunc is called when a text is returned to the user).
Here is how a protfunc is defined (same as an inlinefunc).
@ -272,4 +274,4 @@ Note that no `location` will be set automatically when using `evennia.prototypes
have to specify `location` explicitly in the prototype dict.
If the prototypes you supply are using `prototype_parent` keywords, the spawner will read prototypes from modules
in `settings.PROTOTYPE_MODULES` as well as those saved to the database to determine the body of available parents. The `spawn` command takes many optional keywords, you can find its definition [in the api docs](https://github.com/evennia/evennia/wiki/evennia.prototypes.spawner#spawn).
in `settings.PROTOTYPE_MODULES` as well as those saved to the database to determine the body of available parents. The `spawn` command takes many optional keywords, you can find its definition [in the api docs](code:evennia.prototypes.spawner#spawn).

View file

@ -3,13 +3,13 @@
## Introduction
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](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, by generating a map from an existing grid of rooms.
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](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, 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 anything. You could make an exit "west" that leads to a room described to be in the far north. You could have rooms inside one another, exits leading back to the same room or describing spatial geometries impossible in the real world.
That said, most games *do* organize their rooms in a logical fashion, if nothing else to retain the sanity of their players. And when they do, the game becomes possible to map. This tutorial will give an example of a simple but flexible in-game map system to further help player's to navigate. We will
To simplify development and error-checking we'll break down the work into bite-size chunks, each building on what came before. For this we'll make extensive use of the [Batch code processor](Batch-code-processor), so you may want to familiarize yourself with that.
To simplify development and error-checking we'll break down the work into bite-size chunks, each building on what came before. For this we'll make extensive use of the [Batch code processor](Batch-Code-Processor), so you may want to familiarize yourself with that.
1. **Planning the map** - Here we'll come up with a small example map to use for the rest of the tutorial.
2. **Making a map object** - This will showcase how to make a static in-game "map" object a Character could pick up and look at.
@ -55,9 +55,9 @@ There are many considerations when making a game map depending on the play style
In this section we will try to create an actual "map" object that an account can pick up and look at.
Evennia offers a range of [default commands](Default-Command-Help) for [creating objects and rooms in-game](https://github.com/evennia/evennia/wiki/Building%20Quickstart). While readily accessible, these commands are made to do very specific, restricted things and will thus not offer as much flexibility to experiment (for an advanced exception see [in-line functions](https://github.com/evennia/evennia/wiki/TextTags#new-inlinefuncs)). Additionally, entering long descriptions and properties over and over in the game client can become tedious; especially when testing and you may want to delete and recreate things over and over.
Evennia offers a range of [default commands](Default-Command-Help) for [creating objects and rooms in-game](Building-Quickstart). While readily accessible, these commands are made to do very specific, restricted things and will thus not offer as much flexibility to experiment (for an advanced exception see [in-line functions](TextTags#new-inlinefuncs)). Additionally, entering long descriptions and properties over and over in the game client can become tedious; especially when testing and you may want to delete and recreate things over and over.
To overcome this, Evennia offers [batch processors](https://github.com/evennia/evennia/wiki/Batch-Processors) that work as input-files created out-of-game. In this tutorial we'll be using the more powerful of the two available batch processors, the [Batch Code Processor ](https://github.com/evennia/evennia/wiki/Batch-code%20processor), called with the `@batchcode` command. This is a very powerful tool. It allows you to craft Python files to act as blueprints of your entire game world. These files have access to use Evennia's Python API directly. Batchcode allows for easy editing and creation in whatever text editor you prefer, avoiding having to manually build the world line-by-line inside the game.
To overcome this, Evennia offers [batch processors](Batch-Processors) that work as input-files created out-of-game. In this tutorial we'll be using the more powerful of the two available batch processors, the [Batch Code Processor ](Batch-Code-Processor), called with the `@batchcode` command. This is a very powerful tool. It allows you to craft Python files to act as blueprints of your entire game world. These files have access to use Evennia's Python API directly. Batchcode allows for easy editing and creation in whatever text editor you prefer, avoiding having to manually build the world line-by-line inside the game.
> Important warning: `@batchcode`'s power is only rivaled by the `@py` command. Batchcode is so powerful it should be reserved only for the [superuser](Building-Permissions). Think carefully before you let others (such as `Developer`- level staff) run `@batchcode` on their own - make sure you are okay with them running *arbitrary Python code* on your server.
@ -260,7 +260,7 @@ Log into Evennia as the superuser and run this batchcode. If everything worked o
Now, lets turn our attention towards our game's rooms. Let's use the `return_minimap` method we created above in order to include a minimap in our room descriptions. This is a little more complicated.
By itself we would have to settle for either the map being *above* the description with `room.db.desc = map_string + description_string`, or the map going *below* by reversing their order. Both options are rather unsatisfactory - we would like to have the map next to the text! For this solution we'll explore the utilities that ship with Evennia. Tucked away in `evennia\evennia\utils` is a little module called [EvTable](https://github.com/evennia/evennia/wiki/evennia.utils.evtable) . This is an advanced ASCII table creator for you to utilize in your game. We'll use it by creating a basic table with 1 row and two columns (one for our map and one for our text) whilst also hiding the borders. Open the batchfile again
By itself we would have to settle for either the map being *above* the description with `room.db.desc = map_string + description_string`, or the map going *below* by reversing their order. Both options are rather unsatisfactory - we would like to have the map next to the text! For this solution we'll explore the utilities that ship with Evennia. Tucked away in `evennia\evennia\utils` is a little module called [EvTable](code:evennia.utils.evtable) . This is an advanced ASCII table creator for you to utilize in your game. We'll use it by creating a basic table with 1 row and two columns (one for our map and one for our text) whilst also hiding the borders. Open the batchfile again
```python
# mygame\world\batchcode_world.py
@ -334,4 +334,4 @@ Log in to evennia and run `@batchcode batchcode_world` and you'll have a little
You should now have a mapped little world and a basic understanding of batchcode, EvTable and how easily new game defining features can be added to Evennia.
You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why not add more features to your game by trying other tutorials: [Add weather to your world](https://github.com/evennia/evennia/wiki/Weather%20Tutorial), [fill your world with NPC's](https://github.com/evennia/evennia/wiki/Tutorial-Aggressive-NPCs) or [implement a combat system](https://github.com/evennia/evennia/wiki/Turn%20based%20Combat%20System).
You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why not add more features to your game by trying other tutorials: [Add weather to your world](Weather-Tutorial), [fill your world with NPC's](https://github.com/evennia/evennia/wiki/Tutorial-Aggressive-NPCs) or [implement a combat system](Turn-based-Combat-System).

View file

@ -19,7 +19,7 @@ To see which colours your client support, use the default `@color` command. This
### ANSI colours
Evennia supports the `ANSI` standard for text. This is by far the most supported MUD-color standard, available in all but the most ancient mud clients. The ANSI colours are **r**ed, **g**reen, **y**ellow, **b**lue, **m**agenta, **c**yan, **w**hite and black. They are abbreviated by their 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 foreground text. There are also 8 "background" colours. These have no bright alternative in ANSI (but Evennia uses the [Xterm256](https://github.com/evennia/evennia/wiki/TextTags#xterm256-colours) extension behind the scenes to offer them anyway).
Evennia supports the `ANSI` standard for text. This is by far the most supported MUD-color standard, available in all but the most ancient mud clients. The ANSI colours are **r**ed, **g**reen, **y**ellow, **b**lue, **m**agenta, **c**yan, **w**hite and black. They are abbreviated by their 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 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 them anyway).
To colour your text you put special tags in it. Evennia will parse these and convert them to the correct markup for the client used. If the user's client/console/display supports ANSI colour, they will see the text in the specified colour, otherwise the tags will be stripped (uncolored text). This works also for non-terminal clients, such as the webclient. For the webclient, Evennia will translate the codes to HTML RGB colors.
@ -40,7 +40,7 @@ Here is an example of the tags in action:
- `|h` is used to make any following foreground ANSI colors bright (it has no effect on Xterm colors). This is only relevant to use with `|!` type tags and will be valid until the next `|n`, `|H` or normal (upper-case) `|#` tag. This tag will never affect background colors, those have to be set bright/normal explicitly. Technically, `|h|!G` is identical to `|g`.
- `|H` negates the effects `|h` and returns all ANSI foreground colors (`|!` and `|` types) to 'normal' intensity. It has no effect on background and Xterm colors.
> 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 as [Xterm256 colours](https://github.com/evennia/evennia/wiki/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 upper- and lower-case background tags.
> 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 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 upper- and lower-case background tags.
If you want to display an ANSI marker as output text (without having any effect), you need to escape it by preceding its `|` with another `|`:

View file

@ -3,14 +3,14 @@
This tutorial shows the implementation of an NPC object that responds to characters entering their location. In this example the NPC has the option to respond aggressively or not, but any actions could be triggered this way.
One could imagine using a [Script](https://github.com/evennia/evennia/wiki/Scripts) that is constantly checking for newcomers. This would be highly inefficient (most of the time its check would fail). Instead we handle this on-demand by using a couple of existing object hooks to inform the NPC that a Character has entered.
One could imagine using a [Script](Scripts) that is constantly checking for newcomers. This would be highly inefficient (most of the time its check would fail). Instead we handle this on-demand by using a couple of existing object hooks to inform the NPC that a Character has entered.
It is assumed that you already know how to create custom room and character typeclasses, please see the [Basic Game tutorial](https://github.com/evennia/evennia/wiki/Tutorial%20for%20basic%20MUSH%20like%20game) if you haven't already done this.
It is assumed that you already know how to create custom room and character typeclasses, please see the [Basic Game tutorial](Tutorial-for-basic-MUSH-like-game) if you haven't already done this.
What we will need is the following:
- An NPC typeclass that can react when someone enters.
- A custom [Room](https://github.com/evennia/evennia/wiki/Objects#rooms) typeclass that can tell the NPC that someone entered.
- A custom [Room](Objects#rooms) typeclass that can tell the NPC that someone entered.
- We will also tweak our default `Character` typeclass a little.
To begin with, we need to create an NPC typeclass. Create a new file inside of your typeclasses folder and name it `npcs.py` and then add the following code:

View file

@ -3,7 +3,7 @@
This tutorial shows the implementation of an NPC object that responds to characters speaking in their location. In this example the NPC parrots what is said, but any actions could be triggered this way.
It is assumed that you already know how to create custom room and character typeclasses, please see the [Basic Game tutorial](https://github.com/evennia/evennia/wiki/Tutorial%20for%20basic%20MUSH%20like%20game) if you haven't already done this.
It is assumed that you already know how to create custom room and character typeclasses, please see the [Basic Game tutorial](Tutorial-for-basic-MUSH-like-game) if you haven't already done this.
What we will need is simply a new NPC typeclass that can react when someone speaks.

View file

@ -57,11 +57,11 @@ class CmdPoke(default_cmds.MuxCommand):
```
By default, the search method of a Character will attempt to find a unique object match for the string sent to it (`self.args`, in this case, which is the arguments passed to the command by the player) in the surroundings of the Character - the room or their inventory. If there is no match found, the return value (which is assigned to `target`) will be `None`, and an appropriate failure message will be sent to the Character. If there's not a unique match, `None` will again be returned, and a different error message will be sent asking them to disambiguate the multi-match. By default, the user can then pick out a specific match using with a number and dash preceding the name of the object: `character.search("2-pink unicorn")` will try to find the second pink unicorn in the room.
The search method has many [arguments](https://github.com/evennia/evennia/wiki/evennia.objects.objects#defaultcharactersearch) that allow you to refine the search, such as by designating the location to search in or only matching specific typeclasses.
The search method has many [arguments](code:evennia.objects.objects#defaultcharactersearch) that allow you to refine the search, such as by designating the location to search in or only matching specific typeclasses.
## Searching using `utils.search`
Sometimes you will want to find something that isn't tied to the search methods of a character or account. In these cases, Evennia provides a [utility module with a number of search functions](https://github.com/evennia/evennia/wiki/evennia.utils.search). For example, suppose you want a command that will find and display all the rooms that are tagged as a 'hangout', for people to gather by. Here's a simple Command to do this:
Sometimes you will want to find something that isn't tied to the search methods of a character or account. In these cases, Evennia provides a [utility module with a number of search functions](code:evennia.utils.search). For example, suppose you want a command that will find and display all the rooms that are tagged as a 'hangout', for people to gather by. Here's a simple Command to do this:
```python
# e.g. in file mygame/commands/command.py

View file

@ -1,7 +1,7 @@
# Tutorial Tweeting Game Stats
This tutorial will create a simple script that will send a tweet to your already configured twitter account. Please see: [How to connect Evennia to Twitter](https://github.com/evennia/evennia/wiki/How-to-connect-Evennia-to-Twitter) if you haven't already done so.
This tutorial will create a simple script that will send a tweet to your already configured twitter account. Please see: [How to connect Evennia to Twitter](How-to-connect-Evennia-to-Twitter) if you haven't already done so.
The script could be expanded to cover a variety of statistics you might wish to tweet about regularly, from player deaths to how much currency is in the economy etc.

View file

@ -30,8 +30,8 @@ To use Evennia, you will need basic understanding of Python [modules](http://doc
_Starting tutorials for you who are new to developing with Evennia._
- [Python basic introduction](https://github.com/evennia/evennia/wiki/Python-basic-introduction) (part 1) - Python intro using Evennia.
- [Python basic introduction](https://github.com/evennia/evennia/wiki/Python-basic-tutorial-part-two) (part 2) - More on objects, classes and finding where things are.
- [Python basic introduction](Python-basic-introduction) (part 1) - Python intro using Evennia.
- [Python basic introduction](Python-basic-tutorial-part-two) (part 2) - More on objects, classes and finding where things are.
- [Tutorial: First Steps Coding](https://github.com/evennia/evennia/wiki/First%20Steps%20Coding) - learn each basic feature on their own through step-by-step instruction.
- [Tutorial: A small first game](Tutorial-for-basic-MUSH-like-game) - learn basic features as part of building a small but working game from scratch.
- [Tutorial: Adding new commands](Adding-Command-Tutorial) - focuses specifically on how to add new commands.
@ -49,7 +49,7 @@ _Examples of designing new objects for your game world_
- [Tutorial: Listening NPC's](https://github.com/evennia/evennia/wiki/Tutorial-NPCs-listening)
- [Tutorial: Creating a vehicle](https://github.com/evennia/evennia/wiki/Tutorial-Vehicles)
- [Tutorial: Making an NPC shop](NPC-shop-Tutorial) (also advanced [EvMenu](EvMenu) usage)
- [Tutorial: Implementing a Static In Game Map](Static-In-Game-Map) (also [Batch Code](Batch-code-processor) usage)
- [Tutorial: Implementing a Static In Game Map](Static-In-Game-Map) (also [Batch Code](Batch-Code-Processor) usage)
- [Tutorial: Implementing a Dynamic In Game Map](Dynamic-In-Game-Map)
- [Tutorial: Writing your own unit tests](https://github.com/evennia/evennia/wiki/Unit-Testing#testing-for-game-development-mini-tutorial)

View file

@ -39,7 +39,7 @@ to Evennia you must import that module from somewhere.
All Evennia classes inheriting from class in the table above share one important feature and two important limitations. This is why we don't simply call them "classes" but "typeclasses".
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. This is detailed [below](https://github.com/evennia/evennia/wiki/Typeclasses#about-typeclass-properties).
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. 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_ 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 default library):
```python
@ -228,7 +228,7 @@ obj_to_change.swap_typeclass(new_typeclass_path, clean_attributes=False,
run_start_hooks="all", no_default=True, clean_cmdsets=False)
```
The arguments to this method are described [in the API docs here](https://github.com/evennia/evennia/wiki/evennia.typeclasses.models#typedobjectswap_typeclass).
The arguments to this method are described [in the API docs here](code:evennia.typeclasses.models#typedobjectswap_typeclass).
## How typeclasses actually work

View file

@ -7,7 +7,7 @@ This tutorial will create a simple web-based interface for generating a new in-g
It is probably most useful to set `MULTISESSION_MODE = 2` or `3` (which gives you a character-selection screen when you log into the game later). Other modes can be used with some adaptation to auto-puppet the new Character.
You should have some familiarity with how Django sets up its Model Template View framework. You need to understand what is happening in the basic [Web Character View tutorial](https://github.com/evennia/evennia/wiki/Web-Character-View-Tutorial). If you dont understand the listed tutorial or have a grasp of Django basics, please look at the [Django tutorial](https://docs.djangoproject.com/en/1.8/intro/) to get a taste of what Django does, before throwing Evennia into the mix (Evennia shares its API and attributes with the website interface). This guide will outline the format of the models, views, urls, and html templates needed.
You should have some familiarity with how Django sets up its Model Template View framework. You need to understand what is happening in the basic [Web Character View tutorial](Web-Character-View-Tutorial). If you dont understand the listed tutorial or have a grasp of Django basics, please look at the [Django tutorial](https://docs.djangoproject.com/en/1.8/intro/) to get a taste of what Django does, before throwing Evennia into the mix (Evennia shares its API and attributes with the website interface). This guide will outline the format of the models, views, urls, and html templates needed.
## Pictures
@ -217,7 +217,7 @@ def creating(request):
Most importantly, the following attributes must be set on the created character object:
* Evennia [permissions](https://github.com/evennia/evennia/wiki/Locks#permissions) (copied from the `AccountDB`).
* Evennia [permissions](Locks#permissions) (copied from the `AccountDB`).
* The right `puppet` [locks](Locks) so the Account can actually play as this Character later.
* The relevant Character [typeclass](Typeclasses)
* Character name (key)

View file

@ -9,7 +9,7 @@ Django is a web framework. It gives you a set of development tools for building
Django projects are split up into *apps* and these apps all contribute to one project. For instance, you might have an app for conducting polls, or an app for showing news posts or, like us, one for creating a web client.
Each of these applications has a `urls.py` file, which specifies what [URL](http://en.wikipedia.org/wiki/Uniform_resource_locator)s are used by the app, a `views.py` file for the code that the URLs activate, a `templates` directory for displaying the results of that code in [HTML](http://en.wikipedia.org/wiki/Html) for the user, and a `static` folder that holds assets like [CSS](http://en.wikipedia.org/wiki/CSS), [Javascript](http://en.wikipedia.org/wiki/Javascript), and Image files (You may note your mygame/web folder does not have a `static` or `template` folder. This is intended and explained further below). Django applications may also have a `models.py` file for storing information in the database. We will not change any models here, take a look at the [New Models](https://github.com/evennia/evennia/wiki/New%20Models) page (as well as the [Django docs](https://docs.djangoproject.com/en/1.7/topics/db/models/) on models) if you are interested.
Each of these applications has a `urls.py` file, which specifies what [URL](http://en.wikipedia.org/wiki/Uniform_resource_locator)s are used by the app, a `views.py` file for the code that the URLs activate, a `templates` directory for displaying the results of that code in [HTML](http://en.wikipedia.org/wiki/Html) for the user, and a `static` folder that holds assets like [CSS](http://en.wikipedia.org/wiki/CSS), [Javascript](http://en.wikipedia.org/wiki/Javascript), and Image files (You may note your mygame/web folder does not have a `static` or `template` folder. This is intended and explained further below). Django applications may also have a `models.py` file for storing information in the database. We will not change any models here, take a look at the [New Models](New-Models) page (as well as the [Django docs](https://docs.djangoproject.com/en/1.7/topics/db/models/) on models) if you are interested.
There is also a root `urls.py` that determines the URL structure for the entire project. A starter `urls.py` is included in the default game template, and automatically imports all of Evennia's default URLs for you. This is located in `web/urls.py`.

View file

@ -77,7 +77,7 @@ There are 141 entries in the wiki.
- [Haproxy config (optional)](HAProxy-Config-(Optional)) - A page about Haproxy config (optional).
- [Help system](Help-System) - How-to-use-and-add-help-files-to-the-game.
- [Help system tutorial](Help-System-Tutorial) - Create-a-page-to-see-your-game-help-online
- [Home](index) - Wiki-front-page.
- [Home]([Home](index)) - Wiki-front-page.
- [How to connect evennia to twitter](How-to-connect-Evennia-to-Twitter) - Connecting-your-game-to-a-twitter-account.
- [How to get and give help](How-To-Get-And-Give-Help) - Summing-up-how-to-best-get-help-or-give-it.
- [Implementing a game rule system](Implementing-a-game-rule-system) - Tutorial-giving-ideas-about-creating-a-game-rule-system

View file

@ -11,7 +11,7 @@ Another issue is if you want to group rooms in geographic regions. Let's say th
Many MUD codebases hardcode zones as part of the engine and database. Evennia does no such distinction due to the fact that rooms themselves are meant to be customized to any level anyway. Below is a suggestion for how to implement zones in Evennia.
All objects in Evennia can hold any number of Tags. Tags are short labels that you attach to objects. They make it very easy to retrieve groups of objects. An object can have any number of different tags. So let's attach the relevant tag to our forest:
All objects in Evennia can hold any number of [Tags](Tags). Tags are short labels that you attach to objects. They make it very easy to retrieve groups of objects. An object can have any number of different tags. So let's attach the relevant tag to our forest:
```python
forestobj.tags.add("magicalforest", category="zone")

View file

@ -146,23 +146,27 @@ smv_outputdir_format = "versions" + sep + "{config.release}"
# reroute to github links or to the api
_github_code_root = "https://github.com/evennia/tree/master/"
_github_code_root = "https://github.com/evennia/evennia/blob/master/"
_github_doc_root = "https://github.com/evennia/tree/master/docs/sources/"
# recommonmark
def url_resolver(url):
if url.startswith("github:"):
return _github_code_root + url[7:]
elif url.startswith("api:"):
return f"api/{url[4:]}.rst"
urlstart = "code:"
apistart = "api:"
if url.startswith(urlstart):
return _github_code_root + url[len(urlstart):]
elif url.startswith(apistart):
return "api/" + url[len(apistart):] + ".html"
else:
return _github_doc_root + url
auto_toc_sections = ["Contents", "Toc", "Index"]
recommonmark_config = {
"enable_auto_doc_ref": True,
"enable_auto_toc_tree": True,
"url_resolver": url_resolver,
"auto_toc_tree_section": ["Contents", "Toc", "Index"],

View file

@ -9,18 +9,18 @@ You can [Search][search] the documentation as well as browse all pages alphabeti
suggestion box][form]!
There is [a lengthier introduction](Evennia-Introduction) to read. You might also want to read about
[how to get and give help](how-to-get-and-give-help).
[how to get and give help](How-To-Get-And-Give-Help).
| [![Getting Started][icon_new]](Getting-Started)| [![Admin Docs][icon_admin]](Administrative-Docs) | [![Builder Docs][icon_builder]](Builder-Docs) | [![Developer-Central][icon_devel]](Developer-Central) | [![tutorial][icon_tutorial]](Tutorials) | [![API][icon_API]](evennia) |
|-----------------|----------------------|--------------------------|----------------------|----------------------------|--------------------|
|[Getting Started](Getting-Started)| [Admin Docs](Administrative-Docs) | [Builder Docs](Builder-Docs) | [Developer Central](Developer-Central) | [Tutorials & Examples](Tutorials) | [API](evennia) |
- [Getting Started](Getting-Started) page helps installing and starting Evennia for the first time.
- [Admin Docs](Administrative-Docs) covers running and maintaining an Evennia server.
- [Builder Docs](Builder-Docs) helps for starting to build a game world using Evennia.
- [Developer Central](Developer-Central) describes how Evennia works and is used by coders.
- [Tutorials & Examples](Tutorials) contains help pages on a step-by-step or tutorial format.
- [API](api:evennia) documentation is created from the latest source code.
- The [Getting Started](Getting-Started) page helps installing and starting Evennia for the first time.
- The [Admin Docs](Administrative-Docs) covers running and maintaining an Evennia server.
- The [Builder Docs](Builder-Docs) helps for starting to build a game world using Evennia.
- The [Developer Central](Developer-Central) describes how Evennia works and is used by coders.
- The [Tutorials & Examples](Tutorials) contains help pages on a step-by-step or tutorial format.
- The [API](evennia) documentation is created from the latest source code.
[search]: https://www.google.com/cse/publicurl?cx=010440404980795145992:6ztkvqc46je
[group]: https://groups.google.com/forum/#%21forum/evennia

View file

@ -1,6 +1,5 @@
# Toc
* [index](index.md)
* [A voice operated elevator using events](A-voice-operated-elevator-using-events.md)
* [API refactoring](API-refactoring.md)
* [Accounts](Accounts.md)
@ -57,6 +56,7 @@
* [Evennia Game Index](Evennia-Game-Index.md)
* [Evennia Introduction](Evennia-Introduction.md)
* [Evennia for Diku Users](Evennia-for-Diku-Users.md)
* [Evennia for MUSH Users](Evennia-for-MUSH-Users.md)
* [Evennia for roleplaying sessions](Evennia-for-roleplaying-sessions.md)
* [Execute Python Code](Execute-Python-Code.md)
* [First Steps Coding](First-Steps-Coding.md)
@ -75,6 +75,7 @@
* [IRC](IRC.md)
* [Implementing a game rule system](Implementing-a-game-rule-system.md)
* [Inputfuncs](Inputfuncs.md)
* [Installing on Android](Installing-on-Android.md)
* [Internationalization](Internationalization.md)
* [Learn Python for Evennia The Hard Way](Learn-Python-for-Evennia-The-Hard-Way.md)
* [Licensing](Licensing.md)
@ -86,6 +87,7 @@
* [MonitorHandler](MonitorHandler.md)
* [NPC shop Tutorial](NPC-shop-Tutorial.md)
* [New Models](New-Models.md)
* [Nicks](Nicks.md)
* [OOB](OOB.md)
* [Objects](Objects.md)
* [Online Setup](Online-Setup.md)
@ -107,6 +109,7 @@
* [Setting up PyCharm](Setting-up-PyCharm.md)
* [Signals](Signals.md)
* [Soft Code](Soft-Code.md)
* [Spawner and Prototypes](Spawner-and-Prototypes.md)
* [Start Stop Reload](Start-Stop-Reload.md)
* [Static In Game Map](Static-In-Game-Map.md)
* [Tags](Tags.md)
@ -137,4 +140,4 @@
* [Webclient brainstorm](Webclient-brainstorm.md)
* [Webclient](Webclient.md)
* [Wiki Index](Wiki-Index.md)
* [Zones](Zones.md)
* [Zones](Zones.md)