Simple Team Balancer for TFC
18 Attachment(s)
A team balancer for TFC
When joining a team, it checks the number of human players in all teams, and only allows joining if this wouldn't unbalance the teams. Note: Because the plugin is based on human player count, bots should be set to even the teams. With FoxBot, use these settings in file "foxbot\tfc\foxbot.cfg": Code:
# Bot team balance (0 off, 1 on) CVARS stb_on (1/0) - enable the plugin (default: 1) stb_teams (1 .. 4) - number of teams the current map has (default: 2) stb_version - version number (visible in server rules) Code:
Simple team balance plugin for TFC Beta changes No need for map specific configs Available teams and team size limits are detected automatically, map specific configs setting stb_on and stb_teams aren't necessary any more. Cvar stb_handle_auto_assign Handling auto assign prevents human players getting stacked in one team when bots are present. 0 = let TFC handle auto assign 1 = move player to the team with the least humans (default) 2 = disable auto assign Cvar stb_immunity Only check immunity if this cvar is "true" (1), which is the default. Cvar stb_debug Debug infos in console and hint in chat, off by default. To do
|
Re: Simple Team Balancer
Quote:
btw, you provide a "beta" but you don't say what are the changes. |
Re: Simple Team Balancer
EDIT: sry didnt notice it was for TFC sorry.
|
Re: Simple Team Balancer for Team Fortress Classic (TFC)
Moved the return command from the if-then-else clauses to the end of the function.
Removed the beta. Added TFC heading to the thread title. Several minor changes to the source code. |
Re: Simple Team Balancer for Team Fortress Classic (TFC)
You don't need to initialize manually the array, it's done automatically with "new". You can cache also get_maxplayers().
|
Re: Simple Team Balancer for Team Fortress Classic (TFC)
I've went one step further and made it a global variable, because maxplayers can't be changed.
|
Re: Simple Team Balancer for Team Fortress Classic (TFC)
I was meant that since it's something it won't change in-game. ;)
|
Re: Simple Team Balancer for TFC
Hi
I installed this on my server. Its shows up when i type amx_plugins I entered stb_on 1 and stb_teams 2 in console - for 2fort i dont know what to enter for stb_version so i haven't entered anything. It does not seem to work at all. Any help appreciated thanks |
Re: Simple Team Balancer for TFC
For 2fort you don't need to configure anything, the values you mentioned are default. stb_version just contains the version number, it shouldn't be changed.
I'm assuming this is for the UK 2fort server, it seems to be working. Red had two human players, blue team zero humans (which for the reasons I stated in the first post can happen), and I could *not* choose the red team, so it's working as intended. Immunity: If you have admin immunity (check for flag "a" in file "tfc\addons\amxmodx\configs\users.ini"), you can switch to any team. No forced switching: If teams are uneven e.g. by players dropping from one team, players will NOT be forced to switch. Auto team: If someone chooses auto team (which is available even if tfc_autoteam is disabled), it can happen that there are more humans in one team if there are currently bots present. Bot team balance: This should be enabled, see first post. |
Re: Simple Team Balancer for TFC
The plugin needs testing. If anyone can report that it does or doesn't work, please post, before approval.
If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me. |
All times are GMT -4. The time now is 10:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.