Plug-in Starter (Now for 2.4.x!)

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Plug-in Starter (Now for 2.4.x!)

Post by L4m3r » Tue Feb 26, 2008 10:32 am

I've written a simple PHP script to facilitate the plugin-writing process.

http://l4m3r.bzflag.net/scripts/plugin_starter.php

This will set up a skeleton of the C++ code, handling the events and commands of your choosing. While the primary intention is to make plug-in authoring faster (and less boring) for people who know the API, it may also be helpful for those trying to learn how it works.

It's currently in a testing stage. Please leave any comments and report bugs here. (there are sure to be typos...)
Last edited by L4m3r on Thu Oct 09, 2008 7:44 am, edited 2 times in total.
Optimism is just a milder alternative to denial.

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Tue Feb 26, 2008 11:26 am

Nice work! Looks very handy.

dexter
Private First Class
Private First Class
Posts: 212
Joined: Sun Apr 30, 2006 7:36 am
Location: Germany :o)

Post by dexter » Tue Feb 26, 2008 2:10 pm

I like the point on learning how to make plugins and how they actually function. I'm speaking for someone who has never gone into that direction at all so this might be a good and interesting start. Nice work.

User avatar
flying_popcorn
Private First Class
Private First Class
Posts: 88
Joined: Wed Dec 14, 2005 2:40 am
Contact:

Post by flying_popcorn » Mon Nov 03, 2008 2:20 am

This is very useful, thanks for making it :)

BTW, it has an error: too many arguments to function 'bool bz_removeCustomSlashCommand(const char*)'.
Removing a custom slash command only takes the command name, not a reference to the handler.

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

Re: Plug-in Starter

Post by L4m3r » Wed Aug 01, 2012 8:27 am

Sorry for the wait (it's been way too long), but I've finally gotten around to updating this script for 2.4.x. It should now include all API events that are in trunk as of today.

As before, there are bound to be typos or other bugs. Feedback is appreciated, of course.
Optimism is just a milder alternative to denial.

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Wed Aug 22, 2012 10:02 am

Not sure if you got my message on IRC, but just to be safe.

There are two typos that I've found so far. When you call on a slash command in the class (the virtual bool SlashCommand()) it's "bz_APIStringList" not "bzAPIStringList." Also, it's

Code: Select all

bz_registerCustomSlashCommand(const char*, bz_CustomSlashCommandHandler*)
not "bz_registerCustomSlashCommand(const char*)" so it should look like this:

Code: Select all

bz_registerCustomSlashCommand("myCommand", this)
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

Starmute
Private
Private
Posts: 3
Joined: Thu Feb 03, 2011 11:53 pm

Re: Plug-in Starter (Now for 2.4.x!)

Post by Starmute » Sun Jun 16, 2013 9:30 pm

It appears that the link is not working.

zel
Private First Class
Private First Class
Posts: 13
Joined: Mon Apr 02, 2012 11:03 pm

Re: Plug-in Starter (Now for 2.4.x!)

Post by zel » Thu Aug 22, 2013 4:45 am

Disappointed to have the same as Starmute. Does someone (the author?) have the PHP script? I can host it...

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Mon Dec 23, 2013 7:34 am

Since l4m3r seems to have lost interest in this project, I wrote a replacement.

http://allejo.me/tools/bzflag-plugin-starter/

To avoid spamming this thread, please PM me any issues that you find or report them here. I do plan on adding some more features to this so let me know if you have any ideas. Like the majority of my code, the code for this website is open source and can be found here.
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Sun Jan 08, 2017 4:49 am

I've rewritten this tool available here: http://projects.allejo.io/bzflagPluginStarter2/

The source code is available here and I welcome pull requests if any: https://github.com/allejo/bzflagPluginStarter2

Please note, this version is built entirely in JavaScript so be sure to have it enabled on your browser when visiting this website. Let me know if there are any errors in the generation of plug-in skeletons and I'll be more than happy to correct them. I'll be taking down the PHP version and having the previous URL redirect to the new one in the coming weeks.
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Fri May 05, 2017 8:02 am

The project has moved to: https://bzflag-plugin-starter.allejo.org/

Version 1 of this tool has been shut down and automatically redirects to the current version.
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Tue Oct 29, 2019 5:34 am

Greetings!

Last winter I had started a rewrite of my plug-in starter to be more modular and never managed to finish it; until a few days ago that I started development again.

My project has been split-up into three separate projects:

- aclovis (GitHub) - A TypeScript library for generating C++ programmatically
- bzfPluginGen (GitHub) - A TypeScript library using aclovis for generating a C++ BZFlag plug-in
- bzflagPluginStarter3 (GitHub) - A React.js website using bzfPluginGen to give you pretty buttons to generate a plug-in

The core project, bzfPluginGen, already supports generating all of the following:
  • Custom BZDB settings
  • Custom callbacks
  • Custom flags
  • Custom map objects
  • Custom poll types
  • Custom slash commands
  • Event registration
They just need a UI for them in the React.js project. If anyone is interested in learning React or knows React, feel free to submit a PR to the website GitHub repo. You just need to call the appropriate bzfPluginGen code, I've already taken care of all the thinking of how to generate C++.

Thanks for tanking with my projects and please submit any bug reports!
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Plug-in Starter (Now for 2.4.x!)

Post by allejo » Thu Nov 28, 2019 8:15 am

My plugin starter now has an editor for creating and registering custom map objects. With that, bzflagPluginStarter3 has reached feature parity with bzfPluginGen in that there's a UI for everything bzfPluginGen supports.
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

Post Reply