mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
No longer need to distribute a database file. Each user will run their syncdb script and start with a clean slate. Updated installation instructions in README.
This commit is contained in:
parent
eda1753740
commit
0fc89247aa
6 changed files with 56 additions and 10 deletions
28
README
28
README
|
|
@ -29,6 +29,14 @@ many features free, such as:
|
|||
abstraction of sessions and cookies, and access to whatever game data you
|
||||
desire are all attractive.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
* Python 2.5 strongly recommended, although may work just fine.
|
||||
* PySqlite2
|
||||
* Django (Latest trunk from Subversion recommended)
|
||||
* Optional: Apache2 or equivalent webserver with a Python interpreter
|
||||
module. Required for web interface.
|
||||
|
||||
Installation
|
||||
------------
|
||||
At this point in time, the codebase is changing so rapidly that writing
|
||||
|
|
@ -37,14 +45,15 @@ in development, we'll make sure to update this. But for the really determined
|
|||
(or stubborn), here's a rough outline:
|
||||
|
||||
* Install Django.
|
||||
* Copy the Evennia source somewhere.
|
||||
* Set up your apache2.conf to point mod-python to the settings.py file if you
|
||||
want the web features.
|
||||
* Get a copy of the Evennia source.
|
||||
* Optional: Set up your apache2.conf to point mod-python to the settings.py
|
||||
file if you want the web features.
|
||||
* Copy settings.py.dist to settings.py.
|
||||
* Edit settings.py with your database info.
|
||||
* Run 'python manage.py syncdb'
|
||||
* Run prepenv.sh. This will start the MU* server on port 4000 by default. You
|
||||
* Run startup.sh. This will start the MU* server on port 4000 by default. You
|
||||
may change this via the web interface or by editing the config table in SQL.
|
||||
* Login with the email address and password you provided to the syncdb script.
|
||||
|
||||
Support and Development
|
||||
-----------------------
|
||||
|
|
@ -52,8 +61,11 @@ Since we're so early in development, we really can't hope to offer much support.
|
|||
However, if you'd like to report bugs, make suggestions, or help with the
|
||||
code work, visit either or both of the following links:
|
||||
|
||||
* Evennia Webpage
|
||||
http://evennia.com
|
||||
|
||||
* Evennia Code Page
|
||||
http://code.google.com/p/evennia/
|
||||
|
||||
* Evennia Google Group
|
||||
http://groups-beta.google.com/group/evennia?hl=en
|
||||
http://code.evennia.com
|
||||
|
||||
* Evennia Test Game
|
||||
evennia.com port 4000
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@ INSERT INTO "config_configvalue" VALUES(0,'site_name','Evennia Test Site');
|
|||
INSERT INTO "config_configvalue" VALUES(1,'site_port','4000');
|
||||
INSERT INTO "config_configvalue" VALUES(2,'player_dbnum_start','2');
|
||||
INSERT INTO "config_configvalue" VALUES(3,'money_name_plural','Credits');
|
||||
INSERT INTO "config_configvalue" VALUES(4,'money_name_singular','Credit');
|
||||
INSERT INTO "config_configvalue" VALUES(4,'money_name_singular','Credit');
|
||||
INSERT INTO "config_configvalue" VALUES(5,'game_firstrun','1');
|
||||
BIN
evennia.sql
BIN
evennia.sql
Binary file not shown.
|
|
@ -8,3 +8,11 @@ def get_configvalue(configname):
|
|||
Retrieve a configuration value.
|
||||
"""
|
||||
return ConfigValue.objects.get(conf_key=configname).conf_value
|
||||
|
||||
def set_configvalue(configname, newvalue):
|
||||
"""
|
||||
Sets a configuration value with the specified name.
|
||||
"""
|
||||
conf = ConfigValue.objects.get(conf_key=configname)
|
||||
conf.conf_value = newvalue
|
||||
conf.save()
|
||||
20
initial_setup.py
Normal file
20
initial_setup.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from django.contrib.auth.models import User, Group
|
||||
from apps.objects.models import Object
|
||||
import functions_db
|
||||
import functions_general
|
||||
import gameconf
|
||||
|
||||
def handle_setup():
|
||||
# Set the initial user's username on the #1 object.
|
||||
god_user = User.objects.filter(id=1)[0]
|
||||
god_user_obj = Object.objects.filter(id=1)[0]
|
||||
god_user_obj.set_name(god_user.username)
|
||||
|
||||
groups = ("Immortals", "Wizards", "Builders", "Player Helpers")
|
||||
for group in groups:
|
||||
newgroup = Group()
|
||||
newgroup.name = group
|
||||
newgroup.save()
|
||||
|
||||
# We don't want to do initial setup tasks every startup, only the first.
|
||||
gameconf.set_configvalue('game_firstrun', '0')
|
||||
|
|
@ -10,6 +10,7 @@ import functions_general
|
|||
import session_mgr
|
||||
import gameconf
|
||||
import settings
|
||||
import initial_setup
|
||||
|
||||
class Server(dispatcher):
|
||||
"""
|
||||
|
|
@ -31,7 +32,11 @@ class Server(dispatcher):
|
|||
# Load command aliases into memory for easy/quick access.
|
||||
self.load_cmd_aliases()
|
||||
self.port = gameconf.get_configvalue('site_port')
|
||||
|
||||
|
||||
if gameconf.get_configvalue('game_firstrun') == '1':
|
||||
print ' Game started for the first time, setting defaults.'
|
||||
initial_setup.handle_setup()
|
||||
|
||||
# Start accepting connections.
|
||||
dispatcher.__init__(self)
|
||||
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue