Page 1 of 1

Custom teams and team flags?

Posted: Mon Jun 11, 2018 6:59 pm
by Zehra
One thing which has been in my mind for some time would be to have the option of being able to add custom teams and team flags if wanted.
This could be applied to new game modes, where "zombies vs humans" would actually be team "zombie" and team "human".
Or even to league groups, where teams would be the names of each team playing each other.
I do imagine this would open up several new options which could be used or applied in different games.

Maps could also be made with using custom team flags, no longer needing to have a bot for an empty team.
As the teams are hard coded in 2.4.x, this would require a protocol break, but it would be nice to have as an up coming feature.

Code: Select all

#include "bzfsAPI.h"

class SAMPLE_PLUGIN : public bz_Plugin
  virtual const char* Name() { return "SAMPLE PLUGIN"; }
  virtual void Init(const char* config);
  virtual void Event(bz_EventData * /* eventData */) { return; }
  virtual void Cleanup(void);

void SAMPLE_PLUGIN::Cleanup(void)
  bz_debugMessage(4, "SAMPLE_PLUGIN plugin unloaded");


void SAMPLE_PLUGIN::Init(const char* /*commandLine*/)
  bz_debugMessage(4, "SAMPLE_PLUGIN plugin loaded");
  registerCustomTeamFlag("Zombies", 006400);*/

// Local Variables: ***
// mode:C++ ***
// tab-width: 8 ***
// c-basic-offset: 2 ***
// indent-tabs-mode: t ***
// End: ***
// ex: shiftwidth=2 tabstop=8

Re: Custom teams and team flags?

Posted: Mon Jun 11, 2018 10:17 pm
by JeffM
The team stuff is exceptionally hard coded throughout a large part of the game.

There is on real benefit of this since its' just end user labels, and a single color won't cut it.

A truly custom team would would require much more than a simple name and color, there is a large list of assets associated with each team (in 2.6 right now you have a text color, a radar color, team icon, 5 tank skins, a base wall, a base top, and 3 shot graphics).

I would want to see concrete examples of why the existing teams won't work for what you want to do, and would not even consider this until a rock solid asset management system was in place.

I suggest that instead of offering possible API functions, you simply state the problems you are having with the API, there may be multiple ways to solve the issue that you aren't aware of.

Re: Custom teams and team flags?

Posted: Tue Jun 12, 2018 3:36 am
by Zehra
My bad, didn't realize the effort needed.

My main reason was that there was no real good way of implementing single flag CTF.
Non-team flags can be used, but there is no way to highlight them on radar/map when having super flags.
Using another player slot for another team can be used, but requires either keeping a player or a bot for that team.
It can be done without a player having to be on that slot, but it requires a server modification.

I also kind of wanted to have additional teams too.
RogueTeam exists and works, minus the part of rogues still being able to TK.
(They don't get points for TK-ing, but can still TK.)

Everything can be implemented, but it isn't the nicest solution.