Removed the conf/ modules, putting them into conf/examples instead, in line with other API changes. The gamesrc/ folder is now completely empty and all new modules have to be added explicitly.

This commit is contained in:
Griatch 2012-03-25 19:52:51 +02:00
parent bdb5ab0123
commit e042366f31
11 changed files with 72 additions and 30 deletions

View file

View file

@ -0,0 +1,24 @@
"""
At_initial_setup module template
Copy this module up one level to /gamesrc/conf, name it what you like
and then use it as a template to modify.
Then edit settings.AT_INITIAL_SETUP_HOOK_MODULE to point to your new
module.
Custom at_initial_setup method. This allows you to hook special
modifications to the initial server startup process. Note that this
will only be run once - when the server starts up for the very first
time! It is called last in the startup process and can thus be used to
overload things that happened before it.
The module must contain a global function at_initial_setup(). This
will be called without arguments. Note that tracebacks in this module
will be QUIETLY ignored, so make sure to check it well to make sure it
does what you expect it to.
"""
def at_initial_setup():
pass

View file

@ -0,0 +1,37 @@
"""
At_server_startstop module template
Copy this module one level up, to gamesrc/conf/, name it what you
will and use it as a template for your modifications.
Then edit settings.AT_SERVER_STARTSTOP_MODULE to point to your new
module.
This module contains functions that are imported and called by the
server whenever it changes its running status. At the point these
functions are run, all applicable hooks on individual objects have
already been executed. The main purpose of this is module is to have a
safe place to initialize eventual custom modules that your game needs
to start up or load.
The module should define at least these global functions:
at_server_start()
at_server_stop()
"""
def at_server_start():
"""
This is called every time the server starts up (also after a
reload or reset).
"""
pass
def at_server_stop():
"""
This is called just before a server is shut down, reloaded or
reset.
"""
pass

View file

@ -0,0 +1,49 @@
"""
Connect screen module template
Copy this module one level up, to gamesrc/conf/, name it what
you want and modify it to your liking.
Then you set settings.CONNECTION_SCREEN_MODULE to point to your
new module.
This module holds textual connection screen definitions. All global
string variables (only) in this module are read by Evennia and
assumed to define a Connection screen.
The names of the string variables doesn't matter (except they
shouldn't start with _), but each should hold a string defining a
connection screen - as seen when first connecting to the game
(before having logged in).
OBS - If there are more than one string variable viable in this
module, a random one is picked!
After adding new connection screens to this module you must either
reboot or reload the server to make them available.
"""
from src.utils import utils
from src.commands.connection_screen import DEFAULT_SCREEN
#
# CUSTOM_SCREEN = \
# """{b=============================================================={n
# Welcome to {gEvennia{n, version %s!
#
# If you have an existing account, connect to it by typing:
# {wconnect <email> <password>{n
# If you need to create an account, type (without the <>'s):
# {wcreate \"<username>\" <email> <password>{n
#
# Enter {whelp{n for more info. {wlook{n will re-load this screen.
#{b=============================================================={n""" % utils.get_evennia_version()
# # A suggested alternative screen for the Menu login system
# MENU_SCREEN = \
# """{b=============================================================={n
# Welcome to {gEvennnia{n, version %s!
# {b=============================================================={n""" % utils.get_evennia_version()

View file

@ -0,0 +1,32 @@
"""
Lockfuncs module template
Copy this module one level up, to gamesrc/conf/, name it what
you will and edit it to your liking.
Then add the new module's path to the end of the tuple
defined in settings.LOCK_FUNC_MODULES.
All functions defined globally in this module are assumed to be
available for use in lockstrings to determine access. See
http://code.google.com/p/evennia/wiki/Locks
A lock function is always called with two arguments, accessing_obj and
accessed_obj, followed by any number of arguments. All possible
arguments should be handled (excess ones calling magic (*args,
**kwargs) to avoid errors). The lock function should handle all
eventual tracebacks by logging the error and returning False.
See many more examples of lock functions in src.locks.lockfuncs.
"""
def myfalse(accessing_obj, accessed_obj, *args, **kwargs):
"""
called in lockstring with myfalse().
A simple logger that always returns false. Prints to stdout
for simplicity, should use utils.logger for real operation.
"""
print "%s tried to access %s. Access denied." % (accessing_obj, accessed_obj)
return False

View file

