BETA 3: Race to Seven

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

BETA 3: Race to Seven

Post by RPG »

Author: RPG

Description: Here is beta 3 of the racetoseven plugin. Possibly the last beta. There were no apparent bugs in beta 2, so beta 3 mostly introduces the rewritten permissions and config system. There are 3 new permissions you can put in yoru groups file related to the plugin.

I suggest giving MATCHSTART to any league players, as they may want to have a match. I suggest giving MATCHEND only to referees and admins, as MATCHEND allows the premature ending and reporting of a match, otherwise, a match will be automatically ended when a team reaches the win limit. I suggest giving MATCHCONFIG to site admins and techies, as it can control some major functions of the plugin, such as the win limit (default is 7), and if players are allowed inot the server during a match.

Code: Select all

-------------------------CHANGELOG-------------------------
Beta 3:
FEATURE: Punishes and kicks people who cap their own flag during a match.
FEATURE: Congratulates the capper if he caps the other team's flag.
FEATURE: Added the MATCHCONFIG perm, for users to be able to modify the configuration.
FEATURE: Added the /match config <list|add|reset> <name> <value> command, to manage the configuration.
FEATURE: In the command list that is displayed when the user mistypes a command, it lists the commands the user can and can't run.
REMOVAL: Took out the /set variable, _allowPlayersDuringMatch, due to it's buggy nature
FEATURE: Added MATCHEND perm, for people allowed to forcefully end matches.
Files:
Last edited by RPG on Sat Aug 20, 2005 4:03 pm, edited 1 time in total.
User avatar
[dmp]
Captain
Captain
Posts: 282
Joined: Mon Dec 09, 2002 3:20 pm
Location: CPH, Denmark
Contact:

Post by [dmp] »

linux binary added
Attachments
racetoseven.tar.gz
Linux binary
(12.56 KiB) Downloaded 346 times
I don't need huge pictures here.
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

I'll have this up at MoFo within 24 hours (hopefully!)

What does it do as far as report the results?
...This has been a recording.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

meacan
You beat me to it ;)

I_Died_Once
All the beta plugins have had the same reporting code. It sends the match data via HTTP POST to a URL, http://www.a-delusion.com/raceto7/racetosevenreport.php . Please don't abuse it by trying to hack it and authenticate youself so you can clutter our DB with useless match reports. We'd rather not have that.

Anyways, once it gets to that URL, a PHP script takes all the data, nicely formats it, and insterts into the BZMail database. That way the match report is sent to both me and A-Delusion, so one of us can enter the match into the database. Every match you end, sends us a report.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

report.

Post by optic delusion »

I'll send you a copy of the report, Vader, as soon as you send me a report of a full match.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

I already posted a sample

Post by RPG »

User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

New Name.

Post by optic delusion »

I was trying to get him to use the race plugin, without all the others. And actually see a match from beginning to end.

Since the end score is now adjustable. We need a new name.
Flag Race
Team Race
Race to n?
Usually I'm pretty good with these things, but this one is stumping me.
I came up with Race to Seven, and I think I've developed a mental block, I'm stuck on that name.

Almost forgot....
Thanks for the help, Meacan.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

An idea - how about combining both match start and match end perms into one MATCH perm?

The only "bug" I found was the plugin needs to be able to end a match on it's own under a couple of circumstances. THis is from the beta 2, mind you. You said no bug fixes were done going into beta 3, so I wanted to mention that.

Say its a 4 way match. All four colors are represented, but the whole green team, one by one, all manages to leave. Then the blue team. Then the purple team. Or, says its red vs blue, and the whole blue team leaves.

No one can join the game, and no admins are around. Only the red team remains.

The plugin should give a "ten second warning of some sorts warning the players that the game will self terminate if you don't config so players will be able to join in.

When I ran a quick test of my own on beta2, this is an issue. My opponent left, and I did too by mistake, and I could not get back into the server AT ALL. I had to go to the server itself and restart it from terminal. I guess I could have joined observer, thinking back in retrospect - but there isn't always going to be admins present. I think if someone has the authority to start a match, they should be able to end it if something goes wrong.

Perhaps I might be putting a little too much credibility into a group of people, but if they are in a league together, I would thenk there to be SOME honor in-league about NOT being an @$$hole and ending matches in the middle of one and such... I could be wrong, I most likely am...

but anywho, another issue I see is having the enemy's flag, being right by my base, THEN starting a match right before I cap the flag, giving my team a +1 edge on teh score.

SO for that I suggest having the plugin run

/flag reset all

At the beginning of a match, and even at the end of one. That way, no one can jump start and get a quick point in as the match starts.

At least consider giving the same perm for starting and ending a match until the plugin can clean up after itself and not leave a server in a match when there is no one on it to play.

Good work, BTW. Its coming along very nicely.
...This has been a recording.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

It does.

Post by optic delusion »

It does do flag reset, or at least used to do that.
We have discussed and thnk two different perms are required for /match start and /match end. This is the trickiest thing in the rules to get right, we need more testing.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
Hannibal
Private First Class
Private First Class
Posts: 1073
Joined: Mon May 02, 2005 10:27 pm
Contact:

Post by Hannibal »

what about a match pause kinda thing?...

if one person pauses, then the match should pause for a max of 5 mins...

the players can play FFA w/teams until the person returns or the 5 mins is up...

the team flags disappear or are gone temporarily(is this possible?) until the match resumes to prevent the capping of the flags...until match resumes...
Games don't make people violent, lag does.
ImageImage
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

What Phallic said
...This has been a recording.
User avatar
Hannibal
Private First Class
Private First Class
Posts: 1073
Joined: Mon May 02, 2005 10:27 pm
Contact:

Post by Hannibal »

see, not all of my ideas are bad...
Games don't make people violent, lag does.
ImageImage
User avatar
Hannibal
Private First Class
Private First Class
Posts: 1073
Joined: Mon May 02, 2005 10:27 pm
Contact:

Post by Hannibal »

wait, i dont want that as my nickname, vader! :evil: gimme another one...or just call me phalanx, and can ppl plz start spelling it right! ive had so many things...

the race to 7 works pretty well, vader and Daz v Me and Ashey_J, score:2-7, blue wins!
Games don't make people violent, lag does.
ImageImage
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

A large reply

Post by RPG »

I_Died_Once wrote:An idea - how about combining both match start and match end perms into one MATCH perm?
I thought about this, but people may want to have /match start and /match end to be run by two different types of people. /match end could easily be abused, whereas /match start should be able to be run by most people. There's my justification for two perms.

The only "bug" I found was the plugin needs to be able to end a match on it's own under a couple of circumstances. THis is from the beta 2, mind you. You said no bug fixes were done going into beta 3, so I wanted to mention that.
For a start, I'll have it end a match if there are no players on a server. I'll probably expand on that feature later.

...

When I ran a quick test of my own on beta2, this is an issue. My opponent left, and I did too by mistake, and I could not get back into the server AT ALL. I had to go to the server itself and restart it from terminal. I guess I could have joined observer, thinking back in retrospect - but there isn't always going to be admins present. I think if someone has the authority to start a match, they should be able to end it if something goes wrong.

If you are logged into the server via the /password, of if you are in the LOCAL.ADMIN group, you will be able to join a match every time you try. Also, if you're an admin or have the MATCHCONFIG perm, you could type "/match config set _allowPlayersDuringMatch true"

...

but anywho, another issue I see is having the enemy's flag, being right by my base, THEN starting a match right before I cap the flag, giving my team a +1 edge on teh score.
The plugin pulls a flagreset each time a match is started and ended.

...

Good work, BTW. Its coming along very nicely.
Guest

FEATURE REQUEST

Post by Guest »

Im too damn lazy to write this out again, RPG... 8)

[10:23pm] <CBG> In the other leagues, players often substitute during matches...
[10:23pm] <RPG_> really?
[10:23pm] <CBG> Your plugin blocks out any players that were not on red or blue at the start...
[10:23pm] <CBG> yes...
[10:24pm] <CBG> There needs to be *some* way to allow other players to join...
[10:24pm] <CBG> but not willy-nilly....
[10:24pm] <RPG_> people with the MATCHCONFIG perm can do
[10:24pm] <RPG_> /match config set _allowPlayersDuringMatch true
[10:24pm] <CBG> Keep out the ignorant, but allow other teammembers to substitute...
[10:24pm] <RPG_> that will let them in?
[10:24pm] <CBG> Then every league player needs that perm.
[10:25pm] <RPG_> but with that perm, they can also do
[10:25pm] <RPG_> /match config set _capNum 4
[10:25pm] <CBG> But then we get the problem of the 10yr old league players joining in the middle of a match because the plugin doesnt stop them and they don't know any better...
[10:25pm] <CBG> Then make more/separate perms...

That's it... ;)
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

i'll put it on my TODO list. It'd be a pretty hefty feature to add.
Guest

Post by Guest »

But pretty important if you ask me :)
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Not me

Post by RPG »

I've never seen substitutions happen during a league match.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

The potential problem

Post by RPG »

After some trial-and-error testing, we (brad and I) concluded that the racetoseven plugin doesn't play nicely with some of the other plug-ins. We haven't narrowed it down yet to the offending plugin, but one of them is bad. Running racetoseven alone will yield good results.
User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux »

Only one plugin can hook into an event. Other plugins that hook into the same event won't work right. Or so I've experienced.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Cant Make Mac

Post by optic delusion »

Alriight... Macintosh server plugin loader availabe!

Last Monday I destroyed my libraries, so today I spent fourteen hours backing up my files, completely reloaded my entire OSX10.3.9. Got the correct devtools. Correct cares library (I had the wrong one before), even had to reopen my ports.
Got a fresh CVS, Got the server running, and do /listplugins it says "no plugins loaded"
I almost broke my keyboard I was so happy.

Well, "make" won't run on any of the plugin folders. The provided ones or the racetoseven-source. Is it OK if I cry? Here's the terminal output. It's pretty much the same for all.
Could I still need something in my libraries? Or do I need an optional command with make?

g++ -fPIC -frtti -I../../include -O -c -o shockwaveDeath.o shockwaveDeath.cpp
g++ -fPIC -frtti -I../../include -O -shared -rdynamic shockwaveDeath.o -o shockwavedeath.so
g++: unrecognized option `-shared'
g++: unrecognized option `-rdynamic'
ld: Undefined symbols:
_main
bz_removeEvent(bz_eEventType, bz_EventHandler*)
bz_debugMessage(int, char const*)
bz_fireWorldWep(char const*, float, int, float*, float, float, int, float)
bz_getBZDBDouble(char const*)
bz_registerEvent(bz_eEventType, bz_EventHandler*)
bz_sendPlayCustomLocalSound(int, char const*)
make: *** [shockwavedeath.so] Error 1


For RPG here's everything after make, for racetoseven-source

g++ -fPIC -frtti -I../../include -O -shared -rdynamic racetoseven.o -o racetoseven.so
g++: unrecognized option `-shared'
g++: unrecognized option `-rdynamic'
ld: Undefined symbols:
_main
bz_hasPerm(bz_PlayerRecord*, char const*)
bz_kickUser(int, char const*, bool)
bz_addURLJob(char const*, bz_URLHandler*, char const*)
bz_killPlayer(int, bool, int, char const*)
bz_newIntList()
bz_resetFlags(bool)
bz_getTeamWins(bz_eTeamType)
bz_removeEvent(bz_eEventType, bz_EventHandler*)
bz_debugMessage(int, char const*)
bz_getTeamScore(bz_eTeamType)
bz_getTeamLosses(bz_eTeamType)
bz_registerEvent(bz_eEventType, bz_EventHandler*)
bz_resetTeamScore(bz_eTeamType)
bz_sendTextMessage(int, int, char const*)
bz_getPlayerByIndex(int)
bz_resetPlayerScore(int)
bz_getPlayerIndexList(bzAPIIntList*)
bz_removeCustomSlashCommand(char const*)
bz_registerCustomSlashCommand(char const*, bz_CustomSlashCommandHandler*)
bzApiString::c_str()
bzAPIIntList::size()
TextUtils::replace_all(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
TextUtils::format(char const*, ...)
TextUtils::tokenize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool)
make: *** [racetoseven.so] Error 1


I considered trying billywitchdoctor.com , but it was time to sleep.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

Beta 4 needs to be compliant with the new API.

And new API's need to be backwards compatible with older API versions, dammit.
...This has been a recording.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

I_Died_Once wrote:Beta 4 needs to be compliant with the new API.

And new API's need to be backwards compatible with older API versions, dammit.
Beta 4 will be released today, to fix the compliance, plus I may have found the crash problem.

The reason they can't make API's backwards compatible is pretty legit. Let's say the function

Code: Select all

bz_killPlayer (int playerID)
was in API 10. Basically, it killed a player. Now, let's say BZFlag now supports killing players and telling them why they were killed (a kill message). The bz_killPlayer function would be changed to this

Code: Select all

bz_killPlayer (int playerID, const char killmessage)
for API 11. All the plugins written for version 10 and less have this code:

Code: Select all

bz_killPlayer (11)
Therefore, when bz_killplayer (11) is called when running in API version 11, BZFS would be confused, because it was told that bz_killPlayer takes 2 arguments, playerID and message.

To make the API backwards compatible, you would have to create 2 functions, both named bz_killPlayer (which is acceptable), except that one would only take playerID and the other would take playerID and message. As you can imagine, that would be almost useless code, and over time, the API would grow to gigantic porportions.

Also remember that this is CVS. The devs don't have to stabilize anything, because it's all in development. Once 2.0.4 comes out, there will be a stable API, and therefore plugin devs can write plugins for the 2.0.4 API version and not have to worry about upgrading their plugins until 2.0.6 comes out.
Guest

Post by Guest »

I got make errors with it.
I sent it to A-D, you'll have to get it off him.
Post Reply