fairCTF
Posted: Fri Jan 20, 2006 9:05 am
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.