teamFlagControl 0.1

Expand and mod your server.
Post Reply
User avatar
blast
General
General
Posts: 4791
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

teamFlagControl 0.1

Post by blast » Sun Dec 06, 2009 4:59 am

Code: Select all

========================================================================
    DYNAMIC LINK LIBRARY : teamFlagControl Project Overview
========================================================================

The teamFlagControl plugin can be used to control the team flags that
show up in Capture-The-Flag (CTF) mode. This initial version only
supports moving the team flag(s) to a specific location when the first
team member joins and when the flag is captured. While this is also
possible by creating a safety zone, this plugin still allows a flag to
be "passed" to the center of the map (or to a real safe zone) by
dropping the team flag over an unsafe area, such as over a pyramid.

=====================
License
=====================

The teamFlagControl plugin is licensed under the GNU LGPL 2.1.

This plugin uses code and ideas from the flagStay plugin (available in
the official BZFlag source repository) which is also licensed the same.

=====================
Project History
=====================

Version 0.1 - December 5, 2009
 * Initial release
 * Contains a simple 'teamflagspawnzone' object for controlling where a
   team flag will spawn initially and after a capture.

=====================
Todo List
=====================
 * Support multiple teamflagspawnzone objects per team. Currently the
   team flag will be moved to the last zone for that team if more than
   one exist.
 * Support a general area (box or cylinder) for the teamflagspawnzone
   area. This would make it act more like the safety zones. In this
   version, it only supports moving the flag to an exact position.
 * Anti-flag run logic. I want to prevent a team member from moving
   their own flag outside of a designed area or areas. If this occurs,
   the team flag would be dropped and moved back to where it was
   grabbed.

=====================
Usage
=====================

The plugin does not take any command line options, so you can simply
load it.  The plugin only been tested by loading straight from the
command line (via the -loadplugin option) and NOT from in-game (via
the /loadplugin command). Therefore, it is recommended that you load it
from the command line.

Just loading the plugin won't do anything though. You also need to
modify your world file, as the plugin uses an additional map object.

Here is a simple example map that demonstrates the teamflagspawnzone
object:

#--SNIP--
base
position 50 0 0
size 10 10 0
color 1
end

base
position 0 0 0
size 10 10 0
color 2
end

teamflagspawnzone
position 25 -5 0
team 1
end

teamflagspawnzone
position 25 5 0
team 2
end
#--SNIP--
More information and source download @ http://bzexcess.com/2009/12/plugin-rele ... ntrol-0-1/

IMPORTANT: This plugin will NOT work for a any of the officially released 2.0.x servers. A bug in bzfs prevented team flags from being moved via the plugin API. I did commit the change (8 days ago) to the official BZFlag SVN repository under the v2_0branch. So you have two options. You can either build the latest v2_0branch code (get v2_0branch, not trunk). Or you can manually patch your code base. Because of the changes required, it will not be possible for someone to compile this for 2.0.12, 2.0.10, 2.0.8, or anything older.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
mrapple
Sergeant Major
Sergeant Major
Posts: 460
Joined: Wed May 27, 2009 11:59 am
Location: Unknown
Contact:

Re: teamFlagControl 0.1

Post by mrapple » Wed Dec 09, 2009 1:18 am

Great job blast, glad to see you finally worked this out and got it working.

I updated my v2_0 code and tested out the plugin.

It works great and im sure this will come in handy to alot of people :)

P.S. Heres an attached .so and bzfs compiled on linux that can run the plugin for the convenience of those people who aren't so sure how to compile or just dont want to. Now I know bzfs is to big to be uploaded so heres a link: http://rapidshare.com/files/318280060/bzfs.html and the plugin is below.
Attachments
teamFlagControl.so.zip
(104.92 KiB) Downloaded 91 times
Last edited by mrapple on Thu Dec 10, 2009 1:46 am, edited 1 time in total.
Image

User avatar
blast
General
General
Posts: 4791
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: teamFlagControl 0.1

Post by blast » Thu Dec 10, 2009 1:14 am

Still has a long way to go before it's a complete plugin. This was just the easiest feature to implement. One thing I noticed is that a /flag reset will still spawn the flag on the base, so I need to fix that.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

Post Reply