diff --git a/docs/0.9.5/.buildinfo b/docs/0.9.5/.buildinfo
index 431ca3b9a2..44b66df96b 100644
--- a/docs/0.9.5/.buildinfo
+++ b/docs/0.9.5/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 9766e9d6cd1b1ac3e7e89e787dd3b60f
+config: 309a848b9229079210e6ddb568dd313d
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/0.9.5/Add-a-simple-new-web-page.html b/docs/0.9.5/Add-a-simple-new-web-page.html
index 7c6e9cd324..22bd737b99 100644
--- a/docs/0.9.5/Add-a-simple-new-web-page.html
+++ b/docs/0.9.5/Add-a-simple-new-web-page.html
@@ -133,8 +133,7 @@ Django parlance). You can specify such places in your settings (see the When you enter the address http://localhost:4001/story in your web browser, Django will parse that
field to figure out which page you want to go to. You tell it which patterns are relevant in the
file
-[mygame/web/urls.py](https://github.com/evennia/evennia/blob/master/evennia/game_template/web/urls.p
-y).
+mygame/web/urls.py.
Open it now.
Django looks for the variable urlpatterns in this file. You want to add your new pattern to the
custom_patterns list we have prepared - that is then merged with the default urlpatterns. Here’s
diff --git a/docs/0.9.5/Async-Process.html b/docs/0.9.5/Async-Process.html
index b6fdee8005..a4db249fe2 100644
--- a/docs/0.9.5/Async-Process.html
+++ b/docs/0.9.5/Async-Process.html
@@ -156,16 +156,16 @@ errback.
As of Evennia 0.9, the @interactive [decorator](https://realpython.com/primer-on-python-
-decorators/)
+
As of Evennia 0.9, the @interactive decorator
is available. This makes any function or method possible to ‘pause’ and/or await player input
in an interactive way.
1 @@ -231,7 +230,7 @@ in an interactive way. @interactive def myfunc(caller): - + while True: caller.msg("Getting ready to wait ...") yield(5) diff --git a/docs/0.9.5/Attributes.html b/docs/0.9.5/Attributes.html index e011d46cb8..75abc3fc3d 100644 --- a/docs/0.9.5/Attributes.html +++ b/docs/0.9.5/Attributes.html @@ -289,8 +289,7 @@ entities you can loop over in a for-loop. Attribute-saving supports the followin Lists, like Dicts, like Sets, like [collections.OrderedDict](https://docs.python.org/2/library/collections.html#collections.OrderedDi
-ct), like collections.OrderedDict, like collections.Deque, like
Nestings of any combinations of the above, like lists in dicts or an OrderedDict of tuples, each diff --git a/docs/0.9.5/Bootstrap-&-Evennia.html b/docs/0.9.5/Bootstrap-&-Evennia.html index 1ad863d683..7db5904b52 100644 --- a/docs/0.9.5/Bootstrap-&-Evennia.html +++ b/docs/0.9.5/Bootstrap-&-Evennia.html @@ -143,8 +143,7 @@ docs More Bootstrap¶Bootstrap also provides a huge amount of utilities, as well as styling and content elements. To -learn more about them, please [read the Bootstrap docs](https://getbootstrap.com/docs/4.0/getting- -started/introduction/) or read one of our other web tutorials. +learn more about them, please read the Bootstrap docs or read one of our other web tutorials. |
If you aren’t familiar with the concept of properties in Python, I encourage you to read a good -tutorial on the subject. [This article on Python properties](https://www.programiz.com/python- -programming/property) +tutorial on the subject. This article on Python properties is well-explained and should help you understand the idea.
Let’s look at our properties for x. First of all is the read property.
Note that Python cares about indentation, so make sure to indent with the same number of spaces as shown above!
-So what happens above? We [import the module](http://www.linuxtopia.org/online_books/programming_boo
-ks/python_programming/python_ch28s03.html) evennia/contrib/multidescer.py at the top. Once
+
So what happens above? We import the module evennia/contrib/multidescer.py at the top. Once
imported we can access stuff inside that module using full stop (.). The multidescer is defined as
a class CmdMultiDesc (we could find this out by opening said module in a text editor). At the
bottom we create a new instance of this class and add it to the CharacterCmdSet class. For the
@@ -255,17 +254,14 @@ developer changing the underlying Python code.
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. 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.
+various corners of Evennia. There is also the Tutorial for running 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](Adding-Command-
-Tutorial). You may also find it useful to shop through the evennia/contrib/ folder. The Tutorial
+commands. How this is done is covered by the Tutorial on adding new commands. You may also find it useful to shop through the evennia/contrib/ folder. The Tutorial
world is a small single-player quest you can try (it’s not very MUSH-
like but it does show many Evennia concepts in action). Beyond that there are many more
tutorials to try out. If you feel you want a more visual overview you can also look at
Evennia in pictures.
… And of course, if you need further help you can always drop into the [Evennia chatroom](http://web -chat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb) or post a +
… And of course, if you need further help you can always drop into the Evennia chatroom or post a question in our forum/mailing list!
So you have Evennia up and running. You have a great game idea in mind. Now it’s time to start cracking! But where to start? Here are some ideas for a workflow. Note that the suggestions on this page are just that - suggestions. Also, they are primarily aimed at a lone hobby designer or a small -team developing a game in their free time. There is an article in the Imaginary Realities e-zine -which was written by the Evennia lead dev. It focuses more on you finding out your motivations for -making a game - you can [read the article here](http://journal.imaginary- -realities.com/volume-07/issue-03/where-do-i-begin/index.html).
+team developing a game in their free time.Below are some minimal steps for getting the first version of a new game world going with players. It’s worth to at least make the attempt to do these steps in order even if you are itching to jump ahead in the development cycle. On the other hand, you should also make sure to keep your work fun diff --git a/docs/0.9.5/Glossary.html b/docs/0.9.5/Glossary.html index c98a54aaae..c57b54e72b 100644 --- a/docs/0.9.5/Glossary.html +++ b/docs/0.9.5/Glossary.html @@ -237,8 +237,7 @@ infrastructure. Git itself is a separate project.
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
+
In general Python (and other object-oriented languages), an object is what we call the instance of a class. But one of Evennia’s
core typeclasses 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.
A property is a general term used for properties on any Python object. The term also sometimes
-refers to the property built-in function of Python ([read more here](https://www.python-
-course.eu/python3_properties.php)). Note the distinction between properties,
+refers to the property built-in function of Python (read more here). Note the distinction between properties,
fields and Attributes.
Before doing this tutorial you will probably want to read the intro in [Basic Web tutorial](Web- -Tutorial). Reading the three first parts of the Django -tutorial might help as well.
+Before doing this tutorial you will probably want to read the intro in Basic Web tutorial. Reading the three first parts of the Django tutorial might help as well.
This tutorial will show you how to access the help system through your website. Both help commands and regular help entries will be visible, depending on the logged-in user or an anonymous character.
This tutorial will show you how to:
diff --git a/docs/0.9.5/How-To-Get-And-Give-Help.html b/docs/0.9.5/How-To-Get-And-Give-Help.html index 77c8480564..5567a98c7d 100644 --- a/docs/0.9.5/How-To-Get-And-Give-Help.html +++ b/docs/0.9.5/How-To-Get-And-Give-Help.html @@ -44,18 +44,18 @@If you cannot find what you are looking for in the online documentation, 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 and let us know - no login required. Maybe the docs need to be improved or a new +online 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 +issue tracker and search to see if has been reported/suggested already. If you can’t find an existing entry create a new one.
If you need help, want to start a discussion or get some input on something you are working on, -make a post to the [discussions group][group] This is technically a ‘mailing list’, but you don’t +make a post to the discussions group This is technically a ‘mailing list’, but you don’t need to use e-mail; you can post and read all messages just as easily from your browser via the online interface.
If you want more direct discussions with developers and other users, consider dropping into our -IRC chat channel [#evennia][chat] on the Freenode network. Please note however that you have to be +IRC chat channel #evennia on the Freenode network. Please note however that you have to be patient if you don’t get any response immediately; we are all in very different time zones and many have busy personal lives. So you might have to hang around for a while - you’ll get noticed eventually!
Evennia is a completely non-funded project. It relies on the time donated by its users and developers in order to progress.
-The first and easiest way you as a user can help us out is by taking part in [community -discussions][group] and by giving feedback on what is good or bad. Report bugs you find and features -you lack to our [issue tracker][issues]. Just the simple act of letting developers know you are out +
The first and easiest way you as a user can help us out is by taking part in +community discussions and by giving feedback on what is good or bad. Report bugs you find and features +you lack to our issue tracker. Just the simple act of letting developers know you are out there using their program is worth a lot. Generally mentioning and reviewing Evennia elsewhere is also a nice way to spread the word.
If you’d like to help develop Evennia more hands-on, here are some ways to get going:
@@ -75,10 +75,10 @@ also a nice way to spread the word.Look through our online documentation wiki 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 +
Send a message to our discussion group and/or our IRC 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 +
Take a look at our issue tracker and see if there’s something you feel like taking on. +here are bugs 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]).
… And finally, if you want to help motivate and support development you can also drop some coins -in the developer’s cup. You can [make a donation via PayPal][paypal] or, even better, [become an -Evennia patron on Patreon][patreon]! This is a great way to tip your hat and show that you +in the developer’s cup. You can make a donation via PayPal or, even better, +[become an Evennia patron on Patreon][patreon]! This is a great way to tip your hat and show that you appreciate the work done with the server! Finally, if you want to encourage the community to resolve a particular
-c6MQ#gid=0
-[group]: http://groups.google.com/group/evennia/
-[issues]: https://github.com/evennia/evennia/issues
-[issues-master]: https://github.com/evennia/evennia/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%2
-0label%3Abug%20label%3Amaster-branch
-[chat]: http://webchat.freenode.net/?channels=evennia
-[paypal]: https://www.paypal.com/se/cgi-bin/webscr?cmd=flow&SESSION=Z-VlOvfGjYq2qvCDOUGpb6C8Due7skT
-0qOklQEy5EbaD1f0eyEQaYlmCc8O&dispatch=5885d80a13c0db1f8e263663d3faee8d64ad11bbf4d2a5a1a0d303a50933f9
-b2
-[donate-img]: http://images-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https://www.pay
-palobjects.com/en%255fUS/SE/i/btn/btn%255fdonateCC%255fLG.gif&container=focus&gadget=a&rewriteMime=i
-mage/*
+ b2
+[donate-img]: http://images-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https://www.paypalobjects.com/en%255fUS/SE/i/btn/btn%255fdonateCC%255fLG.gif&container=focus&gadget=a&rewriteMime=image/*
[patreon]: https://www.patreon.com/griatch
-[patreon-img]: http://www.evennia.com/
evennia.com - Main Evennia portal page. Links to all corners of Evennia.
Evennia github page - Download code and read documentation.
[Evennia official chat channel](http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRy -dWUmMTE9MTk1JjEyPXRydWUbb) - Our official IRC chat #evennia at irc.freenode.net:6667.
Evennia official chat channel - Our official IRC chat #evennia at irc.freenode.net:6667.
Evennia forums/mailing list - Web interface to our google group.
Evennia development blog - Musings from the lead developer.
Mud-dev wiki - A (very) slowly growing resource on MUD creation.
Mud Client/Server Interaction - A page on classic MUD telnet protocols.
[Mud Tech’s fun/cool but …](http://gc-taylor.com/blog/2013/01/08/mud-tech-funcool-dont-forget- -ship-damned-thing/) - Greg Taylor gives good advice on mud design.
Mud Tech’s fun/cool but … - Greg Taylor gives good advice on mud design.
Lost Library of MOO - Archive of scientific articles on mudding (in particular moo).
Nick Gammon’s hints thread - @@ -166,16 +164,14 @@ articles (not MUD-specific)
The Alexandrian - A blog about tabletop roleplaying and board games, but with lots of general discussion about rule systems and game balance that could be applicable also for MUDs.
[Raph Koster’s laws of game design](https://www.raphkoster.com/games/laws-of-online-world- -design/the-laws-of-online-world-design/) - thought-provoking guidelines and things to think about +
Raph Koster’s laws of game design - thought-provoking guidelines and things to think about when designing a virtual multiplayer world (Raph is known for Ultima Online among other things).
Richard Bartle Designing Virtual Worlds ([amazon page](http://www.amazon.com/Designing-Virtual- -Worlds-Richard-Bartle/dp/0131018167)) - Essential reading for the design of any persistent game +
Richard Bartle Designing Virtual Worlds (amazon page) - Essential reading for the design of any persistent game world, written by the co-creator of the original game MUD. Published in 2003 but it’s still as relevant now as when it came out. Covers everything you need to know and then some.
Zed A. Shaw Learn Python the Hard way (homepage) - Despite diff --git a/docs/0.9.5/Online-Setup.html b/docs/0.9.5/Online-Setup.html index 2d4fe93767..06579187d7 100644 --- a/docs/0.9.5/Online-Setup.html +++ b/docs/0.9.5/Online-Setup.html @@ -333,8 +333,7 @@ certificate, use it and maintain it with your website.
Also, on Freenode visit the #letsencrypt channel for assistance from the community. For an additional resource, Let’s Encrypt has a very active community forum.
-[A blog where someone sets up Let’s Encrypt](https://www.digitalocean.com/community/tutorials/how- -to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04)
+A blog where someone sets up Let’s Encrypt
The only process missing from all of the above documentation is how to pass verification. This is how Let’s Encrypt verifies that you have control over your domain (not necessarily ownership, it’s Domain Validation (DV)). This can be done either with configuring a certain path on your web server diff --git a/docs/0.9.5/Portal-And-Server.html b/docs/0.9.5/Portal-And-Server.html index 3e726dc9f9..b42ec99513 100644 --- a/docs/0.9.5/Portal-And-Server.html +++ b/docs/0.9.5/Portal-And-Server.html @@ -53,8 +53,7 @@ inside the game or from the command line as described
The Server and Portal are glued together via an AMP (Asynchronous Messaging Protocol) connection. This allows the two programs to communicate seamlessly.
--Note: Evennia only supports Python 2.7+ at this time. This page gathers various development -information relevant to server developers.
-
Django can work with Python 2 and 3 already, though changes may be required to how the Evennia code -uses it. Twisted has much Python 3 compatibility, but not all modules within it have been ported -yet. The -twisted.python.dist3 -module gives some information about what’s ported, and I’m compiling a list of missing modules with -related bug reports which can be found below. The list is based on a search for import statements in -the Evennia source code, please add anything that’s missing.
-Part of this process is expected to be writing more tests for Evennia. One encouraging recent port -to Python 3 in Twisted is its Trial test framework, which may need to be used by Evennia to ensure -it still works correctly with Twisted on Python 3.
-Broadly (and perhaps over-simplified):
-Twisted [expects bytes](http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhydontTwisted -snetworkmethodssupportUnicodeobjectsaswellasstrings)
Django [expects “” to be unicode](https://docs.djangoproject.com/en/1.8/topics/python3/#unicode- -literals)
I think we should use (roughly speaking) “” for unicode and b”” for bytes everywhere, but I need to -look at the impacts of this more closely.
-http://twistedmatrix.com/documents/current/core/howto/python3.html
https://twistedmatrix.com/trac/wiki/Plan/Python3
[Twisted Python3 bugs](https://twistedmatrix.com/trac/query?status=assigned&status=new&status=reop -ened&group=status&milestone=Python-3.x)
x = not ported to Python 3 -/ = ported to Python 3
-twisted.application.internet /
twisted.application.service /
twisted.conch x (not used directly)
~https://twistedmatrix.com/trac/ticket/5102~ /
~https://twistedmatrix.com/trac/ticket/4993~ /
twisted.conch.insults.insults x
twisted.conch.interfaces x
twisted.conch.manhole x
twisted.conch.manhole_ssh x
twisted.conch.ssh.common x
twisted.conch.ssh.keys x
-~https://twistedmatrix.com/trac/ticket/7998~ /
“twisted.conch.ssh.keys should be ported to Python 3”
twisted.conch.ssh.userauth x
twisted.conch.telnet x
twisted.cred.checkers /
twisted.cred.portal /
twisted.internet.defer /
twisted.internet.interfaces /
twisted.internet.protocol /
twisted.internet.reactor /
twisted.internet.ssl /
twisted.internet.task /
twisted.internet.threads /
twisted.protocols.amp x
~https://twistedmatrix.com/trac/ticket/6833~ /
“Port twisted.protocols.amp to Python 3”
twisted.protocols.policies /
twisted.python.components /
twisted.python.log /
twisted.python.threadpool /
twisted.web.http (x)
Partial support. Sufficient?
twisted.web.resource /
twisted.web.server (x)
Partial support. Sufficient?
twisted.web.static /
twisted.web.proxy /
twisted.web.wsgi x
~https://twistedmatrix.com/trac/ticket/7993~ /
-“’twisted.web.wsgi’ should be ported to Python 3”
Seems to be making good progress
twisted.words.protocols.irc x
https://twistedmatrix.com/trac/ticket/6320
“Python 3 support for twisted.words.protocols.irc”
~https://twistedmatrix.com/trac/ticket/6564~
“Replace usage of builtin reduce in twisted.words”
Evennia supports Python 3+ since v0.8. This page is deprecated.
… And so on (you can see the full class online -here). Here we +
… And so on (you can see the full class online here). 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
@@ -371,8 +365,7 @@ Character.
This means that DefaultCharacter is in itself a child of something called DefaultObject! Let’s
see what this parent class provides. It’s in the same module as DefaultCharacter, you just need to
-scroll up near the
-top:
evennia<
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](Weather-
-Tutorial), fill your world with NPC’s or implement a combat
-system.
+not add more features to your game by trying other tutorials: Add weather to your world,
+fill your world with NPC’s or implement a combat system.
This tutorial gives an example of a full, if simplified, combat system for Evennia. It was inspired -by the discussions held on the mailing -list.
+by the discussions held on the mailing list.Most MUDs will use some sort of combat system. There are several main variations:
@@ -94,8 +93,7 @@ free.The commands are (in our example) simple; they can either hit <target>, feint <target> or
parry <target>. They can also defend, a generic passive defense. Finally they may choose to
disengage/flee.
When attacking we use a classic [rock-paper-scissors](https://en.wikipedia.org/wiki/Rock-paper-
-scissors) mechanic to determine success: hit defeats feint, which defeats parry which defeats
+
When attacking we use a classic rock-paper-scissors mechanic to determine success: hit defeats feint, which defeats parry which defeats
hit. defend is a general passive action that has a percentage chance to win against hit
(only).
disengage/flee must be entered two times in a row and will only succeed if there is no hit
@@ -112,8 +110,7 @@ characters and handles all the combat information. Since Scripts are database en
that the combat will not be affected by a server reload.
A combat command set with the relevant commands needed for combat, such as the
various attack/defend options and the flee/disengage command to leave the combat mode.
A rule resolution system. The basics of making such a module is described in the rule system -tutorial. We will only sketch such a module here for our end-turn +
A rule resolution system. The basics of making such a module is described in the rule system tutorial. We will only sketch such a module here for our end-turn combat resolution.
An attack command for initiating the combat mode. This is added to the default
command set. It will create the combat handler and add the character(s) to it. It will also assign
@@ -369,7 +366,7 @@ Whereas the TickerHandler is easy to use, a Script offers more power in this cas
commands). We know this by checking the existence of the
`normal_turn_end` NAttribute, set just before calling
force_repeat.
-
+
"""
if self.ndb.normal_turn_end:
# we get here because the turn ended normally
@@ -391,7 +388,7 @@ Whereas the TickerHandler is easy to use, a Script offers more power in this cas
("defend", character, None)]
# set up back-reference
self._init_character(character)
-
+
def remove_character(self, character):
"Remove combatant from handler"
if character.id in self.db.characters:
@@ -542,7 +539,7 @@ weapon(s) held by the player or by which skills they know.
A general way to implement a rule module is found in the [rule system tutorial](Implementing-a-game- -rule-system). Proper resolution would likely require us to change our Characters to store things +
A general way to implement a rule module is found in the rule system tutorial. Proper resolution would likely require us to change our Characters to store things like strength, weapon skills and so on. So for this example we will settle for a very simplistic rock-paper-scissors kind of setup with some randomness thrown in. We will not deal with damage here but just announce the results of each turn. In a real system the Character objects would hold stats diff --git a/docs/0.9.5/Tutorial-World-Introduction.html b/docs/0.9.5/Tutorial-World-Introduction.html index f900feadc9..2983250252 100644 --- a/docs/0.9.5/Tutorial-World-Introduction.html +++ b/docs/0.9.5/Tutorial-World-Introduction.html @@ -101,13 +101,7 @@ will automatically be unquelled.

+
To get into the mood of this miniature quest, imagine you are an adventurer out to find fame and
fortune. You have heard rumours of an old castle ruin by the coast. In its depth a warrior princess
was buried together with her powerful magical weapon - a valuable prize, if it’s true. Of course
diff --git a/docs/0.9.5/Tutorials.html b/docs/0.9.5/Tutorials.html
index 5d1f546b11..a229896003 100644
--- a/docs/0.9.5/Tutorials.html
+++ b/docs/0.9.5/Tutorials.html
@@ -48,8 +48,8 @@
Before continuing to read these tutorials (and especially before you start to code or build your
-game in earnest) it’s strongly recommended that you read the [Evennia coding introduction](Coding-
-Introduction) as well as the Planning your own game pages first.Tutorials¶
Please note that it’s not within the scope of our tutorials to teach you basic Python. If you are new to the language, expect to have to look up concepts you are unfamiliar with. Usually a quick internet search will give you all info you need. Furthermore, our tutorials tend to focus on @@ -77,22 +77,17 @@ and transitions into writing code.
General code practices for newbie game developers.
To use Evennia, you will need basic understanding of Python modules, -variables, conditional -statements, +variables, conditional statements, loops, -functions, lists, -dictionaries, list comprehensions and string -formatting. You should also have a basic -understanding of object-oriented -programming and what Python +functions, lists, dictionaries, list comprehensions and string formatting. You should also have a basic +understanding of object-oriented programming and what Python Classes are.
Python tutorials for beginners - external link with tutorials for those not familiar with coding in general or Python in particular.
Tutorial: Version Control - use GIT to organize your code both for your own game project and for contributing to Evennia.
MIT offers free courses in many subjects. Their [Introduction to Computer Science and -Programming](https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc- +
MIT offers free courses in many subjects. Their [Introduction to Computer Science and Programming](https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc- introduction-to-computer-science-and-programming-spring-2011/) uses Python as its language of choice. Longer path, but more in-depth. Definitely worth a look.
Tutorial: customize the way channels and channel commands work in your game
[Tutorial: Adding unit tests to your game project](./Unit-Testing#testing-for-game-development-mini- -tutorial)
[Tutorial: Adding unit tests to your game project](./Unit-Testing#testing-for-game-development-mini- tutorial)
Evennia’s test suite makes use of Django unit test system, which in turn relies on Python’s unittest module.
-If you want to help out writing unittests for Evennia, take a look at Evennia’s coveralls.io -page. There you see which modules have any form of +
If you want to help out writing unittests for Evennia, take a look at Evennia’s coveralls.io page. There you see which modules have any form of test coverage and which does not.
To make the test runner find the tests, they must be put in a module named
18 19 20test*.py(sotest.py, @@ -134,13 +133,13 @@ can optionally do cleanup after each test.- import unittest - + # the function we want to test from mypath import myfunc - + class TestObj(unittest.TestCase): "This tests a function myfunc." - + def test_return_value(self): "test method. Makes sure return value is as expected." expected_return = "This is me being nice." @@ -155,8 +154,7 @@ can optionally do cleanup after each test. self.assertEqual(expected_return, actual_return)You might also want to read the documentation for the unittest -module.
+You might also want to read the documentation for the unittest module.
Using the EvenniaTest class¶
Evennia offers a custom TestCase, the
+definition of theevennia.utils.test_resources.EvenniaTestclass. This class @@ -164,8 +162,7 @@ initiates a range of useful properties on themselves for testing Evennia systems.accountand.sessionrepresenting a mock connected Account and its Session and.char1and.char2representing Characters complete with a location in the test database. These are all useful when testing Evennia system requiring any of the default Evennia typeclasses as inputs. See the full -definition of theEvenniaTestclass in [evennia/utils/test_resources.py](https://github.com/evenni -a/evennia/blob/master/evennia/utils/test_resources.py).EvenniaTestclass in evennia/utils/test_resources.py.
1 2 3 @@ -235,9 +232,7 @@ of the Evennia distribution and its unit tests should be run with all other EvenThe way to do this is to only temporarily add your models to the
INSTALLED_APPSdirectory when the test runs. here is an example of how to do it.-Note that this solution, derived from this [stackexchange -answer](http://stackoverflow.com/questions/502916/django-how-to-create-a-model-dynamically-just-for- -testing#503435) is currently untested! Please report your findings.
+Note that this solution, derived from this stackexchange answer is currently untested! Please report your findings.
1 2 @@ -312,7 +307,7 @@ testing#503435) is currently untested! Please report your findings. from django.db.models import loading loading.cache.loaded = False call_command('syncdb', verbosity=0) - + def tearDown(self): settings.configure(**OLD_DEFAULT_SETTINGS) django.setup() @@ -409,11 +404,11 @@ just to show how unit testing works: 11 # mygame/commands/tests.py import unittest - + class TestString(unittest.TestCase): - + """Unittest for strings (just a basic example).""" - + def test_upper(self): """Test the upper() str method.""" self.assertEqual('foo'.upper(), 'FOO') @@ -448,8 +443,8 @@ to see how it looks when it fails.Testing commands¶
-This section will test the proper execution of the ‘abilities’ command, as described in the First -Steps Coding page. Follow this tutorial to create the ‘abilities’ command, we +
This section will test the proper execution of the ‘abilities’ command, as described in the +First Steps Coding page. Follow this tutorial to create the ‘abilities’ command, we will need it to test it.
Testing commands in Evennia is a bit more complex than the simple testing example we have seen. Luckily, Evennia supplies a special test class to do just that … we just need to inherit from it @@ -473,14 +468,14 @@ already have in
com 13 @@ -530,8 +525,8 @@ the code expects static unchanging numbers. While very good for learning it is u will have nothing but static output to test. Here we are going to learn how to test against dynamic output.# bottom of mygame/commands/tests.py from evennia.commands.default.tests import CommandTest - + from commands.command import CmdAbilities from typeclasses.characters import Character - + class TestAbilities(CommandTest): - + character_typeclass = Character - + def test_simple(self): self.call(CmdAbilities(), "", "STR: 5, AGI: 4, MAG: 2")
This tutorial assumes you have a basic understanding of what regular expressions are. If you do not -I recommend reading the
IntroductionandSimple Patternsections at Python regular expressions -tutorial. If you do plan on making a complete Evennia +I recommend reading theIntroductionandSimple Patternsections at +Python regular expressions tutorial. If you do plan on making a complete Evennia project learning regular expressions will save a great deal of time.Append the code below to your
tests.pyfile.
1 @@ -543,11 +538,11 @@ project learning regular expressions will save a great deal of time.
7 8 9 # bottom of mygame/commands/tests.py - + class TestDynamicAbilities(CommandTest): - + character_typeclass = Character - + def test_simple(self): cmd_abil_result = self.call(CmdAbilities(), "") self.assertRegex(cmd_abil_result, "STR: \d+, AGI: \d+, MAG: \d+") diff --git a/docs/0.9.5/Web-Character-Generation.html b/docs/0.9.5/Web-Character-Generation.html index 978660ff48..5f544d5e9a 100644 --- a/docs/0.9.5/Web-Character-Generation.html +++ b/docs/0.9.5/Web-Character-Generation.html @@ -60,8 +60,7 @@ permissions to transfer to their web-created characters. 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](Web-Character-View- -Tutorial). If you don’t understand the listed tutorial or have a grasp of Django basics, please look +to understand what is happening in the basic Web Character View tutorial. If you don’t understand the listed tutorial or have a grasp of Django basics, please look at the Django tutorial 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 @@ -72,26 +71,22 @@ needed.
Here are some screenshots of the simple app we will be making.
Index page, with no character application yet done:
-
+
Having clicked the “create” link you get to create your character (here we will only have name and background, you can add whatever is needed to fit your game):
-
+
Back to the index page. Having entered our character application (we called our character “TestApp”) you see it listed:
-
+
We can also view an already written character application by clicking on it - this brings us to the detail page:
-
+
@@ -450,7 +445,7 @@ setting custom attributes is as easy as doing it in the meat of your Evennia gam 61 62 63 -# file mygame/web/chargen/views.py - + from django.shortcuts import render from web.chargen.models import CharApp from web.chargen.forms import AppForm @@ -789,8 +784,7 @@ created character object. Thankfully, the Evennia API makes this easy.Adding a no CAPCHA reCAPCHA on your character generation¶
As sad as it is, if your server is open to the web, bots might come to visit and take advantage of your open form to create hundreds, thousands, millions of characters if you give them the -opportunity. This section shows you how to use the No CAPCHA -reCAPCHA designed by Google. Not only is it +opportunity. This section shows you how to use the No CAPCHA reCAPCHA designed by Google. Not only is it easy to use, it is user-friendly… for humans. A simple checkbox to check, except if Google has some suspicion, in which case you will have a more difficult test with an image and the usual text inside. It’s worth pointing out that, as long as Google doesn’t suspect you of being a robot, this diff --git a/docs/0.9.5/Web-Character-View-Tutorial.html b/docs/0.9.5/Web-Character-View-Tutorial.html index a068817c77..8f41943bf0 100644 --- a/docs/0.9.5/Web-Character-View-Tutorial.html +++ b/docs/0.9.5/Web-Character-View-Tutorial.html @@ -48,8 +48,7 @@
+change from theWeb Character View Tutorial¶
-Before doing this tutorial you will probably want to read the intro in [Basic Web tutorial](Web- -Tutorial).
+Before doing this tutorial you will probably want to read the intro in Basic Web tutorial.
In this tutorial we will create a web page that displays the stats of a game character. For this, and all other pages we want to make specific to our game, we’ll need to create our own Django “app”
We’ll call our app
character, since it will be dealing with character information. From your game diff --git a/docs/0.9.5/Web-Features.html b/docs/0.9.5/Web-Features.html index 947a595025..bce83b5211 100644 --- a/docs/0.9.5/Web-Features.html +++ b/docs/0.9.5/Web-Features.html @@ -79,7 +79,8 @@ files are things like images, CSS files and Javascript.static,templates,static_overridesandtemplates_overrides. The first two of those are populated automatically by Django and used to serve the website. You should not edit anything in them - the change will be lost. To customize the website you’ll need to copy the file you want to -change from theweb/website/template/orweb/website/static/ path to the corresponding place under one of_overrides` directories.web/website/template/orweb/website/static/path to the corresponding place +under one of_overridesdirectories.Example: To override or modify
evennia/web/website/template/website/index.htmlyou need to add/modifymygame/web/template_overrides/website/index.html.The detailed description on how to customize the website is best described in tutorial form. See the @@ -140,8 +141,7 @@ the root of the website. It will now our own function
mygame.comin the address bar. If we had wanted to add a view forhttp://mygame.com/awesome, the regular expression would have been^/awesome.Look at [evennia/web/website/views.py](https://github.com/evennia/evennia/blob/master/evennia/web/we -bsite/views.py#L82) to see the inputs and outputs you must have to define a view. Easiest may be to +
Look at evennia/web/website/views.py to see the inputs and outputs you must have to define a view. Easiest may be to copy the default file to
mygame/webto have something to modify and expand on.Restart the server and reload the page in the browser - the website will now use your custom view. If there are errors, consider turning on
settings.DEBUGto see the full tracebacks - in debug mode diff --git a/docs/0.9.5/_sources/Add-a-simple-new-web-page.md.txt b/docs/0.9.5/_sources/Add-a-simple-new-web-page.md.txt index f960c5a3e9..c146a54f10 100644 --- a/docs/0.9.5/_sources/Add-a-simple-new-web-page.md.txt +++ b/docs/0.9.5/_sources/Add-a-simple-new-web-page.md.txt @@ -69,14 +69,13 @@ If you'd rather not take advantage of Evennia's base styles, you can do somethin