Two teams, adjustable friendly-fire, kits, individual team items, spectator mode

Supported Games
GameServerKingsGameServerKings

Similar to the current game styles on Battlefield-type servers, but with teams.

Features

  • Endless, not Event-based, no scores kept (for now)
  • Two teams only
  • Players can choose their team upon startup, with a maximum team difference before auto-assigning players
  • Individual kit types for each team
  • Team-specific wearable items
  • Friendly-fire damage is configurable (default is 0.0)
  • GUI Team selection
  • Player stats save on disconnect so they can reconnect and continue from where they left off, with a automatic wipe cycle for sleeping players (default 5 mins)
  • Should be compatible with all other plugins (except those that modify damage)
  • Spawn Database integration
  • Spectator mode (GUI Selection)
  • Admin mode that only admins can see (GUI Selection)
  • Scoreboard GUI
  • Plugin based death notifications=

Chat Commands

  • /switchteam -- Open the team selection GUI and allows player to change teams/spectate
  • /t -- Team chat, just type /t before your message to send to all players on your team

Console Commands

  • tbf.assign <partial player name> <"a"/"b"/"spectator"> - Example: tbf.assign k1lly0u a
  • tbf.purge -- Remove inactive sleepers saved data
  • tbf.list -- Show which team players are on, and when they last disconnected
  • tbf.version -- Print plugin version for debugging purposes
  • tbf.clearscore -- Reset the scoreboard

Built-in Chat

This plugin has a inbuilt chat and death notification system. If you do not wish to use these you may disable them in the configuration.

Note: Using other chat based handlers can result in plugin conflict.

Spawns Database

You must create 2 spawn files, one for each team. Failure to do so will result in the plugin turning itself off. You can also create a optional Admin spawn file. Use Spawns Database to create the spawnfile and set the file names in the configuration.

Spawn file names are adjustable in the configuration; default names are:

  • For Team A, save the spawn file as "team_a_spawns"
  • For Team B, save the spawn file as "team_b_spawns"

Configuration

{
  "Admin": { // Admin team options
    "Chat_Color": "<color=#00ff04>",
    "Chat_Prefix": "[Admin] ",
    "Gear": [ // Default Admin gear
      {
        "amount": 1,
        "container": "wear", // Container options are wear, belt and main
        "name": "Hoodie",
        "shortname": "hoodie",
        "skin": 10129
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Pants",
        "shortname": "pants",
        "skin": 10078
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Gloves",
        "shortname": "burlap.gloves",
        "skin": 10128
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Boots",
        "shortname": "shoes.boots",
        "skin": 10023
      }
    ],
    "Spawnfile": "admin_spawns"
  },
  "Gear": {
    "CommonGear": [ // Common gear all players will receive
      {
        "amount": 1,
        "container": "belt",
        "name": "Machete",
        "shortname": "machete",
        "skin": 0
      },
      {
        "amount": 2,
        "container": "belt",
        "name": "Medical Syringe",
        "shortname": "syringe.medical",
        "skin": 0
      },
      {
        "amount": 1,
        "container": "belt",
        "name": "Bandage",
        "shortname": "bandage",
        "skin": 0
      },
      {
        "amount": 1,
        "container": "belt",
        "name": "Paper Map",
        "shortname": "map",
        "skin": 0
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Metal ChestPlate",
        "shortname": "metal.plate.torso",
        "skin": 0
      }
    ],
    "StartingWeapons": [ // Weapons all players will receive
      {
        "ammo": 120,
        "ammoType": "ammo.rifle.hv",
        "amount": 1,
        "container": "belt",
        "contents": [
          "weapon.mod.holosight"
        ],
        "name": "AssaultRifle",
        "shortname": "rifle.ak",
        "skin": 0
      },
      {
        "ammo": 120,
        "ammoType": "ammo.pistol.hv",
        "amount": 1,
        "container": "belt",
        "contents": [
          "weapon.mod.silencer"
        ],
        "name": "SemiAutoPistol",
        "shortname": "pistol.semiauto",
        "skin": 0
      }
    ]
  },
  "Options": {
    "BroadcastDeath": true, // Broadcast player deaths
    "FF_DamageScale": 0.5, // Friendlyfire damage scale (1.0 is normal, 0.5 is 50%)
    "MaximumTeamCountDifference": 5, // Maximum team count difference before auto assigning new players
    "RemoveSleeper_Timer": 5, // The amount of time a offline players stats will remain in memory
    "UsePluginChatControl": true // Chat controller (shows teams and colors name)
  },
  "ScoreboardUI": { // Adjust the scoreboard position and dimensions
    "XDimension": 0.22,
    "XPosition": 0.39,
    "YDimension": 0.05,
    "YPosition": 0.95
  },
  "Spectators": { // Spectator options
    "Chat_Color": "<color=white>",
    "Chat_Prefix": "[Spectator] ",
    "EnableSpectators": true // Enable/Disable spectator mode
  },
  "TeamA": { // Team A options
    "Chat_Color": "<color=#0066ff>",
    "Chat_Prefix": "[Team A] ",
    "Gear": [
      {
        "amount": 1,
        "container": "wear",
        "name": "Hoodie",
        "shortname": "hoodie",
        "skin": 14178
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Pants",
        "shortname": "pants",
        "skin": 10020
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Gloves",
        "shortname": "burlap.gloves",
        "skin": 10128
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Boots",
        "shortname": "shoes.boots",
        "skin": 10023
      }
    ],
    "Spawnfile": "team_a_spawns"
  },
  "TeamB": { // Team B Options
    "Chat_Color": "<color=#ff0000>",
    "Chat_Prefix": "[Team B] ",
    "Gear": [
      {
        "amount": 1,
        "container": "wear",
        "name": "Hoodie",
        "shortname": "hoodie",
        "skin": 0
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Pants",
        "shortname": "pants",
        "skin": 10019
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Gloves",
        "shortname": "burlap.gloves",
        "skin": 10128
      },
      {
        "amount": 1,
        "container": "wear",
        "name": "Boots",
        "shortname": "shoes.boots",
        "skin": 10023
      }
    ],
    "Spawnfile": "team_b_spawns"
  }
}

Developer API

string GetPlayerTeams(ulong playerID) // Returns the players team (A,B,SPECTATOR,ADMIN)
Dictionary<ulong, string> GetTeams() // Returns a dictionary with player ID's and their corresponding team names

Credits

  • BodyweightEnergy, for the original version of this plugin

MIT License


Copyright (c) 2020 k1lly0u


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.