Page 1 of 1

CTFBonus

Posted: Fri May 19, 2006 7:25 pm
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.

Posted: Fri May 19, 2006 10:50 pm
by Legolas_
Kewl!

Posted: Sat May 20, 2006 12:14 am
by The Knights Who Say Ni
nice looks good

Posted: Sat May 20, 2006 12:34 am
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. :|

Posted: Sat May 20, 2006 2:08 am
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

Posted: Sat May 20, 2006 11:05 pm
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.

Posted: Sat May 20, 2006 11:21 pm
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.

Posted: Mon May 22, 2006 3:18 pm
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!