Debian Codegraph @

doc/plugins.txt

raw
1 Plugin Information:
2 This plugin information is provided by Yann Chachkoff
3
4 Administrative commands (only available in DM mode):
5 ----------------------------------------------------
6 pluglist
7
8 Lists all loaded plugins. Each plugin is identified in Crossfire by a
9 keyword; pluglist shows those keywords, as well as a short text describing
10 each plugin (usually a version string). If no plugin is loaded, the list will
11 simply appear empty. The keyword for the Python plugin is Python.
12
13 plugout <keyword>
14
15 Unloads a given plugin, identified by its _keyword_. So if you want to unload
16 the Python plugin, you need to do 'plugout Python'.
17
18 plugin <libname>
19
20 Loads a given plugin, whose _filename_ is libname. So in the case of Python,
21 you'd have to do a 'plugin cfpython.so'. Note that all filenames are
22 relative to the default plugin path (SHARE/plugins).
23
24 Console messages.
25 -----------------
26 When Crossfire starts, it tries to load all available files in the
27 SHARE/plugins directory as plugin libraries. It first displays the
28 'Initializing plugins:' message. Whenever a plugin has been loaded, the plugin
29 has the opportunity to signal itself by a message on the console. Then the
30 server displays an informative message containing both the plugin content and
31 its keyword. For the Python plugin, the standard load process thus gives:
32
33 [Info] Initializing plugins
34 [Info] Plugins directory is /usr/games/crossfire/lib/crossfire/plugins/
35 [Info] -> Loading plugin : cfpython.so
36 [Debug] CFPython 2.0a init
37 [Debug] CFPython 2.0a post init
38 Running python initialize script.
39 Updating Guilds
40 ['GUILD_TEMPLATE', 'PoisonedDagger', 'GreenGoblin']
41
42 When a plugin has been loaded, it can request to be warned whenever a global
43 event occurs (global events are 'shout', 'login', 'death', and so on). A
44 complete list of events is available in the include/plugin.h file.
45
46 Specific notes related to the Python plugin.
47 --------------------------------------------
48 The Python plugin supports all global events. The constant PYTHON_DEBUG
49 defined at the start of the plugin_python.c file increases the verbosity of
50 the plugin.
51
52 Global event scripts go into SHARE/maps/python/events/<event name>, and are named
53 freely by the developer. If the directory doesn't exist, nothing will happen.
54 <event name> can be 'init', 'login', ... (the right part of the EVENT_xxx defines).
55
56 Some problems have already been reported about the autodetection of the Python
57 libraries. Don't forget that you need the development files of Python (it
58 means the 'libpython2.x.a' and some header files, including 'Python.h'). If
59 configure fails whatever you try, you can still try to edit the plugin
60 Makefile by hand. You need to:
61 - Add your Python headers path to the INCLUDES= line. (for example:
62 -I/usr/include/python2.2);
63 - Add your Python library path to the PYTHON_LIB= line. (for example:
64 /usr/lib/python2.2/config/libpython2.2.a)
65 And then build the plugin after the server. Although I do not recommend this
66 technique, it may help sometimes.
67
68 Status of the logger and animator plugins isn't known.