Need some Help over here.

Questions and answers about the how and why of making maps.
Post Reply
User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Need some Help over here.

Post by ChaoticFangUp » Sat Apr 21, 2012 3:04 pm

Hello there, everyone. ;)

NOTE: Please, do not copy any ideas!

I am making a cool Wings Game Map soon, a Game like Last Tank Standing is, just a lot different.
So... I am a noob at Plug-ins/addings, so I need your help.
If you know how to get to work ANY of the following, please, do tell!

I need to know 10 beautiful things:

1. - How to make a Tank automatically die if it gets above 2500 ft.?
2. - How to make a Tank spawn on 1000 ft.?
3. - How to make a Tank be given a flag by the Server when it Spawns/Respawns? (That is a noob one, but I don't know it. :( )
4. - How to make a 30 countdown that an Admin could start?
*After the countdown, the game would include 5. , 6. , 7. , 8. , 9. , 10.*
5. - How to make a Tank to have 5 Lifes, each time it dies, a Server would PM the one that died: "You just got hit and lost some Feathers! 4 Lifes left!", next time, it would say: "You just got hit and lost some Feathers! 3 Lifes left!".... and so on.
6. - How to make a Tank that would die 5 times automatically out into Observer Mode, and a message would pop-up for everyone saying: ">player< just went down!"? (Same as Last Tank Standing, it would just focus on deaths here).
7. - How to make a Server message pop up for everyone after someone has won/last one flying saying: "Congratulations to >player<, on being the last Predator Bird in the Skies!"?
8. - How to make a player, that would not kill another player in under 3 minutes after a Spawn/Respawn be killed by the Server and giving him a PM by the Server saying: "You did not have the Predator Instinct! You must kill someone in less than 3 minutes of your current spawn to survive!"
9. - How to make, when a player would kill another player, a server would PM the killer saying: "You have just taken down >player<! Your Predator Time was reset to 3:00 minutes!"
10. - How to make a "Force Spawn"? When a player would die, the Server would automatically spawn him/her in 6 seconds after death.

ANY help would be appriciated.
Also, where do I post this so-called plug-ins?
Into a ".bzfs" file?

Thank-you very much, I will give further info about this when I get to know how to make it! :D
It will be awesome!

Cheers,
FangUp.
Last edited by ChaoticFangUp on Sat Apr 21, 2012 3:58 pm, edited 1 time in total.
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5121
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Re: Need some Help over here.

Post by JeffM » Sat Apr 21, 2012 3:38 pm

1) look at rogue geno source
2) look at airspawn source
3) look at bz_givePlayerFlag
4) look at bz_startCountdown
5) Write code that does that using the events in the API, it is pretty straightforward.
6) You can't change a player team while they are joined, so this is not possible.
7) bz_sendTextMessage
8) You can't, the client handles death and the server can not prevent it.
9) Look at playHistoryTracker source.
10) you can't the client has to request the state change from limbo to spawn, the server can not initiate it. The server can only set the spawn position.

A plugin is a C++ library that you write using C++ code. You compile it and tell bzfs to load it. It is not a trivial task. There is much documentation on plugins here on the forums as well as the wiki, do a few simple searches and you will have a lot to read. A general overview is here.
http://wiki.bzflag.org/Plugins

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Sat Apr 21, 2012 4:00 pm

I cannot say anything against any other, because I do not know what is right, but at number 6, you are wrong.
Have you ever player "Last Tank Standing"?
It DOES put you automatically into Observer Mode.

Please, post only if you are 100% sure, JeffM.

Cheers,
FangUp
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Sat Apr 21, 2012 4:11 pm

Hey again.

For the 1000 ft. spawn...
Here is what I got at Wiki:

-loadplugin "X:\path\to\the\plugin\airspawn.dll,<maxHeight>"

It is not working...
This is what I have done:

-loadplugin "X:\path\to\the\plugin\airspawn.dll,1000"

Any ideas why?

Thanks.
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Re: Need some Help over here.

Post by SkillDude » Sat Apr 21, 2012 4:44 pm

Look ChaoticFangUp, what you are asking to do is to basically get help (Or have someone do it rather) with making a plugin.

The fact that you do not know what to do or how to use plugins is going to be a large problem to start with. I am hoping that you understand this actual setting is not supposed to be verbatim:

Code: Select all

-loadplugin "X:\path\to\the\plugin\airspawn.dll,1000"
Most people don't have an X drive, and most people do not install BZFlag to \path\to\the\plugin. I suggest you review what exactly you are doing and try reading a bit so you understand that the -loadplugin command is looking for a path to a plugin.

A dll is a compiled BZFlag plugin for Windows. Compiling, especially when you do not know what you are doing can be a very complex and intimidating task the first time you do it. I suggest you spend some time getting familiar with writing / compiling C++ code before you even attempt this.

And then there's the matter of actually writing the plugin.

You do realize you want a plugin that will well breach 600 lines of code, assuming you include all of your features in one plugin, correct? JeffM has pointed you in all the right directions, and I looked at example plugins the first few times I had to write my own. You will be spending many an hour learning how to write these if you want to include every single feature in yours. (They are not very hard per say, as JeffM points out, but it will require some getting used to.)

Finally, the Last Tank Standing bzfs was modded to allow for player swapping, which is not included in the current source code. Just because you see it doesn't mean it is possible, JeffM's words still stand.

[EDIT]: Force spawning is not possible with the current API.
Last edited by SkillDude on Sat Apr 21, 2012 4:54 pm, edited 1 time in total.

User avatar
blast
General
General
Posts: 4607
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Need some Help over here.

Post by blast » Sat Apr 21, 2012 4:47 pm

He said look at the source, not load the plugin. You will have to write your own plugins.

As for 6, there is nothing in the API to change a player's team. The only way to do it is by bypassing the API (which does not work on Windows) and directly calling functions/code in BZFS, and we do not support that method. So, no, there is not a PROPER way to do this.

For 8, your question was worded poorly. You meant that if a player didn't kill anyone within a certain period of time that they should be killed and get a message sent to them, correct? That would be possible with a plugin. You'd have to track the last kill time and have a tick event periodically check if anyone exceeded that time limit.

As for 10, I think that might be possible (unless that changed since 1.7... ;)), but again, it is not part of the API and not supported.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5121
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Re: Need some Help over here.

Post by JeffM » Sat Apr 21, 2012 4:55 pm

Yes I only mentioned things in the plugins that used the API like you asked, not unsupported hacks that can break at any time. And yes, that is why I put the word SOURCE for some and just the api call for others.

You really should do more basic research on this before you start. I would recommend finding someone else who has more experience in software development and bzfs plugins to help you with your map. That is if you can talk to them with out being rude and assuming you know everything.

I do not think you are qualified to talk about this aspect of plugin development at your current level of understanding. Not when you don't even know how to run them. Learn to walk then learn to fly.

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Sat Apr 21, 2012 6:06 pm

Hmph... okay.
I guess I'll just go with the simple stuff such as Boxes, Pyramids, Bases, Teleports and editing the Speed, Color.... in that case... ;)

Thanks anyways.

Oh, and as for being rude... I am only giving back the kindness I get from people, that means: >You *mirror* Me.<
Want me to be nice? You be nice to me too! I started off nicely. Plus, you are proclaiming yourself to be the almighty, I never said I know a lot about programming/developing plugins.
But if I would want to learn that, I have perfect conditions for that, believe me.
So, why don't I do that? I already went into a way I want to be in my life. I do not want to sit 8 hours in front of a computer and get fat. Good fight.

Cheers,
Pyro.
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5121
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Re: Need some Help over here.

Post by JeffM » Sat Apr 21, 2012 7:08 pm

Image

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Sat Apr 21, 2012 7:50 pm

*Headdesk x3*
Hehe, sent you a PM. ;)
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
ducktape
Private First Class
Private First Class
Posts: 1206
Joined: Sat Jul 01, 2006 2:06 am
Location: Right Behind you!
Contact:

Re: Need some Help over here.

Post by ducktape » Sun Apr 22, 2012 11:05 pm

Oh my word fang. They are telling you things that you could find if you put forward just 15 mins of searching on the wiki and forum space. They know more than you. Stop trying to put them in under you because I guarantee you look like a fool.
Image

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Tue Apr 24, 2012 6:43 pm

Ouch!
I am so dumb! xD

Why would I need an Airspawn plugin, while i can only set the spawn zone?
Oh my God, that is much easier!
Marshall... yes, I am!
Linux - Fedora 16 Power!

User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Re: Need some Help over here.

Post by SkillDude » Tue Apr 24, 2012 9:46 pm

Because tanks are required to spawn on surfaces, therefore you cannot force them to spawn in the air. If you set a spawn zone in mid air, it will look from there and then go down until it find a surface within that zone to spawn the tank on. Forced airspawn only occurs when there is no safe surfaces (Caused by the spawning algorithm, and/or a huge pyramid taking up the whole map) and even then, you don't choose how high it will spawn it.

With a plugin, you can specify the exact Z coordinate a tank will spawn at, so you're not forced to flat surfaces.

User avatar
blast
General
General
Posts: 4607
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Need some Help over here.

Post by blast » Tue Apr 24, 2012 10:00 pm

Note that you would probably have to trick the server into allowing the tanks to be above a certain elevation without being kicked, either by placing an object high up in the air somewhere, or by other means (such as disabling the Z coordinate cheat checking code).
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
ChaoticFangUp
Private First Class
Private First Class
Posts: 41
Joined: Mon Apr 02, 2012 1:24 pm
Location: Battlefield - Killing out of Control!

Re: Need some Help over here.

Post by ChaoticFangUp » Wed Apr 25, 2012 10:38 am

Hehe, I get your point, sigonasr2.
However!
That is why I asked how the player could get a WG Flag given by the Server! :)
I know that now.
However, I do not know if WG could be used in the air when spawned by zone...
And blast said it well too. :D

P.S. - I have just made an awesome CTF Map with:
~ 2 Bases
~ a few Materials
~ a HUGE Mesh!
I have practicaly made like 100 objects in one Mesh, lol.
I will release it soon.
Marshall... yes, I am!
Linux - Fedora 16 Power!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest