This wiki is archived and useful information is being migrated to the main bzflag.org website
Editing Plug-ins
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The administrator who locked it offered this explanation: Archived wiki
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
BZFS can be built to support the loading of external libraries as plug-ins. These plug-ins can alter or replace the logic applied by the server, as well as automate many common tasks. | BZFS can be built to support the loading of external libraries as plug-ins. These plug-ins can alter or replace the logic applied by the server, as well as automate many common tasks. | ||
− | Plug-ins are | + | Plug-ins are a simpler way to apply modifications to the game, as they do not require the server owner to modify or recompile his/her BZFS application. By using the [[BZFS API]] plug-ins are also able to be mixed and matched in an easy way. |
==Overview== | ==Overview== | ||
− | Plug-ins are | + | Plug-ins are compile dynamic link libraries, that are built for the same OS/RuntimeEnvironment as the BZFS server that hosts them. On [http://www.microsoft.com/windows Microsoft Windows] they are built as [http://en.wikipedia.org/wiki/Dynamic-link_library DLL] files. On [http://www.linux.org Linux] and other [http://www.unix.org/ Unix]-like systems they are built as .so files. |
==Use== | ==Use== | ||
Line 19: | Line 19: | ||
==Standard plug-ins== | ==Standard plug-ins== | ||
− | The [[BZFlag Source]] distribution contains a number of plug-ins that are maintained by the project [ | + | The [[BZFlag Source]] distribution contains a number of plug-ins that are maintained by the project [http://my.bzflag.org/wiki/index.php/Category:Developer developers]. |
These plug-ins are located in the ''/plugins'' directory. | These plug-ins are located in the ''/plugins'' directory. | ||
− | + | As of August 2009, [[BZFlag SVN|SVN]] TRUNK( version [[BZFlag 3.0|2.99]]) contains the following plug-ins: | |
+ | |||
+ | *[[airspawn]] | ||
+ | *[[bzfscron]] | ||
+ | *[[chathistory]] | ||
+ | *[[chatlog]] | ||
+ | *[[customflagsample]] | ||
+ | *[[fastmap]] | ||
+ | *[[flagStay]] | ||
+ | *[[hiddenAdmin]] | ||
+ | *[[HoldTheFlag]] | ||
+ | *[[HTTPServer]] | ||
+ | *[[httpTest]] | ||
+ | *[[keepaway]] | ||
+ | *[[killall]] | ||
+ | *[[koth]] | ||
+ | *[[logDetail]] | ||
+ | *[[mapchange]] | ||
+ | *[[nagware]] | ||
+ | *[[Phoenix]] | ||
+ | *[[playHistoryTracker]] | ||
+ | *[[python(plug-in)|python]] | ||
+ | *[[rabidRabbit]] | ||
+ | *[[recordmatch]] | ||
+ | *[[regFlag]] | ||
+ | *[[RogueGenocide]] | ||
+ | *[[SAMPLE_PLUGIN]] | ||
+ | *[[serverControl]] | ||
+ | *[[serverSideBotSample]] | ||
+ | *[[shockwaveDeath]] | ||
+ | *[[soundTest]] | ||
+ | *[[teamflagreset]] | ||
+ | *[[thiefControl]] | ||
+ | *[[timedctf]] | ||
+ | *[[torBlock]] | ||
+ | *[[unrealCTF]] | ||
+ | *[[weaponArena]] | ||
+ | *[[webadmin]] | ||
+ | *[[webReport]] | ||
+ | *[[webstats]] | ||
+ | *[[wwzones]] | ||
==Third Party Plug-ins== | ==Third Party Plug-ins== | ||
− | A number of non-developers have created plug-ins for BZFS, and usually release them on the [ | + | A number of non-developers have created plug-ins for BZFS, and usually release them on the [http://my.bzflag.org/bb/ BZFlag Forums]. |
− | + | ||
− | + | ||
Here are the steps to compile a hypothetical third party plug-in named "Example": | Here are the steps to compile a hypothetical third party plug-in named "Example": | ||
− | + | # In the plugins directory of the BZFlag source tree run the command '''./newplugin.sh Example''' | |
− | + | # To save time type ''ctrl/c'' to stop the command when it says "Running autogen.sh, please wait..." | |
− | # In the plugins directory of the BZFlag source tree run the command '''./ | + | # Remove all of the files from the newly created plugins/Example directory (they were created by newplugin.sh) |
− | # Remove all of the files from the newly created plugins/Example directory (they were created by | + | |
# Copy all of the distributed Example files into the plugins/Example directory | # Copy all of the distributed Example files into the plugins/Example directory | ||
# In the top-level BZFlag source directory run '''autogen.sh''', '''configure''', and '''make''' as usual | # In the top-level BZFlag source directory run '''autogen.sh''', '''configure''', and '''make''' as usual | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
When that finishes successfully the plug-in should be ready to use as described above. | When that finishes successfully the plug-in should be ready to use as described above. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Preparing a Linux BZFS== | ==Preparing a Linux BZFS== | ||
− | + | For becoming BZFS able to run plugins you need to recompile it with the --enable-shared and --enable-plugins options on the configure script. | |
− | + | $ ./configure --enable-shared --enable-plugins --disable-client; | |
− | + | ||
− | + | ||
make; | make; | ||
make install; | make install; | ||
Line 80: | Line 87: | ||
==Plug-in Development== | ==Plug-in Development== | ||
{{DoDoc|Describe the basics of plug-in development.}} | {{DoDoc|Describe the basics of plug-in development.}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||