fairCTF
fairCTF
This plugin has been released. Please see the release thread for the latest plugin version and up-to-date info.
...a beta. My first plugin.
In CTF games, it always sucks when half your team leaves at once, and some <insert colorful word here> continues to capture your flag, even though you're outnumbered 2:1, and no one is willing to switch teams.
fairCTF is my solution to this problem. It checks whether or not the teams are even, numerically. If the teams are uneven, any team flags will be dropped in place almost instantaneously if they are grabbed (or if they're being carried). This includes friendly team flags, effectively freezing the CTF aspect of the game until the teams even up. Players are notified whenever CTF is enabled or disabled.
A team is uneven if:
-The difference in size between the two teams is greater than or equal to 25% of the size of the smaller team when the gap is greater than 1
-The difference in size is four players or more.
-when the smallest team is two players or fewer and the teams are not exactly even.
That last one might sound akward, but it's special to prevent the percentage filter from catching 3v4 or 4v5.
Here are some numbers that the plugin should consider fair:
1v1
2v2
3v4
4v5
5v6
11v9
13v16
these should not be seen as fair by the plugin:
1v2
2v3
2v4
3v5
8v10
17v21
Rogues and teams with zero players are ignored.
This is designed for two-team CTF (any two teams), but it can be used with three or four teams if desired. I do not recommend this, though, because you will have to get a lot of players on the server before it will allow CTF. If there are more than two active teams, the plugin will determine fairness by comparing the smallest and largest teams.
If only one team is present, CTF is allowed (not that it matters).
If any mac and/or linux users would be so kind as to make sure this will build and run properly, I'd really appreciate it. I can't compile plugins under linux, sadly.
Please excuse my crappy coding skills, as I have only had one quarter of formal C++ instruction.
I love the idea of being able to contribute working implementations of my own ideas in the form of plug-ins...
in the attatched zip, there is the source code and a Windows DLL, all I can build. Hope it works, and if it does, enjoy.
...a beta. My first plugin.
In CTF games, it always sucks when half your team leaves at once, and some <insert colorful word here> continues to capture your flag, even though you're outnumbered 2:1, and no one is willing to switch teams.
fairCTF is my solution to this problem. It checks whether or not the teams are even, numerically. If the teams are uneven, any team flags will be dropped in place almost instantaneously if they are grabbed (or if they're being carried). This includes friendly team flags, effectively freezing the CTF aspect of the game until the teams even up. Players are notified whenever CTF is enabled or disabled.
A team is uneven if:
-The difference in size between the two teams is greater than or equal to 25% of the size of the smaller team when the gap is greater than 1
-The difference in size is four players or more.
-when the smallest team is two players or fewer and the teams are not exactly even.
That last one might sound akward, but it's special to prevent the percentage filter from catching 3v4 or 4v5.
Here are some numbers that the plugin should consider fair:
1v1
2v2
3v4
4v5
5v6
11v9
13v16
these should not be seen as fair by the plugin:
1v2
2v3
2v4
3v5
8v10
17v21
Rogues and teams with zero players are ignored.
This is designed for two-team CTF (any two teams), but it can be used with three or four teams if desired. I do not recommend this, though, because you will have to get a lot of players on the server before it will allow CTF. If there are more than two active teams, the plugin will determine fairness by comparing the smallest and largest teams.
If only one team is present, CTF is allowed (not that it matters).
If any mac and/or linux users would be so kind as to make sure this will build and run properly, I'd really appreciate it. I can't compile plugins under linux, sadly.
Please excuse my crappy coding skills, as I have only had one quarter of formal C++ instruction.
I love the idea of being able to contribute working implementations of my own ideas in the form of plug-ins...
in the attatched zip, there is the source code and a Windows DLL, all I can build. Hope it works, and if it does, enjoy.
- Attachments
-
- fairCTF.zip
- fairCTF plugin
- (72.6 KiB) Downloaded 374 times
Last edited by L4m3r on Mon Mar 20, 2006 10:03 am, edited 3 times in total.
Optimism is just a milder alternative to denial.
- I_Died_Once
- Special Forces
- Posts: 635
- Joined: Sun Nov 28, 2004 5:27 pm
- Location: The Dark Side
- Contact:
ALright L4m3r, I'm gonna start an age old debate on ya.
What constitutes unfair? I'm of the school that thinks that once you get over 5 people a differance of 1 player between the teams should be acceptable. (but NOT two) Once you get over 10 players, a differance of two should be accepted. At fifteen, a three player differance should be OK. (OK to cap the flag, that is) Increase the differance allowed by one for every five players on the server. (now, I'm talking about 2 team CTF. More than that will need a revision?)
But I will also say that if you are in a CTF game, if you would concentrate on defending your flag, capping their flag, and the game itself, instead of counting how many people are on what team - you might play a little better and not even noticew the absence of a team mate.
I've held off three players all by myself on a couple of occasions, AND landed myself a cap. I swear that some of you people worry about the most retarded things. I know the folks at Viper's are frothing at the mouth for this plugin.
L4m3r, you're the man.
What constitutes unfair? I'm of the school that thinks that once you get over 5 people a differance of 1 player between the teams should be acceptable. (but NOT two) Once you get over 10 players, a differance of two should be accepted. At fifteen, a three player differance should be OK. (OK to cap the flag, that is) Increase the differance allowed by one for every five players on the server. (now, I'm talking about 2 team CTF. More than that will need a revision?)
But I will also say that if you are in a CTF game, if you would concentrate on defending your flag, capping their flag, and the game itself, instead of counting how many people are on what team - you might play a little better and not even noticew the absence of a team mate.
I've held off three players all by myself on a couple of occasions, AND landed myself a cap. I swear that some of you people worry about the most retarded things. I know the folks at Viper's are frothing at the mouth for this plugin.
L4m3r, you're the man.
...This has been a recording.
Read my whole post, Darth. It allows a difference of one player, unless there are 2 or fewer on the smaller team.
Likewise, it's roughly the same as your limits, except that the ones you specify are the upper limit of what's not considered fair by the plugin- e.g. 10 vs. 8 is not ok, but 9 vs 11 is. Up until a gap of four players occurs, the plugin goes by a percentage difference.
I don't like to whine about it that much when there's a difference of one player, but 5v3 is a noticeable disadvantage. I don't normally check for missing teammates at random; I usually check when I notice that I can hardly spawn...
Likewise, it's roughly the same as your limits, except that the ones you specify are the upper limit of what's not considered fair by the plugin- e.g. 10 vs. 8 is not ok, but 9 vs 11 is. Up until a gap of four players occurs, the plugin goes by a percentage difference.
I don't like to whine about it that much when there's a difference of one player, but 5v3 is a noticeable disadvantage. I don't normally check for missing teammates at random; I usually check when I notice that I can hardly spawn...
Optimism is just a milder alternative to denial.
I dont think the difference should be so small. You said
Great job, though!
8 v 10 really isn't that unfair. 7 v 10 I would say is. But I guess if people disagree they can just modify it themselves.these should not be seen as fair by the plugin:
1v2
2v3
2v4
3v5
8v10
17v21
Great job, though!
1veedo (libcurl.so.2) I have version 3!
Thanks.1veedo wrote:I dont think the difference should be so small. You said8 v 10 really isn't that unfair. 7 v 10 I would say is. But I guess if people disagree they can just modify it themselves.these should not be seen as fair by the plugin:
1v2
2v3
2v4
3v5
8v10
17v21
Great job, though!
And like I said, 8v10 is the upper limit for a difference of two; the plugin will accept 9v11 as even enough... it's close, at least
Optimism is just a milder alternative to denial.
- Sir Kay of Camelot
- Private First Class
- Posts: 51
- Joined: Sat Jan 21, 2006 7:52 pm
- Location: You'll Never Know!
- Contact:
.
Hey I think you should make new topics about new plugins your doing great but also I don't think 8v10 isn't that unfair either....7v10 is but not excactily 8v10....I think you should change that.....Gnurdux is making a theme plugin maybe you could help him :twisted:
Owner@Cruel's
Admin@(Dvn)'s
Cop@Theme's
Cop@Alex135's
God@-Shadow-'s
Owner@YOUR DEAD's
Owner@Gnurdux's
Maker of Servers
Admin@(Dvn)'s
Cop@Theme's
Cop@Alex135's
God@-Shadow-'s
Owner@YOUR DEAD's
Owner@Gnurdux's
Maker of Servers
Permissions Problems
I have both the FAIRCTF permission and the +ALL permission, yet I do not have the permission to run the /ctf command. I'd tell you the revision, but I can't find the version in the README file or anywhere else.
When I do a "/showperms" it doesn't list fairCTF.
Any ideas?
When I do a "/showperms" it doesn't list fairCTF.
Any ideas?
Interesting.
I take it you're using the release version, since the readme is the only place that contains info about the FAIRCTF perm.
First off, what version of BZFS are you using, and what OS?
my groups have the perm and we've never had any problems, from 2.0.4 to CVS from a couple nights ago. the server pass does not cause it to stop working either. However, /showperms does not show fairCTF, probably because it's a custom perm.
If you're sure the plugin is loading right, and for some mysterious reason your particular bzfs doesn't like the perm, you could always use a normal perm unique to whomever you want running the plugin, e.g. BAN, by making a small tweak to the source in the ctfCommand::handle function (the last one IIRC). I could compile a special binary for you if need be.
I take it you're using the release version, since the readme is the only place that contains info about the FAIRCTF perm.
First off, what version of BZFS are you using, and what OS?
my groups have the perm and we've never had any problems, from 2.0.4 to CVS from a couple nights ago. the server pass does not cause it to stop working either. However, /showperms does not show fairCTF, probably because it's a custom perm.
If you're sure the plugin is loading right, and for some mysterious reason your particular bzfs doesn't like the perm, you could always use a normal perm unique to whomever you want running the plugin, e.g. BAN, by making a small tweak to the source in the ctfCommand::handle function (the last one IIRC). I could compile a special binary for you if need be.
Optimism is just a milder alternative to denial.
version
Code: Select all
BZFlag server 2.0.5.20051221-DEVEL-linux-gnu (protocol 0026) http://BZFlag.org/
Linux silvercat 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linux
heh... interesting...
The way our groupfiles are set up, owner "include" admins, and admin "include" cop priveledges.
According to http://silvercat.bzflag.org/page3.html PDS is a cop. UL Approved is an admin.
I can only imagine that the problem is the FAIRCTF perm doesn't get "included" via the * operator. Anyhow, I'll add it manually to the other groups and see what happens.
Thanks for the help.
According to http://silvercat.bzflag.org/page3.html PDS is a cop. UL Approved is an admin.
I can only imagine that the problem is the FAIRCTF perm doesn't get "included" via the * operator. Anyhow, I'll add it manually to the other groups and see what happens.
Thanks for the help.
- cosmos
- Private First Class
- Posts: 83
- Joined: Thu Dec 23, 2004 7:18 pm
- Location: Los Angeles
- Contact:
FreeBSD 4.x version
the hepcat hosting runs on freebsd 4.x and after some fiddling tonight i have successfully built a version of fairCTF for that platform. since others have posted their successful versions i am posting mine to hopefully help anyone else who may need it.
- Attachments
-
- fairCTF_freebsd.tar.gz
- (795.24 KiB) Downloaded 310 times