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
|
abstraction of sessions and cookies, and access to whatever game data you
|
||||||
desire are all attractive.
|
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
|
Installation
|
||||||
------------
|
------------
|
||||||
At this point in time, the codebase is changing so rapidly that writing
|
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:
|
(or stubborn), here's a rough outline:
|
||||||
|
|
||||||
* Install Django.
|
* Install Django.
|
||||||
* Copy the Evennia source somewhere.
|
* Get a copy of the Evennia source.
|
||||||
* Set up your apache2.conf to point mod-python to the settings.py file if you
|
* Optional: Set up your apache2.conf to point mod-python to the settings.py
|
||||||
want the web features.
|
file if you want the web features.
|
||||||
* Copy settings.py.dist to settings.py.
|
* Copy settings.py.dist to settings.py.
|
||||||
* Edit settings.py with your database info.
|
* Edit settings.py with your database info.
|
||||||
* Run 'python manage.py syncdb'
|
* 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.
|
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
|
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
|
However, if you'd like to report bugs, make suggestions, or help with the
|
||||||
code work, visit either or both of the following links:
|
code work, visit either or both of the following links:
|
||||||
|
|
||||||
* Evennia Code Page
|
* Evennia Webpage
|
||||||
http://code.google.com/p/evennia/
|
http://evennia.com
|
||||||
|
|
||||||
* Evennia Google Group
|
* Evennia Code Page
|
||||||
http://groups-beta.google.com/group/evennia?hl=en
|
http://code.evennia.com
|
||||||
|
|
||||||
|
* Evennia Test Game
|
||||||
|
evennia.com port 4000
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@ INSERT INTO "config_configvalue" VALUES(1,'site_port','4000');
|
||||||
INSERT INTO "config_configvalue" VALUES(2,'player_dbnum_start','2');
|
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(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.
|
Retrieve a configuration value.
|
||||||
"""
|
"""
|
||||||
return ConfigValue.objects.get(conf_key=configname).conf_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 session_mgr
|
||||||
import gameconf
|
import gameconf
|
||||||
import settings
|
import settings
|
||||||
|
import initial_setup
|
||||||
|
|
||||||
class Server(dispatcher):
|
class Server(dispatcher):
|
||||||
"""
|
"""
|
||||||
|
|
@ -32,6 +33,10 @@ class Server(dispatcher):
|
||||||
self.load_cmd_aliases()
|
self.load_cmd_aliases()
|
||||||
self.port = gameconf.get_configvalue('site_port')
|
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.
|
# Start accepting connections.
|
||||||
dispatcher.__init__(self)
|
dispatcher.__init__(self)
|
||||||
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue