Page 1 of 1

flagOnSpawn

Posted: Sun Oct 29, 2006 6:39 am
by macsforme
Author: Constitution
Description: Automatically gives tanks superflags upon spawn
Min Version: 2.0.8 (may work with earlier versions, but has not been tested)

This plugin gives superflags to tanks based on arguments specified when the plugin is loaded. Any configuration of teams/flag types is supported. The loading syntax is:

Code: Select all

/loadplugin /path/to/flagOnSpawn.so,FLAGID:TEAM[:FLAGID:TEAM][:FLAGID:TEAM]...
See the readme in the source zip for more detailed instructions. Bug reports and suggestions should be posted here. Enjoy!

Nov. 21, 2007
Updated to version 1.1. Thanks to Optic Delusion for the null pointer dereference fix.

Posted: Sun Oct 29, 2006 12:11 pm
by CannonBallGuy
L4m3r has already created this plugin, see: http://my.bzflag.org/bb/viewtopic.php?t=7401
Though I guess he never released it, so, nic work Constitution!

Posted: Sun Oct 29, 2006 5:51 pm
by L4m3r
CannonBallGuy wrote:L4m3r has already created this plugin, see: http://my.bzflag.org/bb/viewtopic.php?t=7401
Though I guess he never released it, so, nic work Constitution!
Yes, I made this plugin before the flag give function was even added to the API. ;) But I never added configureability or anything, which is why I didn't bother with a release.

Posted: Sun Oct 29, 2006 8:49 pm
by macsforme
L4m3r wrote:But I never added configureability or anything, which is why I didn't bother with a release.
Yeah, this doesn't surprise me. It serves a fairly simple task, but I sought to make this as useful as possible within the simple functionality that it offers. Anyway, this will allow people to give specific teams specific flags, which could be useful. I won't claim that this is a novel idea... but at least this plugin should make this functionality easy for the public to use.

Posted: Sun Oct 29, 2006 10:58 pm
by L4m3r
Constitution wrote:Yeah, this doesn't surprise me. It serves a fairly simple task, but I sought to make this as useful as possible within the simple functionality that it offers. Anyway, this will allow people to give specific teams specific flags, which could be useful. I won't claim that this is a novel idea... but at least this plugin should make this functionality easy for the public to use.
Yeah, I don't think I ever put it to practical use on a server... it was only for test purposes when I adapted /flag give to the API.

It does have some play possibilities, but in most cases the giving scheme needs to be more complex.

Posted: Mon Oct 30, 2006 11:20 pm
by Ck_asdf
uh, oh! I'm having difficulty in getting this to work.
I'm running Fedora Core 5 and the latest version of bzflag.
In my configuration file, I used:

-loadplugin /home/ck/flagOnSpawn.so,V:-1:G:0

I got no errors upon starting the server, but I couldn't spawn with a flag, either.
Am doing something wrong?

Posted: Tue Oct 31, 2006 1:36 am
by macsforme
Ck_asdf wrote:uh, oh! I'm having difficulty in getting this to work.
I'm running Fedora Core 5 and the latest version of bzflag.
In my configuration file, I used:

-loadplugin /home/ck/flagOnSpawn.so,V:-1:G:0

I got no errors upon starting the server, but I couldn't spawn with a flag, either.
Am doing something wrong?
Are you using the binary, or building from source?

Do /listplugins to be sure that the plugin is actually loaded. Enable debug level 4 (with '-d -d -d -d'), and check the output where it mentions flagOnSpawn. There also may be a problem with the flags... be sure to use +f V{number} and +f G{number} to ensure that those flags will be available to give to players. Also try using "/loadplugin /home/ck/flagOnSpawn.so,V:-1:G:0" as a server command during the game, and see if it spits out any errors.

If you still have problems... maybe post your complete config file, and the complete output of '-d -d -d -d'?

Posted: Tue Oct 31, 2006 4:11 am
by Ck_asdf
"Are you using the binary, or building from source?"
I'm using the second download provided in the original post, which is a zipped .so file.

" /listplugins "
While in the server?

"Enable debug level 4 (with '-d -d -d -d'), and check the output"
Where is the output going to end up?

"ensure that those flags will be available"
Yeah, I have 5 high speed & 2 Geno flags.

"try using "/loadplugin /home/ck/flagOnSpawn.so,V:-1:G:0" during the game"
Yeah, it told me "unknown command" here, as well as when I typed "/listplugins" while in the game.

"post your configuration file"
I've linked it to keep things tidy in here:
http://random.id.googlepages.com/ck.txt

Posted: Wed Nov 01, 2006 12:11 am
by A Meteorite
Ck_asdf wrote:" /listplugins "
While in the server?
Yes.
Ck_asdf wrote:"Enable debug level 4 (with '-d -d -d -d'), and check the output"
Where is the output going to end up?
In the terminal (or log if you have one).
Ck_asdf wrote:"try using "/loadplugin /home/ck/flagOnSpawn.so,V:-1:G:0" during the game"
Yeah, it told me "unknown command" here, as well as when I typed "/listplugins" while in the game.
That's the problem, if it tells you it's an unknown command when you do those, you do not have plugin support. You need to compile with the "--enable-shared" and "--enable-plugins" configure switches or get a binary with plugin support.

Posted: Wed Nov 01, 2006 4:09 am
by Ck_asdf
"you do not have plugin support."
That sucks - how come the linux version doesn't come with it automatically? Windows does...

"You need to compile"
Eh ... I'm still new to linux ... not sure how to compile apps.

"get a binary with plugin support."
Where can I find that?

Posted: Thu Nov 02, 2006 2:05 am
by macsforme
Ck_asdf wrote: "You need to compile"
Eh ... I'm still new to linux ... not sure how to compile apps.
If all of your development tools are installed (e.g. compiler, autotools, etc)...

1. Uninstall your current bzflag package. Not sure how the package manager for Fedora Core works... perhaps "apt-get remove bzflag"?
2. Download the current bzflag source code:

Code: Select all

cvs -d:pserver:anonymous@bzflag.cvs.sourceforge.net:/cvsroot/bzflag login
(Hit enter when prompted for a password)

Code: Select all

cvs -z3 -d:pserver:anonymous@bzflag.cvs.sourceforge.net:/cvsroot/bzflag co -P -r v2_0branch bzflag
Your "bzflag" directory now contains the bzflag source code.
3. Build bzflag:

Code: Select all

cd bzflag; ./autogen.sh; ./configure --enable-optimized --enable-shared --enable-plugins --disable-client --disable-bzadmin; make
Note: these commands can also be run one at a time. If it spits out errors, you need to install some packages.
4. Install:

Code: Select all

sudo make install
There are also many other howtos on this subject if you need additional help.

Posted: Fri Nov 10, 2006 10:12 pm
by Ck_asdf
I've been busy, so I haven't tried this. I recently installed the new Fedora Core 6, so I went ahead and left BZ out of the install, so I could install how you directed above. Unfortunately, I'm not sure where to enter the first two lines you have above, about CVS. The konsole? If so, I tried in there, and it gave me an error.
"bash: cvs: command not found"

Does that mean I don't have the development tools installed?
If not, which ones do I need to install?

Thanks for your help so far.

Posted: Wed Nov 15, 2006 5:04 am
by macsforme
This is not really the right place to discuss compilation and installation issues. I would recommend that you post your question on how to compile somewhere in the correct section. In summary, yes, you were to type those commands in the console, terminal, or whatever you want to call it. The output that you quoted states that you do not have cvs installed, so you will need to install that. You'll probably need to install several other things too. I would recommend that you visit the #bzflag IRC channel sometime and ask for help. There ought to be some linux experts who will be able to help you.

Posted: Thu Nov 23, 2006 7:34 pm
by Ck_asdf
Okay, I've reinstalled FC6, and I chose to install the development packages, so now I have CVS. I ran the above commands, and got as far as

Code: Select all

cd bzflag; ./autogen.sh; ./configure --enable-optimized --enable-shared --enable-plugins --disable-client --disable-bzadmin; make
Is this supposed to take a long time?
Okay, it just finished ... and so you know, I changed "disable" to enable on the client & bzadmin options, because I want those ... that didn't screw anything up, did it?

I ran the sudo command, typed the root password, it said wrong password, typed my password, and got this error:
"ck is not in the sudoers file. This incident will be reported."

What next? Do the same procedure, except as root?

Posted: Sun Nov 26, 2006 2:10 am
by macsforme
Yeah, that generally takes a long time. The entire configuration and compilation of the bzflag source code happens in that line.

Not sure why you would need a bzflag client on the server, but I think what you typed should work.

As far as the sudo problem, that just means that you haven't configured the /etc/sudoers file. This can be done in several ways... not sure what's the best way for your particular flavor of Linux. In debian, I think you just add the user "ck" to the group "admin" (with "usermod -a -G admin ck" as root), and in other operating systems I think you use the "visudo" command as root. You'll probably want to add yourself to the sudoers list for other reasons... but all you really need to do to finish the installation is become root before running "make install". You can do this with the "su" command.

Hope that helps.

Posted: Sun Nov 26, 2006 2:53 am
by Ck_asdf
okay, I just ran it as root earlier today, and it worked, though sometimes when I try to run bzflag, I get a segmentation fault error. I run it from the console, since it's not in the games folder of the K menu. And I'm not sure it's related, but several times today, I went "not responding," even though I wasn't doing a lot of other stuff, AND I have DSL, so yeah.

Wonder what has been going on?

Posted: Sun Nov 26, 2006 4:52 am
by Ck_asdf
yaaay, I got the plugin to work properly. :)
unfortunately, every time I try to run as observer when playing, I get that segmentation fault error I was talking about above.


Oh, and you asked why have the client, etc ... I like to run servers, play the game, and do all kinds of stuff ... but mainly, I have the server to test my maps, before I offload them to Tadd or my school to run, for my puny bandwidth isn't near enough to support decent traffic.

That, and the plugin support is merely a toy to me. :D I like doing various things offline with bots, and seeing what I can do. If any of them are interesting, I will see if I can petition Tadd to get his supported, and then do that stuff. Whee!

Later, peeps.

Posted: Mon Jul 23, 2007 3:15 am
by Psyche
Can someone please provide me with a compiled .dll of this plugin? I can't figure out for the life of me how to get this working. ;-;

Posted: Wed Nov 21, 2007 7:20 am
by optic delusion
I use this on my borg cube map, Thanks Constitution!

Posted: Wed Nov 21, 2007 9:33 pm
by macsforme
Optic Delusion wrote:I use this on my borg cube map, Thanks Constitution!
Thanks for the fix; the source code and linux binary have been updated on the initial post.

Re: flagOnSpawn

Posted: Wed Jul 13, 2011 9:21 pm
by allejo
Plugin updated to 2.4