Updated rst files to latest wiki.
This commit is contained in:
parent
60424fa828
commit
9a719d7fb0
8 changed files with 82 additions and 63 deletions
|
|
@ -1,24 +1,30 @@
|
||||||
Administrative Documentation
|
Administrative Documentation
|
||||||
============================
|
============================
|
||||||
|
|
||||||
The following pages are aimed at game administrators. These are defined
|
The following pages are aimed at game administrators -- the higher-ups
|
||||||
as the higher-ups that possess shell access and/or are responsible for
|
that possess shell access and/or are responsible for the game.
|
||||||
the game.
|
|
||||||
|
|
||||||
Installation and Early Life
|
Installation and Early Life
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
- `Choosing an SQL Server <ChoosingAnSQLServer.html>`_
|
- `Choosing an SQL Server <ChoosingAnSQLServer.html>`_
|
||||||
- `Getting Started - Installing Evennia <GettingStarted.html>`_
|
- `Getting Started - Installing Evennia <GettingStarted.html>`_
|
||||||
- `Starting, stopping, restarting and resetting
|
- `Starting, stopping, reloading and resetting
|
||||||
Evennia <StartStopReload.html>`_
|
Evennia <StartStopReload.html>`_
|
||||||
- `Keeping your game up to date <UpdatingYourGame.html>`_
|
- `Keeping your game up to date <UpdatingYourGame.html>`_
|
||||||
|
|
||||||
|
Customizing the server
|
||||||
|
----------------------
|
||||||
|
|
||||||
- `Change Evennia's language <Internationalization.html>`_
|
- `Change Evennia's language <Internationalization.html>`_
|
||||||
- `Collaborate with others using version
|
- `Apache webserver configuration <ApacheConfig.html>`_ (optional)
|
||||||
control <StaffVersionControl.html>`_ (not updated)
|
- `Changing text encodings used by the server <TextEncodings.html>`_
|
||||||
- `Apache Configuration <ApacheConfig.html>`_ (optional)
|
|
||||||
- `Text encodings <TextEncodings.html>`_ used when connecting to
|
|
||||||
Evennia
|
|
||||||
- `How to connect Evennia to IRC channels <IRC.html>`_
|
- `How to connect Evennia to IRC channels <IRC.html>`_
|
||||||
- `How to connect Evennia to an IMC2 network <IMC2.html>`_
|
- `How to connect Evennia to an IMC2 network <IMC2.html>`_
|
||||||
|
|
||||||
|
Working with Evennia
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- `Setting up your work environment with version
|
||||||
|
control <VersionControl.html>`_
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,11 +87,12 @@ situations though.
|
||||||
- You are worried about database performance. Maybe you are
|
- You are worried about database performance. Maybe you are
|
||||||
reading/storing data many times a second (for whatever reason) or you
|
reading/storing data many times a second (for whatever reason) or you
|
||||||
have many players doing things at the same time. Hitting the database
|
have many players doing things at the same time. Hitting the database
|
||||||
over an over might not be ideal in that case. Non-persistent data
|
over and over might not be ideal in that case. Non-persistent data
|
||||||
simply writes to memory, it doesn't hit the database at all. With the
|
simply writes to memory, it doesn't hit the database at all. It
|
||||||
speed and quality of hardware these days, this point is probably less
|
should be said that with the speed and quality of hardware these
|
||||||
likely to be of any big concern except for the most extreme of
|
days, this point is less likely to be of any big concern except for
|
||||||
situations.
|
the most extreme of situations. The default database even runs in RAM
|
||||||
|
if possible, alleviating the need to write to disk.
|
||||||
- You *want* to loose your state when logging off. Maybe you are
|
- You *want* to loose your state when logging off. Maybe you are
|
||||||
testing a buggy `Script <Scripts.html>`_ that does potentially
|
testing a buggy `Script <Scripts.html>`_ that does potentially
|
||||||
harmful stuff to your character object. With non-persistent storage
|
harmful stuff to your character object. With non-persistent storage
|
||||||
|
|
@ -124,7 +125,8 @@ explicitly to get the result you want. This means writing a little bit
|
||||||
more, but has the advantage of clarity and portability: If you plan to
|
more, but has the advantage of clarity and portability: If you plan to
|
||||||
distribute your code to others, it's recommended you use explicit
|
distribute your code to others, it's recommended you use explicit
|
||||||
assignment. This avoids weird errors when your users don't happen to use
|
assignment. This avoids weird errors when your users don't happen to use
|
||||||
the save persistence setting as you.
|
the save persistence setting as you. The Evennia server distribution
|
||||||
|
always use explicit assignment everywhere.
|
||||||
|
|
||||||
What types of data can I save?
|
What types of data can I save?
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
@ -135,22 +137,22 @@ you can practically store any Python object that can be
|
||||||
the ``pickle`` module to serialize data into the database.
|
the ``pickle`` module to serialize data into the database.
|
||||||
|
|
||||||
There is one notable type of object that cannot be pickled - and that is
|
There is one notable type of object that cannot be pickled - and that is
|
||||||
a Django database object. These will instead be stored as wrapper object
|
a Django database object. These will instead be stored as a wrapper
|
||||||
containing the ID and its database model. It will be read back to a new
|
object containing the ID and its database model. It will be read back to
|
||||||
instantiated `typeclass <Typeclasses.html>`_ when the Attribute is
|
a new instantiated `typeclass <Typeclasses.html>`_ when the Attribute is
|
||||||
accessed. Since erroneously trying to save database objects in an
|
accessed. Since erroneously trying to save database objects in an
|
||||||
Attribute will lead to errors, Evennia will try to detect database
|
Attribute will lead to errors, Evennia will try to detect database
|
||||||
objects by analyzing the data being stored. This means that Evennia must
|
objects by analyzing the data being stored. This means that Evennia must
|
||||||
recursively traverse all iterables to make sure all database objects in
|
recursively traverse all iterables to make sure all database objects in
|
||||||
them are stored safely. So for efficiently, it can be a good idea is to
|
them are stored safely. So for efficiency, it can be a good idea is to
|
||||||
avoid deeply nested lists with objects if you can.
|
avoid deeply nested lists with objects if you can.
|
||||||
|
|
||||||
To store several objects, you may only use python *lists* or
|
To store several objects, you may only use python *lists*,
|
||||||
*dictionaries* to store them. If you try to save any other form of
|
*dictionaries* or *tuples* to store them. If you try to save any other
|
||||||
iterable (like a ``set`` or a home-made class), the Attribute will
|
form of iterable (like a ``set`` or a home-made class), the Attribute
|
||||||
convert, store and retrieve it as a list instead. Since you can nest
|
will convert, store and retrieve it as a list instead. Since you can
|
||||||
dictionaries and lists together in any combination, this is usually not
|
nest dictionaries, lists and tuples together in any combination, this is
|
||||||
a limitation you need to worry about.
|
usually not a limitation you need to worry about.
|
||||||
|
|
||||||
*Note that you could fool the safety check if you for example created
|
*Note that you could fool the safety check if you for example created
|
||||||
custom, non-iterable classes and stored database objects in them. So to
|
custom, non-iterable classes and stored database objects in them. So to
|
||||||
|
|
@ -172,8 +174,23 @@ Examples of valid attribute data:
|
||||||
# a dictionary
|
# a dictionary
|
||||||
obj.db.test4 = 'str':34, 'dex':56, 'agi':22, 'int':77
|
obj.db.test4 = 'str':34, 'dex':56, 'agi':22, 'int':77
|
||||||
# a mixed dictionary/list
|
# a mixed dictionary/list
|
||||||
obj.db.test5 = 'members': [obj1,obj2,obj3], 'enemies':[obj4,obj5]# a tuple will stored and returned as a list [1,2,3,4,5]!
|
obj.db.test5 = 'members': [obj1,obj2,obj3], 'enemies':[obj4,obj5]
|
||||||
obj.db.test6 = (1,2,3,4,5)
|
# a tuple with a list in it
|
||||||
|
obj.db.test6 = (1,3,4,8, ["test", "test2"], 9)# a set will still be stored and returned as a list [1,2,3,4,5]!
|
||||||
|
obj.db.test7 = set([1,2,3,4,5])
|
||||||
|
|
||||||
|
Example of non-supported save:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
# this will fool the dbobj-check since myobj (a database object) is "hidden"
|
||||||
|
# inside a custom object. This is unsupported and will lead to unexpected
|
||||||
|
# results!
|
||||||
|
class BadStorage(object):
|
||||||
|
pass
|
||||||
|
bad = BadStorage()
|
||||||
|
bad.dbobj = myobj
|
||||||
|
obj.db.test8 = bad # this will likely lead to a traceback
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,13 @@ page.
|
||||||
SQLite
|
SQLite
|
||||||
------
|
------
|
||||||
|
|
||||||
This is the default database used, and for the vast majority of sites
|
This is the default database used, and for the vast majority of Evennia
|
||||||
out there, will probably be more than adequate. No server process is
|
installs it will probably be more than adequate. No server process is
|
||||||
needed, the administrative overhead is tiny (as is resource
|
needed, the administrative overhead is tiny (as is resource
|
||||||
consumption). The database will appear as a simple file
|
consumption). The database will appear as a simple file
|
||||||
(``game/evennia.db`` by default). Purging your database is just a matter
|
(``game/evennia.db3``). It is not tested how well Evennia performs with
|
||||||
of deleting this file and re-running the database creation commands in
|
SQLite under a heavier load, but it should probably be fine for most
|
||||||
GettingStarted.
|
normal mud-related usage.
|
||||||
|
|
||||||
It is not tested how well Evennia performs with SQLite under a heavier
|
|
||||||
load, but it should probably be fine given the relative simplicity of
|
|
||||||
our applications.
|
|
||||||
|
|
||||||
**Note:** If you run Windows and for some reason need to use a
|
**Note:** If you run Windows and for some reason need to use a
|
||||||
third-party web server like Apache rather than Evennia's internal web
|
third-party web server like Apache rather than Evennia's internal web
|
||||||
|
|
@ -33,23 +29,19 @@ Windows.
|
||||||
Postgres
|
Postgres
|
||||||
--------
|
--------
|
||||||
|
|
||||||
This is Django's recommended DB engine, and the one that we recommend
|
This is Django's recommended database engine, usable for all sites
|
||||||
for all sites aspiring to grow to a larger size. While not as fast as
|
aspiring to grow to a larger size. While not as fast as SQLite for
|
||||||
SQLite for simple purposes, it will scale infinitely better than SQLite,
|
simple purposes, it will scale infinitely better than SQLite, especially
|
||||||
especially if your game has an extensive web presence.
|
if your game has an extensive web presence.
|
||||||
|
|
||||||
MySQL
|
MySQL
|
||||||
-----
|
-----
|
||||||
|
|
||||||
While perfectly reasonable to deploy under, the MySQL driver for Django
|
|
||||||
has some very slight oddities (at the time of this document's writing)
|
|
||||||
that probably don't affect our usage case that much (if at all). Make
|
|
||||||
sure you look at the aforementioned `Notes about supported
|
|
||||||
Databases <http://docs.djangoproject.com/en/dev/ref/databases/#ref-databases>`_
|
|
||||||
page for the latest on this.
|
|
||||||
|
|
||||||
MySQL **may** be slightly faster than Postgres depending on your setup
|
MySQL **may** be slightly faster than Postgres depending on your setup
|
||||||
and software versions involved.
|
and software versions involved. Older versions had some peculiarities
|
||||||
|
though, so check out Django's `Notes about supported
|
||||||
|
Databases <http://docs.djangoproject.com/en/dev/ref/databases/#ref-databases>`_
|
||||||
|
to make sure you use the correct version.
|
||||||
|
|
||||||
Others
|
Others
|
||||||
------
|
------
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ Contributing with Documentation
|
||||||
|
|
||||||
Evennia depends heavily on good documentation and we are always looking
|
Evennia depends heavily on good documentation and we are always looking
|
||||||
for extra eyes and hands to improve it. Even small things such as fixing
|
for extra eyes and hands to improve it. Even small things such as fixing
|
||||||
typos is a great help.
|
typos is a great help. To edit the wiki yourself you need contributor
|
||||||
|
access. Otherwise, it goes a long way just pointing out wiki errors so
|
||||||
|
devs can fix them.
|
||||||
|
|
||||||
Contributing with Code through a clone repository
|
Contributing with Code through a clone repository
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ General Evennia development information
|
||||||
Guide <http://evennia.googlecode.com/svn/trunk/CODING_STYLE>`_
|
Guide <http://evennia.googlecode.com/svn/trunk/CODING_STYLE>`_
|
||||||
(Important!)
|
(Important!)
|
||||||
- `Policy for 'MUX-like' default commands <UsingMUXAsAStandard.html>`_
|
- `Policy for 'MUX-like' default commands <UsingMUXAsAStandard.html>`_
|
||||||
- `Setting up a Bazaar environment for coding <BazaarDevel.html>`_ (not
|
- `Setting up a Mercurial environment for
|
||||||
updated)
|
coding <VersionControl.html>`_
|
||||||
|
|
||||||
Evennia Component Documentation
|
Evennia Component Documentation
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ documentation <Index.html>`_, here's what to do:
|
||||||
How to *give* Help
|
How to *give* Help
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Evennia is a completely non-funded project. It relies on the time
|
Evennia is a completely un-funded project. It relies on the time donated
|
||||||
donated by its users and developers in order to progress.
|
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
|
The first and easiest way you as a user can help us out is by taking
|
||||||
part in `community
|
part in `community
|
||||||
|
|
@ -57,5 +57,5 @@ to get going:
|
||||||
- Check out the `Contributing <Contributing.html>`_ page on how to
|
- Check out the `Contributing <Contributing.html>`_ page on how to
|
||||||
contribute with code in practice.
|
contribute with code in practice.
|
||||||
|
|
||||||
In either case, you may find documentation useful to developers in the
|
See `Contributing to Evennia <Contributing.html>`_ for more detailed
|
||||||
`Developer Central <DeveloperCentral.html>`_.
|
information.
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@ Internationalization
|
||||||
characters between the first "i" and the last "n" in that word) allows
|
characters between the first "i" and the last "n" in that word) allows
|
||||||
Evennia's core server to return texts in other languages than English -
|
Evennia's core server to return texts in other languages than English -
|
||||||
without anyone having to go in and add it manually. Take a look at the
|
without anyone having to go in and add it manually. Take a look at the
|
||||||
``locale`` directory of the Evennia installation. there you will find
|
``locale`` directory of the Evennia installation, there you will find
|
||||||
which languages are currently supported.
|
which languages are currently supported.
|
||||||
|
|
||||||
Note, what is translated in this way are hard-coded strings from the
|
Note, what is translated in this way are hard-coded strings from the
|
||||||
server, things like "Connection closed" or "Server restarted".
|
server, things like "Connection closed" or "Server restarted".
|
||||||
Basically, the things users are not supposed to change on their own.
|
Basically, the things users are not supposed to change on their own.
|
||||||
This means that the default command set is *not* translated. The reason
|
This means that the default command set is *not* translated. The reason
|
||||||
for this is that commands are *intended* to be modified by users. .
|
for this is that commands are *intended* to be modified by users.
|
||||||
|
|
||||||
Changing server language
|
Changing server language
|
||||||
------------------------
|
------------------------
|
||||||
|
|
@ -33,7 +33,7 @@ Translating Evennia
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
If you cannot find your language in ``locale/`` it's because noone has
|
If you cannot find your language in ``locale/`` it's because noone has
|
||||||
translated it yet. Alternatively you might find the language but find
|
translated it yet. Alternatively you might have the language but find
|
||||||
the translation bad ... You are welcome to help improve the situation!
|
the translation bad ... You are welcome to help improve the situation!
|
||||||
|
|
||||||
To start a new translation, place yourself in Evennia's root directory
|
To start a new translation, place yourself in Evennia's root directory
|
||||||
|
|
@ -43,7 +43,7 @@ and run
|
||||||
|
|
||||||
django-admin makemessages -l <language-code>
|
django-admin makemessages -l <language-code>
|
||||||
|
|
||||||
where ``<language-code`` is the two-letter locale code for the language
|
where ``<language-code>`` is the two-letter locale code for the language
|
||||||
you want, like 'sv' for Swedish or 'es' for Spanish.
|
you want, like 'sv' for Swedish or 'es' for Spanish.
|
||||||
|
|
||||||
Next head to ``locale/<language-code>/LC_MESSAGES`` and edit the
|
Next head to ``locale/<language-code>/LC_MESSAGES`` and edit the
|
||||||
|
|
@ -53,9 +53,7 @@ normal text editor -- best is to use a po-file editor from the web
|
||||||
|
|
||||||
The concept of translating is simple, it's just a matter of taking the
|
The concept of translating is simple, it's just a matter of taking the
|
||||||
english strings you find in the ``*.po`` file and add your language's
|
english strings you find in the ``*.po`` file and add your language's
|
||||||
translation best you can. When you are done, send the ``*.po`` file to
|
translation best you can.
|
||||||
the Evennia developer list so we can integrate your translation it into
|
|
||||||
Evennia!
|
|
||||||
|
|
||||||
Finally, you need to compile your translation into a more efficient
|
Finally, you need to compile your translation into a more efficient
|
||||||
form.
|
form.
|
||||||
|
|
@ -67,3 +65,7 @@ form.
|
||||||
This will go through all languages and create/update compiled files
|
This will go through all languages and create/update compiled files
|
||||||
(``*.mo``) for them. This needs to be done whenever a ``*.po`` file is
|
(``*.mo``) for them. This needs to be done whenever a ``*.po`` file is
|
||||||
updated.
|
updated.
|
||||||
|
|
||||||
|
When you are done, send the ``*.po`` and \*.mo file to the Evennia
|
||||||
|
developer list (or push it into your own repository clone) so we can
|
||||||
|
integrate your translation into Evennia!
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class ServerSession(Session):
|
||||||
if not self.logged_in:
|
if not self.logged_in:
|
||||||
return
|
return
|
||||||
|
|
||||||
player = self.get_player()
|
player = self.get_player(1)
|
||||||
character = self.get_character()
|
character = self.get_character()
|
||||||
if player:
|
if player:
|
||||||
#print "sync: at_init() - player"
|
#print "sync: at_init() - player"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue