View Single Post
Author Message
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-25-2008 , 00:21   [EXTENSION] RunTeamLogic (WIN signature updated 8/7/11)
Reply With Quote #1

This extension is now obsolete and no longer required:
Use the "tf_arena_override_team_size" ConVar instead.

----

Update:
Quote:
Originally Posted by psychonic View Post
Here is the recompiled Windows binary that has been needed for a while (did it for Atreus a week or two ago and never got around to posting it). Same source that's currently on the first post.

New gamedata also attached, necessary for Windows after last night's game update.

http://forums.alliedmods.net/showpos...&postcount=372
RunTeamLogic
v1.0.5

Description:
This plugin allows you to modify the amount of players on a team during Arena maps in TF2 via a cvar. The maximum amount of players allowed on a team without this plugin is 11. With this plugin you can change it so you can have up to 16 players on a team at once.

Installation:
Download the RunTeamLogic.zip located at the bottom of this post, and extract it to your mod folder. If you prefer to compile the extension yourself, feel free to download the source of the plugin (also located at the bottom of the post), and do that. Once the files have been extracted, start up your server, configure the CVar, and you're done!

CVars:
rtl_version - RunTeamLogic version
rtl_arenateamsize "12" - The maximum amount of players that can be on a team at once.

Notes:
This extension is far superior to others that try to accomplish the same effect. This being because the way that the game calculates the teams. The game takes the maxplayers available, and divides that number by three (Red vs Blue with the other third in spectator). That's why when you run a 32 player server, you get 11 players on a team (32/3 = 10.6, which when converted to an int becomes 11). What this plugin does is spoof the number of max players so that the team counts are then calculated to what you want them to be. This makes it way less resource intensive than forcing the players onto a team, because the game automatically switches them over due to it thinking they're suppose to be there.

Also, this extension won't make it so the teams can be uneven. If there are an uneven amount of players on the server, the teams will be even, with the one remaining man left in spectator. This plugin just makes it so if your server is full, you can have it to where every person is playing instead of a third of the players having to wait for the next round.

Thanks to:
Nephyrin for giving me the method to use.
pRED* for the detour class, and helping tons with putting this together.
psychonic for recompiling the binaries when a TF2 update broke them.

Changelog:
  • 1.0.1
    • Fixed gamedata file.
  • 1.0.2
    • Added version cvar "rtl_version".
    • The extension now properly deletes all detours.
  • 1.0.3
    • Using pRED's new detour class.
    • Changed around a few things to hopefully fix the bugs.
  • 1.0.4
    • The cvar is used once again (forgot to reimplement it with the new detour code).
    • Corrected the extension information.
  • 1.0.5
    • Fixed cvar glitch.
Attached Files
File Type: zip RunTeamLogic.zip (104.6 KB, 554 views)
File Type: zip RunTeamLogic_source.zip (25.1 KB, 311 views)

Last edited by bl4nk; 09-21-2012 at 17:57.
bl4nk is offline