Page 1 of 2

fairCTF

Posted: Fri Jan 27, 2006 4:10 am
by L4m3r
From the readme:
During a CTF game, don't you hate it when someone keeps capturing the flag after teams have become very uneven? No more.

fairCTF is a plugin that continually checks team sizes to ensure that they are fair. If the plugin decides that the teams aren't even enough, CTF is disabled and players are notified; team flags will be dropped instantly when picked up. Once the teams even up again, CTF is re-enabled and the game can continue.
Note that the boundaries of what the plugin considers "fair" are changeable without recomplilation. See the readme for details and instructions.

I don't know if the .so will work under mac or not. If it doesn't, I'd greatly appreciate it if someone posted a mac build.

Have fun. :)

----

UPDATE: Version 1.1

I realized today that it would be very convenient to have commands to override the plugin. I went ahead and implemented them, since it was cake.

Thus, the plugin will now add a /ctf command to the game. More specifically, /ctf on, /ctf off, and /ctf auto. Read the updated readme for details.

----

UPDATE: Version 1.2

At the recommendation of A Temporal Distraction, I've altered the plugin command to give a little usage blurb when the command is issued incorrectly.

The switch delay has also been increased to five seconds.

----

UPDATE: Version 2.0

fairCTF has been added to the BZFlag source tree at the request of Bullet Catcher. Get the plugin there from now on. :)

I've also taken the opportunity to rewrite most of it to use more logical events. Flag drop delay is now configureable; see readme.

Posted: Fri Jan 27, 2006 12:17 pm
by Teppic
Dose it disable ctf for both teams, or just the team with more members?

Posted: Fri Jan 27, 2006 1:41 pm
by temporal distraction
When the teams are uneven and CTF is disabled, all team flags are immediately dropped where they are. It works quite nicely.

Posted: Fri Jan 27, 2006 5:11 pm
by loophole
Sounds good, I am going to try this plugin out!
Teppic wrote:Dose it disable ctf for both teams, or just the team with more members?
I used to play quake3 and it would only prevent the larger team from handling the flag in an uneven-team situation. I think this is a good idea because it gives the underdog team an advantage, encouraging people to switch teams. Of course switching teams was much easier in q3 than in bz :D

Posted: Fri Jan 27, 2006 5:56 pm
by L4m3r
Teppic wrote:Dose it disable ctf for both teams, or just the team with more members?
CTF is disabled for all teams. It wouldn't be fair otherwise. Teams can't even carry their own flags; the plugin effectively freezes the CTF game until the teams even out.

Posted: Fri Jan 27, 2006 6:17 pm
by loophole
L4m3r wrote: CTF is disabled for all teams. It wouldn't be fair otherwise.
Uneven teams are intrinsically unfair. Even if you take the flags out of the picture.

So denying caps for both teams really doesn't make it fair, rather it just prevents some very unfair activity(big team capping). But its not really "unfair" when the short handed team caps so it doesn't make sense to prevent that activity too IMHO.

If you were to only penalize the large team you would help to even the balance of power.

I think that CTF should always be encouraged, (only prevented in extreme circumstances) otherwise the game could just degenerate into an FFA with uneven teams, which is "not fair".

Posted: Fri Jan 27, 2006 6:35 pm
by L4m3r
Cosmol wrote:
L4m3r wrote: CTF is disabled for all teams. It wouldn't be fair otherwise.
Uneven teams are intrinsically unfair. Even if you take the flags out of the picture.

So denying caps for both teams really doesn't make it fair, rather it just prevents some very unfair activity(big team capping). But its not really "unfair" when the short handed team caps so it doesn't make sense to prevent that activity too IMHO.

If you were to only penalize the large team you would help to even the balance of power.

I think that CTF should always be encouraged, (only prevented in extreme circumstances) otherwise the game could just degenerate into an FFA with uneven teams, which is "not fair".
In my opinion, making it impossible for one team to cap and only making it difficult for the other is a lot more unfair than letting it degenerate into FFA for a few minutes. Usually, only one player needs to switch. If they all refuse, then it's their own fault. :p

Not to mention, the plugin has no concept of which team is which; it ony judges the evenness between them. This is why it works for any number of teams. Making it selectively stop captures would require that it pretty much be reworked, and it opens up a ton of holes and special cases that would have to be dealt with, and special rules that players would have to learn. Too complicated.

Posted: Fri Jan 27, 2006 7:21 pm
by loophole
I disagree that it opens up a ton of holes and special cases.There are only 12 cases to consider if we want to just restrict people carrying flags of teams which they outnumber.

Anyway, you will end up with 16 cases to consider if you want to make behavior predictable for 4 teams, instead of just comparing the largest and smallest teams as it does now.

I think I will see If I can whip up something with the source if you don't want to work on this feature.

Thanks for all your efforts, bz has needed this plugin for a long time!

Posted: Fri Jan 27, 2006 8:50 pm
by L4m3r
Cosmol wrote:I disagree that it opens up a ton of holes and special cases.There are only 12 cases to consider if we want to just restrict people carrying flags of teams which they outnumber.

Anyway, you will end up with 16 cases to consider if you want to make behavior predictable for 4 teams, instead of just comparing the largest and smallest teams as it does now.

I think I will see If I can whip up something with the source if you don't want to work on this feature.

Thanks for all your efforts, bz has needed this plugin for a long time!
If you're going to do it that way, you'd pretty much be making a new plugin. :p The only part I think you'd be able to use is the fairness "algorithm".

Posted: Fri Jan 27, 2006 8:53 pm
by im fine u?
THANK YOU!!!!!!

after mofo, I've been waiting forever for this!!!!!!!!!!