@ -0,0 +1,129 @@
"""
MSSP module template
Copy this module one level up, to gamesrc/conf/, name it
what you want and edit it to your satisfaction.
Then change settings.MSSP_META_MODULE to point to your new module.
MSSP (Mud Server Status Protocol) meta information
MUD website listings (that you have registered with) can use this
information to keep up-to-date with your game stats as you change
them. Also number of currently active players and uptime will
automatically be reported. You don't have to fill in everything
(and most are not used by all crawlers); leave the default
if so needed. You need to @reload the game before updated
information is made available to crawlers (reloading does not
affect uptime).
"""
MSSPTable = {
# Required fieldss
"NAME": "Evennia",
# Generic
"CRAWL DELAY": "-1", # limit how often crawler updates the listing. -1 for no limit
"HOSTNAME": "", # current or new hostname
"PORT": ["4000"], # most important port should be last in list
"CODEBASE": "Evennia",
"CONTACT": "", # email for contacting the mud
"CREATED": "", # year MUD was created
"ICON": "", # url to icon 32x32 or larger; <32kb.
"IP": "", # current or new IP address
"LANGUAGE": "", # name of language used, e.g. English
"LOCATION": "", # full English name of server country
"MINIMUM AGE": "0", # set to 0 if not applicable
"WEBSITE": "www.evennia.com",
# Categorisation
"FAMILY": "Custom", # evennia goes under 'Custom'
"GENRE": "None", # Adult, Fantasy, Historical, Horror, Modern, None, or Science Fiction
"GAMEPLAY": "", # Adventure, Educational, Hack and Slash, None,
# Player versus Player, Player versus Environment,
# Roleplaying, Simulation, Social or Strategy
"STATUS": "Open Beta", # Alpha, Closed Beta, Open Beta, Live
"GAMESYSTEM": "Custom", # D&D, d20 System, World of Darkness, etc. Use Custom if homebrew
"INTERMUD": "IMC2", # evennia supports IMC2.
"SUBGENRE": "None", # LASG, Medieval Fantasy, World War II, Frankenstein,
# Cyberpunk, Dragonlance, etc. Or None if not available.
# World
"AREAS": "0",
"HELPFILES": "0",
"MOBILES": "0",
"OBJECTS": "0",
"ROOMS": "0", # use 0 if room-less
"CLASSES": "0", # use 0 if class-less
"LEVELS": "0", # use 0 if level-less
"RACES": "0", # use 0 if race-less
"SKILLS": "0", # use 0 if skill-less
# Protocols set to 1 or 0)
"ANSI": "1",
"GMCP": "0",
"MCCP": "0",
"MCP": "0",
"MSDP": "0",
"MSP": "0",
"MXP": "0",
"PUEBLO": "0",
"UTF-8": "1",
"VT100": "0",
"XTERM 256 COLORS": "0",
# Commercial set to 1 or 0)
"PAY TO PLAY": "0",
"PAY FOR PERKS": "0",
# Hiring set to 1 or 0)
"HIRING BUILDERS": "0",
"HIRING CODERS": "0",
# Extended variables
# World
"DBSIZE": "0",
"EXITS": "0",
"EXTRA DESCRIPTIONS": "0",
"MUDPROGS": "0",
"MUDTRIGS": "0",
"RESETS": "0",
# Game (set to 1 or 0, or one of the given alternatives)
"ADULT MATERIAL": "0",
"MULTICLASSING": "0",
"NEWBIE FRIENDLY": "0",
"PLAYER CITIES": "0",
"PLAYER CLANS": "0",
"PLAYER CRAFTING": "0",
"PLAYER GUILDS": "0",
"EQUIPMENT SYSTEM": "None", # "None", "Level", "Skill", "Both"
"MULTIPLAYING": "None", # "None", "Restricted", "Full"
"PLAYERKILLING": "None", # "None", "Restricted", "Full"
"QUEST SYSTEM": "None", # "None", "Immortal Run", "Automated", "Integrated"
"ROLEPLAYING": "None", # "None", "Accepted", "Encouraged", "Enforced"
"TRAINING SYSTEM": "None", # "None", "Level", "Skill", "Both"
"WORLD ORIGINALITY": "None", # "All Stock", "Mostly Stock", "Mostly Original", "All Original"
# Protocols (only change if you added/removed something manually)
"ATCP": "0",
"MSDP": "0",
"MCCP": "1",
"SSL": "1",
"UTF-8": "1",
"ZMP": "0",
"XTERM 256 COLORS": "0"}

View file

@ -0,0 +1,19 @@
"""
** OBS This module is not yet used by Evennia **
Example module holding functions for out-of-band protocols to
import and map to given commands from the client. This module
is selected by settings.OOB_FUNC_MODULE.
All functions defined global in this module will be available
for the oob system to call. They will be called with a session/character
as first argument (depending on if the session is logged in or not),
following by any number of extra arguments. The return value will
be packed and returned to the oob protocol and can be on any form.
"""
def testoob(character, *args, **kwargs):
"Simple test function"
print "Called testoob: %s" % val
return "testoob did stuff to the input string '%s'!" % val