CTFBonus

Expand and mod your server.
Post Reply
User avatar
Daler
Private
Private
Posts: 3
Joined: Fri Apr 28, 2006 9:11 pm

CTFBonus

Post by Daler »

Author: Will Mulvihill aka Daler

Description: This plugin gives a configurable bonus to the one who captures the flag and their team in a CTF game. It was motivated by all the time I capped the flag myself and got little satistaction that the flag was capped. I also saw CTF games turning into FFA with no one caring about getting the flag in big games. This plugin and the further plans I have for it are to motivate teamwork and turn CTF games into CTF games! How it works is that you just have to capture the flag and you get a bonus (default is +5). As well, your entire team gets a bonus for "helping" to capture the flag (default is +2).

Min Version: Any bzfs release that has plugin support. I compiled it and am running it on 2.0.8. One caveat is that it has a bug that is client-side which I can not fix:

BUG BUG BUG: If you are not using a patched bzflag client, you will NOT see your own score increase as a result of these bonuses. You WILL see everyone else's bonuses. For example, your score is +1 and Steve, your teammate, is +3. When YOU cap the flag, your score will appear to be unchanged, BUT you will see that Steve has been bumped up to +5. And of course, Steve will see your score as +6, but his own score will appear to him as being still at +3. This bug is easily fixed, but it has to be done on the client side. There is nothing I can do on the server-side to force your own score to update. Fortunately, the patch for this is very simple and I'll attach the diff to this post in case anyone is brave and wants to patch their own bzflag source and recompile. This diff is to be applied to playing.cxx in src/bzflag. All it changes is the client will accept score updates from the server. NOTE: This is already fixed/done in the latest code I've seen in CVS, so a subsequent version of bzflag will likely fix this permanently. But please bug the devs to get the client-side to accept score updates from the server so that this plugin works fully in the future.

Files: I don't yet have a Windows version. Sorry.
Attachments
bzflag-ctfbonus-patch.zip
Patch for bzflag clients to allow server-side score updates to affect your local score.
(603 Bytes) Downloaded 379 times
ctfbonus.zip
Source code to plugin
(15.89 KiB) Downloaded 389 times
ctfbonus_linux.zip
Linux compiled version of plugin.
(32.72 KiB) Downloaded 391 times
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ »

Kewl!
User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni »

nice looks good
Image
Sig Made By AlliedArmour

TGPH
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

Personally, I think it's a bit much to expect your players to use a patched client. Most don't even know how to compile a client to begin with.

Points for CTF has been talked about a lot, but never done because of the client-side issue. this sort of thing should wait until 2.2. :|
Optimism is just a milder alternative to denial.
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Post by Tanner »

Here's a thought.

Every x minutes, send every user their true score and tell them that. Although I have no clue if it is possible, its a thought.

;)

-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
slime
Private First Class
Private First Class
Posts: 188
Joined: Fri Dec 30, 2005 3:08 am
Location: Omaha , Nebraska

Post by slime »

You're right , I've noticed as well that CTF servers are (for the most part) more FFA than CTF. But I don't think making your score higher when you or a teamie captures enemy flag is the right way to go about it. Your score is based on your kills and deaths , it doesn't have anything to do with capturing the enemy's flag.

But here is something you developers might want to think about. It could be a sort of number like teamkills are shown EX:[1] on the side of your score , but it would show how many times you have captured the enemy's flag.

So your score stats could show something like this:

8 11-3 [1] [2]

Where the 8 represents your overall score (same as it does now) , the 11 and 3 represent your kills/deaths (same as it does now) , the [1] represents your teamkills (same as it does now) , and the [2] represents how many times you've captured an enemy's flag.

Just a thought. It would promote CTF , but wouldn't affect your kills/deaths score.
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

slime wrote:You're right , I've noticed as well that CTF servers are (for the most part) more FFA than CTF. But I don't think making your score higher when you or a teamie captures enemy flag is the right way to go about it. Your score is based on your kills and deaths , it doesn't have anything to do with capturing the enemy's flag.

But here is something you developers might want to think about. It could be a sort of number like teamkills are shown EX:[1] on the side of your score , but it would show how many times you have captured the enemy's flag.

So your score stats could show something like this:

8 11-3 [1] [2]

Where the 8 represents your overall score (same as it does now) , the 11 and 3 represent your kills/deaths (same as it does now) , the [1] represents your teamkills (same as it does now) , and the [2] represents how many times you've captured an enemy's flag.

Just a thought. It would promote CTF , but wouldn't affect your kills/deaths score.
I don't think that will happen. I do think, though, that score alteration will become commonplace on many servers following the release of 2.2.0. I think this why the game uses the terms "wins" and "losses" rather than "kills" and "deaths".

Heck, I was planning on doing something similar (albeit much more generic) for 2.2. It's not necessarily a bad thing, it's just that the game really isn't ready for it just yet.
Optimism is just a milder alternative to denial.
User avatar
Daler
Private
Private
Posts: 3
Joined: Fri Apr 28, 2006 9:11 pm

Post by Daler »

I do agree that asking clients to patch isn't going to happen (which is why my original post has the "if you're brave" part). I could spend the time to create hex edit patches which people could run from some kind of patching utility, but still. I just wanted to get this out there and start the ball rolling on this. It would be great if that 10 line patch gets into a 2.0 release if another one is coming out before 2.2, but oh well. I've "scratched by itch" and will do so further whenever I can.

Tanner: I looked into what you are talking about but I can't see any message/packet type that does that currently. The server now sends the score update to the client, its just that the client doesn't do whats its told :)

BTW, my server is also now running fairCTF at the recommendation of many. So many thanks there L4m3r!
Post Reply