Posted: Fri Jan 27, 2006 11:23 pm
by The Knights Who Say Ni
Yes i Also will be using this if i can get a permnant server (hopefuly soon)
and also for my non-permnant server ive being needing this for a while.

Posted: Sat Jan 28, 2006 8:24 am
by L4m3r
Plugin updated to 1.1 (see first post)

wait a minute

Posted: Tue Feb 07, 2006 4:31 am
by Matt?
am i the only one that has tried this? i get an error in apopup window behind bzflag. it says it is missing a file and re-installing it will help fix it

Posted: Tue Feb 07, 2006 4:43 am
by L4m3r
Which file? And which version of BZFlag?

Posted: Tue Feb 07, 2006 4:50 am
by Matt?
ok it is bzflag 2.0.5b5 and the file it need's is MSVCP71D.dll

Posted: Tue Feb 07, 2006 6:12 am
by L4m3r
The plugin has been updated. Try it now, Matt.

Posted: Tue Feb 07, 2006 3:39 pm
by Matt?
excellent, it loads to bzflag, nice work l4. btw what is the -whatever to run a ctf game? thanks

Posted: Tue Feb 07, 2006 4:33 pm
by temporal distraction
Matt? wrote:what is the -whatever to run a ctf game? thanks
Take a look at the conf file in our "Official Files" sticky thread. That conf file is commented very well and you'll be able to find it there.

Posted: Thu Feb 09, 2006 10:41 am
by netochka nezvanova
how about using the scores in the calculation of fair.
a team with one red and three blue is unfair
but what is the red has a score of say +25 and the blue all below zero

or take also the number of kills and deaths

a player has killed 34 tanks and got shot 33 times (score 1)
anotherplayer has killed 3 tanks but is shot 1 time. (score 2)

the first one can survive for a longer time is he better while having a lower score?

Posted: Thu Feb 09, 2006 1:52 pm
by Longhair
I'd be curious to know how your plugin compares to the script that silvercat is using on its servers. It calculates "fairness" based on a percentage (they have a big crowd, so being off by 1 isn't exactly unfair) and it sends a warning message to the player who is carrying the flag to drop it. It also sends a message about it to the admin channel. I think I like the idea of just having the flag drop, rather than us admins having to jump down somebody's throat when they're too obtuse to read a message from the server.

Personally, I'd weigh in on the side of allowing the minority team still being allowed to capture the flag. I realize that I'm saying this without being able to offer some code help, so whatever the outcome, it's a good idea!

Posted: Thu Feb 09, 2006 9:19 pm
by L4m3r
netochka nezvanova wrote:how about using the scores in the calculation of fair.
a team with one red and three blue is unfair
but what is the red has a score of say +25 and the blue all below zero

or take also the number of kills and deaths

a player has killed 34 tanks and got shot 33 times (score 1)
anotherplayer has killed 3 tanks but is shot 1 time. (score 2)

the first one can survive for a longer time is he better while having a lower score?
Two issues with that. One, it would be horribly complicated. As of now, this is a very simple plugin. Adding score features would be quite an undertaking.

Second, we all know that combat scores tend to mean little in CTF. Sure, it can indicate player skill to an extent, but it doesn't say much about whether or not they're a team player.

Also, a discrepancy in numbers can make up for a huge skill difference. I once played a LAN CTF game alone against two complete newbies, but they whipped me because every time they managed to kill me, they'd make off with my flag and theirs. Unless I spawned right there at their base, it was over.
Longhair wrote:I'd be curious to know how your plugin compares to the script that silvercat is using on its servers. It calculates "fairness" based on a percentage (they have a big crowd, so being off by 1 isn't exactly unfair) and it sends a warning message to the player who is carrying the flag to drop it. It also sends a message about it to the admin channel. I think I like the idea of just having the flag drop, rather than us admins having to jump down somebody's throat when they're too obtuse to read a message from the server.
I'd like to know more about this script... I've even tried to see it in action, but no luck. Does it require admin intervention, or can it kick players by itself?

the plugin does use a percentage as its primary reckoning method, but you can also set an absolute maximum gap. there's also a setting to change the cutoff where a one player difference is considred unfair, in case you want it to be different than what the percentage would dictate in that case.
Longhair wrote:Personally, I'd weigh in on the side of allowing the minority team still being allowed to capture the flag. I realize that I'm saying this without being able to offer some code help, so whatever the outcome, it's a good idea!
Yeah, again, that would require a massive restructuring of the plugin. I'll admit that the algorithm cosmol suggested would probably work better in 3 or 4 team CTF games, but personally I'd hate to have the game "rigged" so only one team could win, even if they were at a disadvantage.

Re: fairCTF

Posted: Fri Feb 24, 2006 1:43 am
by temporal distraction
L4m3r wrote:I don't know if the .so will work under mac or not. If it doesn't, I'd greatly appreciate it if someone posted a mac build.
Here is that mac build. OSX 10.4.5 so YMMV if you try this with other systems.

Have fun!

freebsd 4.x version

Posted: Mon May 15, 2006 5:48 am
by cosmos
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.

Posted: Mon Jul 03, 2006 10:31 am
by macsforme
I've created a simple patchfile that changes the plugin's behaviour somewhat. This file should patch against the current 1.2 version of the fairCTF plugin source code. This patch implements the following features:
1. Teams are now free to carry their own team flags at any time.
2. The weaker team (the one with fewer players) can now carry the stronger team's flag at any time. In a map with more than two teams, this is true of any one team's number of players relative to any other team's number of players.

Thought you all might enjoy this, since it has been requested multiple times. Have fun!

Posted: Fri Jul 07, 2006 9:32 pm
by meeba
hey Constitution, I'm having problems with your modification of this plugin.

bzfs is crashing and all I see in output is this:

bad argument "ELF"